summaryrefslogtreecommitdiff
path: root/include/clang/Driver/ToolChain.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Driver/ToolChain.h')
-rw-r--r--include/clang/Driver/ToolChain.h42
1 files changed, 35 insertions, 7 deletions
diff --git a/include/clang/Driver/ToolChain.h b/include/clang/Driver/ToolChain.h
index 2f9c2c190e32d..d5f75b8271101 100644
--- a/include/clang/Driver/ToolChain.h
+++ b/include/clang/Driver/ToolChain.h
@@ -10,7 +10,9 @@
#ifndef LLVM_CLANG_DRIVER_TOOLCHAIN_H
#define LLVM_CLANG_DRIVER_TOOLCHAIN_H
+#include "clang/Basic/DebugInfoOptions.h"
#include "clang/Basic/LLVM.h"
+#include "clang/Basic/LangOptions.h"
#include "clang/Basic/Sanitizers.h"
#include "clang/Driver/Action.h"
#include "clang/Driver/Multilib.h"
@@ -36,17 +38,16 @@ class ArgList;
class DerivedArgList;
} // namespace opt
-} // namespace llvm
-
-namespace clang {
-
-class ObjCRuntime;
-
namespace vfs {
class FileSystem;
} // namespace vfs
+} // namespace llvm
+
+namespace clang {
+
+class ObjCRuntime;
namespace driver {
@@ -116,6 +117,9 @@ private:
const RTTIMode CachedRTTIMode;
+ /// The list of toolchain specific path prefixes to search for libraries.
+ path_list LibraryPaths;
+
/// The list of toolchain specific path prefixes to search for files.
path_list FilePaths;
@@ -146,6 +150,7 @@ private:
protected:
MultilibSet Multilibs;
+ Multilib SelectedMultilib;
ToolChain(const Driver &D, const llvm::Triple &T,
const llvm::opt::ArgList &Args);
@@ -179,7 +184,7 @@ public:
// Accessors
const Driver &getDriver() const { return D; }
- vfs::FileSystem &getVFS() const;
+ llvm::vfs::FileSystem &getVFS() const;
const llvm::Triple &getTriple() const { return Triple; }
/// Get the toolchain's aux triple, if it has one.
@@ -213,6 +218,9 @@ public:
return EffectiveTriple;
}
+ path_list &getLibraryPaths() { return LibraryPaths; }
+ const path_list &getLibraryPaths() const { return LibraryPaths; }
+
path_list &getFilePaths() { return FilePaths; }
const path_list &getFilePaths() const { return FilePaths; }
@@ -221,6 +229,8 @@ public:
const MultilibSet &getMultilibs() const { return Multilibs; }
+ const Multilib &getMultilib() const { return SelectedMultilib; }
+
const SanitizerArgs& getSanitizerArgs() const;
const XRayArgs& getXRayArgs() const;
@@ -340,6 +350,12 @@ public:
return 0;
}
+ /// Get the default trivial automatic variable initialization.
+ virtual LangOptions::TrivialAutoVarInitKind
+ GetDefaultTrivialAutoVarInit() const {
+ return LangOptions::TrivialAutoVarInitKind::Uninitialized;
+ }
+
/// GetDefaultLinker - Get the default linker to use.
virtual const char *getDefaultLinker() const { return "ld"; }
@@ -372,6 +388,9 @@ public:
/// needsProfileRT - returns true if instrumentation profile is on.
static bool needsProfileRT(const llvm::opt::ArgList &Args);
+ /// Returns true if gcov instrumentation (-fprofile-arcs or --coverage) is on.
+ static bool needsGCovInstrumentation(const llvm::opt::ArgList &Args);
+
/// IsUnwindTablesDefault - Does this tool chain use -funwind-tables
/// by default.
virtual bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const;
@@ -394,6 +413,11 @@ public:
/// Complain if this tool chain doesn't support Objective-C ARC.
virtual void CheckObjCARC() const {}
+ /// Get the default debug info format. Typically, this is DWARF.
+ virtual codegenoptions::DebugInfoFormat getDefaultDebugFormat() const {
+ return codegenoptions::DIF_DWARF;
+ }
+
/// UseDwarfDebugFlags - Embed the compile options to clang into the Dwarf
/// compile unit information.
virtual bool UseDwarfDebugFlags() const { return false; }
@@ -418,6 +442,10 @@ public:
return true;
}
+ /// Adjust debug information kind considering all passed options.
+ virtual void adjustDebugInfoKind(codegenoptions::DebugInfoKind &DebugInfoKind,
+ const llvm::opt::ArgList &Args) const {}
+
/// GetExceptionModel - Return the tool chain exception model.
virtual llvm::ExceptionHandling
GetExceptionModel(const llvm::opt::ArgList &Args) const;