Add InitializeNativeAsmParser function.

llvm-svn: 127341
This commit is contained in:
Jan Sjödin 2011-03-09 17:25:46 +00:00
parent 2a3b71684a
commit 27e07c32c6
5 changed files with 29 additions and 1 deletions

8
llvm/configure vendored
View File

@ -5117,6 +5117,7 @@ _ACEOF
LLVM_NATIVE_TARGET="LLVMInitialize${LLVM_NATIVE_ARCH}Target"
LLVM_NATIVE_TARGETINFO="LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo"
LLVM_NATIVE_ASMPRINTER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter"
LLVM_NATIVE_ASMPARSER="LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser"
cat >>confdefs.h <<_ACEOF
#define LLVM_NATIVE_TARGET $LLVM_NATIVE_TARGET
@ -5132,6 +5133,11 @@ cat >>confdefs.h <<_ACEOF
#define LLVM_NATIVE_ASMPRINTER $LLVM_NATIVE_ASMPRINTER
_ACEOF
cat >>confdefs.h <<_ACEOF
#define LLVM_NATIVE_ASMPARSER $LLVM_NATIVE_ASMPARSER
_ACEOF
fi
done
@ -11561,7 +11567,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 11564 "configure"
#line 11570 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H

View File

@ -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

View File

@ -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}

View File

@ -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

View File

@ -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