diff options
author | Chris Lattner <sabre@nondot.org> | 2007-05-04 21:31:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-05-04 21:31:13 +0000 |
commit | a09879663d4a00ba66c44454128f815af115dd53 (patch) | |
tree | 09aca4a3e2ef8ac01cb38eeb3557501c84fc3843 /llvm | |
parent | fd1ad10e61b8bf6affff37dd0a86bb8ff9dc2161 (diff) | |
download | bcm5719-llvm-a09879663d4a00ba66c44454128f815af115dd53.tar.gz bcm5719-llvm-a09879663d4a00ba66c44454128f815af115dd53.zip |
allow the 8-bit abbrev to be used for either bb or other values
llvm-svn: 36761
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index 938be87b452..6ee3a4a3474 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -714,9 +714,9 @@ static void WriteValueSymbolTable(const ValueSymbolTable &VST, if (VST.empty()) return; Stream.EnterSubblock(bitc::VALUE_SYMTAB_BLOCK_ID, 3); - { // 8-bit fixed width VST_ENTRY strings. + { // 8-bit fixed-width VST_ENTRY/VST_BBENTRY strings. BitCodeAbbrev *Abbv = new BitCodeAbbrev(); - Abbv->Add(BitCodeAbbrevOp(bitc::VST_CODE_ENTRY)); + Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 3)); Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 8)); Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Array)); Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 8)); @@ -762,17 +762,17 @@ static void WriteValueSymbolTable(const ValueSymbolTable &VST, } - unsigned AbbrevToUse = 0; + unsigned AbbrevToUse = VST_ENTRY_8_ABBREV; - // VST_ENTRY: [valueid, namelen, namechar x N] - // VST_BBENTRY: [bbid, namelen, namechar x N] + // VST_ENTRY: [valueid, namechar x N] + // VST_BBENTRY: [bbid, namechar x N] unsigned Code; if (isa<BasicBlock>(SI->getValue())) { Code = bitc::VST_CODE_BBENTRY; if (is7Bit) AbbrevToUse = VST_BBENTRY_7_ABBREV; } else { Code = bitc::VST_CODE_ENTRY; - AbbrevToUse = is7Bit ? VST_ENTRY_7_ABBREV : VST_ENTRY_8_ABBREV; + if (is7Bit) AbbrevToUse = VST_ENTRY_7_ABBREV; } NameVals.push_back(VE.getValueID(SI->getValue())); |