summaryrefslogtreecommitdiff
path: root/lib/MC/MCParser
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
commitf06cc981495991d2095ed4066f0eb9c0241c0a61 (patch)
tree1acfdbe8b25f0041db36a81bffc4d240dd0a0164 /lib/MC/MCParser
parent38dd366b307f45815cf03994242555376fa5b50c (diff)
downloadllvm-f06cc981495991d2095ed4066f0eb9c0241c0a61.tar.gz
llvm-f06cc981495991d2095ed4066f0eb9c0241c0a61.tar.bz2
llvm-f06cc981495991d2095ed4066f0eb9c0241c0a61.tar.xz
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179323 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCParser')
-rw-r--r--lib/MC/MCParser/AsmParser.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/MC/MCParser/AsmParser.cpp b/lib/MC/MCParser/AsmParser.cpp
index c50177cb0a..f34bbe90ed 100644
--- a/lib/MC/MCParser/AsmParser.cpp
+++ b/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.