1e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar//===-- CompilerInvocation.h - Compiler Invocation Helper Data --*- C++ -*-===//
2e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar//
3e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar//                     The LLVM Compiler Infrastructure
4e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar//
5e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar// This file is distributed under the University of Illinois Open Source
6e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar// License. See LICENSE.TXT for details.
7e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar//
8e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar//===----------------------------------------------------------------------===//
9e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar
10e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar#ifndef LLVM_CLANG_FRONTEND_COMPILERINVOCATION_H_
11e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar#define LLVM_CLANG_FRONTEND_COMPILERINVOCATION_H_
12e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar
1330a2e16f6c27f888dd11eba6bbbae1e980078fcbChandler Carruth#include "clang/Basic/DiagnosticOptions.h"
1430a2e16f6c27f888dd11eba6bbbae1e980078fcbChandler Carruth#include "clang/Basic/FileSystemOptions.h"
1526a0cac165aea204f661b8da7b167623b12ff143Daniel Dunbar#include "clang/Basic/LangOptions.h"
16d58c03f42ebb4e548c2b53fa25b1cfe02ebb9ac0Daniel Dunbar#include "clang/Basic/TargetOptions.h"
1706057cef0bcd7804e80f3ce2bbe352178396c715Chandler Carruth#include "clang/Frontend/CodeGenOptions.h"
180e0bae8139e25de81f18b6a519783a06f7ba1e25Daniel Dunbar#include "clang/Frontend/DependencyOutputOptions.h"
1926266885d6eba8ee197577dd42a8e68a0e4dd2e8Daniel Dunbar#include "clang/Frontend/FrontendOptions.h"
2053c92be3b233cede6114702a5f86f146f55d6c6ePeter Collingbourne#include "clang/Frontend/LangStandard.h"
2130a2e16f6c27f888dd11eba6bbbae1e980078fcbChandler Carruth#include "clang/Frontend/MigratorOptions.h"
2229cf746aef63b1984c013448e843a290b2badf7bDaniel Dunbar#include "clang/Frontend/PreprocessorOutputOptions.h"
2330a2e16f6c27f888dd11eba6bbbae1e980078fcbChandler Carruth#include "clang/Lex/HeaderSearchOptions.h"
2430a2e16f6c27f888dd11eba6bbbae1e980078fcbChandler Carruth#include "clang/Lex/PreprocessorOptions.h"
2530a2e16f6c27f888dd11eba6bbbae1e980078fcbChandler Carruth#include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
264f32786ac45210143654390177105eb749b614e9Ted Kremenek#include "llvm/ADT/IntrusiveRefCntPtr.h"
2726a0cac165aea204f661b8da7b167623b12ff143Daniel Dunbar#include "llvm/ADT/StringMap.h"
2830a2e16f6c27f888dd11eba6bbbae1e980078fcbChandler Carruth#include "llvm/ADT/StringRef.h"
29e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar#include <string>
30b3375cba7938e01895bb504e7e48ad94a2e07dd1Daniel Dunbar#include <vector>
31b3375cba7938e01895bb504e7e48ad94a2e07dd1Daniel Dunbar
32b1e25a1bc03292dc538d336573e0be1490223171Reid Klecknernamespace llvm {
33b1e25a1bc03292dc538d336573e0be1490223171Reid Klecknernamespace opt {
34b1e25a1bc03292dc538d336573e0be1490223171Reid Klecknerclass ArgList;
35b1e25a1bc03292dc538d336573e0be1490223171Reid Kleckner}
36b1e25a1bc03292dc538d336573e0be1490223171Reid Kleckner}
37b1e25a1bc03292dc538d336573e0be1490223171Reid Kleckner
38e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbarnamespace clang {
398a0c5c2ec5c5496cfb01d2c86bd50991866a7356Ted Kremenekclass CompilerInvocation;
40d6471f7c1921c7802804ce3ff6fe9768310f72b9David Blaikieclass DiagnosticsEngine;
412dec85b21822f950bf6035640c496ad835e11728Chad Rosier
42efce31f51d6e7e31e125f96c20f6cdab3ead0a47James Dennett/// \brief Fill out Opts based on the options given in Args.
43efce31f51d6e7e31e125f96c20f6cdab3ead0a47James Dennett///
442dec85b21822f950bf6035640c496ad835e11728Chad Rosier/// Args must have been created from the OptTable returned by
45efce31f51d6e7e31e125f96c20f6cdab3ead0a47James Dennett/// createCC1OptTable().
46efce31f51d6e7e31e125f96c20f6cdab3ead0a47James Dennett///
47efce31f51d6e7e31e125f96c20f6cdab3ead0a47James Dennett/// When errors are encountered, return false and, if Diags is non-null,
48efce31f51d6e7e31e125f96c20f6cdab3ead0a47James Dennett/// report the error(s).
49dd0b3c4c72464af92e2c27dd5a67e29f91ba7b28Reid Klecknerbool ParseDiagnosticArgs(DiagnosticOptions &Opts, llvm::opt::ArgList &Args,
506bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines                         DiagnosticsEngine *Diags = nullptr);
51dd0b3c4c72464af92e2c27dd5a67e29f91ba7b28Reid Kleckner
52c93dc7889644293e318e19d82830ea2acc45b678Dylan Noblesmithclass CompilerInvocationBase : public RefCountedBase<CompilerInvocation> {
536bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines  void operator=(const CompilerInvocationBase &) LLVM_DELETED_FUNCTION;
546bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines
55ef8225444452a1486bd721f3285301fe84643b00Stephen Hinespublic:
568a0c5c2ec5c5496cfb01d2c86bd50991866a7356Ted Kremenek  /// Options controlling the language variant.
57ef8225444452a1486bd721f3285301fe84643b00Stephen Hines  std::shared_ptr<LangOptions> LangOpts;
5857016dda61498294120b1a881d9e6606337b29d9Douglas Gregor
5957016dda61498294120b1a881d9e6606337b29d9Douglas Gregor  /// Options controlling the target.
60ef8225444452a1486bd721f3285301fe84643b00Stephen Hines  std::shared_ptr<TargetOptions> TargetOpts;
6102c23ebf41ae2f70da0ba7337e05c51fbfe35f7fDouglas Gregor
6202c23ebf41ae2f70da0ba7337e05c51fbfe35f7fDouglas Gregor  /// Options controlling the diagnostic engine.
6302c23ebf41ae2f70da0ba7337e05c51fbfe35f7fDouglas Gregor  IntrusiveRefCntPtr<DiagnosticOptions> DiagnosticOpts;
6402c23ebf41ae2f70da0ba7337e05c51fbfe35f7fDouglas Gregor
65c042edd54face617a3b9d0b4b9d5a3ff229d0f48Douglas Gregor  /// Options controlling the \#include directive.
66c042edd54face617a3b9d0b4b9d5a3ff229d0f48Douglas Gregor  IntrusiveRefCntPtr<HeaderSearchOptions> HeaderSearchOpts;
67c042edd54face617a3b9d0b4b9d5a3ff229d0f48Douglas Gregor
6814e71f04136de056c08ffb9ccd44b4ca391cc8a5Douglas Gregor  /// Options controlling the preprocessor (aside from \#include handling).
6914e71f04136de056c08ffb9ccd44b4ca391cc8a5Douglas Gregor  IntrusiveRefCntPtr<PreprocessorOptions> PreprocessorOpts;
7014e71f04136de056c08ffb9ccd44b4ca391cc8a5Douglas Gregor
718a0c5c2ec5c5496cfb01d2c86bd50991866a7356Ted Kremenek  CompilerInvocationBase();
726bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines  ~CompilerInvocationBase();
73e03245246acbec5c46e93b68ec6942ce42b9e256Daniel Dunbar
748a0c5c2ec5c5496cfb01d2c86bd50991866a7356Ted Kremenek  CompilerInvocationBase(const CompilerInvocationBase &X);
758a0c5c2ec5c5496cfb01d2c86bd50991866a7356Ted Kremenek
76ef8225444452a1486bd721f3285301fe84643b00Stephen Hines  LangOptions *getLangOpts() { return LangOpts.get(); }
77ef8225444452a1486bd721f3285301fe84643b00Stephen Hines  const LangOptions *getLangOpts() const { return LangOpts.get(); }
7857016dda61498294120b1a881d9e6606337b29d9Douglas Gregor
79ef8225444452a1486bd721f3285301fe84643b00Stephen Hines  TargetOptions &getTargetOpts() { return *TargetOpts.get(); }
8057016dda61498294120b1a881d9e6606337b29d9Douglas Gregor  const TargetOptions &getTargetOpts() const {
81ef8225444452a1486bd721f3285301fe84643b00Stephen Hines    return *TargetOpts.get();
8257016dda61498294120b1a881d9e6606337b29d9Douglas Gregor  }
8302c23ebf41ae2f70da0ba7337e05c51fbfe35f7fDouglas Gregor
8402c23ebf41ae2f70da0ba7337e05c51fbfe35f7fDouglas Gregor  DiagnosticOptions &getDiagnosticOpts() const { return *DiagnosticOpts; }
85c042edd54face617a3b9d0b4b9d5a3ff229d0f48Douglas Gregor
86c042edd54face617a3b9d0b4b9d5a3ff229d0f48Douglas Gregor  HeaderSearchOptions &getHeaderSearchOpts() { return *HeaderSearchOpts; }
87c042edd54face617a3b9d0b4b9d5a3ff229d0f48Douglas Gregor  const HeaderSearchOptions &getHeaderSearchOpts() const {
88c042edd54face617a3b9d0b4b9d5a3ff229d0f48Douglas Gregor    return *HeaderSearchOpts;
89c042edd54face617a3b9d0b4b9d5a3ff229d0f48Douglas Gregor  }
9014e71f04136de056c08ffb9ccd44b4ca391cc8a5Douglas Gregor
9114e71f04136de056c08ffb9ccd44b4ca391cc8a5Douglas Gregor  PreprocessorOptions &getPreprocessorOpts() { return *PreprocessorOpts; }
9214e71f04136de056c08ffb9ccd44b4ca391cc8a5Douglas Gregor  const PreprocessorOptions &getPreprocessorOpts() const {
9314e71f04136de056c08ffb9ccd44b4ca391cc8a5Douglas Gregor    return *PreprocessorOpts;
9414e71f04136de056c08ffb9ccd44b4ca391cc8a5Douglas Gregor  }
958a0c5c2ec5c5496cfb01d2c86bd50991866a7356Ted Kremenek};
968a0c5c2ec5c5496cfb01d2c86bd50991866a7356Ted Kremenek
97efce31f51d6e7e31e125f96c20f6cdab3ead0a47James Dennett/// \brief Helper class for holding the data necessary to invoke the compiler.
98e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar///
99e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar/// This class is designed to represent an abstract "invocation" of the
100e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar/// compiler, including data such as the include paths, the code generation
101e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar/// options, the warning flags, and so on.
1028a0c5c2ec5c5496cfb01d2c86bd50991866a7356Ted Kremenekclass CompilerInvocation : public CompilerInvocationBase {
1035746f1ff6286f5e5bd7fc28e5e2031f18e4676c9Daniel Dunbar  /// Options controlling the static analyzer.
10445796b10d11869e86c6b85e24df165410536b313Ted Kremenek  AnalyzerOptionsRef AnalyzerOpts;
1055746f1ff6286f5e5bd7fc28e5e2031f18e4676c9Daniel Dunbar
106b5c6babd3d8e0233b8ea5a4eb1e2700e30c0d396Fariborz Jahanian  MigratorOptions MigratorOpts;
107b5c6babd3d8e0233b8ea5a4eb1e2700e30c0d396Fariborz Jahanian
10836f4ec353b37067dd4a0a3a7da1afbd1a4f1a5e5Daniel Dunbar  /// Options controlling IRgen and the backend.
1092811ccf48d6d898c42cc4cfad37abedb36236d20Chandler Carruth  CodeGenOptions CodeGenOpts;
110e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar
1110e0bae8139e25de81f18b6a519783a06f7ba1e25Daniel Dunbar  /// Options controlling dependency output.
1120e0bae8139e25de81f18b6a519783a06f7ba1e25Daniel Dunbar  DependencyOutputOptions DependencyOutputOpts;
1130e0bae8139e25de81f18b6a519783a06f7ba1e25Daniel Dunbar
114389db16c63eec6ecfa9b235155252d8da766e94eArgyrios Kyrtzidis  /// Options controlling file system operations.
115389db16c63eec6ecfa9b235155252d8da766e94eArgyrios Kyrtzidis  FileSystemOptions FileSystemOpts;
116389db16c63eec6ecfa9b235155252d8da766e94eArgyrios Kyrtzidis
11726266885d6eba8ee197577dd42a8e68a0e4dd2e8Daniel Dunbar  /// Options controlling the frontend itself.
11826266885d6eba8ee197577dd42a8e68a0e4dd2e8Daniel Dunbar  FrontendOptions FrontendOpts;
11926266885d6eba8ee197577dd42a8e68a0e4dd2e8Daniel Dunbar
12029cf746aef63b1984c013448e843a290b2badf7bDaniel Dunbar  /// Options controlling preprocessed output.
12129cf746aef63b1984c013448e843a290b2badf7bDaniel Dunbar  PreprocessorOutputOptions PreprocessorOutputOpts;
12229cf746aef63b1984c013448e843a290b2badf7bDaniel Dunbar
123e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbarpublic:
12445796b10d11869e86c6b85e24df165410536b313Ted Kremenek  CompilerInvocation() : AnalyzerOpts(new AnalyzerOptions()) {}
125e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar
126b3375cba7938e01895bb504e7e48ad94a2e07dd1Daniel Dunbar  /// @name Utility Methods
127b3375cba7938e01895bb504e7e48ad94a2e07dd1Daniel Dunbar  /// @{
128b3375cba7938e01895bb504e7e48ad94a2e07dd1Daniel Dunbar
129efce31f51d6e7e31e125f96c20f6cdab3ead0a47James Dennett  /// \brief Create a compiler invocation from a list of input options.
130efce31f51d6e7e31e125f96c20f6cdab3ead0a47James Dennett  /// \returns true on success.
131b3375cba7938e01895bb504e7e48ad94a2e07dd1Daniel Dunbar  ///
132efce31f51d6e7e31e125f96c20f6cdab3ead0a47James Dennett  /// \param [out] Res - The resulting invocation.
133545c28117c64e78521b8b402caa060ba0b58a530Daniel Dunbar  /// \param ArgBegin - The first element in the argument vector.
134545c28117c64e78521b8b402caa060ba0b58a530Daniel Dunbar  /// \param ArgEnd - The last element in the argument vector.
1351e69fe3a9f0a42b32a3000bda51677d51416564eDaniel Dunbar  /// \param Diags - The diagnostic engine to use for errors.
1368fdb6dee2da0dee97d64fe12eda46fb318414de9Dylan Noblesmith  static bool CreateFromArgs(CompilerInvocation &Res,
1379d520c5ae802fc175c61032b289ddd6968e6ddd2Axel Naumann                             const char* const *ArgBegin,
1389d520c5ae802fc175c61032b289ddd6968e6ddd2Axel Naumann                             const char* const *ArgEnd,
139d6471f7c1921c7802804ce3ff6fe9768310f72b9David Blaikie                             DiagnosticsEngine &Diags);
1401e69fe3a9f0a42b32a3000bda51677d51416564eDaniel Dunbar
141efce31f51d6e7e31e125f96c20f6cdab3ead0a47James Dennett  /// \brief Get the directory where the compiler headers
1421e69fe3a9f0a42b32a3000bda51677d51416564eDaniel Dunbar  /// reside, relative to the compiler binary (found by the passed in
1431e69fe3a9f0a42b32a3000bda51677d51416564eDaniel Dunbar  /// arguments).
1441e69fe3a9f0a42b32a3000bda51677d51416564eDaniel Dunbar  ///
145545c28117c64e78521b8b402caa060ba0b58a530Daniel Dunbar  /// \param Argv0 - The program path (from argv[0]), for finding the builtin
146545c28117c64e78521b8b402caa060ba0b58a530Daniel Dunbar  /// compiler path.
147545c28117c64e78521b8b402caa060ba0b58a530Daniel Dunbar  /// \param MainAddr - The address of main (or some other function in the main
148545c28117c64e78521b8b402caa060ba0b58a530Daniel Dunbar  /// executable), for finding the builtin compiler path.
1498b9adfea5e834eaee0f45d8cc7fb052d68df4a46Daniel Dunbar  static std::string GetResourcesPath(const char *Argv0, void *MainAddr);
150b3375cba7938e01895bb504e7e48ad94a2e07dd1Daniel Dunbar
151efce31f51d6e7e31e125f96c20f6cdab3ead0a47James Dennett  /// \brief Set language defaults for the given input language and
15253c92be3b233cede6114702a5f86f146f55d6c6ePeter Collingbourne  /// language standard in the given LangOptions object.
15353c92be3b233cede6114702a5f86f146f55d6c6ePeter Collingbourne  ///
154efce31f51d6e7e31e125f96c20f6cdab3ead0a47James Dennett  /// \param Opts - The LangOptions object to set up.
15553c92be3b233cede6114702a5f86f146f55d6c6ePeter Collingbourne  /// \param IK - The input language.
15653c92be3b233cede6114702a5f86f146f55d6c6ePeter Collingbourne  /// \param LangStd - The input language standard.
15753c92be3b233cede6114702a5f86f146f55d6c6ePeter Collingbourne  static void setLangDefaults(LangOptions &Opts, InputKind IK,
15853c92be3b233cede6114702a5f86f146f55d6c6ePeter Collingbourne                   LangStandard::Kind LangStd = LangStandard::lang_unspecified);
15953c92be3b233cede6114702a5f86f146f55d6c6ePeter Collingbourne
1606e975c4517958bcc11c834336d340797356058dbDouglas Gregor  /// \brief Retrieve a module hash string that is suitable for uniquely
1616e975c4517958bcc11c834336d340797356058dbDouglas Gregor  /// identifying the conditions under which the module was built.
1626e975c4517958bcc11c834336d340797356058dbDouglas Gregor  std::string getModuleHash() const;
1636e975c4517958bcc11c834336d340797356058dbDouglas Gregor
16436f4ec353b37067dd4a0a3a7da1afbd1a4f1a5e5Daniel Dunbar  /// @}
16536f4ec353b37067dd4a0a3a7da1afbd1a4f1a5e5Daniel Dunbar  /// @name Option Subgroups
16636f4ec353b37067dd4a0a3a7da1afbd1a4f1a5e5Daniel Dunbar  /// @{
16736f4ec353b37067dd4a0a3a7da1afbd1a4f1a5e5Daniel Dunbar
16845796b10d11869e86c6b85e24df165410536b313Ted Kremenek  AnalyzerOptionsRef getAnalyzerOpts() const {
1695746f1ff6286f5e5bd7fc28e5e2031f18e4676c9Daniel Dunbar    return AnalyzerOpts;
1705746f1ff6286f5e5bd7fc28e5e2031f18e4676c9Daniel Dunbar  }
1715746f1ff6286f5e5bd7fc28e5e2031f18e4676c9Daniel Dunbar
172b5c6babd3d8e0233b8ea5a4eb1e2700e30c0d396Fariborz Jahanian  MigratorOptions &getMigratorOpts() { return MigratorOpts; }
173b5c6babd3d8e0233b8ea5a4eb1e2700e30c0d396Fariborz Jahanian  const MigratorOptions &getMigratorOpts() const {
174b5c6babd3d8e0233b8ea5a4eb1e2700e30c0d396Fariborz Jahanian    return MigratorOpts;
175b5c6babd3d8e0233b8ea5a4eb1e2700e30c0d396Fariborz Jahanian  }
176b5c6babd3d8e0233b8ea5a4eb1e2700e30c0d396Fariborz Jahanian
1772811ccf48d6d898c42cc4cfad37abedb36236d20Chandler Carruth  CodeGenOptions &getCodeGenOpts() { return CodeGenOpts; }
1782811ccf48d6d898c42cc4cfad37abedb36236d20Chandler Carruth  const CodeGenOptions &getCodeGenOpts() const {
1792811ccf48d6d898c42cc4cfad37abedb36236d20Chandler Carruth    return CodeGenOpts;
18036f4ec353b37067dd4a0a3a7da1afbd1a4f1a5e5Daniel Dunbar  }
18136f4ec353b37067dd4a0a3a7da1afbd1a4f1a5e5Daniel Dunbar
1820e0bae8139e25de81f18b6a519783a06f7ba1e25Daniel Dunbar  DependencyOutputOptions &getDependencyOutputOpts() {
1830e0bae8139e25de81f18b6a519783a06f7ba1e25Daniel Dunbar    return DependencyOutputOpts;
1840e0bae8139e25de81f18b6a519783a06f7ba1e25Daniel Dunbar  }
1850e0bae8139e25de81f18b6a519783a06f7ba1e25Daniel Dunbar  const DependencyOutputOptions &getDependencyOutputOpts() const {
1860e0bae8139e25de81f18b6a519783a06f7ba1e25Daniel Dunbar    return DependencyOutputOpts;
1870e0bae8139e25de81f18b6a519783a06f7ba1e25Daniel Dunbar  }
1880e0bae8139e25de81f18b6a519783a06f7ba1e25Daniel Dunbar
189389db16c63eec6ecfa9b235155252d8da766e94eArgyrios Kyrtzidis  FileSystemOptions &getFileSystemOpts() { return FileSystemOpts; }
190389db16c63eec6ecfa9b235155252d8da766e94eArgyrios Kyrtzidis  const FileSystemOptions &getFileSystemOpts() const {
191389db16c63eec6ecfa9b235155252d8da766e94eArgyrios Kyrtzidis    return FileSystemOpts;
192389db16c63eec6ecfa9b235155252d8da766e94eArgyrios Kyrtzidis  }
193389db16c63eec6ecfa9b235155252d8da766e94eArgyrios Kyrtzidis
19426266885d6eba8ee197577dd42a8e68a0e4dd2e8Daniel Dunbar  FrontendOptions &getFrontendOpts() { return FrontendOpts; }
19526266885d6eba8ee197577dd42a8e68a0e4dd2e8Daniel Dunbar  const FrontendOptions &getFrontendOpts() const {
19626266885d6eba8ee197577dd42a8e68a0e4dd2e8Daniel Dunbar    return FrontendOpts;
19726266885d6eba8ee197577dd42a8e68a0e4dd2e8Daniel Dunbar  }
19826266885d6eba8ee197577dd42a8e68a0e4dd2e8Daniel Dunbar
19929cf746aef63b1984c013448e843a290b2badf7bDaniel Dunbar  PreprocessorOutputOptions &getPreprocessorOutputOpts() {
20029cf746aef63b1984c013448e843a290b2badf7bDaniel Dunbar    return PreprocessorOutputOpts;
20129cf746aef63b1984c013448e843a290b2badf7bDaniel Dunbar  }
20229cf746aef63b1984c013448e843a290b2badf7bDaniel Dunbar  const PreprocessorOutputOptions &getPreprocessorOutputOpts() const {
20329cf746aef63b1984c013448e843a290b2badf7bDaniel Dunbar    return PreprocessorOutputOpts;
20429cf746aef63b1984c013448e843a290b2badf7bDaniel Dunbar  }
20529cf746aef63b1984c013448e843a290b2badf7bDaniel Dunbar
20636f4ec353b37067dd4a0a3a7da1afbd1a4f1a5e5Daniel Dunbar  /// @}
207e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar};
208e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar
2096bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hinesnamespace vfs {
2106bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines  class FileSystem;
2116bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines}
2126bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines
2136bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen HinesIntrusiveRefCntPtr<vfs::FileSystem>
2146bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen HinescreateVFSFromCompilerInvocation(const CompilerInvocation &CI,
2156bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines                                DiagnosticsEngine &Diags);
2166bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines
217e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar} // end namespace clang
218e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar
219e29709f32e82d7f7dfc25d8602b1b828a1aa7f56Daniel Dunbar#endif
220