[cfe-commits] r137792 - /cfe/trunk/lib/Serialization/ASTWriter.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Tue Aug 16 17:31:14 PDT 2011
Author: akirtzidis
Date: Tue Aug 16 19:31:14 2011
New Revision: 137792
URL: http://llvm.org/viewvc/llvm-project?rev=137792&view=rev
Log:
[PCH] When writing out ExpansionInfo, make sure we don't lose track if it's a macro arg expansion or not.
Modified:
cfe/trunk/lib/Serialization/ASTWriter.cpp
Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=137792&r1=137791&r2=137792&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriter.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriter.cpp Tue Aug 16 19:31:14 2011
@@ -1540,7 +1540,8 @@
const SrcMgr::ExpansionInfo &Expansion = SLoc->getExpansion();
Record.push_back(Expansion.getSpellingLoc().getRawEncoding());
Record.push_back(Expansion.getExpansionLocStart().getRawEncoding());
- Record.push_back(Expansion.getExpansionLocEnd().getRawEncoding());
+ Record.push_back(Expansion.isMacroArgExpansion() ? 0
+ : Expansion.getExpansionLocEnd().getRawEncoding());
// Compute the token length for this macro expansion.
unsigned NextOffset = SourceMgr.getNextLocalOffset();
More information about the cfe-commits
mailing list