From: Daniel Dunbar Date: Mon, 11 Aug 2008 16:50:21 +0000 (+0000) Subject: Update for IRBuilder template change (update LLVM!) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=58bf6101062867ca4b3028f9e77e4ae642f09b44;p=clang Update for IRBuilder template change (update LLVM!) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54642 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.h b/lib/CodeGen/CGDebugInfo.h index d94619b391..7e41143837 100644 --- a/lib/CodeGen/CGDebugInfo.h +++ b/lib/CodeGen/CGDebugInfo.h @@ -16,13 +16,13 @@ #include "clang/AST/Type.h" #include "clang/Basic/SourceLocation.h" +#include "llvm/Support/IRBuilder.h" #include #include namespace llvm { class Function; - template class IRBuilder; class DISerializer; class CompileUnitDesc; class BasicBlock; @@ -54,6 +54,8 @@ private: SourceLocation CurLoc; SourceLocation PrevLoc; + typedef llvm::IRBuilder<> BuilderType; + /// CompileUnitCache - Cache of previously constructed CompileUnits. std::map CompileUnitCache; @@ -103,24 +105,24 @@ public: /// EmitStopPoint - Emit a call to llvm.dbg.stoppoint to indicate a change of /// source line. - void EmitStopPoint(llvm::Function *Fn, llvm::IRBuilder &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 &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 &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 &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 &Builder); + BuilderType &Builder); /// EmitGlobalVariable - Emit information about a global variable. void EmitGlobalVariable(llvm::GlobalVariable *GV, const VarDecl *decl); diff --git a/lib/CodeGen/CGObjCRuntime.h b/lib/CodeGen/CGObjCRuntime.h index c03857fab0..4610ef8b65 100644 --- a/lib/CodeGen/CGObjCRuntime.h +++ b/lib/CodeGen/CGObjCRuntime.h @@ -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 namespace llvm { - template class IRBuilder; class Constant; class Type; class Value; @@ -39,11 +39,13 @@ namespace CodeGen { /// 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 &Builder, + virtual llvm::Value *GenerateMessageSend(BuilderType &Builder, const llvm::Type *ReturnTy, llvm::Value *Sender, llvm::Value *Receiver, @@ -54,7 +56,7 @@ public: /// 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 &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 @@ public: bool isClassMethod, bool isVarArg) = 0; /// Look up the class for the specified name - virtual llvm::Value *LookupClass(llvm::IRBuilder &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