[llvm-commits] CVS: llvm/include/llvm/Instructions.h

Chris Lattner sabre at nondot.org
Fri Apr 13 17:13:20 PDT 2007



Changes in directory llvm/include/llvm:

Instructions.h updated: 1.65 -> 1.66
---
Log message:

add GetElementPtrInst::hasAllZeroIndices, a long-overdue helper method.
Writing it twice in the same day was too much for me.


---
Diffs of the changes:  (+5 -0)

 Instructions.h |    5 +++++
 1 files changed, 5 insertions(+)


Index: llvm/include/llvm/Instructions.h
diff -u llvm/include/llvm/Instructions.h:1.65 llvm/include/llvm/Instructions.h:1.66
--- llvm/include/llvm/Instructions.h:1.65	Mon Apr  9 13:00:57 2007
+++ llvm/include/llvm/Instructions.h	Fri Apr 13 19:12:57 2007
@@ -408,6 +408,11 @@
   inline bool hasIndices() const {
     return getNumOperands() > 1;
   }
+  
+  /// hasAllZeroIndices - Return true if all of the indices of this GEP are
+  /// zeros.  If so, the result pointer and the first operand have the same
+  /// value, just potentially different types.
+  bool hasAllZeroIndices() const;
 
   // Methods for support type inquiry through isa, cast, and dyn_cast:
   static inline bool classof(const GetElementPtrInst *) { return true; }






More information about the llvm-commits mailing list