[cfe-commits] r49607 - in /cfe/trunk/lib/CodeGen: CGExprAgg.cpp CGExprComplex.cpp CGExprScalar.cpp CGObjCEtoile.cpp CGObjCGNU.cpp CGObjCRuntime.h CodeGenFunction.h

Chris Lattner sabre at nondot.org
Sun Apr 13 00:32:11 PDT 2008


Author: lattner
Date: Sun Apr 13 02:32:11 2008
New Revision: 49607

URL: http://llvm.org/viewvc/llvm-project?rev=49607&view=rev
Log:
update to follow mainline llvm API change.

Modified:
    cfe/trunk/lib/CodeGen/CGExprAgg.cpp
    cfe/trunk/lib/CodeGen/CGExprComplex.cpp
    cfe/trunk/lib/CodeGen/CGExprScalar.cpp
    cfe/trunk/lib/CodeGen/CGObjCEtoile.cpp
    cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
    cfe/trunk/lib/CodeGen/CGObjCRuntime.h
    cfe/trunk/lib/CodeGen/CodeGenFunction.h

Modified: cfe/trunk/lib/CodeGen/CGExprAgg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprAgg.cpp?rev=49607&r1=49606&r2=49607&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprAgg.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprAgg.cpp Sun Apr 13 02:32:11 2008
@@ -29,7 +29,7 @@
 namespace  {
 class VISIBILITY_HIDDEN AggExprEmitter : public StmtVisitor<AggExprEmitter> {
   CodeGenFunction &CGF;
-  llvm::LLVMFoldingBuilder &Builder;
+  llvm::IRBuilder &Builder;
   llvm::Value *DestPtr;
   bool VolatileDest;
 public:

Modified: cfe/trunk/lib/CodeGen/CGExprComplex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprComplex.cpp?rev=49607&r1=49606&r2=49607&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprComplex.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprComplex.cpp Sun Apr 13 02:32:11 2008
@@ -31,7 +31,7 @@
 class VISIBILITY_HIDDEN ComplexExprEmitter
   : public StmtVisitor<ComplexExprEmitter, ComplexPairTy> {
   CodeGenFunction &CGF;
-  llvm::LLVMFoldingBuilder &Builder;
+  llvm::IRBuilder &Builder;
 public:
   ComplexExprEmitter(CodeGenFunction &cgf) : CGF(cgf), Builder(CGF.Builder) {
   }

Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=49607&r1=49606&r2=49607&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Sun Apr 13 02:32:11 2008
@@ -40,7 +40,7 @@
 class VISIBILITY_HIDDEN ScalarExprEmitter
   : public StmtVisitor<ScalarExprEmitter, Value*> {
   CodeGenFunction &CGF;
-  llvm::LLVMFoldingBuilder &Builder;
+  llvm::IRBuilder &Builder;
   CGObjCRuntime *Runtime;
 
 

Modified: cfe/trunk/lib/CodeGen/CGObjCEtoile.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCEtoile.cpp?rev=49607&r1=49606&r2=49607&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCEtoile.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCEtoile.cpp Sun Apr 13 02:32:11 2008
@@ -14,7 +14,7 @@
 #include "CGObjCRuntime.h"
 #include "llvm/Module.h"
 #include "llvm/Support/Compiler.h"
-#include "llvm/Support/LLVMBuilder.h"
+#include "llvm/Support/IRBuilder.h"
 #include "llvm/ADT/SmallVector.h"
 
 namespace {
@@ -36,14 +36,14 @@
   CGObjCEtoile(llvm::Module &Mp,
     const llvm::Type *LLVMIntType,
     const llvm::Type *LLVMLongType);
-  virtual llvm::Value *generateMessageSend(llvm::LLVMFoldingBuilder &Builder,
+  virtual llvm::Value *generateMessageSend(llvm::IRBuilder &Builder,
                                            const llvm::Type *ReturnTy,
                                            llvm::Value *Sender,
                                            llvm::Value *Receiver,
                                            llvm::Value *Selector,
                                            llvm::Value** ArgV,
                                            unsigned ArgC);
-  llvm::Value *getSelector(llvm::LLVMFoldingBuilder &Builder,
+  llvm::Value *getSelector(llvm::IRBuilder &Builder,
       llvm::Value *SelName,
       llvm::Value *SelTypes);
   virtual llvm::Function *MethodPreamble(const llvm::Type *ReturnTy,
@@ -117,7 +117,7 @@
 }
 
 /// Looks up the selector for the specified name / type pair.
-llvm::Value *CGObjCEtoile::getSelector(llvm::LLVMFoldingBuilder &Builder,
+llvm::Value *CGObjCEtoile::getSelector(llvm::IRBuilder &Builder,
     llvm::Value *SelName,
     llvm::Value *SelTypes)
 {
@@ -137,23 +137,20 @@
   return Builder.CreateCall(SelFunction, Args.begin(), Args.end());
 }
 
-static void SetField(llvm::LLVMFoldingBuilder &Builder,
-                     llvm::Value *Structure, 
-                     unsigned Index, 
-                     llvm::Value *Value) {
+static void SetField(llvm::IRBuilder &Builder, llvm::Value *Structure, 
+                     unsigned Index,  llvm::Value *Value) {
     llvm::Value *element_ptr = Builder.CreateStructGEP(Structure, Index);
     Builder.CreateStore(Value, element_ptr);
 }
 // Generate code for a message send expression on the Etoile runtime.
 // BIG FAT WARNING: Much of this code will need factoring out later.
-llvm::Value *CGObjCEtoile::generateMessageSend(
-                                            llvm::LLVMFoldingBuilder &Builder,
-                                            const llvm::Type *ReturnTy,
-                                            llvm::Value *Sender,
-                                            llvm::Value *Receiver,
-                                            llvm::Value *Selector,
-                                            llvm::Value** ArgV,
-                                            unsigned ArgC) {
+llvm::Value *CGObjCEtoile::generateMessageSend(llvm::IRBuilder &Builder,
+                                               const llvm::Type *ReturnTy,
+                                               llvm::Value *Sender,
+                                               llvm::Value *Receiver,
+                                               llvm::Value *Selector,
+                                               llvm::Value** ArgV,
+                                               unsigned ArgC) {
   // FIXME: Selectors should be statically cached, not looked up on every call.
   llvm::Value *cmd = getSelector(Builder, Selector, 0);
   // TODO: [Polymorphic] inline caching

Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCGNU.cpp?rev=49607&r1=49606&r2=49607&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Sun Apr 13 02:32:11 2008
@@ -14,7 +14,7 @@
 #include "CGObjCRuntime.h"
 #include "llvm/Module.h"
 #include "llvm/Support/Compiler.h"
-#include "llvm/Support/LLVMBuilder.h"
+#include "llvm/Support/IRBuilder.h"
 #include "llvm/ADT/SmallVector.h"
 
 namespace {
@@ -33,14 +33,14 @@
   CGObjCGNU(llvm::Module &Mp,
     const llvm::Type *LLVMIntType,
     const llvm::Type *LLVMLongType);
-  virtual llvm::Value *generateMessageSend(llvm::LLVMFoldingBuilder &Builder,
+  virtual llvm::Value *generateMessageSend(llvm::IRBuilder &Builder,
                                            const llvm::Type *ReturnTy,
                                            llvm::Value *Sender,
                                            llvm::Value *Receiver,
                                            llvm::Value *Selector,
                                            llvm::Value** ArgV,
                                            unsigned ArgC);
-  llvm::Value *getSelector(llvm::LLVMFoldingBuilder &Builder,
+  llvm::Value *getSelector(llvm::IRBuilder &Builder,
       llvm::Value *SelName,
       llvm::Value *SelTypes);
   virtual llvm::Function *MethodPreamble(const llvm::Type *ReturnTy,
@@ -88,7 +88,7 @@
 
 /// Looks up the selector for the specified name / type pair.
 // FIXME: Selectors should be statically cached, not looked up on every call.
-llvm::Value *CGObjCGNU::getSelector(llvm::LLVMFoldingBuilder &Builder,
+llvm::Value *CGObjCGNU::getSelector(llvm::IRBuilder &Builder,
     llvm::Value *SelName,
     llvm::Value *SelTypes)
 {
@@ -119,7 +119,7 @@
 // FIXME: Much of this code will need factoring out later.
 // TODO: This should take a sender argument (pointer to self in the calling
 // context)
-llvm::Value *CGObjCGNU::generateMessageSend(llvm::LLVMFoldingBuilder &Builder,
+llvm::Value *CGObjCGNU::generateMessageSend(llvm::IRBuilder &Builder,
                                             const llvm::Type *ReturnTy,
                                             llvm::Value *Sender,
                                             llvm::Value *Receiver,

Modified: cfe/trunk/lib/CodeGen/CGObjCRuntime.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCRuntime.h?rev=49607&r1=49606&r2=49607&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCRuntime.h (original)
+++ cfe/trunk/lib/CodeGen/CGObjCRuntime.h Sun Apr 13 02:32:11 2008
@@ -17,7 +17,7 @@
 #define CLANG_CODEGEN_OBCJRUNTIME_H
 
 namespace llvm {
-  class LLVMFoldingBuilder;
+  class IRBuilder;
   class Constant;
   class Type;
   class Value;
@@ -35,7 +35,7 @@
   virtual ~CGObjCRuntime();
   
   /// Generate an Objective-C message send operation
-  virtual llvm::Value *generateMessageSend(llvm::LLVMFoldingBuilder &Builder,
+  virtual llvm::Value *generateMessageSend(llvm::IRBuilder &Builder,
                                            const llvm::Type *ReturnTy,
                                            llvm::Value *Sender,
                                            llvm::Value *Receiver,

Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=49607&r1=49606&r2=49607&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Sun Apr 13 02:32:11 2008
@@ -17,7 +17,7 @@
 #include "clang/AST/Type.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/SmallVector.h"
-#include "llvm/Support/LLVMBuilder.h"
+#include "llvm/Support/IRBuilder.h"
 #include <vector>
 
 namespace llvm {
@@ -244,7 +244,7 @@
   TargetInfo &Target;
   
   typedef std::pair<llvm::Value *, llvm::Value *> ComplexPairTy;
-  llvm::LLVMFoldingBuilder Builder;
+  llvm::IRBuilder Builder;
   
   // Holds the Decl for the current function or method
   const Decl *CurFuncDecl;





More information about the cfe-commits mailing list