diff options
author | Robert Widmann <devteam.codafi@gmail.com> | 2018-03-14 06:45:51 +0000 |
---|---|---|
committer | Robert Widmann <devteam.codafi@gmail.com> | 2018-03-14 06:45:51 +0000 |
commit | 4bb481b2f2a3915895c8795dbc90a54be5cf9cfd (patch) | |
tree | cfb958a0f7311663e87b1d01065c19bc31f204c1 /llvm/include/llvm-c/Core.h | |
parent | 2d603a1860f003d90c4e7be95575552c69c2194f (diff) | |
download | bcm5719-llvm-4bb481b2f2a3915895c8795dbc90a54be5cf9cfd.tar.gz bcm5719-llvm-4bb481b2f2a3915895c8795dbc90a54be5cf9cfd.zip |
[LLVM-C] Redo unnamed_address attribute bindings
Summary:
The old bindings should have used an enum instead of a boolean. This
deprecates LLVMHasUnnamedAddr and LLVMSetUnnamedAddr , replacing them
with LLVMGetUnnamedAddress and LLVMSetUnnamedAddress respectively that do.
Though it is unlikely LLVM will gain more supported global value linker
hints, the new API can scale to accommodate this.
Reviewers: deadalnix, whitequark
Reviewed By: whitequark
Subscribers: llvm-commits, harlanhaskins
Differential Revision: https://reviews.llvm.org/D43448
llvm-svn: 327479
Diffstat (limited to 'llvm/include/llvm-c/Core.h')
-rw-r--r-- | llvm/include/llvm-c/Core.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h index 89e36c05688..e1f1191d083 100644 --- a/llvm/include/llvm-c/Core.h +++ b/llvm/include/llvm-c/Core.h @@ -187,6 +187,12 @@ typedef enum { } LLVMVisibility; typedef enum { + LLVMNoUnnamedAddr, /**< Address of the GV is significant. */ + LLVMLocalUnnamedAddr, /**< Address of the GV is locally insignificant. */ + LLVMGlobalUnnamedAddr /**< Address of the GV is globally insignificant. */ +} LLVMUnnamedAddr; + +typedef enum { LLVMDefaultStorageClass = 0, LLVMDLLImportStorageClass = 1, /**< Function to be imported from DLL. */ LLVMDLLExportStorageClass = 2 /**< Function to be accessible from DLL. */ @@ -1844,7 +1850,12 @@ LLVMVisibility LLVMGetVisibility(LLVMValueRef Global); void LLVMSetVisibility(LLVMValueRef Global, LLVMVisibility Viz); LLVMDLLStorageClass LLVMGetDLLStorageClass(LLVMValueRef Global); void LLVMSetDLLStorageClass(LLVMValueRef Global, LLVMDLLStorageClass Class); +LLVMUnnamedAddr LLVMGetUnnamedAddress(LLVMValueRef Global); +void LLVMSetUnnamedAddress(LLVMValueRef Global, LLVMUnnamedAddr UnnamedAddr); + +/** Deprecated: Use LLVMGetUnnamedAddress instead. */ LLVMBool LLVMHasUnnamedAddr(LLVMValueRef Global); +/** Deprecated: Use LLVMSetUnnamedAddress instead. */ void LLVMSetUnnamedAddr(LLVMValueRef Global, LLVMBool HasUnnamedAddr); /** |