mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-21 03:53:04 +02:00
fa86e5fee9
This avoids "static initialization order fiasco" Differential Revision: https://reviews.llvm.org/D25412 llvm-svn: 283702
24 lines
715 B
C++
24 lines
715 B
C++
//===-- AVRTargetInfo.cpp - AVR Target Implementation ---------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/IR/Module.h"
|
|
#include "llvm/Support/TargetRegistry.h"
|
|
namespace llvm {
|
|
Target &getTheAVRTarget() {
|
|
static Target TheAVRTarget;
|
|
return TheAVRTarget;
|
|
}
|
|
}
|
|
|
|
extern "C" void LLVMInitializeAVRTargetInfo() {
|
|
llvm::RegisterTarget<llvm::Triple::avr> X(llvm::getTheAVRTarget(), "avr",
|
|
"Atmel AVR Microcontroller");
|
|
}
|
|
|