Expose two new static methods from BinaryOperator: createNeg, createNot
authorChris Lattner <sabre@nondot.org>
Wed, 14 Aug 2002 17:51:29 +0000 (17:51 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 14 Aug 2002 17:51:29 +0000 (17:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3314 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/InstrTypes.h

index 8d1b5f1230dce8e8353c67a28e36c7d90f28a951..1d3bae6c7d61f6bc6bda39dae902e52da2dcb3e6 100644 (file)
@@ -116,7 +116,13 @@ public:
   static BinaryOperator *create(BinaryOps Op, Value *S1, Value *S2,
                                const std::string &Name = "");
 
-  inline BinaryOps getOpcode() const { 
+  // createNeg, createNot - Helper constructors that create the "neg" and "not"
+  // instructions out of "sub" and "xor" instructions.
+  //
+  static BinaryOperator *createNeg(Value *Op, const std::string &Name = "");
+  static BinaryOperator *createNot(Value *Op, const std::string &Name = "");
+
+  BinaryOps getOpcode() const { 
     return (BinaryOps)Instruction::getOpcode();
   }