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
This commit is contained in:
Erich Keane 2017-04-14 15:21:18 +00:00
parent 0c559f6d9e
commit 750fe2220e
1 changed files with 1 additions and 0 deletions

View File

@ -2173,6 +2173,7 @@ bool Generic_GCC::GCCInstallationDetector::ScanGentooGccConfig(
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 =