| Index: lib/Target/PNaCl/MCTargetDesc/PNaClMCTargetDesc.cpp | 
| =================================================================== | 
| --- lib/Target/PNaCl/MCTargetDesc/PNaClMCTargetDesc.cpp	(revision 0) | 
| +++ lib/Target/PNaCl/MCTargetDesc/PNaClMCTargetDesc.cpp	(revision 0) | 
| @@ -0,0 +1,48 @@ | 
| +//===-- PNaClMCTargetDesc.cpp - PNaCl Target Descriptions -------*- C++ -*-===// | 
| +// | 
| +//                     The LLVM Compiler Infrastructure | 
| +// | 
| +// This file is distributed under the University of Illinois Open Source | 
| +// License. See LICENSE.TXT for details. | 
| +// | 
| +//===----------------------------------------------------------------------===// | 
| +// | 
| +// This file provides PNaCl specific target descriptions. | 
| +// | 
| +//===----------------------------------------------------------------------===// | 
| + | 
| +#include "PNaClMCTargetDesc.h" | 
| +#include "PNaClMCAsmInfo.h" | 
| +#include "llvm/MC/MCCodeGenInfo.h" | 
| +#include "llvm/MC/MCInstrInfo.h" | 
| +#include "llvm/MC/MCRegisterInfo.h" | 
| +#include "llvm/MC/MCSubtargetInfo.h" | 
| +#include "llvm/Support/TargetRegistry.h" | 
| + | 
| +using namespace llvm; | 
| + | 
| +static MCSubtargetInfo *createPNaClMCSubtargetInfo(StringRef TT, StringRef CPU, | 
| +                                                   StringRef FS) { | 
| +  return new MCSubtargetInfo(); | 
| +} | 
| + | 
| +static MCCodeGenInfo *createPNaClMCCodeGenInfo(StringRef TT, Reloc::Model RM, | 
| +                                               CodeModel::Model CM) { | 
| +  MCCodeGenInfo *X = new MCCodeGenInfo(); | 
| +  X->InitMCCodeGenInfo(Reloc::PIC_, CM); | 
| +  return X; | 
| +} | 
| + | 
| +// Force static initialization. | 
| +extern "C" void LLVMInitializePNaClTargetMC() { | 
| +  // Register the MC asm info. | 
| +  RegisterMCAsmInfo<PNaClMCAsmInfo> X(ThePNaClTarget); | 
| + | 
| +  // Register the MC codegen info. | 
| +  TargetRegistry::RegisterMCCodeGenInfo(ThePNaClTarget, | 
| +                                        createPNaClMCCodeGenInfo); | 
| + | 
| +  // Register the MC subtarget info. | 
| +  TargetRegistry::RegisterMCSubtargetInfo(ThePNaClTarget, | 
| +                                          createPNaClMCSubtargetInfo); | 
| +} | 
|  |