llvm/lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.cpp
Mehdi Amini ae5f5d3d3c Move the global variables representing each Target behind accessor function
This avoids "static initialization order fiasco"

Differential Revision: https://reviews.llvm.org/D25412

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283702 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-09 23:00:34 +00:00

24 lines
736 B
C++

//===-- SystemZTargetInfo.cpp - SystemZ target implementation -------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "SystemZ.h"
#include "llvm/Support/TargetRegistry.h"
using namespace llvm;
Target &llvm::getTheSystemZTarget() {
static Target TheSystemZTarget;
return TheSystemZTarget;
}
extern "C" void LLVMInitializeSystemZTargetInfo() {
RegisterTarget<Triple::systemz, /*HasJIT=*/true> X(getTheSystemZTarget(),
"systemz", "SystemZ");
}