[PATCH] D31996: Make Gentoo GNU GCC Config override whitespace tolerant

2017-04-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane closed this revision. erichkeane added a comment. Forgot the "DifferentialRevision" in the commit message, but added it as related here. https://reviews.llvm.org/D31996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31996: Make Gentoo GNU GCC Config override whitespace tolerant

2017-04-14 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. Well, I've just checked gcc-config sources and it seems that it sources the file through bash, and gets the resulting `${CURRENT}`. While I don't think we ought to do complete bash support here, I guess allowing the same degree of whitespace bash does makes sense.

[PATCH] D31996: Make Gentoo GNU GCC Config override whitespace tolerant

2017-04-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D31996#727229, @mgorny wrote: > Is there any specific reason you need this? Since the file is autogenerated, > I don't think it matters very much to allow extra whiespace. But then, I do > not think it hurts, so feel free to do it. The

[PATCH] D31996: Make Gentoo GNU GCC Config override whitespace tolerant

2017-04-14 Thread Michał Górny via Phabricator via cfe-commits
mgorny accepted this revision. mgorny added a comment. This revision is now accepted and ready to land. Is there any specific reason you need this? Since the file is autogenerated, I don't think it matters very much to allow extra whiespace. But then, I do not think it hurts, so feel free to do

[PATCH] D31996: Make Gentoo GNU GCC Config override whitespace tolerant

2017-04-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 95054. erichkeane added a comment. Oops, yeah, good suggestion. https://reviews.llvm.org/D31996 Files: lib/Driver/ToolChains/Gnu.cpp Index: lib/Driver/ToolChains/Gnu.cpp === ---

[PATCH] D31996: Make Gentoo GNU GCC Config override whitespace tolerant

2017-04-12 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/Driver/ToolChains/Gnu.cpp:2176 for (StringRef Line : Lines) { + StringRef TrimLine = Line.trim(); // CURRENT=triple-version Can we just do Line = Line.trim() so we won't have an extra

[PATCH] D31996: Make Gentoo GNU GCC Config override whitespace tolerant

2017-04-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. 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