Author: erichkeane Date: Fri Apr 14 10:21:18 2017 New Revision: 300328 URL: http://llvm.org/viewvc/llvm-project?rev=300328&view=rev Log: 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. Modified: cfe/trunk/lib/Driver/ToolChains/Gnu.cpp Modified: cfe/trunk/lib/Driver/ToolChains/Gnu.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Gnu.cpp?rev=300328&r1=300327&r2=300328&view=diff ============================================================================== --- cfe/trunk/lib/Driver/ToolChains/Gnu.cpp (original) +++ cfe/trunk/lib/Driver/ToolChains/Gnu.cpp Fri Apr 14 10:21:18 2017 @@ -2173,6 +2173,7 @@ bool Generic_GCC::GCCInstallationDetecto SmallVector<StringRef, 2> 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<StringRef, StringRef> ActiveVersion = _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits