Don't print out global names unnecesssarily. Also, expose pass

constructors so passes can be inserted by TargetMachine.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3742 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Vikram S. Adve 2002-09-16 15:54:02 +00:00
parent ebc7511e86
commit 13f1d71c80

View File

@ -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);
}