diff options
author | ed <ed@FreeBSD.org> | 2009-06-02 17:58:47 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-06-02 17:58:47 +0000 |
commit | f27e5a09a0d815b8a4814152954ff87dadfdefc0 (patch) | |
tree | ce7d964cbb5e39695b71481698f10cb099c23d4a /include/clang/Frontend/CompileOptions.h | |
download | FreeBSD-src-f27e5a09a0d815b8a4814152954ff87dadfdefc0.zip FreeBSD-src-f27e5a09a0d815b8a4814152954ff87dadfdefc0.tar.gz |
Import Clang, at r72732.
Diffstat (limited to 'include/clang/Frontend/CompileOptions.h')
-rw-r--r-- | include/clang/Frontend/CompileOptions.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/include/clang/Frontend/CompileOptions.h b/include/clang/Frontend/CompileOptions.h new file mode 100644 index 0000000..1af5e48 --- /dev/null +++ b/include/clang/Frontend/CompileOptions.h @@ -0,0 +1,62 @@ +//===--- CompileOptions.h ---------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the CompileOptions interface. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_FRONTEND_COMPILEOPTIONS_H +#define LLVM_CLANG_FRONTEND_COMPILEOPTIONS_H + +#include <string> +#include <vector> + +namespace clang { + +/// CompileOptions - Track various options which control how the code +/// is optimized and passed to the backend. +class CompileOptions { +public: + unsigned OptimizationLevel : 3; /// The -O[0-4] option specified. + unsigned OptimizeSize : 1; /// If -Os is specified. + unsigned DebugInfo : 1; /// Should generate deubg info (-g). + unsigned UnitAtATime : 1; /// Unused. For mirroring GCC + /// optimization selection. + unsigned InlineFunctions : 1; /// Should functions be inlined? + unsigned SimplifyLibCalls : 1; /// Should standard library calls be + /// treated specially. + unsigned UnrollLoops : 1; /// Control whether loops are unrolled. + unsigned VerifyModule : 1; /// Control whether the module + /// should be run through the LLVM Verifier. + unsigned TimePasses : 1; /// Set when -ftime-report is enabled. + unsigned NoCommon : 1; /// Set when -fno-common or C++ is enabled. + + /// CPU - An optional CPU to target. + std::string CPU; + + /// Features - A list of subtarget features to pass to the code + /// generator. + std::vector<std::string> Features; + +public: + CompileOptions() { + OptimizationLevel = 0; + OptimizeSize = 0; + DebugInfo = 0; + UnitAtATime = 1; + InlineFunctions = SimplifyLibCalls = UnrollLoops = 0; + VerifyModule = 1; + TimePasses = 0; + NoCommon = 0; + } +}; + +} // end namespace clang + +#endif |