aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Module.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2008-04-06 20:25:17 +0000
committerGabor Greif <ggreif@gmail.com>2008-04-06 20:25:17 +0000
commitd6da1d0d17e2605363504f044664696f4d85b30f (patch)
tree76db4bc690c153a1cfbd2989849c3b1d95500390 /lib/VMCore/Module.cpp
parent6af9244457f24a4e9f2165d9f478e3e9cb225777 (diff)
downloadexternal_llvm-d6da1d0d17e2605363504f044664696f4d85b30f.zip
external_llvm-d6da1d0d17e2605363504f044664696f4d85b30f.tar.gz
external_llvm-d6da1d0d17e2605363504f044664696f4d85b30f.tar.bz2
API changes for class Use size reduction, wave 1.
Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Module.cpp')
-rw-r--r--lib/VMCore/Module.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp
index 864ec04..429cf1a 100644
--- a/lib/VMCore/Module.cpp
+++ b/lib/VMCore/Module.cpp
@@ -32,7 +32,7 @@ using namespace llvm;
Function *ilist_traits<Function>::createSentinel() {
FunctionType *FTy =
FunctionType::get(Type::VoidTy, std::vector<const Type*>(), false);
- Function *Ret = new Function(FTy, GlobalValue::ExternalLinkage);
+ Function *Ret = Function::Create(FTy, GlobalValue::ExternalLinkage);
// This should not be garbage monitored.
LeakDetector::removeGarbageObject(Ret);
return Ret;
@@ -149,7 +149,7 @@ Constant *Module::getOrInsertFunction(const std::string &Name,
GlobalValue *F = dyn_cast_or_null<GlobalValue>(SymTab.lookup(Name));
if (F == 0) {
// Nope, add it
- Function *New = new Function(Ty, GlobalVariable::ExternalLinkage, Name);
+ Function *New = Function::Create(Ty, GlobalVariable::ExternalLinkage, Name);
FunctionList.push_back(New);
return New; // Return the new prototype.
}