In ExecutionEngine::getPointerToGlobal(), throw away const qualifier

on Function * when passing it to getPointerToFunction().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7818 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Brian Gaeke 2003-08-13 18:16:14 +00:00
parent b428654076
commit 37df460874

View File

@ -22,7 +22,7 @@ Statistic<> NumInitBytes("lli", "Number of bytes of global vars initialized");
// value. This may involve code generation if it's a function. // value. This may involve code generation if it's a function.
// //
void *ExecutionEngine::getPointerToGlobal(const GlobalValue *GV) { 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); return getPointerToFunction(F);
assert(GlobalAddress[GV] && "Global hasn't had an address allocated yet?"); assert(GlobalAddress[GV] && "Global hasn't had an address allocated yet?");