diff options
| author | Vedant Kumar <vsk@apple.com> | 2016-07-18 19:56:33 +0000 |
|---|---|---|
| committer | Vedant Kumar <vsk@apple.com> | 2016-07-18 19:56:33 +0000 |
| commit | f2030b931caca4c89e680f125a0d8aa2e6593551 (patch) | |
| tree | b2ceafc1335908f3ac0396b1c746d1eac2baabca | |
| parent | 052b1ed2fd182115fe39abfb36c2615bf5948877 (diff) | |
| download | bcm5719-llvm-f2030b931caca4c89e680f125a0d8aa2e6593551.tar.gz bcm5719-llvm-f2030b931caca4c89e680f125a0d8aa2e6593551.zip | |
[Driver] Make Driver::DefaultTargetTriple private (NFCI)
No in-tree targets access this `DefaultTargetTriple` directly, and usage
of default triples is generally discouraged. Make the field private.
This is part of en effort to make the clang driver use effective triples
more pervasively.
Differential Revision: https://reviews.llvm.org/D22289
llvm-svn: 275894
| -rw-r--r-- | clang/include/clang/Driver/Driver.h | 6 | ||||
| -rw-r--r-- | clang/lib/Driver/Driver.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/clang/include/clang/Driver/Driver.h b/clang/include/clang/Driver/Driver.h index 3b3893e9fb2..b2ed5b07b5b 100644 --- a/clang/include/clang/Driver/Driver.h +++ b/clang/include/clang/Driver/Driver.h @@ -130,9 +130,6 @@ public: /// If the standard library is used bool UseStdLib; - /// Default target triple. - std::string DefaultTargetTriple; - /// Driver title to use with help. std::string DriverTitle; @@ -181,6 +178,9 @@ public: unsigned CCGenDiagnostics : 1; private: + /// Default target triple. + std::string DefaultTargetTriple; + /// Name to use when invoking gcc/g++. std::string CCCGenericGCCName; diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 12889016fa0..61e8fbb2c81 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -54,12 +54,12 @@ Driver::Driver(StringRef ClangExecutable, StringRef DefaultTargetTriple, Mode(GCCMode), SaveTemps(SaveTempsNone), BitcodeEmbed(EmbedNone), LTOMode(LTOK_None), ClangExecutable(ClangExecutable), SysRoot(DEFAULT_SYSROOT), UseStdLib(true), - DefaultTargetTriple(DefaultTargetTriple), DriverTitle("clang LLVM compiler"), CCPrintOptionsFilename(nullptr), CCPrintHeadersFilename(nullptr), CCLogDiagnosticsFilename(nullptr), CCCPrintBindings(false), CCPrintHeaders(false), CCLogDiagnostics(false), - CCGenDiagnostics(false), CCCGenericGCCName(""), CheckInputsExist(true), - CCCUsePCH(true), SuppressMissingInputWarning(false) { + CCGenDiagnostics(false), DefaultTargetTriple(DefaultTargetTriple), + CCCGenericGCCName(""), CheckInputsExist(true), CCCUsePCH(true), + SuppressMissingInputWarning(false) { // Provide a sane fallback if no VFS is specified. if (!this->VFS) |

