summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCParser/AsmParser.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2013-04-11 21:49:30 +0000
committerChad Rosier <mcrosier@apple.com>2013-04-11 21:49:30 +0000
commit8fb83300692540d548fb05e716700392b1d819cd (patch)
tree1c7f282e4ecfd71a1c57e70655580170939e2b5c /llvm/lib/MC/MCParser/AsmParser.cpp
parent6bda0db299546495492e5d4aa1e49bd09caa84bb (diff)
downloadbcm5719-llvm-8fb83300692540d548fb05e716700392b1d819cd.tar.gz
bcm5719-llvm-8fb83300692540d548fb05e716700392b1d819cd.zip
[ms-inline asm] Remove brackets from around a symbol reference in the target
specific logic. This makes the code much less fragile. Test case coming on the clang side in a moment. rdar://13634327 llvm-svn: 179323
Diffstat (limited to 'llvm/lib/MC/MCParser/AsmParser.cpp')
-rw-r--r--llvm/lib/MC/MCParser/AsmParser.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp
index c50177cb0a4..f34bbe90ed9 100644
--- a/llvm/lib/MC/MCParser/AsmParser.cpp
+++ b/llvm/lib/MC/MCParser/AsmParser.cpp
@@ -4196,12 +4196,8 @@ AsmParser::parseMSInlineAsm(void *AsmLoc, std::string &AsmString,
// Emit everything up to the immediate/expression.
unsigned Len = Loc - AsmStart;
- if (Len) {
- // For Input/Output operands we need to remove the brackets, if present.
- if ((Kind == AOK_Input || Kind == AOK_Output) && Loc[-1] == '[')
- --Len;
+ if (Len)
OS << StringRef(AsmStart, Len);
- }
// Skip the original expression.
if (Kind == AOK_Skip) {
@@ -4255,11 +4251,6 @@ AsmParser::parseMSInlineAsm(void *AsmLoc, std::string &AsmString,
// Skip the original expression.
AsmStart = Loc + (*I).Len + AdditionalSkip;
-
- // For Input/Output operands we need to remove the brackets, if present.
- if ((Kind == AOK_Input || Kind == AOK_Output) && AsmStart != AsmEnd &&
- *AsmStart == ']')
- ++AsmStart;
}
// Emit the remainder of the asm string.
OpenPOWER on IntegriCloud