From: Douglas Gregor Date: Thu, 25 Oct 2012 00:25:27 +0000 (+0000) Subject: Fix computation of predefines buffer from the preprocessor-option X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9b8da43077a78f9ab223caf4889e6c6eba2c4a3;p=clang Fix computation of predefines buffer from the preprocessor-option checking, and disable the old predefines-buffer-diff'ing code path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166653 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 7e768c67fc..d246569a4c 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -277,6 +277,7 @@ static bool checkPreprocessorOptions(const PreprocessorOptions &PPOpts, } else { SuggestedPredefines += "#define "; SuggestedPredefines += MacroName.str(); + SuggestedPredefines += ' '; SuggestedPredefines += Existing.first.str(); SuggestedPredefines += '\n'; } @@ -1026,16 +1027,6 @@ void ASTReader::Error(unsigned DiagID, /// \brief Tell the AST listener about the predefines buffers in the chain. bool ASTReader::CheckPredefinesBuffers(bool Complain) { - if (Listener) { - // We only care about the primary module. - ModuleFile &M = ModuleMgr.getPrimaryModule(); - SuggestedPredefines.clear(); - return Listener->ReadPredefinesBuffer(PCHPredefinesBuffers, - M.ActualOriginalSourceFileName, - SuggestedPredefines, - FileMgr, - Complain); - } return false; }