//===----------------------------------------------------------------------===//
#include "llvm/Module.h"
-#include "llvm/Method.h"
+#include "llvm/Function.h"
#include "llvm/GlobalVariable.h"
#include "llvm/InstrTypes.h"
#include "llvm/ValueHolderImpl.h"
// for having a DefHolderImpl.h file seperate from DefHolder.h! :(
//
template class ValueHolder<GlobalVariable, Module, Module>;
-template class ValueHolder<Method, Module, Module>;
+template class ValueHolder<Function, Module, Module>;
// Define the GlobalValueRefMap as a struct that wraps a map so that we don't
// have Module.h depend on <map>
Module::Module()
: Value(Type::VoidTy, Value::ModuleVal, ""), SymTabValue(this),
- GlobalList(this, this), MethodList(this, this), GVRefMap(0) {
+ GlobalList(this, this), FunctionList(this, this), GVRefMap(0) {
}
Module::~Module() {
dropAllReferences();
GlobalList.delete_all();
GlobalList.setParent(0);
- MethodList.delete_all();
- MethodList.setParent(0);
+ FunctionList.delete_all();
+ FunctionList.setParent(0);
}
// delete.
//
void Module::dropAllReferences() {
- for_each(MethodList.begin(), MethodList.end(),
- std::mem_fun(&Method::dropAllReferences));
+ for_each(FunctionList.begin(), FunctionList.end(),
+ std::mem_fun(&Function::dropAllReferences));
for_each(GlobalList.begin(), GlobalList.end(),
std::mem_fun(&GlobalVariable::dropAllReferences));
bool Module::reduceApply(bool (*Func)(const GlobalVariable*)) const {
return reduce_apply_bool(gbegin(), gend(), Func);
}
-bool Module::reduceApply(bool (*Func)(Method*)) {
+bool Module::reduceApply(bool (*Func)(Function*)) {
return reduce_apply_bool(begin(), end(), Func);
}
-bool Module::reduceApply(bool (*Func)(const Method*)) const {
+bool Module::reduceApply(bool (*Func)(const Function*)) const {
return reduce_apply_bool(begin(), end(), Func);
}