[cfe-commits] r136619 - in /cfe/trunk: include/clang/Serialization/ASTBitCodes.h lib/Serialization/ASTReader.cpp lib/Serialization/ASTWriter.cpp

Douglas Gregor dgregor at apple.com
Mon Aug 1 09:01:55 PDT 2011


Author: dgregor
Date: Mon Aug  1 11:01:55 2011
New Revision: 136619

URL: http://llvm.org/viewvc/llvm-project?rev=136619&view=rev
Log:
Rename the AST file's SOURCE_LOCATION_MAP to MODULE_OFFSET_MAP, to indicate the greater role it will soon play in remapping.

Modified:
    cfe/trunk/include/clang/Serialization/ASTBitCodes.h
    cfe/trunk/lib/Serialization/ASTReader.cpp
    cfe/trunk/lib/Serialization/ASTWriter.cpp

Modified: cfe/trunk/include/clang/Serialization/ASTBitCodes.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTBitCodes.h?rev=136619&r1=136618&r2=136619&view=diff
==============================================================================
--- cfe/trunk/include/clang/Serialization/ASTBitCodes.h (original)
+++ cfe/trunk/include/clang/Serialization/ASTBitCodes.h Mon Aug  1 11:01:55 2011
@@ -387,8 +387,11 @@
       /// 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.

Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=136619&r1=136618&r2=136619&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Mon Aug  1 11:01:55 2011
@@ -2271,7 +2271,7 @@
       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;

Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=136619&r1=136618&r2=136619&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriter.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriter.cpp Mon Aug  1 11:01:55 2011
@@ -1582,7 +1582,7 @@
     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;
@@ -1597,7 +1597,7 @@
       }
     }
     Record.clear();
-    Record.push_back(SOURCE_LOCATION_MAP);
+    Record.push_back(MODULE_OFFSET_MAP);
     Stream.EmitRecordWithBlob(SLocMapAbbrev, Record,
                               Buffer.data(), Buffer.size());
   }





More information about the cfe-commits mailing list