diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-09-16 15:54:02 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-09-16 15:54:02 +0000 |
commit | 8cbdbd8e2ed3bc9f0ac1ed1096553364698ce1f6 (patch) | |
tree | d4d96bca0c8532e2088c45d992cbf6e83a539a52 /llvm/lib/Target/Sparc/EmitAssembly.cpp | |
parent | 4f5bad8d2eb39fd0a3578904c0726b2950548481 (diff) | |
download | bcm5719-llvm-8cbdbd8e2ed3bc9f0ac1ed1096553364698ce1f6.tar.gz bcm5719-llvm-8cbdbd8e2ed3bc9f0ac1ed1096553364698ce1f6.zip |
Don't print out global names unnecesssarily. Also, expose pass
constructors so passes can be inserted by TargetMachine.cpp.
llvm-svn: 3742
Diffstat (limited to 'llvm/lib/Target/Sparc/EmitAssembly.cpp')
-rw-r--r-- | llvm/lib/Target/Sparc/EmitAssembly.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/Sparc/EmitAssembly.cpp b/llvm/lib/Target/Sparc/EmitAssembly.cpp index 9520d58b301..9822ae80b95 100644 --- a/llvm/lib/Target/Sparc/EmitAssembly.cpp +++ b/llvm/lib/Target/Sparc/EmitAssembly.cpp @@ -508,7 +508,7 @@ SparcFunctionAsmPrinter::emitFunction(const Function &F) } // End anonymous namespace -Pass *UltraSparc::getFunctionAsmPrinterPass(PassManager &PM, std::ostream &Out){ +Pass *UltraSparc::getFunctionAsmPrinterPass(std::ostream &Out) { return new SparcFunctionAsmPrinter(Out, *this); } @@ -830,7 +830,8 @@ void SparcModuleAsmPrinter::FoldConstants(const Module &M, void SparcModuleAsmPrinter::printGlobalVariable(const GlobalVariable* GV) { - toAsm << "\t.global\t" << getID(GV) << "\n"; + if (GV->hasExternalLinkage()) + toAsm << "\t.global\t" << getID(GV) << "\n"; if (GV->hasInitializer()) printConstant(GV->getInitializer(), getID(GV)); @@ -879,6 +880,6 @@ void SparcModuleAsmPrinter::emitGlobalsAndConstants(const Module &M) { } // End anonymous namespace -Pass *UltraSparc::getModuleAsmPrinterPass(PassManager &PM, std::ostream &Out) { +Pass *UltraSparc::getModuleAsmPrinterPass(std::ostream &Out) { return new SparcModuleAsmPrinter(Out, *this); } |