[cfe-commits] r54642 - in /cfe/trunk/lib/CodeGen: CGDebugInfo.h CGObjCRuntime.h

Daniel Dunbar daniel at zuster.org
Mon Aug 11 09:50:22 PDT 2008


Author: ddunbar
Date: Mon Aug 11 11:50:21 2008
New Revision: 54642

URL: http://llvm.org/viewvc/llvm-project?rev=54642&view=rev
Log:
Update for IRBuilder template change (update LLVM!)

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.h
    cfe/trunk/lib/CodeGen/CGObjCRuntime.h

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

==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.h (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.h Mon Aug 11 11:50:21 2008
@@ -16,13 +16,13 @@
 
 #include "clang/AST/Type.h"
 #include "clang/Basic/SourceLocation.h"
+#include "llvm/Support/IRBuilder.h"
 #include <map>
 #include <vector>
 
 
 namespace llvm {
   class Function;
-  template<bool C> class IRBuilder;
   class DISerializer;
   class CompileUnitDesc;
   class BasicBlock;
@@ -54,6 +54,8 @@
   SourceLocation CurLoc;
   SourceLocation PrevLoc;
 
+  typedef llvm::IRBuilder<> BuilderType;
+
   /// CompileUnitCache - Cache of previously constructed CompileUnits.
   std::map<unsigned, llvm::CompileUnitDesc *> CompileUnitCache;
 
@@ -103,24 +105,24 @@
 
   /// EmitStopPoint - Emit a call to llvm.dbg.stoppoint to indicate a change of
   /// source line.
-  void EmitStopPoint(llvm::Function *Fn, llvm::IRBuilder<true> &Builder);
+  void EmitStopPoint(llvm::Function *Fn, BuilderType &Builder);
 
   /// EmitFunctionStart - Emit a call to llvm.dbg.function.start to indicate
   /// start of a new function
   void EmitFunctionStart(const FunctionDecl *FnDecl, llvm::Function *Fn,
-                         llvm::IRBuilder<true> &Builder);
+                         BuilderType &Builder);
   
   /// EmitRegionStart - Emit a call to llvm.dbg.region.start to indicate start
   /// of a new block.  
-  void EmitRegionStart(llvm::Function *Fn, llvm::IRBuilder<true> &Builder);
+  void EmitRegionStart(llvm::Function *Fn, BuilderType &Builder);
   
   /// EmitRegionEnd - Emit call to llvm.dbg.region.end to indicate end of a 
   /// block.
-  void EmitRegionEnd(llvm::Function *Fn, llvm::IRBuilder<true> &Builder);
+  void EmitRegionEnd(llvm::Function *Fn, BuilderType &Builder);
 
   /// EmitDeclare - Emit call to llvm.dbg.declare for a variable declaration.
   void EmitDeclare(const VarDecl *decl, unsigned Tag, llvm::Value *AI,
-                   llvm::IRBuilder<true> &Builder);
+                   BuilderType &Builder);
 
   /// EmitGlobalVariable - Emit information about a global variable.
   void EmitGlobalVariable(llvm::GlobalVariable *GV, const VarDecl *decl);

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

==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCRuntime.h (original)
+++ cfe/trunk/lib/CodeGen/CGObjCRuntime.h Mon Aug 11 11:50:21 2008
@@ -17,10 +17,10 @@
 #define CLANG_CODEGEN_OBCJRUNTIME_H
 #include "clang/Basic/IdentifierTable.h" // Selector
 #include "llvm/ADT/SmallVector.h"
+#include "llvm/Support/IRBuilder.h"
 #include <string>
 
 namespace llvm {
-  template<bool C> class IRBuilder;
   class Constant;
   class Type;
   class Value;
@@ -39,11 +39,13 @@
 
 /// Implements runtime-specific code generation functions.
 class CGObjCRuntime {
+  typedef llvm::IRBuilder<> BuilderType;
+
 public:
   virtual ~CGObjCRuntime();
   
   /// Generate an Objective-C message send operation
-  virtual llvm::Value *GenerateMessageSend(llvm::IRBuilder<true> &Builder,
+  virtual llvm::Value *GenerateMessageSend(BuilderType &Builder,
                                            const llvm::Type *ReturnTy,
                                            llvm::Value *Sender,
                                            llvm::Value *Receiver,
@@ -54,7 +56,7 @@
   /// this compilation unit with the runtime library.
   virtual llvm::Function *ModuleInitFunction() =0;
   /// Get a selector for the specified name and type values
-  virtual llvm::Value *GetSelector(llvm::IRBuilder<true> &Builder,
+  virtual llvm::Value *GetSelector(BuilderType &Builder,
                                    Selector Sel) =0;
   /// Generate a constant string object
   virtual llvm::Constant *GenerateConstantString(const char *String,
@@ -111,7 +113,7 @@
                                          bool isClassMethod,
                                          bool isVarArg) = 0;
   /// Look up the class for the specified name
-  virtual llvm::Value *LookupClass(llvm::IRBuilder<true> &Builder, 
+  virtual llvm::Value *LookupClass(BuilderType &Builder, 
                                    llvm::Value *ClassName) =0;
   /// If instance variable addresses are determined at runtime then this should
   /// return true, otherwise instance variables will be accessed directly from





More information about the cfe-commits mailing list