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

Chris Lattner sabre at nondot.org
Thu Oct 19 17:27:21 PDT 2006



Changes in directory llvm/include/llvm:

Constant.h updated: 1.31 -> 1.32
---
Log message:

add a method to determine whether evaluation of a constant can trap.


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

 Constant.h |    4 ++++
 1 files changed, 4 insertions(+)


Index: llvm/include/llvm/Constant.h
diff -u llvm/include/llvm/Constant.h:1.31 llvm/include/llvm/Constant.h:1.32
--- llvm/include/llvm/Constant.h:1.31	Wed Sep 27 19:37:43 2006
+++ llvm/include/llvm/Constant.h	Thu Oct 19 19:27:06 2006
@@ -54,6 +54,10 @@
   virtual bool isNullValue() const = 0;
 
   virtual void print(std::ostream &O) const;
+  
+  /// canTrap - Return true if evaluation of this constant could trap.  This is
+  /// true for things like constant expressions that could divide by zero.
+  bool canTrap() const;
 
   // Specialize get/setOperand for Constant's as their operands are always
   // constants as well.






More information about the llvm-commits mailing list