diff options
Diffstat (limited to 'contrib/llvm/lib/Target/Hexagon/TargetInfo/HexagonTargetInfo.cpp')
-rw-r--r-- | contrib/llvm/lib/Target/Hexagon/TargetInfo/HexagonTargetInfo.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/llvm/lib/Target/Hexagon/TargetInfo/HexagonTargetInfo.cpp b/contrib/llvm/lib/Target/Hexagon/TargetInfo/HexagonTargetInfo.cpp index 40f6c8d..0554646 100644 --- a/contrib/llvm/lib/Target/Hexagon/TargetInfo/HexagonTargetInfo.cpp +++ b/contrib/llvm/lib/Target/Hexagon/TargetInfo/HexagonTargetInfo.cpp @@ -12,8 +12,12 @@ #include "llvm/Support/TargetRegistry.h" using namespace llvm; -Target llvm::TheHexagonTarget; +Target &llvm::getTheHexagonTarget() { + static Target TheHexagonTarget; + return TheHexagonTarget; +} extern "C" void LLVMInitializeHexagonTargetInfo() { - RegisterTarget<Triple::hexagon, /*HasJIT=*/false> X(TheHexagonTarget, "hexagon", "Hexagon"); + RegisterTarget<Triple::hexagon, /*HasJIT=*/false> X(getTheHexagonTarget(), + "hexagon", "Hexagon"); } |