[llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp

Reid Spencer reid at x10sys.com
Sun Apr 8 16:58:58 PDT 2007



Changes in directory llvm/lib/Bytecode/Reader:

Reader.cpp updated: 1.244 -> 1.245
---
Log message:

No functional change, this is just easier to read and debug.


---
Diffs of the changes:  (+10 -9)

 Reader.cpp |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)


Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.244 llvm/lib/Bytecode/Reader/Reader.cpp:1.245
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.244	Thu Mar 29 13:58:08 2007
+++ llvm/lib/Bytecode/Reader/Reader.cpp	Sun Apr  8 18:58:41 2007
@@ -276,16 +276,17 @@
     }
   }
 
-  if (GlobalTyID < ModuleValues.size() && ModuleValues[GlobalTyID]) {
-    if (Num < ModuleValues[GlobalTyID]->size())
-      return ModuleValues[GlobalTyID]->getOperand(Num);
-    Num -= ModuleValues[GlobalTyID]->size();
-  }
+  if (GlobalTyID < ModuleValues.size()) 
+    if (ValueList *Globals = ModuleValues[GlobalTyID]) {
+      if (Num < Globals->size())
+        return Globals->getOperand(Num);
+      Num -= Globals->size();
+    }
 
-  if (FunctionValues.size() > type &&
-      FunctionValues[type] &&
-      Num < FunctionValues[type]->size())
-    return FunctionValues[type]->getOperand(Num);
+  if (type < FunctionValues.size())
+    if (ValueList *Locals = FunctionValues[type])
+      if (Num < Locals->size())
+        return Locals->getOperand(Num);
 
   if (!Create) return 0;  // Do not create a placeholder?
 






More information about the llvm-commits mailing list