diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-12 23:52:32 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-12 23:52:32 +0000 |
commit | 26266885d6eba8ee197577dd42a8e68a0e4dd2e8 (patch) | |
tree | 8ff1d1460dc996509d51ca61f561fe71b07ad772 /include/clang/Frontend/FrontendOptions.h | |
parent | 80ac2358bbf3e18a941d54d481d372c7a0155199 (diff) |
Add FrontendOptions, and starting moving clang-cc to it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87044 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/FrontendOptions.h')
-rw-r--r-- | include/clang/Frontend/FrontendOptions.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/include/clang/Frontend/FrontendOptions.h b/include/clang/Frontend/FrontendOptions.h new file mode 100644 index 0000000000..da177bc037 --- /dev/null +++ b/include/clang/Frontend/FrontendOptions.h @@ -0,0 +1,52 @@ +//===--- FrontendOptions.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_FRONTENDOPTIONS_H +#define LLVM_CLANG_FRONTEND_FRONTENDOPTIONS_H + +#include <string> +#include <vector> + +namespace clang { + +/// FrontendOptions - Options for controlling the behavior of the frontend. +class FrontendOptions { +public: + unsigned DisableFree : 1; ///< Disable freeing of memory on exit. + unsigned EmptyInputOnly : 1; ///< Force input files to be treated as if they + /// were empty, for timing the frontend startup. + unsigned FixItAll : 1; ///< Apply FIX-IT advice to the input source files. + unsigned RelocatablePCH : 1; ///< When generating PCH files, instruct the + /// PCH writer to create relocatable PCH files. + unsigned ShowStats : 1; ///< Show frontend performance metrics and statistics. + unsigned ShowTimers : 1; ///< Show timers for individual actions. + + /// The input files. + std::vector<std::string> InputFilenames; + + /// The output file, if any. + std::string OutputFile; + + /// If given, the name for a C++ class to view the inheritance of. + std::string ViewClassInheritance; + +public: + FrontendOptions() { + DisableFree = 0; + EmptyInputOnly = 0; + FixItAll = 0; + RelocatablePCH = 0; + ShowStats = 0; + ShowTimers = 0; + } +}; + +} // end namespace clang + +#endif |