mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
Mark llvm::ConstantExpr::getAsInstruction as const
Summary: getAsInstruction is the only non-const member method. It is impossible to enforce const-correctness because of it. Reviewers: jmolloy, majnemer Reviewed By: jmolloy Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70113
This commit is contained in:
parent
380e3e814f
commit
ed10a34931
@ -1250,7 +1250,7 @@ public:
|
||||
/// which would take a ConstantExpr parameter, but that would have spread
|
||||
/// implementation details of ConstantExpr outside of Constants.cpp, which
|
||||
/// would make it harder to remove ConstantExprs altogether.
|
||||
Instruction *getAsInstruction();
|
||||
Instruction *getAsInstruction() const;
|
||||
|
||||
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||
static bool classof(const Value *V) {
|
||||
|
@ -3004,7 +3004,7 @@ Value *ConstantExpr::handleOperandChangeImpl(Value *From, Value *ToV) {
|
||||
NewOps, this, From, To, NumUpdated, OperandNo);
|
||||
}
|
||||
|
||||
Instruction *ConstantExpr::getAsInstruction() {
|
||||
Instruction *ConstantExpr::getAsInstruction() const {
|
||||
SmallVector<Value *, 4> ValueOperands(op_begin(), op_end());
|
||||
ArrayRef<Value*> Ops(ValueOperands);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user