[PATCH] C API: Expose GlobalValue's UnnamedAddr.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Mar 10 10:14:52 PDT 2014


LGTM

On 5 March 2014 00:37, Manuel Jacob <me at manueljacob.de> wrote:
> Hi whitequark,
>
> http://llvm-reviews.chandlerc.com/D2959
>
> Files:
>   include/llvm-c/Core.h
>   lib/IR/Core.cpp
>
> Index: include/llvm-c/Core.h
> ===================================================================
> --- include/llvm-c/Core.h
> +++ include/llvm-c/Core.h
> @@ -1697,6 +1697,8 @@
>  void LLVMSetVisibility(LLVMValueRef Global, LLVMVisibility Viz);
>  LLVMDLLStorageClass LLVMGetDLLStorageClass(LLVMValueRef Global);
>  void LLVMSetDLLStorageClass(LLVMValueRef Global, LLVMDLLStorageClass Class);
> +LLVMBool LLVMHasUnnamedAddr(LLVMValueRef Global);
> +void LLVMSetUnnamedAddr(LLVMValueRef Global, LLVMBool HasUnnamedAddr);
>
>  /**
>   * @defgroup LLVMCCoreValueWithAlignment Values with alignment
> Index: lib/IR/Core.cpp
> ===================================================================
> --- lib/IR/Core.cpp
> +++ lib/IR/Core.cpp
> @@ -1262,6 +1262,14 @@
>        static_cast<GlobalValue::DLLStorageClassTypes>(Class));
>  }
>
> +LLVMBool LLVMHasUnnamedAddr(LLVMValueRef Global) {
> +  return unwrap<GlobalValue>(Global)->hasUnnamedAddr();
> +}
> +
> +void LLVMSetUnnamedAddr(LLVMValueRef Global, LLVMBool HasUnnamedAddr) {
> +  unwrap<GlobalValue>(Global)->setUnnamedAddr(HasUnnamedAddr);
> +}
> +
>  /*--.. Operations on global variables, load and store instructions .........--*/
>
>  unsigned LLVMGetAlignment(LLVMValueRef V) {
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



More information about the llvm-commits mailing list