diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp index 93eed24b8dc..99fdc1f6e99 100644 --- a/lib/TableGen/Record.cpp +++ b/lib/TableGen/Record.cpp @@ -1699,7 +1699,7 @@ void Record::checkName() { assert(TypedName && "Record name is not typed!"); RecTy *Type = TypedName->getType(); if (dynamic_cast(Type) == 0) { - throw "Record name is not a string!"; + throw TGError(getLoc(), "Record name is not a string!"); } }