[llvm-commits] [llvm] r68774 - /llvm/trunk/include/llvm/Support/IRBuilder.h

Nick Lewycky nicholas at mxc.ca
Thu Apr 9 23:54:06 PDT 2009


Author: nicholas
Date: Fri Apr 10 01:54:06 2009
New Revision: 68774

URL: http://llvm.org/viewvc/llvm-project?rev=68774&view=rev
Log:
Cleanup. Remove redundant llvm:: , we don't need them since we're inside
namespace llvm already.

Modified:
    llvm/trunk/include/llvm/Support/IRBuilder.h

Modified: llvm/trunk/include/llvm/Support/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/IRBuilder.h?rev=68774&r1=68773&r2=68774&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/IRBuilder.h (original)
+++ llvm/trunk/include/llvm/Support/IRBuilder.h Fri Apr 10 01:54:06 2009
@@ -323,7 +323,7 @@
     return Insert(GetElementPtrInst::Create(Ptr, Idx), Name);
   }
   Value *CreateConstGEP1_32(Value *Ptr, unsigned Idx0, const char *Name = "") {
-    llvm::Value *Idx = ConstantInt::get(llvm::Type::Int32Ty, Idx0);
+    Value *Idx = ConstantInt::get(Type::Int32Ty, Idx0);
 
     if (Constant *PC = dyn_cast<Constant>(Ptr))
       return Folder.CreateGetElementPtr(PC, &Idx, 1);
@@ -332,9 +332,9 @@
   }
   Value *CreateConstGEP2_32(Value *Ptr, unsigned Idx0, unsigned Idx1, 
                     const char *Name = "") {
-    llvm::Value *Idxs[] = {
-      ConstantInt::get(llvm::Type::Int32Ty, Idx0),
-      ConstantInt::get(llvm::Type::Int32Ty, Idx1)
+    Value *Idxs[] = {
+      ConstantInt::get(Type::Int32Ty, Idx0),
+      ConstantInt::get(Type::Int32Ty, Idx1)
     };
 
     if (Constant *PC = dyn_cast<Constant>(Ptr))
@@ -343,7 +343,7 @@
     return Insert(GetElementPtrInst::Create(Ptr, Idxs, Idxs+2), Name);    
   }
   Value *CreateConstGEP1_64(Value *Ptr, uint64_t Idx0, const char *Name = "") {
-    llvm::Value *Idx = ConstantInt::get(llvm::Type::Int64Ty, Idx0);
+    Value *Idx = ConstantInt::get(Type::Int64Ty, Idx0);
 
     if (Constant *PC = dyn_cast<Constant>(Ptr))
       return Folder.CreateGetElementPtr(PC, &Idx, 1);
@@ -352,9 +352,9 @@
   }
   Value *CreateConstGEP2_64(Value *Ptr, uint64_t Idx0, uint64_t Idx1, 
                     const char *Name = "") {
-    llvm::Value *Idxs[] = {
-      ConstantInt::get(llvm::Type::Int64Ty, Idx0),
-      ConstantInt::get(llvm::Type::Int64Ty, Idx1)
+    Value *Idxs[] = {
+      ConstantInt::get(Type::Int64Ty, Idx0),
+      ConstantInt::get(Type::Int64Ty, Idx1)
     };
 
     if (Constant *PC = dyn_cast<Constant>(Ptr))
@@ -367,19 +367,19 @@
   }
   Value *CreateGlobalString(const char *Str = "", const char *Name = "") {
     Constant *StrConstant = ConstantArray::get(Str, true);
-    GlobalVariable *gv = new llvm::GlobalVariable(StrConstant->getType(),
-                                                  true,
-                                                  GlobalValue::InternalLinkage,
-                                                  StrConstant,
-                                                  "",
-                                                  BB->getParent()->getParent(),
-                                                  false);
+    GlobalVariable *gv = new GlobalVariable(StrConstant->getType(),
+                                            true,
+                                            GlobalValue::InternalLinkage,
+                                            StrConstant,
+                                            "",
+                                            BB->getParent()->getParent(),
+                                            false);
     gv->setName(Name);
     return gv;
   }
   Value *CreateGlobalStringPtr(const char *Str = "", const char *Name = "") {
     Value *gv = CreateGlobalString(Str, Name);
-    Value *zero = llvm::ConstantInt::get(llvm::Type::Int32Ty, 0);
+    Value *zero = ConstantInt::get(Type::Int32Ty, 0);
     Value *Args[] = { zero, zero };
     return CreateGEP(gv, Args, Args+2, Name);
   }
@@ -671,13 +671,13 @@
 
   /// CreateIsNull - Return an i1 value testing if \arg Arg is null.
   Value *CreateIsNull(Value *Arg, const char *Name = "") {
-    return CreateICmpEQ(Arg, llvm::Constant::getNullValue(Arg->getType()),
+    return CreateICmpEQ(Arg, Constant::getNullValue(Arg->getType()),
                         Name);
   }
 
   /// CreateIsNotNull - Return an i1 value testing if \arg Arg is not null.
   Value *CreateIsNotNull(Value *Arg, const char *Name = "") {
-    return CreateICmpNE(Arg, llvm::Constant::getNullValue(Arg->getType()),
+    return CreateICmpNE(Arg, Constant::getNullValue(Arg->getType()),
                         Name);
   }
 





More information about the llvm-commits mailing list