mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-31 17:42:40 +00:00
Bug fix: In preventing static global variables from being printed twice,
I also prevented external globals from being printed twice, but they should (extern declaration and definition). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4043 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3400837374
commit
2a408f06b5
@ -563,9 +563,8 @@ void CWriter::printModule(Module *M) {
|
||||
if (!M->gempty()) {
|
||||
Out << "\n\n/* Global Variable Definitions and Initialization */\n";
|
||||
for (Module::giterator I = M->gbegin(), E = M->gend(); I != E; ++I) {
|
||||
if (I->hasExternalLinkage())
|
||||
continue; // printed above!
|
||||
Out << "static ";
|
||||
if (I->hasInternalLinkage())
|
||||
Out << "static ";
|
||||
printType(I->getType()->getElementType(), getValueName(I));
|
||||
|
||||
if (I->hasInitializer()) {
|
||||
|
@ -563,9 +563,8 @@ void CWriter::printModule(Module *M) {
|
||||
if (!M->gempty()) {
|
||||
Out << "\n\n/* Global Variable Definitions and Initialization */\n";
|
||||
for (Module::giterator I = M->gbegin(), E = M->gend(); I != E; ++I) {
|
||||
if (I->hasExternalLinkage())
|
||||
continue; // printed above!
|
||||
Out << "static ";
|
||||
if (I->hasInternalLinkage())
|
||||
Out << "static ";
|
||||
printType(I->getType()->getElementType(), getValueName(I));
|
||||
|
||||
if (I->hasInitializer()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user