aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/TableGen
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2023-03-06 19:56:43 -0800
committerCraig Topper <craig.topper@sifive.com>2023-03-06 19:58:47 -0800
commitc24fdc1834aea1f836fa15148ba0663a4de33337 (patch)
tree38e0c8d73bae63c5842e77e45484ba597fe18ff6 /llvm/lib/TableGen
parent6b3b2625851bbaff1ee28a6d23f98af02e395327 (diff)
downloadllvm-c24fdc1834aea1f836fa15148ba0663a4de33337.zip
llvm-c24fdc1834aea1f836fa15148ba0663a4de33337.tar.gz
llvm-c24fdc1834aea1f836fa15148ba0663a4de33337.tar.bz2
[TableGen] Fix error message that called Record::getName on a possibly anonymous record.
Record::getName only works for named records. Use getNameInitAsString to handle anonymous records without crashing.
Diffstat (limited to 'llvm/lib/TableGen')
-rw-r--r--llvm/lib/TableGen/Record.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp
index 654857f..363bf7b 100644
--- a/llvm/lib/TableGen/Record.cpp
+++ b/llvm/lib/TableGen/Record.cpp
@@ -2259,7 +2259,7 @@ Init *CondOpInit::Fold(Record *CurRec) const {
}
PrintFatalError(CurRec->getLoc(),
- CurRec->getName() +
+ CurRec->getNameInitAsString() +
" does not have any true condition in:" +
this->getAsString());
return nullptr;