summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-06-16 20:12:29 +0000
committerDouglas Gregor <dgregor@apple.com>2009-06-16 20:12:29 +0000
commit1b731d5dbe66e095c8cb778c20cbfca09ed24c59 (patch)
tree3b70585f419f3d21aabb3abc46666f5062efef26 /llvm/lib/Target/PowerPC
parent392da9c56d0ae1889e35dbebf4da6d8a34c4e0c8 (diff)
downloadbcm5719-llvm-1b731d5dbe66e095c8cb778c20cbfca09ed24c59.tar.gz
bcm5719-llvm-1b731d5dbe66e095c8cb778c20cbfca09ed24c59.zip
Introduce new headers whose inclusion forces linking and
initialization of all targets (InitializeAllTargets.h) or assembler printers (InitializeAllAsmPrinters.h). This is a step toward the elimination of relinked object files, so that we can build normal archives. llvm-svn: 73543
Diffstat (limited to 'llvm/lib/Target/PowerPC')
-rw-r--r--llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp6
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetMachine.cpp5
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 7723982f69a..e4783c1a18f 100644
--- a/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
+++ b/llvm/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
@@ -1202,3 +1202,9 @@ namespace {
extern "C" int PowerPCAsmPrinterForceLink;
int PowerPCAsmPrinterForceLink = 0;
+
+// Force static initialization when called from
+// llvm/InitializeAllAsmPrinters.h
+namespace llvm {
+ void InitializePowerPCAsmPrinter() { }
+}
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
index ef3f0fc0421..3e89885a77e 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -35,6 +35,11 @@ X("ppc32", "PowerPC 32");
static RegisterTarget<PPC64TargetMachine>
Y("ppc64", "PowerPC 64");
+// Force static initialization when called from llvm/InitializeAllTargets.h
+namespace llvm {
+ void InitializePowerPCTarget() { }
+}
+
// No assembler printer by default
PPCTargetMachine::AsmPrinterCtorFn PPCTargetMachine::AsmPrinterCtor = 0;
OpenPOWER on IntegriCloud