[llvm-commits] [llvm] r61465 - /llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp

Duncan Sands baldrick at free.fr
Mon Dec 29 00:05:21 PST 2008


Author: baldrick
Date: Mon Dec 29 02:05:02 2008
New Revision: 61465

URL: http://llvm.org/viewvc/llvm-project?rev=61465&view=rev
Log:
Add braces, as suggested by a gcc warning.

Modified:
    llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp

Modified: llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp?rev=61465&r1=61464&r2=61465&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp (original)
+++ llvm/trunk/lib/CodeGen/PreAllocSplitting.cpp Mon Dec 29 02:05:02 2008
@@ -701,12 +701,13 @@
         --walker;
         
     // Must check begin() too.
-    if (!found)
+    if (!found) {
       if (BlockUses.count(walker))
         found = true;
       else
         goto Fallback;
-    
+    }
+
     unsigned UseIndex = LIs->getInstructionIndex(walker);
     UseIndex = LiveIntervals::getUseIndex(UseIndex);
     unsigned EndIndex = 0;
@@ -753,14 +754,15 @@
         --walker;
         
     // Must check begin() too.
-    if (!foundDef && !foundUse)
+    if (!foundDef && !foundUse) {
       if (BlockDefs.count(walker))
         foundDef = true;
       else if (BlockUses.count(walker))
         foundUse = true;
       else
         goto Fallback;
-      
+    }
+
     unsigned StartIndex = LIs->getInstructionIndex(walker);
     StartIndex = foundDef ? LiveIntervals::getDefIndex(StartIndex) :
                             LiveIntervals::getUseIndex(StartIndex);





More information about the llvm-commits mailing list