1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2024-12-14 11:32:34 +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:
Chris Lattner 2001-06-21 05:25:33 +00:00
parent be0b11c611
commit 681cf74ab5

View File

@ -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));
}
//===----------------------------------------------------------------------===//