aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2010-03-09 00:43:34 +0000
committerBill Wendling <isanbard@gmail.com>2010-03-09 00:43:34 +0000
commitcf6f28d84af09b38e96307007cd93760a7ca42d7 (patch)
tree17187c8ed0de91ba22202336686bfb42f13a7485
parentbecd83e3f4eb996f8e43189ce482267b3b8351a8 (diff)
downloadexternal_llvm-cf6f28d84af09b38e96307007cd93760a7ca42d7.zip
external_llvm-cf6f28d84af09b38e96307007cd93760a7ca42d7.tar.gz
external_llvm-cf6f28d84af09b38e96307007cd93760a7ca42d7.tar.bz2
Print blank line and clear stubs vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98019 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
index 0d52a0c..a18008e 100644
--- a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
@@ -1132,8 +1132,16 @@ void ARMAsmPrinter::EmitEndOfAsmFile(Module &M) {
// L_foo$stub:
OutStreamer.EmitLabel(Stubs[i].first);
// .indirect_symbol _foo
- OutStreamer.EmitSymbolAttribute(Stubs[i].second, MCSA_IndirectSymbol);
- OutStreamer.EmitIntValue(0, 4/*size*/, 0/*addrspace*/);
+ MCSymbol *MCSym = Stubs[i].second;
+ OutStreamer.EmitSymbolAttribute(MCSym, MCSA_IndirectSymbol);
+
+ if (MCSym->isUndefined())
+ // External to current translation unit.
+ OutStreamer.EmitIntValue(0, 4/*size*/, 0/*addrspace*/);
+ else
+ // Internal to current translation unit.
+ OutStreamer.EmitValue(MCSymbolRefExpr::Create(MCSym, OutContext),
+ 4/*size*/, 0/*addrspace*/);
}
Stubs.clear();
@@ -1152,6 +1160,9 @@ void ARMAsmPrinter::EmitEndOfAsmFile(Module &M) {
OutContext),
4/*size*/, 0/*addrspace*/);
}
+
+ Stubs.clear();
+ OutStreamer.AddBlankLine();
}
// Funny Darwin hack: This flag tells the linker that no global symbols