blob: f947f650c6763e166196868541cf2ef06fd7c8ac [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 {
Chris Lattnerf31182a2004-02-13 23:18:48 +000020
21struct CTargetMachine : public TargetMachine {
Chris Lattnerbc641b92006-03-23 05:43:16 +000022 CTargetMachine(const Module &M, const std::string &FS)
23 : TargetMachine("CBackend", M) {}
Chris Lattnerf31182a2004-02-13 23:18:48 +000024
Chris Lattnerf31182a2004-02-13 23:18:48 +000025 // This is the only thing that actually does anything here.
Chris Lattner0431c962005-06-25 02:48:37 +000026 virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
Chris Lattnerce8eb0c2005-11-08 02:11:51 +000027 CodeGenFileType FileType, bool Fast);
Chris Lattnerd36c9702004-07-11 02:48:49 +000028
29 // This class always works, but shouldn't be the default in most cases.
30 static unsigned getModuleMatchQuality(const Module &M) { return 1; }
Chris Lattnerf31182a2004-02-13 23:18:48 +000031};
32
33} // End llvm namespace
34
35
36#endif