diff options
author | Dan Gohman <gohman@apple.com> | 2010-04-15 01:51:59 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-04-15 01:51:59 +0000 |
commit | bcaf681cdef13dcf4a863288c3329be96f96bd14 (patch) | |
tree | 74e33ebe55a3f42cbcab17b94b633920dc026367 /llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp | |
parent | 1bbc7086ff89a53b2c4e69e9d8bff959030cb5ed (diff) | |
download | bcm5719-llvm-bcaf681cdef13dcf4a863288c3329be96f96bd14.tar.gz bcm5719-llvm-bcaf681cdef13dcf4a863288c3329be96f96bd14.zip |
Add const qualifiers to CodeGen's use of LLVM IR constructs.
llvm-svn: 101334
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp index ab257fd1ddb..976965d8fd0 100644 --- a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -995,12 +995,13 @@ unsigned JITEmitter::GetSizeOfGlobalsInBytes(MachineFunction &MF) { for (unsigned CurOp = 0; CurOp < NumOps; CurOp++) { const MachineOperand &MO = MI.getOperand(CurOp); if (MO.isGlobal()) { - GlobalValue* V = MO.getGlobal(); + const GlobalValue* V = MO.getGlobal(); const GlobalVariable *GV = dyn_cast<const GlobalVariable>(V); if (!GV) continue; // If seen in previous function, it will have an entry here. - if (TheJIT->getPointerToGlobalIfAvailable(GV)) + if (TheJIT->getPointerToGlobalIfAvailable( + const_cast<GlobalVariable *>(GV))) continue; // If seen earlier in this function, it will have an entry here. // FIXME: it should be possible to combine these tables, by |