[llvm] r194140 - [llvm-c] Add functions for initializing native AsmPrinter, AsmParser & Disassembler

Timur Iskhodzhanov timurrrr at google.com
Wed Nov 6 01:42:01 PST 2013


FYI

This fails to build on Windows:
lib\Support\DynamicLibrary.cpp(179) : error C2653: 'sys' : is not a
class or namespace name
lib\Support\DynamicLibrary.cpp(179) : error C3861:
'LoadLibraryPermanently': identifier not found

2013/11/6 Peter Zotov <whitequark at whitequark.org>:
> Author: whitequark
> Date: Wed Nov  6 03:21:35 2013
> New Revision: 194140
>
> URL: http://llvm.org/viewvc/llvm-project?rev=194140&view=rev
> Log:
> [llvm-c] Add functions for initializing native AsmPrinter, AsmParser & Disassembler
>
> Original patch by Chris Wailes
>
> Modified:
>     llvm/trunk/include/llvm-c/Target.h
>
> Modified: llvm/trunk/include/llvm-c/Target.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm-c/Target.h?rev=194140&r1=194139&r2=194140&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm-c/Target.h (original)
> +++ llvm/trunk/include/llvm-c/Target.h Wed Nov  6 03:21:35 2013
> @@ -146,6 +146,42 @@ static inline LLVMBool LLVMInitializeNat
>  #endif
>  }
>
> +/** LLVMInitializeNativeTargetAsmParser - The main program should call this
> +    function to initialize the parser for the native target corresponding to the
> +    host. */
> +static inline LLVMBool LLVMInitializeNativeTargetAsmParser(void) {
> +#ifdef LLVM_NATIVE_TARGET
> +  LLVM_NATIVE_ASMPARSER();
> +  return 0;
> +#else
> +  return 1;
> +#endif
> +}
> +
> +/** LLVMInitializeNativeTargetAsmPrinter - The main program should call this
> +    function to initialize the printer for the native target corresponding to
> +    the host. */
> +static inline LLVMBool LLVMInitializeNativeTargetAsmPrinter(void) {
> +#ifdef LLVM_NATIVE_TARGET
> +  LLVM_NATIVE_ASMPRINTER();
> +  return 0;
> +#else
> +  return 1;
> +#endif
> +}
> +
> +/** LLVMInitializeNativeTargetDisassembler - The main program should call this
> +    function to initialize the disassembler for the native target corresponding
> +    to the host. */
> +static inline LLVMBool LLVMInitializeNativeTargetDisassembler(void) {
> +#ifdef LLVM_NATIVE_TARGET
> +  LLVM_NATIVE_DISASSEMBLER();
> +  return 0;
> +#else
> +  return 1;
> +#endif
> +}
> +
>  /*===-- Target Data -------------------------------------------------------===*/
>
>  /** Creates target data from a target layout string.
>
>
> _______________________________________________
> 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