diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-08-09 18:56:35 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-08-09 18:56:35 +0000 |
commit | c6fbe5636da8906de295c3c5f36ab44fb768ae34 (patch) | |
tree | 93ee9fb3cd121c4c46e3644a7597784dc185a785 | |
parent | a0f596c1fc01d826687e4388b7fccd99cff8dc38 (diff) |
Revert r137134. It breaks some code as Eli pointed out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137135 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/CBackend/CBackend.cpp | 2 | ||||
-rw-r--r-- | test/CodeGen/CBackend/pr10081.ll | 11 |
2 files changed, 1 insertions, 12 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index e4ecb9e1c5..5b9a0a297f 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; diff --git a/test/CodeGen/CBackend/pr10081.ll b/test/CodeGen/CBackend/pr10081.ll deleted file mode 100644 index 723bf5c757..0000000000 --- a/test/CodeGen/CBackend/pr10081.ll +++ /dev/null @@ -1,11 +0,0 @@ -; RUN: llc < %s -march=c | grep {static float _ZL3foo} | count 1 -; PR10081 - -@_ZL3foo = internal global float 0.000000e+00, align 4 - -define float @_Z3barv() nounwind ssp { - %1 = load float* @_ZL3foo, align 4 - %2 = fadd float %1, 1.000000e+00 - store float %2, float* @_ZL3foo, align 4 - ret float %1 -} |