aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Reader/Reader.h
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-08-21 20:50:49 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-08-21 20:50:49 +0000
commit572c2565191f2d7d5cf46f8325b2795db2d6f466 (patch)
treee4573d9641582ba925086adc7a8eb1b06a68f419 /lib/Bytecode/Reader/Reader.h
parent5b472d9879867c5c31ff2a2ce9d376a12d974976 (diff)
Add boolean file format flags in preparation for version 5 bytecode.
Remove the "processFunctions" boolean from ParseBytecode as it is no longer needed. This is part of avoiding double reading of functions when analyzing bytecode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15982 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Reader/Reader.h')
-rw-r--r--lib/Bytecode/Reader/Reader.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/lib/Bytecode/Reader/Reader.h b/lib/Bytecode/Reader/Reader.h
index 5e7a439d7d..80dbea986d 100644
--- a/lib/Bytecode/Reader/Reader.h
+++ b/lib/Bytecode/Reader/Reader.h
@@ -130,8 +130,7 @@ public:
void ParseBytecode(
const unsigned char *Buf, ///< Beginning of the bytecode buffer
unsigned Length, ///< Length of the bytecode buffer
- const std::string &ModuleID, ///< An identifier for the module constructed.
- bool processFunctions=false ///< Process all function bodies fully.
+ const std::string &ModuleID ///< An identifier for the module constructed.
);
/// @brief Parse all function bodies
@@ -299,6 +298,21 @@ private:
/// alignment of bytecode fields was done away with completely.
bool hasAlignment;
+ // In version 4, basic blocks have a minimum index of 0 whereas all the
+ // other primitives have a minimum index of 1 (because 0 is the "null"
+ // value. In version 5, we made this consistent.
+ bool hasInconsistentBBSlotNums;
+
+ // In version 4, the types SByte and UByte were encoded as vbr_uint so that
+ // signed values > 63 and unsigned values >127 would be encoded as two
+ // bytes. In version 5, they are encoded directly in a single byte.
+ bool hasVBRByteTypes;
+
+ // In version 4, modules begin with a "Module Block" which encodes a 4-byte
+ // integer value 0x01 to identify the module block. This is unnecessary and
+ // removed in version 5.
+ bool hasUnnecessaryModuleBlockId;
+
/// CompactionTypes - If a compaction table is active in the current function,
/// this is the mapping that it contains. We keep track of what resolved type
/// it is as well as what global type entry it is.
@@ -498,7 +512,8 @@ private:
/// @brief A function for creating a BytecodeAnalzer as a handler
/// for the Bytecode reader.
-BytecodeHandler* createBytecodeAnalyzerHandler(BytecodeAnalysis& bca );
+BytecodeHandler* createBytecodeAnalyzerHandler(BytecodeAnalysis& bca,
+ std::ostream* output );
} // End llvm namespace