diff options
author | Jim Grosbach <grosbach@apple.com> | 2012-07-12 00:53:31 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2012-07-12 00:53:31 +0000 |
commit | d2aabd3bb2c8114bc143176a6e30a7e6d2b6d746 (patch) | |
tree | 993688009d7c13bce647b5c8c473aa9344d945a8 /llvm/lib | |
parent | 0e449c4e5494acb8c9e27ed2522d6fd23b88072c (diff) | |
download | bcm5719-llvm-d2aabd3bb2c8114bc143176a6e30a7e6d2b6d746.tar.gz bcm5719-llvm-d2aabd3bb2c8114bc143176a6e30a7e6d2b6d746.zip |
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
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/TableGen/Record.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp index 93eed24b8dc..99fdc1f6e99 100644 --- a/llvm/lib/TableGen/Record.cpp +++ b/llvm/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<StringRecTy *>(Type) == 0) { - throw "Record name is not a string!"; + throw TGError(getLoc(), "Record name is not a string!"); } } |