mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Fix bug: CBackend/2002-10-16-External.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4201 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8de3fc6f2d
commit
e8e035b591
@ -572,17 +572,16 @@ void CWriter::printModule(Module *M) {
|
||||
// Output the global variable definitions and contents...
|
||||
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->hasInternalLinkage())
|
||||
Out << "static ";
|
||||
printType(I->getType()->getElementType(), getValueName(I));
|
||||
for (Module::giterator I = M->gbegin(), E = M->gend(); I != E; ++I)
|
||||
if (!I->isExternal()) {
|
||||
if (I->hasInternalLinkage())
|
||||
Out << "static ";
|
||||
printType(I->getType()->getElementType(), getValueName(I));
|
||||
|
||||
if (I->hasInitializer()) {
|
||||
Out << " = " ;
|
||||
writeOperand(I->getInitializer());
|
||||
Out << ";\n";
|
||||
}
|
||||
Out << ";\n";
|
||||
}
|
||||
}
|
||||
|
||||
// Output all of the functions...
|
||||
|
@ -572,17 +572,16 @@ void CWriter::printModule(Module *M) {
|
||||
// Output the global variable definitions and contents...
|
||||
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->hasInternalLinkage())
|
||||
Out << "static ";
|
||||
printType(I->getType()->getElementType(), getValueName(I));
|
||||
for (Module::giterator I = M->gbegin(), E = M->gend(); I != E; ++I)
|
||||
if (!I->isExternal()) {
|
||||
if (I->hasInternalLinkage())
|
||||
Out << "static ";
|
||||
printType(I->getType()->getElementType(), getValueName(I));
|
||||
|
||||
if (I->hasInitializer()) {
|
||||
Out << " = " ;
|
||||
writeOperand(I->getInitializer());
|
||||
Out << ";\n";
|
||||
}
|
||||
Out << ";\n";
|
||||
}
|
||||
}
|
||||
|
||||
// Output all of the functions...
|
||||
|
Loading…
x
Reference in New Issue
Block a user