summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mc/AsmParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-mc/AsmParser.cpp')
-rw-r--r--llvm/tools/llvm-mc/AsmParser.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/tools/llvm-mc/AsmParser.cpp b/llvm/tools/llvm-mc/AsmParser.cpp
index 4dd136d0086..ca0b9338415 100644
--- a/llvm/tools/llvm-mc/AsmParser.cpp
+++ b/llvm/tools/llvm-mc/AsmParser.cpp
@@ -185,6 +185,12 @@ bool AsmParser::ParseStatement() {
if (Lexer.Lex() == asmtok::Colon) {
// identifier ':' -> Label.
Lexer.Lex();
+
+ // Since we saw a label, create a symbol and emit it.
+ // FIXME: If the label starts with L it is an assembler temporary label.
+ // Why does the client of this api need to know this?
+ Out.EmitLabel(Ctx.GetOrCreateSymbol(IDVal));
+
return ParseStatement();
}
OpenPOWER on IntegriCloud