summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Constants.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index b7d1a488f5..3308499192 100644
--- a/include/llvm/Constants.h
+++ b/include/llvm/Constants.h
@@ -1076,6 +1076,16 @@ public:
/// current one.
Constant *getWithOperands(ArrayRef<Constant*> Ops, Type *Ty) const;
+ /// getAsInstruction - Returns an Instruction which implements the same operation
+ /// as this ConstantExpr. The instruction is not linked to any basic block.
+ ///
+ /// A better approach to this could be to have a constructor for Instruction
+ /// which would take a ConstantExpr parameter, but that would have spread
+ /// implementation details of ConstantExpr outside of Constants.cpp, which
+ /// would make it harded to remove ConstantExprs altogether
+ /// (http://llvm.org/bugs/show_bug.cgi?id=10368).
+ Instruction *getAsInstruction();
+
virtual void destroyConstant();
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To, Use *U);