diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:17:04 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:17:04 +0000 |
| commit | b915e9e0fc85ba6f398b3fab0db6a81a8913af94 (patch) | |
| tree | 98b8f811c7aff2547cab8642daf372d6c59502fb /lib/Target/MSP430/TargetInfo/MSP430TargetInfo.cpp | |
| parent | 6421cca32f69ac849537a3cff78c352195e99f1b (diff) | |
Notes
Diffstat (limited to 'lib/Target/MSP430/TargetInfo/MSP430TargetInfo.cpp')
| -rw-r--r-- | lib/Target/MSP430/TargetInfo/MSP430TargetInfo.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Target/MSP430/TargetInfo/MSP430TargetInfo.cpp b/lib/Target/MSP430/TargetInfo/MSP430TargetInfo.cpp index 0d71d04ebe22..62f52a193674 100644 --- a/lib/Target/MSP430/TargetInfo/MSP430TargetInfo.cpp +++ b/lib/Target/MSP430/TargetInfo/MSP430TargetInfo.cpp @@ -12,9 +12,12 @@ #include "llvm/Support/TargetRegistry.h" using namespace llvm; -Target llvm::TheMSP430Target; +Target &llvm::getTheMSP430Target() { + static Target TheMSP430Target; + return TheMSP430Target; +} -extern "C" void LLVMInitializeMSP430TargetInfo() { - RegisterTarget<Triple::msp430> - X(TheMSP430Target, "msp430", "MSP430 [experimental]"); +extern "C" void LLVMInitializeMSP430TargetInfo() { + RegisterTarget<Triple::msp430> X(getTheMSP430Target(), "msp430", + "MSP430 [experimental]"); } |
