diff options
| author | Dale Johannesen <dalej@apple.com> | 2008-05-14 20:12:51 +0000 |
|---|---|---|
| committer | Dale Johannesen <dalej@apple.com> | 2008-05-14 20:12:51 +0000 |
| commit | ce4396bc92640e84cb8aa55e424f11341a3f1e3b (patch) | |
| tree | e49fb307951b1f7cfdf182eee611d01333dc00df /llvm/lib/Target/Mips/MipsAsmPrinter.cpp | |
| parent | e94e0f66cdd503e02936f0705ddf74ed9bf44e0c (diff) | |
| download | bcm5719-llvm-ce4396bc92640e84cb8aa55e424f11341a3f1e3b.tar.gz bcm5719-llvm-ce4396bc92640e84cb8aa55e424f11341a3f1e3b.zip | |
Add CommonLinkage; currently tentative definitions
are represented as "weak", but there are subtle differences
in some cases on Darwin, so we need both. The intent
is that "common" will behave identically to "weak" unless
somebody changes their target to do something else.
No functional change as yet.
llvm-svn: 51118
Diffstat (limited to 'llvm/lib/Target/Mips/MipsAsmPrinter.cpp')
| -rw-r--r-- | llvm/lib/Target/Mips/MipsAsmPrinter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp index 6c0c908ae7b..6ae6104cb29 100644 --- a/llvm/lib/Target/Mips/MipsAsmPrinter.cpp +++ b/llvm/lib/Target/Mips/MipsAsmPrinter.cpp @@ -461,7 +461,8 @@ doFinalization(Module &M) // Is this correct ? if (C->isNullValue() && (I->hasLinkOnceLinkage() || - I->hasInternalLinkage() || I->hasWeakLinkage())) + I->hasInternalLinkage() || I->hasWeakLinkage() || + I->hasCommonLinkage())) { if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it. @@ -487,7 +488,8 @@ doFinalization(Module &M) switch (I->getLinkage()) { case GlobalValue::LinkOnceLinkage: - case GlobalValue::WeakLinkage: + case GlobalValue::CommonLinkage: + case GlobalValue::WeakLinkage: // FIXME: Verify correct for weak. // Nonnull linkonce -> weak O << "\t.weak " << name << "\n"; |

