summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains/Gnu.cpp
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2017-04-14 15:21:18 +0000
committerErich Keane <erich.keane@intel.com>2017-04-14 15:21:18 +0000
commit750fe2220e53bc6d9c8fd4d5e0ab7f59d693b14d (patch)
tree7de75aaa34e8d861e5674a9914ca46059669bbbd /clang/lib/Driver/ToolChains/Gnu.cpp
parent0c559f6d9e5c89ca9a70526009269b33c733a30d (diff)
downloadbcm5719-llvm-750fe2220e53bc6d9c8fd4d5e0ab7f59d693b14d.tar.gz
bcm5719-llvm-750fe2220e53bc6d9c8fd4d5e0ab7f59d693b14d.zip
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
Diffstat (limited to 'clang/lib/Driver/ToolChains/Gnu.cpp')
-rw-r--r--clang/lib/Driver/ToolChains/Gnu.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
index 595285e087f..549e24cbd2b 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<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 =
OpenPOWER on IntegriCloud