summaryrefslogtreecommitdiffstats
path: root/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
commit249076e75ced1241b64a4cf0dff66924b7ccead6 (patch)
tree0e97a00ca21013ed523e1a57fb8b9566e10611f8 /lib/Driver/ToolChains/Gnu.cpp
parent437675cc8853d7b449557f01ffddb28e11010d56 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300328 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains/Gnu.cpp')
-rw-r--r--lib/Driver/ToolChains/Gnu.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
index 595285e087..549e24cbd2 100644
--- a/lib/Driver/ToolChains/Gnu.cpp
+++ b/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 =