diff options
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGCXXABI.h | 4 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGCall.h | 10 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGCleanup.h | 4 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.h | 28 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGException.h | 12 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGVTables.h | 4 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 16 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 22 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenTBAA.h | 4 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenTypes.h | 8 | ||||
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.h | 5 |
11 files changed, 59 insertions, 58 deletions
diff --git a/clang/lib/CodeGen/CGCXXABI.h b/clang/lib/CodeGen/CGCXXABI.h index 29f299a43e3..8c0df38ff1a 100644 --- a/clang/lib/CodeGen/CGCXXABI.h +++ b/clang/lib/CodeGen/CGCXXABI.h @@ -151,7 +151,7 @@ public: virtual void BuildConstructorSignature(const CXXConstructorDecl *Ctor, CXXCtorType T, CanQualType &ResTy, - llvm::SmallVectorImpl<CanQualType> &ArgTys) = 0; + SmallVectorImpl<CanQualType> &ArgTys) = 0; /// Build the signature of the given destructor variant by adding /// any required parameters. For convenience, ResTy has been @@ -160,7 +160,7 @@ public: virtual void BuildDestructorSignature(const CXXDestructorDecl *Dtor, CXXDtorType T, CanQualType &ResTy, - llvm::SmallVectorImpl<CanQualType> &ArgTys) = 0; + SmallVectorImpl<CanQualType> &ArgTys) = 0; /// Build the ABI-specific portion of the parameter list for a /// function. This generally involves a 'this' parameter and diff --git a/clang/lib/CodeGen/CGCall.h b/clang/lib/CodeGen/CGCall.h index 343b944bf6c..24ed366dd86 100644 --- a/clang/lib/CodeGen/CGCall.h +++ b/clang/lib/CodeGen/CGCall.h @@ -42,7 +42,7 @@ namespace clang { class VarDecl; namespace CodeGen { - typedef llvm::SmallVector<llvm::AttributeWithIndex, 8> AttributeListType; + typedef SmallVector<llvm::AttributeWithIndex, 8> AttributeListType; struct CallArg { RValue RV; @@ -56,7 +56,7 @@ namespace CodeGen { /// CallArgList - Type for representing both the value and type of /// arguments in a call. class CallArgList : - public llvm::SmallVector<CallArg, 16> { + public SmallVector<CallArg, 16> { public: struct Writeback { /// The original argument. @@ -90,18 +90,18 @@ namespace CodeGen { bool hasWritebacks() const { return !Writebacks.empty(); } - typedef llvm::SmallVectorImpl<Writeback>::const_iterator writeback_iterator; + typedef SmallVectorImpl<Writeback>::const_iterator writeback_iterator; writeback_iterator writeback_begin() const { return Writebacks.begin(); } writeback_iterator writeback_end() const { return Writebacks.end(); } private: - llvm::SmallVector<Writeback, 1> Writebacks; + SmallVector<Writeback, 1> Writebacks; }; /// FunctionArgList - Type for representing both the decl and type /// of parameters to a function. The decl must be either a /// ParmVarDecl or ImplicitParamDecl. - class FunctionArgList : public llvm::SmallVector<const VarDecl*, 16> { + class FunctionArgList : public SmallVector<const VarDecl*, 16> { }; /// CGFunctionInfo - Class to encapsulate the information about a diff --git a/clang/lib/CodeGen/CGCleanup.h b/clang/lib/CodeGen/CGCleanup.h index c93ec5bb76a..9cf04bf79a8 100644 --- a/clang/lib/CodeGen/CGCleanup.h +++ b/clang/lib/CodeGen/CGCleanup.h @@ -178,7 +178,7 @@ class EHCleanupScope : public EHScope { llvm::SmallPtrSet<llvm::BasicBlock*, 4> Branches; /// Normal branch-afters. - llvm::SmallVector<std::pair<llvm::BasicBlock*,llvm::ConstantInt*>, 4> + SmallVector<std::pair<llvm::BasicBlock*,llvm::ConstantInt*>, 4> BranchAfters; /// The destinations of EH branch-afters and branch-throughs. @@ -187,7 +187,7 @@ class EHCleanupScope : public EHScope { llvm::SmallPtrSet<llvm::BasicBlock*, 4> EHBranches; /// EH branch-afters. - llvm::SmallVector<std::pair<llvm::BasicBlock*,llvm::ConstantInt*>, 4> + SmallVector<std::pair<llvm::BasicBlock*,llvm::ConstantInt*>, 4> EHBranchAfters; }; mutable struct ExtInfo *ExtInfo; diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h index f87d0072e32..09e4628f476 100644 --- a/clang/lib/CodeGen/CGDebugInfo.h +++ b/clang/lib/CodeGen/CGDebugInfo.h @@ -70,7 +70,7 @@ class CGDebugInfo { /// DebugInfoNames - This is a storage for names that are /// constructed on demand. For example, C++ destructors, C++ operators etc.. llvm::BumpPtrAllocator DebugInfoNames; - llvm::StringRef CWDName; + StringRef CWDName; llvm::DenseMap<const char *, llvm::WeakVH> DIFileCache; llvm::DenseMap<const FunctionDecl *, llvm::WeakVH> SPCache; @@ -113,17 +113,17 @@ class CGDebugInfo { void CollectCXXMemberFunctions(const CXXRecordDecl *Decl, llvm::DIFile F, - llvm::SmallVectorImpl<llvm::Value *> &E, + SmallVectorImpl<llvm::Value *> &E, llvm::DIType T); void CollectCXXFriends(const CXXRecordDecl *Decl, llvm::DIFile F, - llvm::SmallVectorImpl<llvm::Value *> &EltTys, + SmallVectorImpl<llvm::Value *> &EltTys, llvm::DIType RecordTy); void CollectCXXBases(const CXXRecordDecl *Decl, llvm::DIFile F, - llvm::SmallVectorImpl<llvm::Value *> &EltTys, + SmallVectorImpl<llvm::Value *> &EltTys, llvm::DIType RecordTy); llvm::DIArray @@ -136,18 +136,18 @@ class CGDebugInfo { CollectCXXTemplateParams(const ClassTemplateSpecializationDecl *TS, llvm::DIFile F); - llvm::DIType createFieldType(llvm::StringRef name, QualType type, + llvm::DIType createFieldType(StringRef name, QualType type, Expr *bitWidth, SourceLocation loc, AccessSpecifier AS, uint64_t offsetInBits, llvm::DIFile tunit, llvm::DIDescriptor scope); void CollectRecordFields(const RecordDecl *Decl, llvm::DIFile F, - llvm::SmallVectorImpl<llvm::Value *> &E, + SmallVectorImpl<llvm::Value *> &E, llvm::DIType RecordTy); void CollectVTableInfo(const CXXRecordDecl *Decl, llvm::DIFile F, - llvm::SmallVectorImpl<llvm::Value *> &EltTys); + SmallVectorImpl<llvm::Value *> &EltTys); public: CGDebugInfo(CodeGenModule &CGM); @@ -234,7 +234,7 @@ private: llvm::DIDescriptor getContextDescriptor(const Decl *Decl); /// getCurrentDirname - Return current directory name. - llvm::StringRef getCurrentDirname(); + StringRef getCurrentDirname(); /// CreateCompileUnit - Create new compile unit. void CreateCompileUnit(); @@ -255,7 +255,7 @@ private: /// CreateMemberType - Create new member and increase Offset by FType's size. llvm::DIType CreateMemberType(llvm::DIFile Unit, QualType FType, - llvm::StringRef Name, uint64_t *Offset); + StringRef Name, uint64_t *Offset); /// getFunctionDeclaration - Return debug info descriptor to describe method /// declaration for the given method definition. @@ -264,21 +264,21 @@ private: /// getFunctionName - Get function name for the given FunctionDecl. If the /// name is constructred on demand (e.g. C++ destructor) then the name /// is stored on the side. - llvm::StringRef getFunctionName(const FunctionDecl *FD); + StringRef getFunctionName(const FunctionDecl *FD); /// getObjCMethodName - Returns the unmangled name of an Objective-C method. /// This is the display name for the debugging info. - llvm::StringRef getObjCMethodName(const ObjCMethodDecl *FD); + StringRef getObjCMethodName(const ObjCMethodDecl *FD); /// getSelectorName - Return selector name. This is used for debugging /// info. - llvm::StringRef getSelectorName(Selector S); + StringRef getSelectorName(Selector S); /// getClassName - Get class name including template argument list. - llvm::StringRef getClassName(RecordDecl *RD); + StringRef getClassName(RecordDecl *RD); /// getVTableName - Get vtable name for the given Class. - llvm::StringRef getVTableName(const CXXRecordDecl *Decl); + StringRef getVTableName(const CXXRecordDecl *Decl); /// getLineNumber - Get line number for the location. If location is invalid /// then use current location. diff --git a/clang/lib/CodeGen/CGException.h b/clang/lib/CodeGen/CGException.h index 5a743b51f66..d0216160d50 100644 --- a/clang/lib/CodeGen/CGException.h +++ b/clang/lib/CodeGen/CGException.h @@ -24,15 +24,15 @@ namespace CodeGen { /// The exceptions personality for a function. When class EHPersonality { - llvm::StringRef PersonalityFn; + StringRef PersonalityFn; // If this is non-null, this personality requires a non-standard // function for rethrowing an exception after a catchall cleanup. // This function must have prototype void(void*). - llvm::StringRef CatchallRethrowFn; + StringRef CatchallRethrowFn; - EHPersonality(llvm::StringRef PersonalityFn, - llvm::StringRef CatchallRethrowFn = llvm::StringRef()) + EHPersonality(StringRef PersonalityFn, + StringRef CatchallRethrowFn = StringRef()) : PersonalityFn(PersonalityFn), CatchallRethrowFn(CatchallRethrowFn) {} @@ -46,8 +46,8 @@ public: static const EHPersonality GNU_CPlusPlus; static const EHPersonality GNU_CPlusPlus_SJLJ; - llvm::StringRef getPersonalityFnName() const { return PersonalityFn; } - llvm::StringRef getCatchallRethrowFnName() const { return CatchallRethrowFn; } + StringRef getPersonalityFnName() const { return PersonalityFn; } + StringRef getCatchallRethrowFnName() const { return CatchallRethrowFn; } }; } diff --git a/clang/lib/CodeGen/CGVTables.h b/clang/lib/CodeGen/CGVTables.h index eff6e56c1f8..8e88bba26e7 100644 --- a/clang/lib/CodeGen/CGVTables.h +++ b/clang/lib/CodeGen/CGVTables.h @@ -116,7 +116,7 @@ class CodeGenVTables { /// pointers in the vtable for a given record decl. llvm::DenseMap<const CXXRecordDecl *, uint64_t> NumVirtualFunctionPointers; - typedef llvm::SmallVector<ThunkInfo, 1> ThunkInfoVectorTy; + typedef SmallVector<ThunkInfo, 1> ThunkInfoVectorTy; typedef llvm::DenseMap<const CXXMethodDecl *, ThunkInfoVectorTy> ThunksMapTy; /// Thunks - Contains all thunks that a given method decl will need. @@ -143,7 +143,7 @@ class CodeGenVTables { /// VTableAddressPointsMapTy - Address points for a single vtable. typedef llvm::DenseMap<BaseSubobject, uint64_t> VTableAddressPointsMapTy; - typedef llvm::SmallVector<std::pair<uint64_t, ThunkInfo>, 1> + typedef SmallVector<std::pair<uint64_t, ThunkInfo>, 1> VTableThunksTy; typedef llvm::DenseMap<const CXXRecordDecl *, VTableThunksTy> diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 1ce9c7966c0..656158d77fb 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -353,7 +353,7 @@ private: /// A a; /// foo: /// bar(); - llvm::SmallVector<BranchFixup, 8> BranchFixups; + SmallVector<BranchFixup, 8> BranchFixups; char *allocate(size_t Size); @@ -681,7 +681,7 @@ public: public: /// ObjCEHValueStack - Stack of Objective-C exception values, used for /// rethrows. - llvm::SmallVector<llvm::Value*, 8> ObjCEHValueStack; + SmallVector<llvm::Value*, 8> ObjCEHValueStack; /// A class controlling the emission of a finally block. class FinallyInfo { @@ -872,7 +872,7 @@ public: /// The given basic block lies in the current EH scope, but may be a /// target of a potentially scope-crossing jump; get a stable handle /// to which we can perform this jump later. - JumpDest getJumpDestInCurrentScope(llvm::StringRef Name = llvm::StringRef()) { + JumpDest getJumpDestInCurrentScope(StringRef Name = StringRef()) { return getJumpDestInCurrentScope(createBasicBlock(Name)); } @@ -1089,7 +1089,7 @@ private: JumpDest BreakBlock; JumpDest ContinueBlock; }; - llvm::SmallVector<BreakContinue, 8> BreakContinueStack; + SmallVector<BreakContinue, 8> BreakContinueStack; /// SwitchInsn - This is nearest current switch instruction. It is null if if /// current context is not in a switch. @@ -1415,7 +1415,7 @@ public: static bool hasAggregateLLVMType(QualType T); /// createBasicBlock - Create an LLVM basic block. - llvm::BasicBlock *createBasicBlock(llvm::StringRef name = "", + llvm::BasicBlock *createBasicBlock(StringRef name = "", llvm::Function *parent = 0, llvm::BasicBlock *before = 0) { #ifdef NDEBUG @@ -2122,14 +2122,14 @@ public: llvm::Value *EmitARMBuiltinExpr(unsigned BuiltinID, const CallExpr *E); llvm::Value *EmitNeonCall(llvm::Function *F, - llvm::SmallVectorImpl<llvm::Value*> &O, + SmallVectorImpl<llvm::Value*> &O, const char *name, unsigned shift = 0, bool rightshift = false); llvm::Value *EmitNeonSplat(llvm::Value *V, llvm::Constant *Idx); llvm::Value *EmitNeonShiftVector(llvm::Value *V, llvm::Type *Ty, bool negateForRightShift); - llvm::Value *BuildVector(const llvm::SmallVectorImpl<llvm::Value*> &Ops); + llvm::Value *BuildVector(const SmallVectorImpl<llvm::Value*> &Ops); llvm::Value *EmitX86BuiltinExpr(unsigned BuiltinID, const CallExpr *E); llvm::Value *EmitPPCBuiltinExpr(unsigned BuiltinID, const CallExpr *E); @@ -2370,7 +2370,7 @@ private: /// Ty, into individual arguments on the provided vector \arg Args. See /// ABIArgInfo::Expand. void ExpandTypeToArgs(QualType Ty, RValue Src, - llvm::SmallVector<llvm::Value*, 16> &Args, + SmallVector<llvm::Value*, 16> &Args, llvm::FunctionType *IRFuncTy); llvm::Value* EmitAsmInput(const AsmStmt &S, diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 76c59d42bc8..e081caa7bf1 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -257,7 +257,7 @@ class CodeGenModule : public CodeGenTypeCache { CtorList GlobalDtors; /// MangledDeclNames - A map of canonical GlobalDecls to their mangled names. - llvm::DenseMap<GlobalDecl, llvm::StringRef> MangledDeclNames; + llvm::DenseMap<GlobalDecl, StringRef> MangledDeclNames; llvm::BumpPtrAllocator MangledNamesAllocator; std::vector<llvm::Constant*> Annotations; @@ -279,7 +279,7 @@ class CodeGenModule : public CodeGenTypeCache { /// - Global variables with initializers whose order of initialization /// is set by init_priority attribute. - llvm::SmallVector<std::pair<OrderGlobalInits, llvm::Function*>, 8> + SmallVector<std::pair<OrderGlobalInits, llvm::Function*>, 8> PrioritizedCXXGlobalInits; /// CXXGlobalDtors - Global destructor functions and arguments that need to @@ -433,7 +433,7 @@ public: /// variable with the right type will be created and all uses of the old /// variable will be replaced with a bitcast to the new variable. llvm::GlobalVariable * - CreateOrReplaceCXXRuntimeVariable(llvm::StringRef Name, llvm::Type *Ty, + CreateOrReplaceCXXRuntimeVariable(StringRef Name, llvm::Type *Ty, llvm::GlobalValue::LinkageTypes Linkage); /// GetAddrOfGlobalVar - Return the llvm::Constant for the address of the @@ -544,7 +544,7 @@ public: /// /// \param GlobalName If provided, the name to use for the global /// (if one is created). - llvm::Constant *GetAddrOfConstantString(llvm::StringRef Str, + llvm::Constant *GetAddrOfConstantString(StringRef Str, const char *GlobalName=0); /// GetAddrOfConstantCString - Returns a pointer to a character array @@ -595,13 +595,13 @@ public: /// CreateRuntimeFunction - Create a new runtime function with the specified /// type and name. llvm::Constant *CreateRuntimeFunction(llvm::FunctionType *Ty, - llvm::StringRef Name, + StringRef Name, llvm::Attributes ExtraAttrs = llvm::Attribute::None); /// CreateRuntimeVariable - Create a new runtime global variable with the /// specified type and name. llvm::Constant *CreateRuntimeVariable(llvm::Type *Ty, - llvm::StringRef Name); + StringRef Name); ///@name Custom Blocks Runtime Interfaces ///@{ @@ -633,7 +633,7 @@ public: const AnnotateAttr *AA, unsigned LineNo); /// Error - Emit a general error that something can't be done. - void Error(SourceLocation loc, llvm::StringRef error); + void Error(SourceLocation loc, StringRef error); /// ErrorUnsupported - Print out an error that codegen doesn't support the /// specified stmt yet. @@ -688,7 +688,7 @@ public: AttributeListType &PAL, unsigned &CallingConv); - llvm::StringRef getMangledName(GlobalDecl GD); + StringRef getMangledName(GlobalDecl GD); void getBlockMangledName(GlobalDecl GD, MangleBuffer &Buffer, const BlockDecl *BD); @@ -720,15 +720,15 @@ public: std::vector<const CXXRecordDecl*> DeferredVTables; private: - llvm::GlobalValue *GetGlobalValue(llvm::StringRef Ref); + llvm::GlobalValue *GetGlobalValue(StringRef Ref); - llvm::Constant *GetOrCreateLLVMFunction(llvm::StringRef MangledName, + llvm::Constant *GetOrCreateLLVMFunction(StringRef MangledName, llvm::Type *Ty, GlobalDecl D, bool ForVTable, llvm::Attributes ExtraAttrs = llvm::Attribute::None); - llvm::Constant *GetOrCreateLLVMGlobal(llvm::StringRef MangledName, + llvm::Constant *GetOrCreateLLVMGlobal(StringRef MangledName, llvm::PointerType *PTy, const VarDecl *D, bool UnnamedAddr = false); diff --git a/clang/lib/CodeGen/CodeGenTBAA.h b/clang/lib/CodeGen/CodeGenTBAA.h index c4583473a0e..9fe51fb3314 100644 --- a/clang/lib/CodeGen/CodeGenTBAA.h +++ b/clang/lib/CodeGen/CodeGenTBAA.h @@ -15,7 +15,7 @@ #ifndef CLANG_CODEGEN_CODEGENTBAA_H #define CLANG_CODEGEN_CODEGENTBAA_H -#include "llvm/LLVMContext.h" +#include "clang/Basic/LLVM.h" #include "llvm/ADT/DenseMap.h" namespace llvm { @@ -55,7 +55,7 @@ class CodeGenTBAA { /// considered to be equivalent to it. llvm::MDNode *getChar(); - llvm::MDNode *getTBAAInfoForNamedType(llvm::StringRef NameStr, + llvm::MDNode *getTBAAInfoForNamedType(StringRef NameStr, llvm::MDNode *Parent, bool Readonly = false); diff --git a/clang/lib/CodeGen/CodeGenTypes.h b/clang/lib/CodeGen/CodeGenTypes.h index 7682f2af7dc..7f0f8ac5f0c 100644 --- a/clang/lib/CodeGen/CodeGenTypes.h +++ b/clang/lib/CodeGen/CodeGenTypes.h @@ -93,7 +93,7 @@ class CodeGenTypes { /// a recursive struct conversion, set this to true. bool SkippedLayout; - llvm::SmallVector<const RecordDecl *, 8> DeferredRecords; + SmallVector<const RecordDecl *, 8> DeferredRecords; private: /// TypeCache - This map keeps cache of llvm::Types @@ -190,7 +190,7 @@ public: /// /// \param ArgTys - must all actually be canonical as params const CGFunctionInfo &getFunctionInfo(CanQualType RetTy, - const llvm::SmallVectorImpl<CanQualType> &ArgTys, + const SmallVectorImpl<CanQualType> &ArgTys, const FunctionType::ExtInfo &Info); /// \brief Compute a new LLVM record layout object for the given record. @@ -200,7 +200,7 @@ public: /// addRecordTypeName - Compute a name from the given record decl with an /// optional suffix and name the given LLVM type using it. void addRecordTypeName(const RecordDecl *RD, llvm::StructType *Ty, - llvm::StringRef suffix); + StringRef suffix); public: // These are internal details of CGT that shouldn't be used externally. @@ -211,7 +211,7 @@ public: // These are internal details of CGT that shouldn't be used externally. /// argument types it would be passed as on the provided vector \arg /// ArgTys. See ABIArgInfo::Expand. void GetExpandedTypes(QualType type, - llvm::SmallVectorImpl<llvm::Type*> &expanded); + SmallVectorImpl<llvm::Type*> &expanded); /// IsZeroInitializable - Return whether a type can be /// zero-initialized (in the C++ sense) with an LLVM zeroinitializer. diff --git a/clang/lib/CodeGen/TargetInfo.h b/clang/lib/CodeGen/TargetInfo.h index d5e8884cdff..a188b9c6c28 100644 --- a/clang/lib/CodeGen/TargetInfo.h +++ b/clang/lib/CodeGen/TargetInfo.h @@ -15,6 +15,7 @@ #ifndef CLANG_CODEGEN_TARGETINFO_H #define CLANG_CODEGEN_TARGETINFO_H +#include "clang/Basic/LLVM.h" #include "llvm/ADT/StringRef.h" namespace llvm { @@ -107,7 +108,7 @@ namespace clang { } virtual llvm::Type* adjustInlineAsmType(CodeGen::CodeGenFunction &CGF, - llvm::StringRef Constraint, + StringRef Constraint, llvm::Type* Ty) const { return Ty; } @@ -122,7 +123,7 @@ namespace clang { /// a particular instruction sequence. This functions returns /// that instruction sequence in inline assembly, which will be /// empty if none is required. - virtual llvm::StringRef getARCRetainAutoreleasedReturnValueMarker() const { + virtual StringRef getARCRetainAutoreleasedReturnValueMarker() const { return ""; } }; |