diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-01-13 03:16:35 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-01-13 03:16:35 +0000 |
commit | ebaf92c67dac4974f98a08f8096d3eb2f4edd09d (patch) | |
tree | 0b6bd99eaa776f048d2d5f10cde189cf7f177e63 /lib/TableGen/TGParser.cpp | |
parent | c4b527ac06c8e2e7c43020a56f000a53ab1dc9de (diff) | |
download | external_llvm-ebaf92c67dac4974f98a08f8096d3eb2f4edd09d.zip external_llvm-ebaf92c67dac4974f98a08f8096d3eb2f4edd09d.tar.gz external_llvm-ebaf92c67dac4974f98a08f8096d3eb2f4edd09d.tar.bz2 |
Use uniqued StringInit pointers for lookups.
This avoids a gazillion StringMap and dynamic_cast calls, making
TableGen run 3x faster.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148091 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/TableGen/TGParser.cpp')
-rw-r--r-- | lib/TableGen/TGParser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp index 8bcb029..5c13af1 100644 --- a/lib/TableGen/TGParser.cpp +++ b/lib/TableGen/TGParser.cpp @@ -64,7 +64,7 @@ bool TGParser::AddValue(Record *CurRec, SMLoc Loc, const RecordVal &RV) { if (CurRec == 0) CurRec = &CurMultiClass->Rec; - if (RecordVal *ERV = CurRec->getValue(RV.getName())) { + if (RecordVal *ERV = CurRec->getValue(RV.getNameInit())) { // The value already exists in the class, treat this as a set. if (ERV->setValue(RV.getValue())) return Error(Loc, "New definition of '" + RV.getName() + "' of type '" + |