IR: Introduce Module::global_objects().
This is a convenience iterator that allows clients to enumerate the GlobalObjects within a Module. Also start using it in a few places where it is obviously the right thing to use. Differential Revision: http://reviews.llvm.org/D21580 llvm-svn: 273470
This commit is contained in:
@@ -235,10 +235,8 @@ void ExecutionEngine::clearAllGlobalMappings() {
|
||||
void ExecutionEngine::clearGlobalMappingsFromModule(Module *M) {
|
||||
MutexGuard locked(lock);
|
||||
|
||||
for (Function &FI : *M)
|
||||
EEState.RemoveMapping(getMangledName(&FI));
|
||||
for (GlobalVariable &GI : M->globals())
|
||||
EEState.RemoveMapping(getMangledName(&GI));
|
||||
for (GlobalObject &GO : M->global_objects())
|
||||
EEState.RemoveMapping(getMangledName(&GO));
|
||||
}
|
||||
|
||||
uint64_t ExecutionEngine::updateGlobalMapping(const GlobalValue *GV,
|
||||
|
||||
Reference in New Issue
Block a user