summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AVR/AVRTargetMachine.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-10-09 23:00:34 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-10-09 23:00:34 +0000
commitf42454b94b035cd4ad65c8470bb56e761f79b86e (patch)
treedc8386dc823263161a0fadf2cf1de1227927a2e7 /llvm/lib/Target/AVR/AVRTargetMachine.cpp
parent69125397170c6ee553725b8bfb562fe38d3ffefe (diff)
downloadbcm5719-llvm-f42454b94b035cd4ad65c8470bb56e761f79b86e.tar.gz
bcm5719-llvm-f42454b94b035cd4ad65c8470bb56e761f79b86e.zip
Move the global variables representing each Target behind accessor function
This avoids "static initialization order fiasco" Differential Revision: https://reviews.llvm.org/D25412 llvm-svn: 283702
Diffstat (limited to 'llvm/lib/Target/AVR/AVRTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/AVR/AVRTargetMachine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/AVR/AVRTargetMachine.cpp b/llvm/lib/Target/AVR/AVRTargetMachine.cpp
index b613c3a2f70..f630a5ddccb 100644
--- a/llvm/lib/Target/AVR/AVRTargetMachine.cpp
+++ b/llvm/lib/Target/AVR/AVRTargetMachine.cpp
@@ -77,7 +77,7 @@ TargetPassConfig *AVRTargetMachine::createPassConfig(PassManagerBase &PM) {
extern "C" void LLVMInitializeAVRTarget() {
// Register the target.
- RegisterTargetMachine<AVRTargetMachine> X(TheAVRTarget);
+ RegisterTargetMachine<AVRTargetMachine> X(getTheAVRTarget());
}
const AVRSubtarget *AVRTargetMachine::getSubtargetImpl() const {
OpenPOWER on IntegriCloud