mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 12:19:53 +00:00
Modified to use the new reduce_apply algorithm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
be0b11c611
commit
681cf74ab5
@ -12,6 +12,7 @@
|
||||
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/BasicBlock.h"
|
||||
#include "llvm/Tools/STLExtras.h"
|
||||
class Method;
|
||||
class CallInst;
|
||||
|
||||
@ -20,11 +21,8 @@ class CallInst;
|
||||
//
|
||||
|
||||
static inline bool ApplyOptToAllMethods(Module *C, bool (*Opt)(Method*)) {
|
||||
bool Modified = false;
|
||||
for (Module::MethodListType::iterator I = C->getMethodList().begin();
|
||||
I != C->getMethodList().end(); I++)
|
||||
Modified |= Opt(*I);
|
||||
return Modified;
|
||||
return reduce_apply(C->getMethodList().begin(), C->getMethodList().end(),
|
||||
bitwise_or<bool>(), false, ptr_fun(Opt));
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
Loading…
Reference in New Issue
Block a user