diff options
author | Craig Topper <craig.topper@sifive.com> | 2023-03-06 19:56:43 -0800 |
---|---|---|
committer | Craig Topper <craig.topper@sifive.com> | 2023-03-06 19:58:47 -0800 |
commit | c24fdc1834aea1f836fa15148ba0663a4de33337 (patch) | |
tree | 38e0c8d73bae63c5842e77e45484ba597fe18ff6 /llvm/lib/TableGen | |
parent | 6b3b2625851bbaff1ee28a6d23f98af02e395327 (diff) | |
download | llvm-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.cpp | 2 |
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; |