Anton Korobeynikov | 5027652 | 2008-04-23 22:29:24 +0000 | [diff] [blame] | 1 | //===-- CPPTargetMachine.h - TargetMachine for the C++ backend --*- 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 TargetMachine that is used by the C++ backend. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef CPPTARGETMACHINE_H |
| 15 | #define CPPTARGETMACHINE_H |
| 16 | |
| 17 | #include "llvm/Target/TargetMachine.h" |
| 18 | #include "llvm/Target/TargetData.h" |
| 19 | |
| 20 | namespace llvm { |
| 21 | |
David Greene | 7184781 | 2009-07-14 20:18:05 +0000 | [diff] [blame] | 22 | class formatted_raw_ostream; |
Owen Anderson | cb37188 | 2008-08-21 00:14:44 +0000 | [diff] [blame] | 23 | |
Anton Korobeynikov | 5027652 | 2008-04-23 22:29:24 +0000 | [diff] [blame] | 24 | struct CPPTargetMachine : public TargetMachine { |
Daniel Dunbar | 214e223 | 2009-08-04 04:02:45 +0000 | [diff] [blame] | 25 | CPPTargetMachine(const Target &T, const std::string &TT, |
Daniel Dunbar | e28039c | 2009-08-02 23:37:13 +0000 | [diff] [blame] | 26 | const std::string &FS) |
Daniel Dunbar | 214e223 | 2009-08-04 04:02:45 +0000 | [diff] [blame] | 27 | : TargetMachine(T) {} |
Anton Korobeynikov | 5027652 | 2008-04-23 22:29:24 +0000 | [diff] [blame] | 28 | |
Dan Gohman | 99dca4f | 2010-05-11 19:57:55 +0000 | [diff] [blame] | 29 | virtual bool addPassesToEmitFile(PassManagerBase &PM, |
| 30 | formatted_raw_ostream &Out, |
| 31 | CodeGenFileType FileType, |
| 32 | CodeGenOpt::Level OptLevel, |
| 33 | bool DisableVerify); |
Anton Korobeynikov | 5027652 | 2008-04-23 22:29:24 +0000 | [diff] [blame] | 34 | |
Daniel Dunbar | d1a919e | 2009-08-03 17:40:25 +0000 | [diff] [blame] | 35 | virtual const TargetData *getTargetData() const { return 0; } |
Anton Korobeynikov | 5027652 | 2008-04-23 22:29:24 +0000 | [diff] [blame] | 36 | }; |
| 37 | |
Daniel Dunbar | 4cb1e13 | 2009-07-18 23:03:22 +0000 | [diff] [blame] | 38 | extern Target TheCppBackendTarget; |
| 39 | |
Anton Korobeynikov | 5027652 | 2008-04-23 22:29:24 +0000 | [diff] [blame] | 40 | } // End llvm namespace |
| 41 | |
| 42 | |
| 43 | #endif |