LLVM API Documentation
00001 //===-- CTargetMachine.h - TargetMachine for the C backend ------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file was developed by the LLVM research group and is distributed under 00006 // the University of Illinois Open Source License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file declares the TargetMachine that is used by the C backend. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef CTARGETMACHINE_H 00015 #define CTARGETMACHINE_H 00016 00017 #include "llvm/Target/TargetMachine.h" 00018 00019 namespace llvm { 00020 00021 struct CTargetMachine : public TargetMachine { 00022 CTargetMachine(const Module &M, const std::string &FS) 00023 : TargetMachine("CBackend", M) {} 00024 00025 // This is the only thing that actually does anything here. 00026 virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out, 00027 CodeGenFileType FileType, bool Fast); 00028 00029 // This class always works, but shouldn't be the default in most cases. 00030 static unsigned getModuleMatchQuality(const Module &M) { return 1; } 00031 }; 00032 00033 } // End llvm namespace 00034 00035 00036 #endif