simplify code.
authorChris Lattner <sabre@nondot.org>
Mon, 28 May 2012 01:37:08 +0000 (01:37 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 28 May 2012 01:37:08 +0000 (01:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157555 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Module.cpp

index b872ccee14cc101a11f1a621c7bca1eec3200bc4..8ea36659b88915cec62a5934e06dcd349d44daea 100644 (file)
@@ -188,8 +188,7 @@ Constant *Module::getOrInsertTargetIntrinsic(StringRef Name,
 
 Constant *Module::getOrInsertFunction(StringRef Name,
                                       FunctionType *Ty) {
-  AttrListPtr AttributeList = AttrListPtr::get((AttributeWithIndex *)0, 0);
-  return getOrInsertFunction(Name, Ty, AttributeList);
+  return getOrInsertFunction(Name, Ty, AttrListPtr());
 }
 
 // getOrInsertFunction - Look up the specified function in the module symbol
@@ -231,7 +230,7 @@ Constant *Module::getOrInsertFunction(StringRef Name,
   // Build the function type and chain to the other getOrInsertFunction...
   return getOrInsertFunction(Name,
                              FunctionType::get(RetTy, ArgTys, false),
-                             AttrListPtr::get((AttributeWithIndex *)0, 0));
+                             AttrListPtr());
 }
 
 // getFunction - Look up the specified function in the module symbol table.