aboutsummaryrefslogtreecommitdiff
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.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/clang/Driver/ToolChain.h b/include/clang/Driver/ToolChain.h
index 3092e81b95b5..560df19e25ce 100644
--- a/include/clang/Driver/ToolChain.h
+++ b/include/clang/Driver/ToolChain.h
@@ -53,10 +53,20 @@ public:
RLT_Libgcc
};
+ enum RTTIMode {
+ RM_EnabledExplicitly,
+ RM_EnabledImplicitly,
+ RM_DisabledExplicitly,
+ RM_DisabledImplicitly
+ };
+
private:
const Driver &D;
const llvm::Triple Triple;
const llvm::opt::ArgList &Args;
+ // We need to initialize CachedRTTIArg before CachedRTTIMode
+ const llvm::opt::Arg *const CachedRTTIArg;
+ const RTTIMode CachedRTTIMode;
/// The list of toolchain specific path prefixes to search for
/// files.
@@ -134,6 +144,12 @@ public:
const SanitizerArgs& getSanitizerArgs() const;
+ // Returns the Arg * that explicitly turned on/off rtti, or nullptr.
+ const llvm::opt::Arg *getRTTIArg() const { return CachedRTTIArg; }
+
+ // Returns the RTTIMode for the toolchain with the current arguments.
+ RTTIMode getRTTIMode() const { return CachedRTTIMode; }
+
// Tool access.
/// TranslateArgs - Create a new derived argument list for any argument