[PATCH] Using an invalid -O falls back on -O3 instead of an error
Sylvestre Ledru
sylvestre at debian.org
Mon Nov 11 07:17:37 PST 2013
Renato, -O4 is dead (for now ?) See r189149
================
Comment at: lib/Frontend/CompilerInvocation.cpp:307
@@ -308,1 +306,3 @@
+ << Args.getLastArg(OPT_O)->getAsString(Args) << OptLevel << DefaultOptLevel;
+ OptLevel = DefaultOptLevel;
}
----------------
Renato Golin wrote:
> This seems slightly redundant. Either you use literal 3 all over, or set the DefaultOptLevel on a higher place. Also, this is not the "default" level, but the fall-back level for high levels, maybe a better word would be "MaxOptLevel", if there isn't one already (I don't know).
>
> If there isn't, than maybe you could create a MaxOptLevel on a higher level and change all comparisons "OptLevel > 3" for "OptLevel > MaxOptLevel".
>
Thanks for the suggestion. I will have a look!
http://llvm-reviews.chandlerc.com/D2125
BRANCH
/cfe/trunk
ARCANIST PROJECT
clang
More information about the cfe-commits
mailing list