[llvm-commits] CVS: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp

Chris Lattner sabre at nondot.org
Fri May 4 14:31:31 PDT 2007



Changes in directory llvm/lib/Bitcode/Writer:

BitcodeWriter.cpp updated: 1.34 -> 1.35
---
Log message:

allow the 8-bit abbrev to be used for either bb or other values


---
Diffs of the changes:  (+6 -6)

 BitcodeWriter.cpp |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


Index: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff -u llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:1.34 llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:1.35
--- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:1.34	Fri May  4 15:58:35 2007
+++ llvm/lib/Bitcode/Writer/BitcodeWriter.cpp	Fri May  4 16:31:13 2007
@@ -714,9 +714,9 @@
   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 @@
       }
     
     
-    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()));






More information about the llvm-commits mailing list