OLD | NEW |
(Empty) | |
| 1 //===-- PNaClTargetMachine.h - TargetMachine for the PNaCl --*- 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 declares the PNaCl-specific subclass of TargetMachine. |
| 11 // |
| 12 //===----------------------------------------------------------------------===// |
| 13 |
| 14 #ifndef PNACLTARGETMACHINE_H |
| 15 #define PNACLTARGETMACHINE_H |
| 16 |
| 17 #include "llvm/Target/TargetMachine.h" |
| 18 #include "llvm/Target/TargetData.h" |
| 19 |
| 20 namespace llvm { |
| 21 |
| 22 class formatted_raw_ostream; |
| 23 |
| 24 class PNaClTargetMachine : public TargetMachine { |
| 25 const TargetData DataLayout; // Calculates type size & alignment |
| 26 |
| 27 public: |
| 28 PNaClTargetMachine(const Target &T, StringRef TT, |
| 29 StringRef CPU, StringRef FS, |
| 30 Reloc::Model RM, CodeModel::Model CM); |
| 31 |
| 32 virtual bool addPassesToEmitFile(PassManagerBase &PM, |
| 33 formatted_raw_ostream &Out, |
| 34 CodeGenFileType FileType, |
| 35 CodeGenOpt::Level OptLevel, |
| 36 bool DisableVerify); |
| 37 |
| 38 virtual const TargetData *getTargetData() const { return &DataLayout; } |
| 39 }; |
| 40 |
| 41 extern Target ThePNaClTarget; |
| 42 |
| 43 } // end namespace llvm |
| 44 |
| 45 #endif |
OLD | NEW |