Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Side by Side Diff: lib/Target/PNaCl/MCTargetDesc/PNaClMCTargetDesc.cpp

Issue 7847007: lto/addAsmGlobalSymbols: fail fracefully when the target does not define AsmParser. (Closed) Base URL: https://llvm.org/svn/llvm-project/llvm/trunk/
Patch Set: . Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/Target/PNaCl/MCTargetDesc/PNaClMCTargetDesc.h ('k') | lib/Target/PNaCl/Makefile » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 //===-- PNaClMCTargetDesc.cpp - PNaCl Target Descriptions -------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file provides PNaCl specific target descriptions.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #include "PNaClMCTargetDesc.h"
15 #include "PNaClMCAsmInfo.h"
16 #include "llvm/MC/MCCodeGenInfo.h"
17 #include "llvm/MC/MCInstrInfo.h"
18 #include "llvm/MC/MCRegisterInfo.h"
19 #include "llvm/MC/MCSubtargetInfo.h"
20 #include "llvm/Support/TargetRegistry.h"
21
22 using namespace llvm;
23
24 static MCSubtargetInfo *createPNaClMCSubtargetInfo(StringRef TT, StringRef CPU,
25 StringRef FS) {
26 return new MCSubtargetInfo();
27 }
28
29 static MCCodeGenInfo *createPNaClMCCodeGenInfo(StringRef TT, Reloc::Model RM,
30 CodeModel::Model CM) {
31 MCCodeGenInfo *X = new MCCodeGenInfo();
32 X->InitMCCodeGenInfo(Reloc::PIC_, CM);
33 return X;
34 }
35
36 // Force static initialization.
37 extern "C" void LLVMInitializePNaClTargetMC() {
38 // Register the MC asm info.
39 RegisterMCAsmInfo<PNaClMCAsmInfo> X(ThePNaClTarget);
40
41 // Register the MC codegen info.
42 TargetRegistry::RegisterMCCodeGenInfo(ThePNaClTarget,
43 createPNaClMCCodeGenInfo);
44
45 // Register the MC subtarget info.
46 TargetRegistry::RegisterMCSubtargetInfo(ThePNaClTarget,
47 createPNaClMCSubtargetInfo);
48 }
OLDNEW
« no previous file with comments | « lib/Target/PNaCl/MCTargetDesc/PNaClMCTargetDesc.h ('k') | lib/Target/PNaCl/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698