diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-08-09 18:31:50 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-08-09 18:31:50 +0000 |
commit | a0f596c1fc01d826687e4388b7fccd99cff8dc38 (patch) | |
tree | 85ad84bd71785b53965d1ddb6d37d67bab40e9a7 /lib/Target/CBackend/CBackend.cpp | |
parent | 4a74b3b933e2944ff313dc5d24da6f9e8ec4c1c4 (diff) |
Print out the variable declaration only if it is a declaration. Otherwise, a
'static' variable will be emitted twice.
PR10081
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137134 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CBackend/CBackend.cpp')
-rw-r--r-- | lib/Target/CBackend/CBackend.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 5b9a0a297f..e4ecb9e1c5 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -1817,7 +1817,7 @@ bool CWriter::doInitialization(Module &M) { Out << "\n\n/* Global Variable Declarations */\n"; for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I) - if (!I->isDeclaration()) { + if (I->isDeclaration()) { // Ignore special globals, such as debug info. if (getGlobalVariableClass(I)) continue; |