mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-26 21:20:37 +00:00
Use the new method, though noone currently implements it any better than before
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10320 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
18cb4c3c74
commit
38f0ebad9a
@ -150,7 +150,11 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
|
||||
if (isa<ConstantPointerNull>(C)) {
|
||||
Result.PointerVal = 0;
|
||||
} else if (const ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(C)){
|
||||
Result = PTOGV(getPointerToGlobal(CPR->getValue()));
|
||||
if (Function *F =
|
||||
const_cast<Function*>(dyn_cast<Function>(CPR->getValue())))
|
||||
Result = PTOGV(getPointerToFunctionOrStub(F));
|
||||
else
|
||||
Result = PTOGV(getPointerToGlobal(CPR->getValue()));
|
||||
|
||||
} else {
|
||||
assert(0 && "Unknown constant pointer type!");
|
||||
|
Loading…
Reference in New Issue
Block a user