From: Erich Keane Date: Fri, 14 Apr 2017 15:21:18 +0000 (+0000) Subject: Make Gentoo GNU GCC Config override whitespace tolerant X-Git-Tag: llvmorg-5.0.0-rc1~7678 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=750fe2220e53bc6d9c8fd4d5e0ab7f59d693b14d;p=platform%2Fupstream%2Fllvm.git Make Gentoo GNU GCC Config override whitespace tolerant The config-*triple* file handling isn't tolerant of leading/trailing whitespace, making it not terribly obvious when a single extraneous tab/space/etc will cause the override to be ignored. This patch simply trims the lines to ensure that it is tolerant of whitespace. llvm-svn: 300328 --- diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp index 595285e..549e24c 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2173,6 +2173,7 @@ bool Generic_GCC::GCCInstallationDetector::ScanGentooGccConfig( SmallVector Lines; File.get()->getBuffer().split(Lines, "\n"); for (StringRef Line : Lines) { + Line = Line.trim(); // CURRENT=triple-version if (Line.consume_front("CURRENT=")) { const std::pair ActiveVersion =