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.
llvm-svn: 49277
diff --git a/llvm/lib/VMCore/Module.cpp b/llvm/lib/VMCore/Module.cpp
index 864ec04..429cf1a 100644
--- a/llvm/lib/VMCore/Module.cpp
+++ b/llvm/lib/VMCore/Module.cpp
@@ -32,7 +32,7 @@
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 @@
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.
}