Revert r137134. It breaks some code as Eli pointed out.
authorBill Wendling <isanbard@gmail.com>
Tue, 9 Aug 2011 18:56:35 +0000 (18:56 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 9 Aug 2011 18:56:35 +0000 (18:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137135 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp
test/CodeGen/CBackend/pr10081.ll [deleted file]

index e4ecb9e1c564147710f8cd68874c1eb6bd57c757..5b9a0a297fb31fa2c49d4982594d7c72767f0b20 100644 (file)
@@ -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 (file)
index 723bf5c..0000000
+++ /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
-}