Skip to content

Commit

Permalink
Rename the AST file's SOURCE_LOCATION_MAP to MODULE_OFFSET_MAP, to in…
Browse files Browse the repository at this point in the history
…dicate the greater role it will soon play in remapping.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136619 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
DougGregor committed Aug 1, 2011
1 parent 9d9e3dd commit 5d51a1d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions include/clang/Serialization/ASTBitCodes.h
Expand Up @@ -387,8 +387,11 @@ namespace clang {
/// for typo correction.
KNOWN_NAMESPACES = 46,

/// \brief Record code for the source location remapping information.
SOURCE_LOCATION_MAP = 47,
/// \brief Record code for the remapping information used to relate
/// loaded modules to the various offsets and IDs(e.g., source location
/// offests, declaration and type IDs) that are used in that module to
/// refer to other modules.
MODULE_OFFSET_MAP = 47,

/// \brief Record code for the source manager line table information,
/// which stores information about #line directives.
Expand Down
2 changes: 1 addition & 1 deletion lib/Serialization/ASTReader.cpp
Expand Up @@ -2271,7 +2271,7 @@ ASTReader::ReadASTBlock(Module &F) {
break;
}

case SOURCE_LOCATION_MAP: {
case MODULE_OFFSET_MAP: {
// Additional remapping information.
const unsigned char *Data = (const unsigned char*)BlobStart;
const unsigned char *DataEnd = Data + BlobLen;
Expand Down
4 changes: 2 additions & 2 deletions lib/Serialization/ASTWriter.cpp
Expand Up @@ -1582,7 +1582,7 @@ void ASTWriter::WriteSourceManagerBlock(SourceManager &SourceMgr,
Chain->ModuleMgr.exportLookup(Modules);

Abbrev = new BitCodeAbbrev();
Abbrev->Add(BitCodeAbbrevOp(SOURCE_LOCATION_MAP));
Abbrev->Add(BitCodeAbbrevOp(MODULE_OFFSET_MAP));
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob));
unsigned SLocMapAbbrev = Stream.EmitAbbrev(Abbrev);
llvm::SmallString<2048> Buffer;
Expand All @@ -1597,7 +1597,7 @@ void ASTWriter::WriteSourceManagerBlock(SourceManager &SourceMgr,
}
}
Record.clear();
Record.push_back(SOURCE_LOCATION_MAP);
Record.push_back(MODULE_OFFSET_MAP);
Stream.EmitRecordWithBlob(SLocMapAbbrev, Record,
Buffer.data(), Buffer.size());
}
Expand Down

0 comments on commit 5d51a1d

Please sign in to comment.