blob: f5894aab83c6715cf1114511ba5acea23eab1eab [file] [log] [blame]
Chris Lattnerf31182a2004-02-13 23:18:48 +00001//===-- CTargetMachine.h - TargetMachine for the C backend ------*- C++ -*-===//
Misha Brukmand6a29a52005-04-20 16:05:03 +00002//
Chris Lattnerf31182a2004-02-13 23:18:48 +00003// The LLVM Compiler Infrastructure
4//
5// This file was developed by the LLVM research group and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
Misha Brukmand6a29a52005-04-20 16:05:03 +00007//
Chris Lattnerf31182a2004-02-13 23:18:48 +00008//===----------------------------------------------------------------------===//
Misha Brukmand6a29a52005-04-20 16:05:03 +00009//
Chris Lattnerf31182a2004-02-13 23:18:48 +000010// This file declares the TargetMachine that is used by the C backend.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef CTARGETMACHINE_H
15#define CTARGETMACHINE_H
16
17#include "llvm/Target/TargetMachine.h"
18
19namespace llvm {
20class IntrinsicLowering;
21
22struct CTargetMachine : public TargetMachine {
Jim Laskeyb1e11802005-09-01 21:38:21 +000023 CTargetMachine(const Module &M, IntrinsicLowering *IL,
24 const std::string &FS) :
Chris Lattnerb06f1032004-03-03 02:14:15 +000025 TargetMachine("CBackend", IL, M) {}
Chris Lattnerf31182a2004-02-13 23:18:48 +000026
Chris Lattnerf31182a2004-02-13 23:18:48 +000027 // This is the only thing that actually does anything here.
Chris Lattner0431c962005-06-25 02:48:37 +000028 virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
Chris Lattnerce8eb0c2005-11-08 02:11:51 +000029 CodeGenFileType FileType, bool Fast);
Chris Lattnerd36c9702004-07-11 02:48:49 +000030
31 // This class always works, but shouldn't be the default in most cases.
32 static unsigned getModuleMatchQuality(const Module &M) { return 1; }
Chris Lattnerf31182a2004-02-13 23:18:48 +000033};
34
35} // End llvm namespace
36
37
38#endif