[dragonegg] r181030 - Don't declare target initialization functions ourself, let
Duncan Sands
baldrick at free.fr
Fri May 3 09:38:52 PDT 2013
Author: baldrick
Date: Fri May 3 11:38:52 2013
New Revision: 181030
URL: http://llvm.org/viewvc/llvm-project?rev=181030&view=rev
Log:
Don't declare target initialization functions ourself, let
llvm-c/Target.h do it for us. In fact this header was being dragged in already,
and causing clang to error out when compiling this file due to the duplicate
declarations. Fixes PR15903.
Modified:
dragonegg/trunk/src/Backend.cpp
Modified: dragonegg/trunk/src/Backend.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Backend.cpp?rev=181030&r1=181029&r2=181030&view=diff
==============================================================================
--- dragonegg/trunk/src/Backend.cpp (original)
+++ dragonegg/trunk/src/Backend.cpp Fri May 3 11:38:52 2013
@@ -46,6 +46,7 @@
#include "llvm/Target/TargetLibraryInfo.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
+#include "llvm-c/Target.h"
#ifdef ENABLE_LLVM_PLUGINS
#include "llvm/LinkAllPasses.h"
@@ -295,18 +296,6 @@ static bool SizeOfGlobalMatchesDecl(Glob
#error LLVM_TARGET_NAME macro not specified
#endif
-namespace llvm {
-#define Declare2(TARG, MOD) extern "C" void LLVMInitialize##TARG##MOD()
-#define Declare(T, M) Declare2(T, M)
-Declare(LLVM_TARGET_NAME, TargetInfo);
-Declare(LLVM_TARGET_NAME, Target);
-Declare(LLVM_TARGET_NAME, TargetMC);
-Declare(LLVM_TARGET_NAME, AsmPrinter);
-Declare(LLVM_TARGET_NAME, AsmParser);
-#undef Declare
-#undef Declare2
-}
-
/// ConfigureLLVM - Initialized and configure LLVM.
static void ConfigureLLVM(void) {
// Initialize the LLVM backend.
More information about the llvm-commits
mailing list