summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2008-11-15 21:36:30 +0000
committerOscar Fuentes <ofv@wanadoo.es>2008-11-15 21:36:30 +0000
commitba4eb2a9dba43e1d4de1e5d378204a8222e1bfea (patch)
tree4f99d9355b464c7a565d1b29c0e32fc4d8cf9d71 /llvm/lib/Target/PowerPC
parente132e2432a3834f6128ffe304b04ec58b415af3a (diff)
downloadbcm5719-llvm-ba4eb2a9dba43e1d4de1e5d378204a8222e1bfea.tar.gz
bcm5719-llvm-ba4eb2a9dba43e1d4de1e5d378204a8222e1bfea.zip
Adds extern "C" ints to the .cpp files that use RegisterTarget, as
well as 2 files that use "Registrator"s. These are to be used by the MSVC builds, as the Win32 linker does not include libs that are otherwise unreferenced, even if global constructors in the lib have side-effects. Patch by Scott Graham! llvm-svn: 59378
Diffstat (limited to 'llvm/lib/Target/PowerPC')
-rw-r--r--llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp3
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetMachine.cpp8
2 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
index 6c17dbece07..3043b0098b4 100644
--- a/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
+++ b/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
@@ -1112,3 +1112,6 @@ namespace {
}
} Registrator;
}
+
+extern "C" int PowerPCAsmPrinterForceLink;
+int PowerPCAsmPrinterForceLink = 0;
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
index 22b459cb748..0ff65d2a0d3 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -21,6 +21,14 @@
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
+/// PowerPCTargetMachineModule - Note that this is used on hosts that
+/// cannot link in a library unless there are references into the
+/// library. In particular, it seems that it is not possible to get
+/// things to work on Win32 without this. Though it is unused, do not
+/// remove it.
+extern "C" int PowerPCTargetMachineModule;
+int PowerPCTargetMachineModule = 0;
+
// Register the targets
static RegisterTarget<PPC32TargetMachine>
X("ppc32", "PowerPC 32");
OpenPOWER on IntegriCloud