aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-06-06 19:47:08 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-06-06 19:47:08 +0000
commit95a9d937728ca9cf2bf44f86ff1184df318b3bd7 (patch)
tree77b5cf196dfbbd2ec36581c239d67d5632540710 /lib/ExecutionEngine
parenta7542d5f870c5d98960d1676e23ac1d1d975d7e5 (diff)
downloadexternal_llvm-95a9d937728ca9cf2bf44f86ff1184df318b3bd7.zip
external_llvm-95a9d937728ca9cf2bf44f86ff1184df318b3bd7.tar.gz
external_llvm-95a9d937728ca9cf2bf44f86ff1184df318b3bd7.tar.bz2
Round 2 of dead private variable removal.
LLVM is now -Wunused-private-field clean except for - lib/MC/MCDisassembler/Disassembler.h. Not sure why it keeps all those unaccessible fields. - gtest. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158096 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/MCJIT/MCJIT.cpp2
-rw-r--r--lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h10
2 files changed, 4 insertions, 8 deletions
diff --git a/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/lib/ExecutionEngine/MCJIT/MCJIT.cpp
index 7d2fabb..84274c0 100644
--- a/lib/ExecutionEngine/MCJIT/MCJIT.cpp
+++ b/lib/ExecutionEngine/MCJIT/MCJIT.cpp
@@ -45,7 +45,7 @@ ExecutionEngine *MCJIT::createJIT(Module *M,
// If the target supports JIT code generation, create the JIT.
if (TargetJITInfo *TJ = TM->getJITInfo())
- return new MCJIT(M, TM, *TJ, new MCJITMemoryManager(JMM, M), GVsWithCode);
+ return new MCJIT(M, TM, *TJ, new MCJITMemoryManager(JMM), GVsWithCode);
if (ErrorStr)
*ErrorStr = "target does not support JIT code generation";
diff --git a/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h b/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h
index 084f9a8..441aaeb 100644
--- a/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h
+++ b/lib/ExecutionEngine/MCJIT/MCJITMemoryManager.h
@@ -22,15 +22,11 @@ namespace llvm {
// matching LLVM IR counterparts in the module(s) being compiled.
class MCJITMemoryManager : public RTDyldMemoryManager {
virtual void anchor();
- JITMemoryManager *JMM;
+ OwningPtr<JITMemoryManager> JMM;
- // FIXME: Multiple modules.
- Module *M;
public:
- MCJITMemoryManager(JITMemoryManager *jmm, Module *m) :
- JMM(jmm?jmm:JITMemoryManager::CreateDefaultMemManager()), M(m) {}
- // We own the JMM, so make sure to delete it.
- ~MCJITMemoryManager() { delete JMM; }
+ MCJITMemoryManager(JITMemoryManager *jmm) :
+ JMM(jmm?jmm:JITMemoryManager::CreateDefaultMemManager()) {}
uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
unsigned SectionID) {