diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
commit | 676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (patch) | |
tree | 02a1ac369cb734d0abfa5000dd86e5b7797e6a74 /lib/CodeGen/CodeGenModule.h | |
parent | c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff) | |
download | src-test2-676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63.tar.gz src-test2-676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63.zip |
Notes
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | lib/CodeGen/CodeGenModule.h | 50 |
1 files changed, 40 insertions, 10 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 91f3d94330f1..75679d11c13c 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -119,15 +119,29 @@ struct OrderGlobalInits { struct ObjCEntrypoints { ObjCEntrypoints() { memset(this, 0, sizeof(*this)); } - /// void objc_autoreleasePoolPop(void*); + /// void objc_alloc(id); + llvm::Constant *objc_alloc; + + /// void objc_allocWithZone(id); + llvm::Constant *objc_allocWithZone; + + /// void objc_autoreleasePoolPop(void*); llvm::Constant *objc_autoreleasePoolPop; + /// void objc_autoreleasePoolPop(void*); + /// Note this method is used when we are using exception handling + llvm::Constant *objc_autoreleasePoolPopInvoke; + /// void *objc_autoreleasePoolPush(void); llvm::Constant *objc_autoreleasePoolPush; /// id objc_autorelease(id); llvm::Constant *objc_autorelease; + /// id objc_autorelease(id); + /// Note this is the runtime method not the intrinsic. + llvm::Constant *objc_autoreleaseRuntimeFunction; + /// id objc_autoreleaseReturnValue(id); llvm::Constant *objc_autoreleaseReturnValue; @@ -152,6 +166,10 @@ struct ObjCEntrypoints { /// id objc_retain(id); llvm::Constant *objc_retain; + /// id objc_retain(id); + /// Note this is the runtime method not the intrinsic. + llvm::Constant *objc_retainRuntimeFunction; + /// id objc_retainAutorelease(id); llvm::Constant *objc_retainAutorelease; @@ -167,6 +185,10 @@ struct ObjCEntrypoints { /// void objc_release(id); llvm::Constant *objc_release; + /// void objc_release(id); + /// Note this is the runtime method not the intrinsic. + llvm::Constant *objc_releaseRuntimeFunction; + /// void objc_storeStrong(id*, id); llvm::Constant *objc_storeStrong; @@ -764,7 +786,8 @@ public: /// bitcast to the new variable. llvm::GlobalVariable * CreateOrReplaceCXXRuntimeVariable(StringRef Name, llvm::Type *Ty, - llvm::GlobalValue::LinkageTypes Linkage); + llvm::GlobalValue::LinkageTypes Linkage, + unsigned Alignment); llvm::Function * CreateGlobalInitOrDestructFunction(llvm::FunctionType *ty, const Twine &name, @@ -1042,8 +1065,7 @@ public: const CGFunctionInfo &FI); /// Set the LLVM function attributes (sext, zext, etc). - void SetLLVMFunctionAttributes(const Decl *D, - const CGFunctionInfo &Info, + void SetLLVMFunctionAttributes(GlobalDecl GD, const CGFunctionInfo &Info, llvm::Function *F); /// Set the LLVM function attributes which only apply to a function @@ -1103,8 +1125,7 @@ public: // Fills in the supplied string map with the set of target features for the // passed in function. - void getFunctionFeatureMap(llvm::StringMap<bool> &FeatureMap, - const FunctionDecl *FD); + void getFunctionFeatureMap(llvm::StringMap<bool> &FeatureMap, GlobalDecl GD); StringRef getMangledName(GlobalDecl GD); StringRef getBlockMangledName(GlobalDecl GD, const BlockDecl *BD); @@ -1223,6 +1244,10 @@ public: void EmitOMPDeclareReduction(const OMPDeclareReductionDecl *D, CodeGenFunction *CGF = nullptr); + /// Emit a code for requires directive. + /// \param D Requires declaration + void EmitOMPRequiresDecl(const OMPRequiresDecl *D); + /// Returns whether the given record has hidden LTO visibility and therefore /// may participate in (single-module) CFI and whole-program vtable /// optimization. @@ -1288,9 +1313,9 @@ private: llvm::AttributeList ExtraAttrs = llvm::AttributeList(), ForDefinition_t IsForDefinition = NotForDefinition); - llvm::Constant *GetOrCreateMultiVersionIFunc(GlobalDecl GD, - llvm::Type *DeclTy, - const FunctionDecl *FD); + llvm::Constant *GetOrCreateMultiVersionResolver(GlobalDecl GD, + llvm::Type *DeclTy, + const FunctionDecl *FD); void UpdateMultiVersionNames(GlobalDecl GD, const FunctionDecl *FD); llvm::Constant *GetOrCreateLLVMGlobal(StringRef MangledName, @@ -1299,7 +1324,7 @@ private: ForDefinition_t IsForDefinition = NotForDefinition); - bool GetCPUAndFeaturesAttributes(const Decl *D, + bool GetCPUAndFeaturesAttributes(GlobalDecl GD, llvm::AttrBuilder &AttrBuilder); void setNonAliasAttributes(GlobalDecl GD, llvm::GlobalObject *GO); @@ -1310,6 +1335,8 @@ private: void EmitGlobalDefinition(GlobalDecl D, llvm::GlobalValue *GV = nullptr); void EmitGlobalFunctionDefinition(GlobalDecl GD, llvm::GlobalValue *GV); + void EmitMultiVersionFunctionDefinition(GlobalDecl GD, llvm::GlobalValue *GV); + void EmitGlobalVarDefinition(const VarDecl *D, bool IsTentative = false); void EmitAliasDefinition(GlobalDecl GD); void emitIFuncDefinition(GlobalDecl GD); @@ -1397,6 +1424,9 @@ private: /// Emit the Clang version as llvm.ident metadata. void EmitVersionIdentMetadata(); + /// Emit the Clang commandline as llvm.commandline metadata. + void EmitCommandLineMetadata(); + /// Emits target specific Metadata for global declarations. void EmitTargetMetadata(); |