mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-02 15:51:54 +00:00
TableGen: Location information for diagnostic.
def Pat<...>; Results in 'record name is not a string!' diagnostic. Not the best, but the lack of location information moves it from not very helpful into completely useless. We're in the Record class when throwing the error, so just add the location info directly. llvm-svn: 160098
This commit is contained in:
parent
6b6d3e2854
commit
89caeb3736
@ -1699,7 +1699,7 @@ void Record::checkName() {
|
||||
assert(TypedName && "Record name is not typed!");
|
||||
RecTy *Type = TypedName->getType();
|
||||
if (dynamic_cast<StringRecTy *>(Type) == 0) {
|
||||
throw "Record name is not a string!";
|
||||
throw TGError(getLoc(), "Record name is not a string!");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user