diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-31 07:20:15 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-31 07:20:15 +0000 |
commit | ef23b6001e8d9715246ca23bd8c3a6887d7844cb (patch) | |
tree | 1d804502a321c84095efa2ec80bb1c772a75710a /lib/Serialization/ASTReaderDecl.cpp | |
parent | 9d128d04578c62675eeb0cce83066052f9c19c9a (diff) |
[PCH] Now that we store the location of a decl outside its record
make sure that we keep track of locations of replaced decls as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143341 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | lib/Serialization/ASTReaderDecl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp index 7b37bbfa1b..d414c07290 100644 --- a/lib/Serialization/ASTReaderDecl.cpp +++ b/lib/Serialization/ASTReaderDecl.cpp @@ -1449,8 +1449,10 @@ ASTReader::RecordLocation ASTReader::DeclCursorForID(DeclID ID, unsigned &RawLocation) { // See if there's an override. DeclReplacementMap::iterator It = ReplacedDecls.find(ID); - if (It != ReplacedDecls.end()) - return RecordLocation(It->second.first, It->second.second); + if (It != ReplacedDecls.end()) { + RawLocation = It->second.RawLoc; + return RecordLocation(It->second.Mod, It->second.Offset); + } GlobalDeclMapType::iterator I = GlobalDeclMap.find(ID); assert(I != GlobalDeclMap.end() && "Corrupted global declaration map"); |