diff options
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/Execution.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/UserInput.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp index 3ecc3ec0eab..d88d91ff1f9 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -25,7 +25,7 @@ static unsigned getOperandSlot(Value *V) { case Type::TY##TyID: Result.TY##Val = ((CLASS*)CPV)->getValue(); break static GenericValue getOperandValue(Value *V, ExecutionContext &SF) { - if (ConstPoolVal *CPV = V->castConstant()) { + if (ConstPoolVal *CPV = dyn_cast<ConstPoolVal>(V)) { GenericValue Result; switch (CPV->getType()->getPrimitiveID()) { GET_CONST_VAL(Bool , ConstPoolBool); @@ -48,7 +48,7 @@ static GenericValue getOperandValue(Value *V, ExecutionContext &SF) { } static void printOperandInfo(Value *V, ExecutionContext &SF) { - if (!V->isConstant()) { + if (!isa<ConstPoolVal>(V)) { unsigned TyP = V->getType()->getUniqueID(); // TypePlane for value unsigned Slot = getOperandSlot(V); cout << "Value=" << (void*)V << " TypeID=" << TyP << " Slot=" << Slot diff --git a/llvm/lib/ExecutionEngine/Interpreter/UserInput.cpp b/llvm/lib/ExecutionEngine/Interpreter/UserInput.cpp index eb5725feddc..e9fc9db3436 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/UserInput.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/UserInput.cpp @@ -134,7 +134,7 @@ bool Interpreter::callMethod(const string &Name) { vector<Value*> Options = LookupMatchingNames(Name); for (unsigned i = 0; i < Options.size(); ++i) { // Remove nonmethod matches... - if (!Options[i]->isMethod()) { + if (!isa<Method>(Options[i])) { Options.erase(Options.begin()+i); --i; } |