diff options
author | Eric Christopher <echristo@apple.com> | 2012-03-26 21:56:56 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-03-26 21:56:56 +0000 |
commit | c4b2271d4aa5c98417d6582b4f0b69fbe5e61cb9 (patch) | |
tree | 7abfdfd3651ae8fa374f9d9a254bee444d555f42 /include | |
parent | 11641d308a560f5bdcd17e13c808e1abf66f5404 (diff) | |
download | external_llvm-c4b2271d4aa5c98417d6582b4f0b69fbe5e61cb9.zip external_llvm-c4b2271d4aa5c98417d6582b4f0b69fbe5e61cb9.tar.gz external_llvm-c4b2271d4aa5c98417d6582b4f0b69fbe5e61cb9.tar.bz2 |
Add InitializeNativeTargetDisassembler function.
Patch by Ojab.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153476 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Config/config.h.cmake | 3 | ||||
-rw-r--r-- | include/llvm/Config/config.h.in | 3 | ||||
-rw-r--r-- | include/llvm/Config/llvm-config.h.cmake | 3 | ||||
-rw-r--r-- | include/llvm/Config/llvm-config.h.in | 3 | ||||
-rw-r--r-- | include/llvm/Support/TargetSelect.h | 12 |
5 files changed, 24 insertions, 0 deletions
diff --git a/include/llvm/Config/config.h.cmake b/include/llvm/Config/config.h.cmake index e50bff5..69e3580 100644 --- a/include/llvm/Config/config.h.cmake +++ b/include/llvm/Config/config.h.cmake @@ -572,6 +572,9 @@ /* LLVM name for the native AsmPrinter init function, if available */ #cmakedefine LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter +/* LLVM name for the native Disassembler init function, if available */ +#cmakedefine LLVM_NATIVE_DISASSEMBLER LLVMInitialize${LLVM_NATIVE_ARCH}Disassembler + /* LLVM name for the native Target init function, if available */ #cmakedefine LLVM_NATIVE_TARGET LLVMInitialize${LLVM_NATIVE_ARCH}Target diff --git a/include/llvm/Config/config.h.in b/include/llvm/Config/config.h.in index 3095fab..ccff7da 100644 --- a/include/llvm/Config/config.h.in +++ b/include/llvm/Config/config.h.in @@ -567,6 +567,9 @@ /* LLVM name for the native AsmPrinter init function, if available */ #undef LLVM_NATIVE_ASMPRINTER +/* LLVM name for the native Disassembler init function, if available */ +#undef LLVM_NATIVE_DISASSEMBLER + /* LLVM name for the native Target init function, if available */ #undef LLVM_NATIVE_TARGET diff --git a/include/llvm/Config/llvm-config.h.cmake b/include/llvm/Config/llvm-config.h.cmake index 3a55e6b..85d28fe 100644 --- a/include/llvm/Config/llvm-config.h.cmake +++ b/include/llvm/Config/llvm-config.h.cmake @@ -61,6 +61,9 @@ /* LLVM name for the native AsmPrinter init function, if available */ #cmakedefine LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter +/* LLVM name for the native Disassembler init function, if available */ +#cmakedefine LLVM_NATIVE_DISASSEMBLER LLVMInitialize${LLVM_NATIVE_ARCH}Disassembler + /* LLVM name for the native Target init function, if available */ #cmakedefine LLVM_NATIVE_TARGET LLVMInitialize${LLVM_NATIVE_ARCH}Target diff --git a/include/llvm/Config/llvm-config.h.in b/include/llvm/Config/llvm-config.h.in index 2613366..973652f 100644 --- a/include/llvm/Config/llvm-config.h.in +++ b/include/llvm/Config/llvm-config.h.in @@ -61,6 +61,9 @@ /* LLVM name for the native AsmPrinter init function, if available */ #undef LLVM_NATIVE_ASMPRINTER +/* LLVM name for the native Disassembler init function, if available */ +#undef LLVM_NATIVE_DISASSEMBLER + /* LLVM name for the native Target init function, if available */ #undef LLVM_NATIVE_TARGET diff --git a/include/llvm/Support/TargetSelect.h b/include/llvm/Support/TargetSelect.h index 83ff68c..a86e953 100644 --- a/include/llvm/Support/TargetSelect.h +++ b/include/llvm/Support/TargetSelect.h @@ -149,6 +149,18 @@ namespace llvm { #endif } + /// InitializeNativeTargetDisassembler - The main program should call + /// this function to initialize the native target disassembler. + inline bool InitializeNativeTargetDisassembler() { + // If we have a native target, initialize the corresponding disassembler. +#ifdef LLVM_NATIVE_DISASSEMBLER + LLVM_NATIVE_DISASSEMBLER(); + return false; +#else + return true; +#endif + } + } #endif |