aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/XCore/XCoreAsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-06-24 18:52:01 +0000
committerChris Lattner <sabre@nondot.org>2009-06-24 18:52:01 +0000
commit0a7befa8bd56621f51eaf9196417b866962bf7b1 (patch)
tree5808b5fa5af5308c7c5fd91e4fbf134836ff36e4 /lib/Target/XCore/XCoreAsmPrinter.cpp
parent52cff8352622c38a1ab95daffca92a45f81ef02a (diff)
downloadexternal_llvm-0a7befa8bd56621f51eaf9196417b866962bf7b1.tar.gz
external_llvm-0a7befa8bd56621f51eaf9196417b866962bf7b1.tar.bz2
external_llvm-0a7befa8bd56621f51eaf9196417b866962bf7b1.zip
eliminate the ExtWeakSymbols set from AsmPrinter. This eliminates
a bunch of code from all the targets, and eliminates nondeterministic ordering of directives being emitted in the output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74096 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore/XCoreAsmPrinter.cpp')
-rw-r--r--lib/Target/XCore/XCoreAsmPrinter.cpp29
1 files changed, 2 insertions, 27 deletions
diff --git a/lib/Target/XCore/XCoreAsmPrinter.cpp b/lib/Target/XCore/XCoreAsmPrinter.cpp
index ed4c101843..b87d88fb99 100644
--- a/lib/Target/XCore/XCoreAsmPrinter.cpp
+++ b/lib/Target/XCore/XCoreAsmPrinter.cpp
@@ -244,9 +244,6 @@ emitGlobal(const GlobalVariable *GV)
// Mark the end of the global
O << "\t.cc_bottom " << name << ".data\n";
- } else {
- if (GV->hasExternalWeakLinkage())
- ExtWeakSymbols.insert(GV);
}
}
@@ -375,12 +372,7 @@ void XCoreAsmPrinter::printOperand(const MachineInstr *MI, int opNum) {
printBasicBlockLabel(MO.getMBB());
break;
case MachineOperand::MO_GlobalAddress:
- {
- const GlobalValue *GV = MO.getGlobal();
- O << Mang->getValueName(GV);
- if (GV->hasExternalWeakLinkage())
- ExtWeakSymbols.insert(GV);
- }
+ O << Mang->getValueName(MO.getGlobal());
break;
case MachineOperand::MO_ExternalSymbol:
O << MO.getSymbolName();
@@ -430,25 +422,8 @@ bool XCoreAsmPrinter::doInitialization(Module &M) {
bool Result = AsmPrinter::doInitialization(M);
DW = getAnalysisIfAvailable<DwarfWriter>();
- if (!FileDirective.empty()) {
+ if (!FileDirective.empty())
emitFileDirective(FileDirective);
- }
-
- // Print out type strings for external functions here
- for (Module::const_iterator I = M.begin(), E = M.end();
- I != E; ++I) {
- if (I->isDeclaration() && !I->isIntrinsic()) {
- switch (I->getLinkage()) {
- default:
- assert(0 && "Unexpected linkage");
- case Function::ExternalWeakLinkage:
- ExtWeakSymbols.insert(I);
- // fallthrough
- case Function::ExternalLinkage:
- break;
- }
- }
- }
return Result;
}