On Apr 2, 2013, at 8:16 PM, Douglas Gregor <[email protected]> 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
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to