summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitb8a7c9d0bf9f064c349fc522f59e34d2ada5dfd7 (patch)
tree04fdc1bc2a8a1c4509c675eceeac412a76ee0132 /llvm/lib/TableGen/TGParser.cpp
parent232bd6017cf877d7b5f10dd48d50d2acbd321a95 (diff)
downloadbcm5719-llvm-b8a7c9d0bf9f064c349fc522f59e34d2ada5dfd7.tar.gz
bcm5719-llvm-b8a7c9d0bf9f064c349fc522f59e34d2ada5dfd7.zip
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. llvm-svn: 142521
Diffstat (limited to 'llvm/lib/TableGen/TGParser.cpp')
-rw-r--r--llvm/lib/TableGen/TGParser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp
index fdf88d86ec4..828e77528c1 100644
--- a/llvm/lib/TableGen/TGParser.cpp
+++ b/llvm/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();
OpenPOWER on IntegriCloud