On 21 June 2016 at 19:04, Joerg Sonnenberger via cfe-commits <cfe-commits@lists.llvm.org> wrote: > On Tue, Jun 21, 2016 at 06:53:03PM -0400, Rafael Espíndola via cfe-commits > wrote: >> diff --git a/lib/Frontend/InitPreprocessor.cpp >> b/lib/Frontend/InitPreprocessor.cpp >> index 27ef59a..6b93c69 100644 >> --- a/lib/Frontend/InitPreprocessor.cpp >> +++ b/lib/Frontend/InitPreprocessor.cpp >> @@ -873,10 +873,10 @@ static void InitializePredefinedMacros(const >> TargetInfo &TI, >> if (unsigned PICLevel = LangOpts.PICLevel) { >> Builder.defineMacro("__PIC__", Twine(PICLevel)); >> Builder.defineMacro("__pic__", Twine(PICLevel)); >> - } >> - if (unsigned PIELevel = LangOpts.PIELevel) { >> - Builder.defineMacro("__PIE__", Twine(PIELevel)); >> - Builder.defineMacro("__pie__", Twine(PIELevel)); >> + if (LangOpts.PIE) { >> + Builder.defineMacro("__PIE__", Twine(PICLevel)); >> + Builder.defineMacro("__pie__", Twine(PICLevel)); >> + } >> } >> >> // Macros to control C99 numerics and <float.h> > > This is the only part that I am somewhat nervous about, since it changes > behavior in an externally visible way. I'm not sure what the code > expectations are in the wild world right now.
I should not, or there is a bug. It changes the driver to cc1 interface, but given driver invocation we should be creating identical defines. Cheers, Rafael _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits