diff options
Diffstat (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReaderDecl.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index abfee00cf3a..dad3a1450e3 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -2482,18 +2482,11 @@ static bool isConsumerInterestedIn(Decl *D, bool HasBody) { /// \brief Get the correct cursor and offset for loading a declaration. ASTReader::RecordLocation ASTReader::DeclCursorForID(DeclID ID, unsigned &RawLocation) { - // See if there's an override. - DeclReplacementMap::iterator It = ReplacedDecls.find(ID); - 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"); ModuleFile *M = I->second; - const DeclOffset & - DOffs = M->DeclOffsets[ID - M->BaseDeclID - NUM_PREDEF_DECL_IDS]; + const DeclOffset &DOffs = + M->DeclOffsets[ID - M->BaseDeclID - NUM_PREDEF_DECL_IDS]; RawLocation = DOffs.Loc; return RecordLocation(M, DOffs.BitOffset); } |