blob: 678a932cb28686d14ad168e7c374bc826995ecc6 [file] [log] [blame]
Anton Korobeynikov78695032008-04-23 22:29:24 +00001//===-- 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
Benjamin Kramera7c40ef2014-08-13 16:26:38 +000014#ifndef LLVM_LIB_TARGET_CPPBACKEND_CPPTARGETMACHINE_H
15#define LLVM_LIB_TARGET_CPPBACKEND_CPPTARGETMACHINE_H
Anton Korobeynikov78695032008-04-23 22:29:24 +000016
Chandler Carruth9fb823b2013-01-02 11:36:10 +000017#include "llvm/IR/DataLayout.h"
Chandler Carruth802d7552012-12-04 07:12:27 +000018#include "llvm/Target/TargetMachine.h"
Eric Christophereba91672014-08-04 16:40:55 +000019#include "llvm/Target/TargetSubtargetInfo.h"
Anton Korobeynikov78695032008-04-23 22:29:24 +000020
21namespace llvm {
22
David Greenea31f96c2009-07-14 20:18:05 +000023class formatted_raw_ostream;
Owen Anderson93719642008-08-21 00:14:44 +000024
Anton Korobeynikov78695032008-04-23 22:29:24 +000025struct CPPTargetMachine : public TargetMachine {
Mehdi Amini93e1ea12015-03-12 00:07:24 +000026 CPPTargetMachine(const Target &T, StringRef TT, StringRef CPU, StringRef FS,
27 const TargetOptions &Options, Reloc::Model RM,
28 CodeModel::Model CM, CodeGenOpt::Level OL)
Eric Christopher4d0f35a2015-03-21 04:22:23 +000029 : TargetMachine(T, "", TT, CPU, FS, Options) {}
Anton Korobeynikov78695032008-04-23 22:29:24 +000030
Eric Christophereba91672014-08-04 16:40:55 +000031public:
Craig Topper9d74a5a2014-04-29 07:58:41 +000032 bool addPassesToEmitFile(PassManagerBase &PM, formatted_raw_ostream &Out,
33 CodeGenFileType FileType, bool DisableVerify,
34 AnalysisID StartAfter,
35 AnalysisID StopAfter) override;
Anton Korobeynikov78695032008-04-23 22:29:24 +000036};
37
Daniel Dunbar67038c12009-07-18 23:03:22 +000038extern Target TheCppBackendTarget;
39
Anton Korobeynikov78695032008-04-23 22:29:24 +000040} // End llvm namespace
41
42
43#endif