summaryrefslogtreecommitdiff
path: root/lib/TableGen
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2011-10-19 13:02:52 +0000
committerDavid Greene <greened@obbligato.org>2011-10-19 13:02:52 +0000
commite681d284f96333cef7774c6cc3dd862526af2282 (patch)
tree3b1937f33b89fd3c7f57fd5812816fd3c6f50a3a /lib/TableGen
parent0615d6aac810059a37fbced0f315cce75476da49 (diff)
downloadllvm-e681d284f96333cef7774c6cc3dd862526af2282.tar.gz
llvm-e681d284f96333cef7774c6cc3dd862526af2282.tar.bz2
llvm-e681d284f96333cef7774c6cc3dd862526af2282.tar.xz
Fix Name Access
Ask for the record name as a string explicitly to avoid a potential assert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/TableGen')
-rw-r--r--lib/TableGen/Record.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp
index 4f38e144d9..049148c388 100644
--- a/lib/TableGen/Record.cpp
+++ b/lib/TableGen/Record.cpp
@@ -1674,7 +1674,7 @@ void RecordVal::dump() const { errs() << *this; }
void RecordVal::print(raw_ostream &OS, bool PrintSem) const {
if (getPrefix()) OS << "field ";
- OS << *getType() << " " << getName();
+ OS << *getType() << " " << getNameInitAsString();
if (getValue())
OS << " = " << *getValue();