LLVM API Documentation

XCoreSubtarget.h

Go to the documentation of this file.
00001 //=====-- XCoreSubtarget.h - Define Subtarget for the XCore -----*- C++ -*--==//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file declares the XCore specific subclass of TargetSubtarget.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef XCORESUBTARGET_H
00015 #define XCORESUBTARGET_H
00016 
00017 #include "llvm/Target/TargetSubtarget.h"
00018 #include "llvm/Target/TargetMachine.h"
00019 
00020 #include <string>
00021 
00022 namespace llvm {
00023 class Module;
00024 
00025 class XCoreSubtarget : public TargetSubtarget {
00026   bool IsXS1A;
00027   bool IsXS1B;
00028 
00029 public:
00030   /// This constructor initializes the data members to match that
00031   /// of the specified module.
00032   ///
00033   XCoreSubtarget(const TargetMachine &TM, const Module &M, 
00034                 const std::string &FS);
00035 
00036   bool isXS1A() const { return IsXS1A; }
00037   bool isXS1B() const { return IsXS1B; }
00038   
00039   /// ParseSubtargetFeatures - Parses features string setting specified 
00040   /// subtarget options.  Definition of function is auto generated by tblgen.
00041   void ParseSubtargetFeatures(const std::string &FS, const std::string &CPU);
00042 };
00043 } // End llvm namespace
00044 
00045 #endif