mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-13 23:20:41 +00:00
Don't output explicit initializers for globals that are zero initialized
llvm-svn: 6651
This commit is contained in:
parent
1a3c1a6208
commit
e9a9d85aee
@ -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…
x
Reference in New Issue
Block a user