summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-11-05 22:08:08 +0000
committerJim Grosbach <grosbach@apple.com>2010-11-05 22:08:08 +0000
commit5a2c68d308067ad92b980a689d4d76b13aae2632 (patch)
tree75725880c1717f25415eeb3c6a0f7de0874a375f /llvm/lib/Target/ARM/ARMAsmPrinter.cpp
parenta4076924d1af2c23ae76390bfd49bf5ca695ec8b (diff)
downloadbcm5719-llvm-5a2c68d308067ad92b980a689d4d76b13aae2632.tar.gz
bcm5719-llvm-5a2c68d308067ad92b980a689d4d76b13aae2632.zip
MC'ize the '.code 16' and '.thumb_func' ARM directives.
llvm-svn: 118301
Diffstat (limited to 'llvm/lib/Target/ARM/ARMAsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMAsmPrinter.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
index 9327bb78c46..3908b1eeeb4 100644
--- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -299,17 +299,8 @@ namespace {
void ARMAsmPrinter::EmitFunctionEntryLabel() {
if (AFI->isThumbFunction()) {
- OutStreamer.EmitRawText(StringRef("\t.code\t16"));
- if (!Subtarget->isTargetDarwin())
- OutStreamer.EmitRawText(StringRef("\t.thumb_func"));
- else {
- // This needs to emit to a temporary string to get properly quoted
- // MCSymbols when they have spaces in them.
- SmallString<128> Tmp;
- raw_svector_ostream OS(Tmp);
- OS << "\t.thumb_func\t" << *CurrentFnSym;
- OutStreamer.EmitRawText(OS.str());
- }
+ OutStreamer.EmitAssemblerFlag(MCAF_Code16);
+ OutStreamer.EmitThumbFunc(Subtarget->isTargetDarwin()? CurrentFnSym : 0);
}
OutStreamer.EmitLabel(CurrentFnSym);
OpenPOWER on IntegriCloud