forked from OSchip/llvm-project
[modules] Improve llvm-bcanalyzer output on AST files a little. No functionality change.
llvm-svn: 229145
This commit is contained in:
parent
36913deebe
commit
ec216500f2
|
@ -1094,13 +1094,13 @@ namespace clang {
|
||||||
///
|
///
|
||||||
/// These constants describe the records that describe statements
|
/// These constants describe the records that describe statements
|
||||||
/// or expressions. These records occur within type and declarations
|
/// or expressions. These records occur within type and declarations
|
||||||
/// block, so they begin with record values of 100. Each constant
|
/// block, so they begin with record values of 128. Each constant
|
||||||
/// describes a record for a specific statement or expression class in the
|
/// describes a record for a specific statement or expression class in the
|
||||||
/// AST.
|
/// AST.
|
||||||
enum StmtCode {
|
enum StmtCode {
|
||||||
/// \brief A marker record that indicates that we are at the end
|
/// \brief A marker record that indicates that we are at the end
|
||||||
/// of an expression.
|
/// of an expression.
|
||||||
STMT_STOP = 100,
|
STMT_STOP = 128,
|
||||||
/// \brief A NULL expression.
|
/// \brief A NULL expression.
|
||||||
STMT_NULL_PTR,
|
STMT_NULL_PTR,
|
||||||
/// \brief A reference to a previously [de]serialized Stmt record.
|
/// \brief A reference to a previously [de]serialized Stmt record.
|
||||||
|
|
|
@ -206,7 +206,7 @@ public:
|
||||||
llvm::BitstreamCursor InputFilesCursor;
|
llvm::BitstreamCursor InputFilesCursor;
|
||||||
|
|
||||||
/// \brief Offsets for all of the input file entries in the AST file.
|
/// \brief Offsets for all of the input file entries in the AST file.
|
||||||
const uint32_t *InputFileOffsets;
|
const uint64_t *InputFileOffsets;
|
||||||
|
|
||||||
/// \brief The input files that have been loaded from this AST file.
|
/// \brief The input files that have been loaded from this AST file.
|
||||||
std::vector<InputFile> InputFilesLoaded;
|
std::vector<InputFile> InputFilesLoaded;
|
||||||
|
|
|
@ -2543,7 +2543,7 @@ ASTReader::ReadControlBlock(ModuleFile &F,
|
||||||
case INPUT_FILE_OFFSETS:
|
case INPUT_FILE_OFFSETS:
|
||||||
NumInputs = Record[0];
|
NumInputs = Record[0];
|
||||||
NumUserInputs = Record[1];
|
NumUserInputs = Record[1];
|
||||||
F.InputFileOffsets = (const uint32_t *)Blob.data();
|
F.InputFileOffsets = (const uint64_t *)Blob.data();
|
||||||
F.InputFilesLoaded.resize(NumInputs);
|
F.InputFilesLoaded.resize(NumInputs);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -4350,7 +4350,7 @@ bool ASTReader::readASTFileControlBlock(StringRef Filename,
|
||||||
|
|
||||||
unsigned NumInputFiles = Record[0];
|
unsigned NumInputFiles = Record[0];
|
||||||
unsigned NumUserFiles = Record[1];
|
unsigned NumUserFiles = Record[1];
|
||||||
const uint32_t *InputFileOffs = (const uint32_t *)Blob.data();
|
const uint64_t *InputFileOffs = (const uint64_t *)Blob.data();
|
||||||
for (unsigned I = 0; I != NumInputFiles; ++I) {
|
for (unsigned I = 0; I != NumInputFiles; ++I) {
|
||||||
// Go find this input file.
|
// Go find this input file.
|
||||||
bool isSystemFile = I >= NumUserFiles;
|
bool isSystemFile = I >= NumUserFiles;
|
||||||
|
|
|
@ -941,10 +941,11 @@ void ASTWriter::WriteBlockInfoBlock() {
|
||||||
|
|
||||||
// Preprocessor Block.
|
// Preprocessor Block.
|
||||||
BLOCK(PREPROCESSOR_BLOCK);
|
BLOCK(PREPROCESSOR_BLOCK);
|
||||||
|
RECORD(PP_MACRO_DIRECTIVE_HISTORY);
|
||||||
RECORD(PP_MACRO_OBJECT_LIKE);
|
RECORD(PP_MACRO_OBJECT_LIKE);
|
||||||
RECORD(PP_MACRO_FUNCTION_LIKE);
|
RECORD(PP_MACRO_FUNCTION_LIKE);
|
||||||
RECORD(PP_TOKEN);
|
RECORD(PP_TOKEN);
|
||||||
|
|
||||||
// Decls and Types block.
|
// Decls and Types block.
|
||||||
BLOCK(DECLTYPES_BLOCK);
|
BLOCK(DECLTYPES_BLOCK);
|
||||||
RECORD(TYPE_EXT_QUAL);
|
RECORD(TYPE_EXT_QUAL);
|
||||||
|
@ -1469,7 +1470,7 @@ void ASTWriter::WriteInputFiles(SourceManager &SourceMgr,
|
||||||
|
|
||||||
unsigned UserFilesNum = 0;
|
unsigned UserFilesNum = 0;
|
||||||
// Write out all of the input files.
|
// Write out all of the input files.
|
||||||
std::vector<uint32_t> InputFileOffsets;
|
std::vector<uint64_t> InputFileOffsets;
|
||||||
for (std::deque<InputFileEntry>::iterator
|
for (std::deque<InputFileEntry>::iterator
|
||||||
I = SortedFiles.begin(), E = SortedFiles.end(); I != E; ++I) {
|
I = SortedFiles.begin(), E = SortedFiles.end(); I != E; ++I) {
|
||||||
const InputFileEntry &Entry = *I;
|
const InputFileEntry &Entry = *I;
|
||||||
|
|
Loading…
Reference in New Issue