summaryrefslogtreecommitdiff
path: root/lib/TableGen/TGParser.cpp
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2011-10-19 13:04:26 +0000
committerDavid Greene <greened@obbligato.org>2011-10-19 13:04:26 +0000
commit8592b2b2a3dde4e5c8f00e855497f760ae94272f (patch)
tree3e40de32c1b09cc4fd366ca12ebecf49924a7fd2 /lib/TableGen/TGParser.cpp
parentbbec279d8eb0d7e27c2bf6e4da4f44286451d142 (diff)
downloadllvm-8592b2b2a3dde4e5c8f00e855497f760ae94272f.tar.gz
llvm-8592b2b2a3dde4e5c8f00e855497f760ae94272f.tar.bz2
llvm-8592b2b2a3dde4e5c8f00e855497f760ae94272f.tar.xz
Don't Parse Object Body as a Name
Stop parsing a value if we are in name parsing mode and we see a left brace. A left brace indicates the start of an object body when we are parsing a name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142521 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/TableGen/TGParser.cpp')
-rw-r--r--lib/TableGen/TGParser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp
index fdf88d86ec..828e77528c 100644
--- a/lib/TableGen/TGParser.cpp
+++ b/lib/TableGen/TGParser.cpp
@@ -1330,6 +1330,10 @@ Init *TGParser::ParseValue(Record *CurRec, RecTy *ItemType, IDParseMode Mode) {
switch (Lex.getCode()) {
default: return Result;
case tgtok::l_brace: {
+ if (Mode == ParseNameMode)
+ // This is the beginning of the object body.
+ return Result;
+
SMLoc CurlyLoc = Lex.getLoc();
Lex.Lex(); // eat the '{'
std::vector<unsigned> Ranges = ParseRangeList();