Rename getEntryNode -> getEntryBlock()
[oota-llvm.git] / include / llvm / ConstantHandling.h
index 2401ad7596b2b5ff7c7e7531bb03a69083844a89..66719cda8e5687294eb87f9e8f171373c432d5e4 100644 (file)
@@ -125,6 +125,12 @@ private:
   ConstRules &operator=(const ConstRules &);  // Do not implement
 };
 
+// Unary operators...
+inline Constant *operator~(const Constant &V) {
+  assert(V.getType()->isIntegral() && "Cannot invert non-intergral constant!");
+  return ConstRules::get(V, V)->op_xor(&V,
+                                    ConstantInt::getAllOnesValue(V.getType()));
+}
 
 // Standard binary operators...
 inline Constant *operator+(const Constant &V1, const Constant &V2) {