r178616 - Use getPredefinesFileID() appropriately.
Argyrios Kyrtzidis
akyrtzi at gmail.com
Thu Apr 4 12:46:24 PDT 2013
On Apr 2, 2013, at 8:16 PM, Douglas Gregor <dgregor at apple.com> wrote:
> Author: dgregor
> Date: Tue Apr 2 22:16:36 2013
> New Revision: 178616
>
> URL: http://llvm.org/viewvc/llvm-project?rev=178616&view=rev
> Log:
> Use getPredefinesFileID() appropriately.
>
> Thanks to Argyrios for the pointer.
>
> Modified:
> cfe/trunk/lib/Frontend/CompilerInstance.cpp
>
> Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=178616&r1=178615&r2=178616&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
> +++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Tue Apr 2 22:16:36 2013
> @@ -936,7 +936,7 @@ static void checkConfigMacro(Preprocesso
> continue;
>
> // We only care about the predefines buffer.
> - if (!StringRef(Buffer->getBufferIdentifier()).equals("<built-in>"))
> + if (FID != PP.getPredefinesFileID())
> continue;
>
> // This macro was defined on the command line, then #undef'd later.
> @@ -969,7 +969,7 @@ static void checkConfigMacro(Preprocesso
> continue;
>
> // We only care about the predefines buffer.
> - if (!StringRef(Buffer->getBufferIdentifier()).equals("<built-in>"))
> + if (FID != PP.getPredefinesFileID())
> continue;
>
> PredefinedDef = Def;
>
>
The buffer variables are not needed now, removed them in r178780.
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130404/4ff321a6/attachment.html>
More information about the cfe-commits
mailing list