aboutsummaryrefslogtreecommitdiffstats
path: root/include/clang/Driver/Driver.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Driver/Driver.h')
-rw-r--r--include/clang/Driver/Driver.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/clang/Driver/Driver.h b/include/clang/Driver/Driver.h
index f9528641073a..5e7283e31ee0 100644
--- a/include/clang/Driver/Driver.h
+++ b/include/clang/Driver/Driver.h
@@ -12,12 +12,14 @@
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/LLVM.h"
#include "clang/Driver/Action.h"
+#include "clang/Driver/Options.h"
#include "clang/Driver/Phases.h"
#include "clang/Driver/ToolChain.h"
#include "clang/Driver/Types.h"
#include "clang/Driver/Util.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Support/StringSaver.h"
@@ -55,8 +57,6 @@ enum LTOKind {
/// Driver - Encapsulate logic for constructing compilation processes
/// from a set of gcc-driver-like command line arguments.
class Driver {
- std::unique_ptr<llvm::opt::OptTable> Opts;
-
DiagnosticsEngine &Diags;
IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS;
@@ -250,9 +250,17 @@ private:
// getFinalPhase - Determine which compilation mode we are in and record
// which option we used to determine the final phase.
+ // TODO: Much of what getFinalPhase returns are not actually true compiler
+ // modes. Fold this functionality into Types::getCompilationPhases and
+ // handleArguments.
phases::ID getFinalPhase(const llvm::opt::DerivedArgList &DAL,
llvm::opt::Arg **FinalPhaseArg = nullptr) const;
+ // handleArguments - All code related to claiming and printing diagnostics
+ // related to arguments to the driver are done here.
+ void handleArguments(Compilation &C, llvm::opt::DerivedArgList &Args,
+ const InputList &Inputs, ActionList &Actions) const;
+
// Before executing jobs, sets up response files for commands that need them.
void setUpResponseFiles(Compilation &C, Command &Cmd);
@@ -292,7 +300,7 @@ public:
const std::string &getConfigFile() const { return ConfigFile; }
- const llvm::opt::OptTable &getOpts() const { return *Opts; }
+ const llvm::opt::OptTable &getOpts() const { return getDriverOptTable(); }
const DiagnosticsEngine &getDiags() const { return Diags; }