diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-10-16 18:29:00 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-10-16 18:29:00 +0000 |
| commit | 068ad840382360fa8eceb3192f3389d6b5ba98f8 (patch) | |
| tree | eb75d6e96d958dc2cf9f0c2b74ebaa8d2751a491 /llvm/lib/Target/X86/Printer.cpp | |
| parent | 2d05c60bac33d65c9f47b3de66534eeccab787e1 (diff) | |
| download | bcm5719-llvm-068ad840382360fa8eceb3192f3389d6b5ba98f8.tar.gz bcm5719-llvm-068ad840382360fa8eceb3192f3389d6b5ba98f8.zip | |
Add support for 'weak' linkage.
llvm-svn: 9171
Diffstat (limited to 'llvm/lib/Target/X86/Printer.cpp')
| -rw-r--r-- | llvm/lib/Target/X86/Printer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/Printer.cpp b/llvm/lib/Target/X86/Printer.cpp index fbc6b6e1aff..f8c006cfd1c 100644 --- a/llvm/lib/Target/X86/Printer.cpp +++ b/llvm/lib/Target/X86/Printer.cpp @@ -948,7 +948,8 @@ bool Printer::doFinalization(Module &M) { unsigned Align = TD.getTypeAlignment(C->getType()); if (C->isNullValue() && - (I->hasLinkOnceLinkage() || I->hasInternalLinkage())) { + (I->hasLinkOnceLinkage() || I->hasInternalLinkage() || + I->hasWeakLinkage() /* FIXME: Verify correct */)) { SwitchSection(O, CurSection, ".data"); if (I->hasInternalLinkage()) O << "\t.local " << name << "\n"; @@ -961,6 +962,7 @@ bool Printer::doFinalization(Module &M) { } else { switch (I->getLinkage()) { case GlobalValue::LinkOnceLinkage: + case GlobalValue::WeakLinkage: // FIXME: Verify correct for weak. // Nonnull linkonce -> weak O << "\t.weak " << name << "\n"; SwitchSection(O, CurSection, ""); |

