[llvm-commits] [llvm] r49494 - /llvm/branches/ggreif/use-diet/lib/AsmParser/llvmAsmParser.y

Gabor Greif ggreif at gmail.com
Thu Apr 10 13:31:54 PDT 2008


Author: ggreif
Date: Thu Apr 10 15:31:52 2008
New Revision: 49494

URL: http://llvm.org/viewvc/llvm-project?rev=49494&view=rev
Log:
forgot to create-ify this

Modified:
    llvm/branches/ggreif/use-diet/lib/AsmParser/llvmAsmParser.y

Modified: llvm/branches/ggreif/use-diet/lib/AsmParser/llvmAsmParser.y
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/AsmParser/llvmAsmParser.y?rev=49494&r1=49493&r2=49494&view=diff

==============================================================================
--- llvm/branches/ggreif/use-diet/lib/AsmParser/llvmAsmParser.y (original)
+++ llvm/branches/ggreif/use-diet/lib/AsmParser/llvmAsmParser.y Thu Apr 10 15:31:52 2008
@@ -495,8 +495,8 @@
    if (const FunctionType *FTy = dyn_cast<FunctionType>(ElTy))
      V = Function::Create(FTy, GlobalValue::ExternalLinkage);
    else
-     V = new GlobalVariable(ElTy, false, GlobalValue::ExternalLinkage, 0, "",
-                            (Module*)0, false, PTy->getAddressSpace());
+     V = GlobalVariable::Create(ElTy, false, GlobalValue::ExternalLinkage, 0, "",
+                                (Module*)0, false, PTy->getAddressSpace());
    break;
   }
   default:
@@ -784,8 +784,8 @@
 
   // Otherwise there is no existing GV to use, create one now.
   GlobalVariable *GV =
-    new GlobalVariable(Ty, isConstantGlobal, Linkage, Initializer, Name,
-                       CurModule.CurrentModule, IsThreadLocal, AddressSpace);
+    GlobalVariable::Create(Ty, isConstantGlobal, Linkage, Initializer, Name,
+                           CurModule.CurrentModule, IsThreadLocal, AddressSpace);
   GV->setVisibility(Visibility);
   InsertValue(GV, CurModule.Values);
   return GV;
@@ -1782,9 +1782,9 @@
           GV = Function::Create(FTy, GlobalValue::ExternalWeakLinkage, Name,
                                 CurModule.CurrentModule);
         } else {
-          GV = new GlobalVariable(PT->getElementType(), false,
-                                  GlobalValue::ExternalWeakLinkage, 0,
-                                  Name, CurModule.CurrentModule);
+          GV = GlobalVariable::Create(PT->getElementType(), false,
+                                      GlobalValue::ExternalWeakLinkage, 0,
+                                      Name, CurModule.CurrentModule);
         }
 
         // Keep track of the fact that we have a forward ref to recycle it





More information about the llvm-commits mailing list