]> granicus.if.org Git - clang/blob - include/clang/Basic/TargetOptions.h
Add TargetOptions and use it when constructing targets.
[clang] / include / clang / Basic / TargetOptions.h
1 //===--- TargetOptions.h ----------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLVM_CLANG_FRONTEND_TARGETOPTIONS_H
11 #define LLVM_CLANG_FRONTEND_TARGETOPTIONS_H
12
13 #include <string>
14 #include <vector>
15
16 namespace clang {
17
18 /// TargetOptions - Options for controlling the target.
19 class TargetOptions {
20 public:
21
22   /// If given, the name of the target triple to compile for. If not given the
23   /// target will be selected to match the host.
24   std::string Triple;
25
26   /// If given, the name of the target CPU to generate code for.
27   std::string CPU;
28
29   /// If given, the name of the target ABI to use.
30   std::string ABI;
31
32   /// The list of target specific features to enable or disable -- this should
33   /// be a list of strings starting with by '+' or '-'.
34   std::vector<std::string> Features;
35 };
36
37 }  // end namespace clang
38
39 #endif