summaryrefslogtreecommitdiff
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.h37
1 files changed, 22 insertions, 15 deletions
diff --git a/include/clang/Driver/Driver.h b/include/clang/Driver/Driver.h
index c0def2bcca29f..c0327a2f1d1c2 100644
--- a/include/clang/Driver/Driver.h
+++ b/include/clang/Driver/Driver.h
@@ -15,12 +15,16 @@
#include "clang/Driver/Phases.h"
#include "clang/Driver/Util.h"
+#include "llvm/ADT/Triple.h"
#include "llvm/System/Path.h" // FIXME: Kill when CompilationInfo
// lands.
#include <list>
#include <set>
#include <string>
+namespace llvm {
+ class raw_ostream;
+}
namespace clang {
namespace driver {
class Action;
@@ -51,11 +55,11 @@ public:
public:
/// The name the driver was invoked as.
std::string Name;
-
+
/// The path the driver executable was in, as invoked from the
/// command line.
std::string Dir;
-
+
/// Default host triple.
std::string DefaultHostTriple;
@@ -71,7 +75,7 @@ public:
/// Whether the driver should follow g++ like behavior.
bool CCCIsCXX : 1;
-
+
/// Echo commands while executing (in -v style).
bool CCCEcho : 1;
@@ -99,11 +103,11 @@ public:
private:
/// Only use clang for the given architectures (only used when
/// non-empty).
- std::set<std::string> CCCClangArchs;
+ std::set<llvm::Triple::ArchType> CCCClangArchs;
/// Certain options suppress the 'no input files' warning.
bool SuppressMissingInputWarning : 1;
-
+
std::list<std::string> TempFiles;
std::list<std::string> ResultFiles;
@@ -111,7 +115,7 @@ public:
Driver(const char *_Name, const char *_Dir,
const char *_DefaultHostTriple,
const char *_DefaultImageName,
- Diagnostic &_Diags);
+ bool IsProduction, Diagnostic &_Diags);
~Driver();
/// @name Accessors
@@ -185,14 +189,15 @@ public:
void PrintOptions(const ArgList &Args) const;
/// PrintVersion - Print the driver version.
- void PrintVersion(const Compilation &C) const;
+ void PrintVersion(const Compilation &C, llvm::raw_ostream &OS) const;
/// GetFilePath - Lookup \arg Name in the list of file search paths.
///
/// \arg TC - The tool chain for additional information on
/// directories to search.
+ //
// FIXME: This should be in CompilationInfo.
- llvm::sys::Path GetFilePath(const char *Name, const ToolChain &TC) const;
+ std::string GetFilePath(const char *Name, const ToolChain &TC) const;
/// GetProgramPath - Lookup \arg Name in the list of program search
/// paths.
@@ -202,9 +207,10 @@ public:
///
/// \arg WantFile - False when searching for an executable file, otherwise
/// true. Defaults to false.
+ //
// FIXME: This should be in CompilationInfo.
- llvm::sys::Path GetProgramPath(const char *Name, const ToolChain &TC,
- bool WantFile = false) const;
+ std::string GetProgramPath(const char *Name, const ToolChain &TC,
+ bool WantFile = false) const;
/// HandleImmediateArgs - Handle any arguments which should be
/// treated before building actions or binding tools.
@@ -225,6 +231,7 @@ public:
void BuildJobsForAction(Compilation &C,
const Action *A,
const ToolChain *TC,
+ const char *BoundArch,
bool CanAcceptPipe,
bool AtTopLevel,
const char *LinkingOutput,
@@ -239,7 +246,7 @@ public:
/// \param BaseInput - The original input file that this action was
/// triggered by.
/// \param AtTopLevel - Whether this is a "top-level" action.
- const char *GetNamedOutputPath(Compilation &C,
+ const char *GetNamedOutputPath(Compilation &C,
const JobAction &JA,
const char *BaseInput,
bool AtTopLevel) const;
@@ -249,15 +256,15 @@ public:
///
/// GCC goes to extra lengths here to be a bit more robust.
std::string GetTemporaryPath(const char *Suffix) const;
-
+
/// GetHostInfo - Construct a new host info object for the given
/// host triple.
const HostInfo *GetHostInfo(const char *HostTriple) const;
/// ShouldUseClangCompilar - Should the clang compiler be used to
/// handle this action.
- bool ShouldUseClangCompiler(const Compilation &C, const JobAction &JA,
- const std::string &ArchName) const;
+ bool ShouldUseClangCompiler(const Compilation &C, const JobAction &JA,
+ const llvm::Triple &ArchName) const;
/// @}
@@ -268,7 +275,7 @@ public:
/// \return True if the entire string was parsed (9.2), or all
/// groups were parsed (10.3.5extrastuff). HadExtra is true if all
/// groups were parsed but extra characters remain at the end.
- static bool GetReleaseVersion(const char *Str, unsigned &Major,
+ static bool GetReleaseVersion(const char *Str, unsigned &Major,
unsigned &Minor, unsigned &Micro,
bool &HadExtra);
};