mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
Don't output explicit initializers for globals that are zero initialized
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6651 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4e8c999518
commit
940b08dd1e
@ -73,7 +73,6 @@ namespace {
|
||||
void printModule(Module *M);
|
||||
void printSymbolTable(const SymbolTable &ST);
|
||||
void printContainedStructs(const Type *Ty, std::set<const StructType *> &);
|
||||
void printGlobal(const GlobalVariable *GV);
|
||||
void printFunctionSignature(const Function *F, bool Prototype);
|
||||
|
||||
void printFunction(Function *);
|
||||
@ -619,9 +618,10 @@ void CWriter::printModule(Module *M) {
|
||||
if (I->hasInternalLinkage())
|
||||
Out << "static ";
|
||||
printType(Out, I->getType()->getElementType(), getValueName(I));
|
||||
|
||||
Out << " = " ;
|
||||
writeOperand(I->getInitializer());
|
||||
if (!I->getInitializer()->isNullValue()) {
|
||||
Out << " = " ;
|
||||
writeOperand(I->getInitializer());
|
||||
}
|
||||
Out << ";\n";
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +73,6 @@ namespace {
|
||||
void printModule(Module *M);
|
||||
void printSymbolTable(const SymbolTable &ST);
|
||||
void printContainedStructs(const Type *Ty, std::set<const StructType *> &);
|
||||
void printGlobal(const GlobalVariable *GV);
|
||||
void printFunctionSignature(const Function *F, bool Prototype);
|
||||
|
||||
void printFunction(Function *);
|
||||
@ -619,9 +618,10 @@ void CWriter::printModule(Module *M) {
|
||||
if (I->hasInternalLinkage())
|
||||
Out << "static ";
|
||||
printType(Out, I->getType()->getElementType(), getValueName(I));
|
||||
|
||||
Out << " = " ;
|
||||
writeOperand(I->getInitializer());
|
||||
if (!I->getInitializer()->isNullValue()) {
|
||||
Out << " = " ;
|
||||
writeOperand(I->getInitializer());
|
||||
}
|
||||
Out << ";\n";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user