Use llvm::InitializeNativeTargetAsmPrinter() now that it is available.

This enables us to remove the whole ugly config file parsing hack.

Also includes some minor CMake beautifications (nobody should really be at 2.4 anymore, 2.6 is more than three years old now).
This commit is contained in:
David Nadlinger
2011-11-12 18:24:27 +01:00
parent bafe9c8e03
commit 23f360c988
2 changed files with 68 additions and 66 deletions

View File

@@ -434,7 +434,9 @@ int main(int argc, char** argv)
// Allocate target machine.
// first initialize llvm
// First initialize the native target and any additionally specified ones.
llvm::InitializeNativeTarget();
llvm::InitializeNativeTargetAsmPrinter();
#define LLVM_TARGET(A) LLVMInitialize##A##TargetInfo(); LLVMInitialize##A##Target(); LLVMInitialize##A##AsmPrinter();
// this is defined to be LLVM_TARGET(target name 1) LLVM_TARGET(target name 2) ...
LDC_TARGETS