diff options
| author | Jeff Cohen <jeffc@jolt-lang.org> | 2006-05-04 16:20:22 +0000 |
|---|---|---|
| committer | Jeff Cohen <jeffc@jolt-lang.org> | 2006-05-04 16:20:22 +0000 |
| commit | 06041abeb617be049c508a923ccfe5ac8c31f62d (patch) | |
| tree | f4627efbc07514659c9a25b2bc2ebf9459f08d4f /llvm/lib/Target | |
| parent | f812a4fa75eb6b2e13af05bffbad586c14587622 (diff) | |
| download | bcm5719-llvm-06041abeb617be049c508a923ccfe5ac8c31f62d.tar.gz bcm5719-llvm-06041abeb617be049c508a923ccfe5ac8c31f62d.zip | |
Make external globals public; other minor cleanup.
llvm-svn: 28096
Diffstat (limited to 'llvm/lib/Target')
| -rwxr-xr-x | llvm/lib/Target/X86/X86IntelAsmPrinter.cpp | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/llvm/lib/Target/X86/X86IntelAsmPrinter.cpp b/llvm/lib/Target/X86/X86IntelAsmPrinter.cpp index f9093da36d8..0c6c6b44458 100755 --- a/llvm/lib/Target/X86/X86IntelAsmPrinter.cpp +++ b/llvm/lib/Target/X86/X86IntelAsmPrinter.cpp @@ -24,20 +24,6 @@ using namespace llvm; X86IntelAsmPrinter::X86IntelAsmPrinter(std::ostream &O, X86TargetMachine &TM) : X86SharedAsmPrinter(O, TM) { - CommentString = ";"; - GlobalPrefix = "_"; - PrivateGlobalPrefix = "$"; - AlignDirective = "\talign\t"; - MLSections = true; - ZeroDirective = "\tdb\t"; - ZeroDirectiveSuffix = " dup(0)"; - AsciiDirective = "\tdb\t"; - AscizDirective = 0; - Data8bitsDirective = "\t.db\t"; - Data16bitsDirective = "\t.dw\t"; - Data32bitsDirective = "\t.dd\t"; - Data64bitsDirective = "\t.dq\t"; - HasDotTypeDotSizeDirective = false; } /// runOnMachineFunction - This uses the printMachineInstruction() @@ -413,8 +399,22 @@ void X86IntelAsmPrinter::printMachineInstruction(const MachineInstr *MI) { bool X86IntelAsmPrinter::doInitialization(Module &M) { X86SharedAsmPrinter::doInitialization(M); + CommentString = ";"; + GlobalPrefix = "_"; + PrivateGlobalPrefix = "$"; + AlignDirective = "\talign\t"; + MLSections = true; + ZeroDirective = "\tdb\t"; + ZeroDirectiveSuffix = " dup(0)"; + AsciiDirective = "\tdb\t"; + AscizDirective = 0; + Data8bitsDirective = "\t.db\t"; + Data16bitsDirective = "\t.dw\t"; + Data32bitsDirective = "\t.dd\t"; + Data64bitsDirective = "\t.dq\t"; + HasDotTypeDotSizeDirective = false; Mang->markCharUnacceptable('.'); - PrivateGlobalPrefix = "$"; // need this here too :( + O << "\t.686\n\t.model flat\n\n"; // Emit declarations for external functions. @@ -427,6 +427,8 @@ bool X86IntelAsmPrinter::doInitialization(Module &M) { I != E; ++I) { if (I->isExternal()) O << "\textern " << Mang->getValueName(I) << ":byte\n"; + else if (I->getLinkage() == GlobalValue::ExternalLinkage) + O << "\tpublic " << Mang->getValueName(I) << "\n"; } return false; |

