diff options
author | Jim Grosbach <grosbach@apple.com> | 2010-11-05 22:33:53 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2010-11-05 22:33:53 +0000 |
commit | 642fc9c24ba7c43a4a962c6c05cfffce713d7de7 (patch) | |
tree | 8ba3529be6088e2cbcfdbd62ad1d62693e2e6e96 | |
parent | 83c4018fcca18fe9c281c3943fc58a17621636c4 (diff) | |
download | external_llvm-642fc9c24ba7c43a4a962c6c05cfffce713d7de7.zip external_llvm-642fc9c24ba7c43a4a962c6c05cfffce713d7de7.tar.gz external_llvm-642fc9c24ba7c43a4a962c6c05cfffce713d7de7.tar.bz2 |
Hook up the '.thumb_func' directive to the streamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118307 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index dffee21..2ebea1a 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -13,6 +13,7 @@ #include "llvm/MC/MCParser/MCAsmLexer.h" #include "llvm/MC/MCParser/MCAsmParser.h" #include "llvm/MC/MCParser/MCParsedAsmOperand.h" +#include "llvm/MC/MCContext.h" #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCInst.h" @@ -904,14 +905,15 @@ bool ARMAsmParser::ParseDirectiveThumbFunc(SMLoc L) { const AsmToken &Tok = Parser.getTok(); if (Tok.isNot(AsmToken::Identifier) && Tok.isNot(AsmToken::String)) return Error(L, "unexpected token in .thumb_func directive"); + StringRef Name = Tok.getString(); Parser.Lex(); // Consume the identifier token. - if (getLexer().isNot(AsmToken::EndOfStatement)) return Error(L, "unexpected token in directive"); Parser.Lex(); - // TODO: mark symbol as a thumb symbol - // getParser().getStreamer().Emit???(); + // Mark symbol as a thumb symbol. + MCSymbol *Func = getParser().getContext().GetOrCreateSymbol(Name); + getParser().getStreamer().EmitThumbFunc(Func); return false; } |