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
http://lists
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.
http
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 cod
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
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
===
--- lib/Driv
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 StringRe
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 whi