diff options
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 86b46856d3..58a4cdb89b 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -655,6 +655,12 @@ static std::string getEffectiveClangTriple(const Driver &D, } else { const toolchains::Darwin &DarwinTC( reinterpret_cast<const toolchains::Darwin&>(TC)); + + // If the target isn't initialized (e.g., an unknown Darwin platform, return + // the default triple). + if (!DarwinTC.isTargetInitialized()) + return Triple.getTriple(); + unsigned Version[3]; DarwinTC.getTargetVersion(Version); |