[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Instructions.cpp

Dan Gohman djg at cray.com
Thu Mar 22 09:39:28 PDT 2007



Changes in directory llvm/lib/VMCore:

AsmWriter.cpp updated: 1.264 -> 1.265
Instructions.cpp updated: 1.80 -> 1.81
---
Log message:

Change uses of Function::front to Function::getEntryBlock for readability.


---
Diffs of the changes:  (+2 -2)

 AsmWriter.cpp    |    2 +-
 Instructions.cpp |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.264 llvm/lib/VMCore/AsmWriter.cpp:1.265
--- llvm/lib/VMCore/AsmWriter.cpp:1.264	Mon Mar 19 13:32:53 2007
+++ llvm/lib/VMCore/AsmWriter.cpp	Thu Mar 22 11:38:57 2007
@@ -1036,7 +1036,7 @@
   if (BB->getParent() == 0)
     Out << "\t\t; Error: Block without parent!";
   else {
-    if (BB != &BB->getParent()->front()) {  // Not the entry block?
+    if (BB != &BB->getParent()->getEntryBlock()) {  // Not the entry block?
       // Output predecessors for the block...
       Out << "\t\t;";
       pred_const_iterator PI = pred_begin(BB), PE = pred_end(BB);


Index: llvm/lib/VMCore/Instructions.cpp
diff -u llvm/lib/VMCore/Instructions.cpp:1.80 llvm/lib/VMCore/Instructions.cpp:1.81
--- llvm/lib/VMCore/Instructions.cpp:1.80	Thu Mar  1 14:27:41 2007
+++ llvm/lib/VMCore/Instructions.cpp	Thu Mar 22 11:38:57 2007
@@ -170,7 +170,7 @@
   if (HasUndefInput && !AllowNonDominatingInstruction)
     if (Instruction *IV = dyn_cast<Instruction>(InVal))
       // If it's in the entry block, it dominates everything.
-      if (IV->getParent() != &IV->getParent()->getParent()->front() ||
+      if (IV->getParent() != &IV->getParent()->getParent()->getEntryBlock() ||
           isa<InvokeInst>(IV))
         return 0;   // Cannot guarantee that InVal dominates this PHINode.
 






More information about the llvm-commits mailing list