blob: 00e402feffbc081e68e3e1d7978fe606b4837776 [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 {
Daniel Sanders3e5de882015-06-11 19:41:26 +000026 CPPTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
27 StringRef FS, const TargetOptions &Options, Reloc::Model RM,
Mehdi Amini93e1ea12015-03-12 00:07:24 +000028 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:
Rafael Espindola5560a4c2015-04-14 22:14:34 +000032 bool addPassesToEmitFile(PassManagerBase &PM, raw_pwrite_stream &Out,
Craig Topper9d74a5a2014-04-29 07:58:41 +000033 CodeGenFileType FileType, bool DisableVerify,
Alex Lorenze2d75232015-07-06 17:44:26 +000034 AnalysisID StartBefore, AnalysisID StartAfter,
35 AnalysisID StopAfter,
Alex Lorenz735c47e2015-06-15 20:30:22 +000036 MachineFunctionInitializer *MFInitializer) override;
Anton Korobeynikov78695032008-04-23 22:29:24 +000037};
38
Daniel Dunbar67038c12009-07-18 23:03:22 +000039extern Target TheCppBackendTarget;
40
Alexander Kornienkof00654e2015-06-23 09:49:53 +000041} // End llvm namespace
Anton Korobeynikov78695032008-04-23 22:29:24 +000042
43
44#endif