aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-06-20 05:02:56 +0000
committerChris Lattner <sabre@nondot.org>2004-06-20 05:02:56 +0000
commit762a76b891da04f508fec097169d354c9d41fcea (patch)
tree788700ce70455461a0b70f4901ef4dceec9beb91
parentcf5933a716e7eb6bd5ff49aa62f3e76379ebaf51 (diff)
Add methods like BinaryOperator::createAdd that take an instruction to insert
before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14261 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/InstrTypes.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h
index 723b354717..de90dc5bc7 100644
--- a/include/llvm/InstrTypes.h
+++ b/include/llvm/InstrTypes.h
@@ -122,6 +122,12 @@ public:
return create(Instruction::OPC, V1, V2, Name, BB);\
}
#include "llvm/Instruction.def"
+#define HANDLE_BINARY_INST(N, OPC, CLASS) \
+ static BinaryOperator *create##OPC(Value *V1, Value *V2, \
+ const std::string &Name, Instruction *I) {\
+ return create(Instruction::OPC, V1, V2, Name, I);\
+ }
+#include "llvm/Instruction.def"
/// Helper functions to construct and inspect unary operations (NEG and NOT)