diff options
author | Jan Sjödin <jan_sjodin@yahoo.com> | 2011-03-09 17:25:46 +0000 |
---|---|---|
committer | Jan Sjödin <jan_sjodin@yahoo.com> | 2011-03-09 17:25:46 +0000 |
commit | dd54ffda263a17bddb0ad04a670916125972929a (patch) | |
tree | 1307a21f9195862b0d6746de512d08d070dcf4bc /include | |
parent | 635f71880bf26c06cdf2c678b4804439a0503429 (diff) | |
download | llvm-dd54ffda263a17bddb0ad04a670916125972929a.tar.gz llvm-dd54ffda263a17bddb0ad04a670916125972929a.tar.bz2 llvm-dd54ffda263a17bddb0ad04a670916125972929a.tar.xz |
Add InitializeNativeAsmParser function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127341 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-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/Target/TargetSelect.h | 13 |
4 files changed, 22 insertions, 0 deletions
diff --git a/include/llvm/Config/config.h.in b/include/llvm/Config/config.h.in index 14c44b4b1e..29f5c93e3c 100644 --- a/include/llvm/Config/config.h.in +++ b/include/llvm/Config/config.h.in @@ -567,6 +567,9 @@ /* LLVM architecture name for the native architecture, if available */ #undef LLVM_NATIVE_ARCH +/* LLVM name for the native AsmParser init function, if available */ +#undef LLVM_NATIVE_ASMPARSER + /* LLVM name for the native AsmPrinter init function, if available */ #undef LLVM_NATIVE_ASMPRINTER diff --git a/include/llvm/Config/llvm-config.h.cmake b/include/llvm/Config/llvm-config.h.cmake index 33a40350d5..9a9cb3b739 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 AsmPrinter init function, if available */ +#cmakedefine LLVM_NATIVE_ASMPARSER LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser + /* Define if this is Unixish platform */ #cmakedefine LLVM_ON_UNIX ${LLVM_ON_UNIX} diff --git a/include/llvm/Config/llvm-config.h.in b/include/llvm/Config/llvm-config.h.in index e7a04ee91b..4766a7a2b2 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 AsmPrinter init function, if available */ +#undef LLVM_NATIVE_ASMPARSER + /* Define if this is Unixish platform */ #undef LLVM_ON_UNIX diff --git a/include/llvm/Target/TargetSelect.h b/include/llvm/Target/TargetSelect.h index 1891f87974..c5ab90b0e0 100644 --- a/include/llvm/Target/TargetSelect.h +++ b/include/llvm/Target/TargetSelect.h @@ -120,6 +120,19 @@ namespace llvm { return true; #endif } + + /// InitializeNativeTargetAsmParser - The main program should call + /// this function to initialize the native target asm parser. + inline bool InitializeNativeTargetAsmParser() { + // If we have a native target, initialize the corresponding asm parser. +#ifdef LLVM_NATIVE_ASMPARSER + LLVM_NATIVE_ASMPARSER(); + return false; +#else + return true; +#endif + } + } #endif |