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 | 46510a73e977273ec67747eb34cbdb43f815e451 (patch) | |
tree | 77f85024abba153c97d6af9aa800ad53b20c4fd2 /lib/ExecutionEngine/JIT/JITEmitter.cpp | |
parent | cff6f85454034b9df419e5a1ee9244e086e84f1f (diff) |
Add const qualifiers to CodeGen's use of LLVM IR constructs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101334 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/JIT/JITEmitter.cpp')
-rw-r--r-- | lib/ExecutionEngine/JIT/JITEmitter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp index ab257fd1dd..976965d8fd 100644 --- a/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/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 |