1 //==-- llvm/Target/TargetSubtarget.h - Target Information --------*- C++ -*-==//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by Nate Begeman and is distributed under the
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file describes the subtarget options of a Target machine.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TARGET_TARGETSUBTARGET_H
15 #define LLVM_TARGET_TARGETSUBTARGET_H
21 //===----------------------------------------------------------------------===//
23 /// TargetSubtarget - Generic base class for all target subtargets. All
24 /// Target-specific options that control code generation and printing should
25 /// be exposed through a TargetSubtarget-derived class.
27 class TargetSubtarget {
28 TargetSubtarget(const TargetSubtarget&); // DO NOT IMPLEMENT
29 void operator=(const TargetSubtarget&); // DO NOT IMPLEMENT
30 std::string CPU; // CPU name.
31 protected: // Can only create subclasses...
34 virtual ~TargetSubtarget();
35 void setCPU(const std::string &C) { CPU = C; }
36 const std::string &getCPU() const { return CPU; }
39 } // End llvm namespace