diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-15 06:48:46 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-15 06:48:46 +0000 |
commit | d58c03f42ebb4e548c2b53fa25b1cfe02ebb9ac0 (patch) | |
tree | e082f87bb3c2c8ba64c0e6e0b77f6e39bcc885e1 /include/clang/Basic/TargetOptions.h | |
parent | 7745cab137b9d91205f13a7adaebe6ed801595f7 (diff) |
Add TargetOptions and use it when constructing targets.
- This ended up being hard to factor, sorry for the large diff.
- Some post-commit cleanup to come.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88833 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/TargetOptions.h')
-rw-r--r-- | include/clang/Basic/TargetOptions.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/include/clang/Basic/TargetOptions.h b/include/clang/Basic/TargetOptions.h new file mode 100644 index 0000000000..eeaab1558f --- /dev/null +++ b/include/clang/Basic/TargetOptions.h @@ -0,0 +1,39 @@ +//===--- TargetOptions.h ----------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_FRONTEND_TARGETOPTIONS_H +#define LLVM_CLANG_FRONTEND_TARGETOPTIONS_H + +#include <string> +#include <vector> + +namespace clang { + +/// TargetOptions - Options for controlling the target. +class TargetOptions { +public: + + /// If given, the name of the target triple to compile for. If not given the + /// target will be selected to match the host. + std::string Triple; + + /// If given, the name of the target CPU to generate code for. + std::string CPU; + + /// If given, the name of the target ABI to use. + std::string ABI; + + /// The list of target specific features to enable or disable -- this should + /// be a list of strings starting with by '+' or '-'. + std::vector<std::string> Features; +}; + +} // end namespace clang + +#endif |