diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-03-27 07:28:06 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-03-27 07:28:06 +0000 |
commit | cb34bd3abb773bd3e3957f10b52d36a6366081b2 (patch) | |
tree | 42c545a505f31ee8100f4bccb640fdf6d84afdee /clang/lib/Serialization/ASTReader.cpp | |
parent | 34da7514843016409da42513b668242600b0b45f (diff) | |
download | bcm5719-llvm-cb34bd3abb773bd3e3957f10b52d36a6366081b2.tar.gz bcm5719-llvm-cb34bd3abb773bd3e3957f10b52d36a6366081b2.zip |
Encapsulate a couple of on-disk structures a little more.
llvm-svn: 264534
Diffstat (limited to 'clang/lib/Serialization/ASTReader.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index 180b65bf16a..d344cf7c606 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -4897,8 +4897,8 @@ PreprocessedEntity *ASTReader::ReadPreprocessedEntity(unsigned Index) { return nullptr; // Read the record. - SourceRange Range(ReadSourceLocation(M, PPOffs.Begin), - ReadSourceLocation(M, PPOffs.End)); + SourceRange Range(TranslateSourceLocation(M, PPOffs.getBegin()), + TranslateSourceLocation(M, PPOffs.getEnd())); PreprocessingRecord &PPRec = *PP.getPreprocessingRecord(); StringRef Blob; RecordData Record; @@ -5089,7 +5089,7 @@ Optional<bool> ASTReader::isPreprocessedEntityInFileID(unsigned Index, unsigned LocalIndex = PPInfo.second; const PPEntityOffset &PPOffs = M.PreprocessedEntityOffsets[LocalIndex]; - SourceLocation Loc = ReadSourceLocation(M, PPOffs.Begin); + SourceLocation Loc = TranslateSourceLocation(M, PPOffs.getBegin()); if (Loc.isInvalid()) return false; @@ -6426,9 +6426,9 @@ SourceLocation ASTReader::getSourceLocationForDeclID(GlobalDeclID ID) { if (Decl *D = DeclsLoaded[Index]) return D->getLocation(); - unsigned RawLocation = 0; - RecordLocation Rec = DeclCursorForID(ID, RawLocation); - return ReadSourceLocation(*Rec.F, RawLocation); + SourceLocation Loc; + DeclCursorForID(ID, Loc); + return Loc; } static Decl *getPredefinedDecl(ASTContext &Context, PredefinedDeclIDs ID) { |