on Function * when passing it to getPointerToFunction().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7818
91177308-0d34-0410-b5e6-
96231b3b80d8
// value. This may involve code generation if it's a function.
//
void *ExecutionEngine::getPointerToGlobal(const GlobalValue *GV) {
- if (const Function *F = dyn_cast<Function>(GV))
+ if (Function *F = const_cast<Function*>(dyn_cast<Function>(GV)))
return getPointerToFunction(F);
assert(GlobalAddress[GV] && "Global hasn't had an address allocated yet?");