move ExtWeakSymbols to AsmPrinter

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32648 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2006-12-18 03:37:18 +00:00
parent 0be3ed886c
commit 15404d060b
7 changed files with 23 additions and 39 deletions

View File

@@ -250,7 +250,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
// reference!
if (const GlobalValue *GV = dyn_cast<GlobalValue>(C))
if (GV->hasExternalWeakLinkage())
ExtWeakSymbols.insert(Mang->getValueName(GV));
ExtWeakSymbols.insert(GV);
EmitGlobalConstant(C);
O << '\n';
@@ -278,15 +278,6 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
O << "\t.ascii \" -export:" << *i << "\"\n";
}
if (TAI->getWeakRefDirective()) {
if (ExtWeakSymbols.begin() != ExtWeakSymbols.end())
SwitchToDataSection("");
for (std::set<std::string>::iterator i = ExtWeakSymbols.begin(),
e = ExtWeakSymbols.end(); i != e; ++i) {
O << TAI->getWeakRefDirective() << *i << "\n";
}
}
if (Subtarget->isTargetDarwin()) {
SwitchToDataSection("");