[cfe-commits] r111475 - in /cfe/trunk: include/clang/Serialization/ASTDeserializationListener.h include/clang/Serialization/ASTReader.h include/clang/Serialization/PCHBitCodes.h lib/Serialization/ASTReader.cpp lib/Serialization/ASTWriter.cpp
Sebastian Redl
sebastian.redl at getdesigned.at
Wed Aug 18 16:57:22 PDT 2010
Author: cornedbee
Date: Wed Aug 18 18:57:22 2010
New Revision: 111475
URL: http://llvm.org/viewvc/llvm-project?rev=111475&view=rev
Log:
Rename stuff in PCHBitCodes.h
Modified:
cfe/trunk/include/clang/Serialization/ASTDeserializationListener.h
cfe/trunk/include/clang/Serialization/ASTReader.h
cfe/trunk/include/clang/Serialization/PCHBitCodes.h
cfe/trunk/lib/Serialization/ASTReader.cpp
cfe/trunk/lib/Serialization/ASTWriter.cpp
Modified: cfe/trunk/include/clang/Serialization/ASTDeserializationListener.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTDeserializationListener.h?rev=111475&r1=111474&r2=111475&view=diff
==============================================================================
--- cfe/trunk/include/clang/Serialization/ASTDeserializationListener.h (original)
+++ cfe/trunk/include/clang/Serialization/ASTDeserializationListener.h Wed Aug 18 18:57:22 2010
@@ -12,8 +12,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_FRONTEND_PCH_DESERIALIZATION_LISTENER_H
-#define LLVM_CLANG_FRONTEND_PCH_DESERIALIZATION_LISTENER_H
+#ifndef LLVM_CLANG_FRONTEND_AST_DESERIALIZATION_LISTENER_H
+#define LLVM_CLANG_FRONTEND_AST_DESERIALIZATION_LISTENER_H
#include "clang/Serialization/PCHBitCodes.h"
Modified: cfe/trunk/include/clang/Serialization/ASTReader.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/ASTReader.h?rev=111475&r1=111474&r2=111475&view=diff
==============================================================================
--- cfe/trunk/include/clang/Serialization/ASTReader.h (original)
+++ cfe/trunk/include/clang/Serialization/ASTReader.h Wed Aug 18 18:57:22 2010
@@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_FRONTEND_PCH_READER_H
-#define LLVM_CLANG_FRONTEND_PCH_READER_H
+#ifndef LLVM_CLANG_FRONTEND_AST_READER_H
+#define LLVM_CLANG_FRONTEND_AST_READER_H
#include "clang/Serialization/PCHBitCodes.h"
#include "clang/Sema/ExternalSemaSource.h"
Modified: cfe/trunk/include/clang/Serialization/PCHBitCodes.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Serialization/PCHBitCodes.h?rev=111475&r1=111474&r2=111475&view=diff
==============================================================================
--- cfe/trunk/include/clang/Serialization/PCHBitCodes.h (original)
+++ cfe/trunk/include/clang/Serialization/PCHBitCodes.h Wed Aug 18 18:57:22 2010
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
//
-// This header defines Bitcode enum values for Clang precompiled header files.
+// This header defines Bitcode enum values for Clang serialized AST files.
//
// The enum values defined in this file should be considered permanent. If
// new features are added, they should have values added at the end of the
@@ -22,37 +22,37 @@
namespace clang {
namespace pch {
- /// \brief PCH major version number supported by this version of
+ /// \brief AST file major version number supported by this version of
/// Clang.
///
- /// Whenever the PCH format changes in a way that makes it
+ /// Whenever the AST file format changes in a way that makes it
/// incompatible with previous versions (such that a reader
/// designed for the previous version could not support reading
/// the new version), this number should be increased.
///
- /// Version 4 of PCH files also requires that the version control branch and
+ /// Version 4 of AST files also requires that the version control branch and
/// revision match exactly, since there is no backward compatibility of
- /// PCH files at this time.
+ /// AST files at this time.
const unsigned VERSION_MAJOR = 4;
- /// \brief PCH minor version number supported by this version of
+ /// \brief AST file minor version number supported by this version of
/// Clang.
///
- /// Whenever the PCH format changes in a way that is still
+ /// Whenever the AST format changes in a way that is still
/// compatible with previous versions (such that a reader designed
/// for the previous version could still support reading the new
/// version by ignoring new kinds of subblocks), this number
/// should be increased.
const unsigned VERSION_MINOR = 0;
- /// \brief An ID number that refers to a declaration in a PCH file.
+ /// \brief An ID number that refers to a declaration in an AST file.
///
/// The ID numbers of declarations are consecutive (in order of
/// discovery) and start at 2. 0 is reserved for NULL, and 1 is
/// reserved for the translation unit declaration.
typedef uint32_t DeclID;
- /// \brief An ID number that refers to a type in a PCH file.
+ /// \brief An ID number that refers to a type in an AST file.
///
/// The ID of a type is partitioned into two parts: the lower
/// three bits are used to store the const/volatile/restrict
@@ -64,18 +64,18 @@
/// other types that have serialized representations.
typedef uint32_t TypeID;
- /// \brief An ID number that refers to an identifier in a PCH
+ /// \brief An ID number that refers to an identifier in an AST
/// file.
typedef uint32_t IdentID;
typedef uint32_t SelectorID;
/// \brief Describes the various kinds of blocks that occur within
- /// a PCH file.
+ /// an AST file.
enum BlockIDs {
- /// \brief The PCH block, which acts as a container around the
- /// full PCH block.
- PCH_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID,
+ /// \brief The AST block, which acts as a container around the
+ /// full AST block.
+ AST_BLOCK_ID = llvm::bitc::FIRST_APPLICATION_BLOCKID,
/// \brief The block containing information about the source
/// manager.
@@ -86,16 +86,16 @@
PREPROCESSOR_BLOCK_ID,
/// \brief The block containing the definitions of all of the
- /// types and decls used within the PCH file.
+ /// types and decls used within the AST file.
DECLTYPES_BLOCK_ID
};
- /// \brief Record types that occur within the PCH block itself.
- enum PCHRecordTypes {
+ /// \brief Record types that occur within the AST block itself.
+ enum ASTRecordTypes {
/// \brief Record code for the offsets of each type.
///
/// The TYPE_OFFSET constant describes the record that occurs
- /// within the PCH block. The record itself is an array of offsets that
+ /// within the AST block. The record itself is an array of offsets that
/// point into the declarations and types block (identified by
/// DECLTYPES_BLOCK_ID). The index into the array is based on the ID
/// of a type. For a given type ID @c T, the lower three bits of
@@ -110,7 +110,7 @@
///
/// The DECL_OFFSET constant describes the record that occurs
/// within the block identified by DECL_OFFSETS_BLOCK_ID within
- /// the PCH block. The record itself is an array of offsets that
+ /// the AST block. The record itself is an array of offsets that
/// point into the declarations and types block (identified by
/// DECLTYPES_BLOCK_ID). The declaration ID is an index into this
/// record, after subtracting one to account for the use of
@@ -126,8 +126,8 @@
/// actually important to check.
LANGUAGE_OPTIONS = 3,
- /// \brief PCH metadata, including the PCH file version number
- /// and the target triple used to build the PCH file.
+ /// \brief AST file metadata, including the AST file version number
+ /// and the target triple used to build the AST file.
METADATA = 4,
/// \brief Record code for the table of offsets of each
@@ -142,7 +142,7 @@
///
/// The identifier table is a simple blob that contains
/// NULL-terminated strings for all of the identifiers
- /// referenced by the PCH file. The IDENTIFIER_OFFSET table
+ /// referenced by the AST file. The IDENTIFIER_OFFSET table
/// contains the mapping from identifier IDs to the characters
/// in this blob. Note that the starting offsets of all of the
/// identifiers are odd, so that, when the identifier offset
@@ -154,10 +154,10 @@
/// \brief Record code for the array of external definitions.
///
- /// The PCH file contains a list of all of the unnamed external
+ /// The AST file contains a list of all of the unnamed external
/// definitions present within the parsed headers, stored as an
/// array of declaration IDs. These external definitions will be
- /// reported to the AST consumer after the PCH file has been
+ /// reported to the AST consumer after the AST file has been
/// read, since their presence can affect the semantics of the
/// program (e.g., for code generation).
EXTERNAL_DEFINITIONS = 7,
@@ -172,7 +172,7 @@
SPECIAL_TYPES = 8,
/// \brief Record code for the extra statistics we gather while
- /// generating a PCH file.
+ /// generating an AST file.
STATISTICS = 9,
/// \brief Record code for the array of tentative definitions.
@@ -198,7 +198,7 @@
SOURCE_LOCATION_OFFSETS = 15,
/// \brief Record code for the set of source location entries
- /// that need to be preloaded by the PCH reader.
+ /// that need to be preloaded by the AST reader.
///
/// This set contains the source location entry for the
/// predefines buffer and for any file entries that need to be
@@ -212,13 +212,13 @@
EXT_VECTOR_DECLS = 18,
/// \brief Record code for the original file that was used to
- /// generate the precompiled header.
+ /// generate the AST file.
ORIGINAL_FILE_NAME = 19,
/// Record #20 intentionally left blank.
/// \brief Record code for the version control branch and revision
- /// information of the compiler used to build this PCH file.
+ /// information of the compiler used to build this AST file.
VERSION_CONTROL_BRANCH_REVISION = 21,
/// \brief Record code for the array of unused file scoped decls.
@@ -234,8 +234,8 @@
/// \brief Record code for the array of dynamic classes.
DYNAMIC_CLASSES = 25,
- /// \brief Record code for the chained PCH metadata, including the
- /// PCH version and the name of the PCH this is chained to.
+ /// \brief Record code for the chained AST metadata, including the
+ /// AST file version and the name of the PCH this depends on.
CHAINED_METADATA = 26,
/// \brief Record code for referenced selector pool.
@@ -261,7 +261,7 @@
/// \brief Record code for a decl replacement block.
///
/// If a declaration is modified after having been deserialized, and then
- /// written to a dependent PCH file, its ID and offset must be added to
+ /// written to a dependent AST file, its ID and offset must be added to
/// the replacement block.
DECL_REPLACEMENTS = 33
};
@@ -312,10 +312,10 @@
PP_MACRO_DEFINITION = 5
};
- /// \defgroup PCHAST Precompiled header AST constants
+ /// \defgroup ASTAST AST file AST constants
///
/// The constants in this group describe various components of the
- /// abstract syntax tree within a precompiled header.
+ /// abstract syntax tree within an AST file.
///
/// @{
@@ -397,7 +397,7 @@
/// \brief Record codes for each kind of type.
///
/// These constants describe the type records that can occur within a
- /// block identified by DECLTYPES_BLOCK_ID in the PCH file. Each
+ /// block identified by DECLTYPES_BLOCK_ID in the AST file. Each
/// constant describes a record for a specific type class in the
/// AST.
enum TypeCode {
@@ -803,17 +803,17 @@
EXPR_CXX_CONSTRUCT,
/// \brief A CXXTemporaryObjectExpr record.
EXPR_CXX_TEMPORARY_OBJECT,
- // \brief A CXXStaticCastExpr record.
+ /// \brief A CXXStaticCastExpr record.
EXPR_CXX_STATIC_CAST,
- // \brief A CXXDynamicCastExpr record.
+ /// \brief A CXXDynamicCastExpr record.
EXPR_CXX_DYNAMIC_CAST,
- // \brief A CXXReinterpretCastExpr record.
+ /// \brief A CXXReinterpretCastExpr record.
EXPR_CXX_REINTERPRET_CAST,
- // \brief A CXXConstCastExpr record.
+ /// \brief A CXXConstCastExpr record.
EXPR_CXX_CONST_CAST,
- // \brief A CXXFunctionalCastExpr record.
+ /// \brief A CXXFunctionalCastExpr record.
EXPR_CXX_FUNCTIONAL_CAST,
- // \brief A CXXBoolLiteralExpr record.
+ /// \brief A CXXBoolLiteralExpr record.
EXPR_CXX_BOOL_LITERAL,
EXPR_CXX_NULL_PTR_LITERAL, // CXXNullPtrLiteralExpr
EXPR_CXX_TYPEID_EXPR, // CXXTypeidExpr (of expr).
Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=111475&r1=111474&r2=111475&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Wed Aug 18 18:57:22 2010
@@ -1411,7 +1411,7 @@
ASTReader::ReadASTBlock(PerFileData &F) {
llvm::BitstreamCursor &Stream = F.Stream;
- if (Stream.EnterSubBlock(pch::PCH_BLOCK_ID)) {
+ if (Stream.EnterSubBlock(pch::AST_BLOCK_ID)) {
Error("malformed block record in AST file");
return Failure;
}
@@ -1484,7 +1484,7 @@
Record.clear();
const char *BlobStart = 0;
unsigned BlobLen = 0;
- switch ((pch::PCHRecordTypes)Stream.ReadRecord(Code, Record,
+ switch ((pch::ASTRecordTypes)Stream.ReadRecord(Code, Record,
&BlobStart, &BlobLen)) {
default: // Default behavior: ignore.
break;
@@ -1923,7 +1923,7 @@
return Failure;
}
break;
- case pch::PCH_BLOCK_ID:
+ case pch::AST_BLOCK_ID:
switch (ReadASTBlock(F)) {
case Success:
break;
@@ -2109,8 +2109,8 @@
// We only know the AST subblock ID.
switch (BlockID) {
- case pch::PCH_BLOCK_ID:
- if (Stream.EnterSubBlock(pch::PCH_BLOCK_ID)) {
+ case pch::AST_BLOCK_ID:
+ if (Stream.EnterSubBlock(pch::AST_BLOCK_ID)) {
Diags.Report(diag::err_fe_pch_malformed_block) << ASTFileName;
return std::string();
}
Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=111475&r1=111474&r2=111475&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriter.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriter.cpp Wed Aug 18 18:57:22 2010
@@ -614,7 +614,7 @@
#define RECORD(X) EmitRecordID(pch::X, #X, Stream, Record)
// AST Top-Level Block.
- BLOCK(PCH_BLOCK);
+ BLOCK(AST_BLOCK);
RECORD(ORIGINAL_FILE_NAME);
RECORD(TYPE_OFFSET);
RECORD(DECL_OFFSET);
@@ -2119,7 +2119,7 @@
// Write the remaining AST contents.
RecordData Record;
- Stream.EnterSubblock(pch::PCH_BLOCK_ID, 5);
+ Stream.EnterSubblock(pch::AST_BLOCK_ID, 5);
WriteMetadata(Context, isysroot);
WriteLanguageOptions(Context.getLangOptions());
if (StatCalls && !isysroot)
@@ -2238,7 +2238,7 @@
Preprocessor &PP = SemaRef.PP;
RecordData Record;
- Stream.EnterSubblock(pch::PCH_BLOCK_ID, 5);
+ Stream.EnterSubblock(pch::AST_BLOCK_ID, 5);
WriteMetadata(Context, isysroot);
if (StatCalls && !isysroot)
WriteStatCache(*StatCalls);
More information about the cfe-commits
mailing list