diff options
author | Devang Patel <dpatel@apple.com> | 2009-08-04 02:36:39 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-08-04 02:36:39 +0000 |
commit | 2453c401459c9febff32f902253ada6b17a69756 (patch) | |
tree | 6d161fae48e52d96bb37d2ec8cd7a3225bc17f80 /lib/Bitcode/Writer | |
parent | d701aa7bed07cad16e33594c59251c958df2c74d (diff) | |
download | external_llvm-2453c401459c9febff32f902253ada6b17a69756.zip external_llvm-2453c401459c9febff32f902253ada6b17a69756.tar.gz external_llvm-2453c401459c9febff32f902253ada6b17a69756.tar.bz2 |
Fix MDString Abbrev setup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78034 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Writer')
-rw-r--r-- | lib/Bitcode/Writer/BitcodeWriter.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index 00b1d00..1e6e9fb 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -504,10 +504,6 @@ static void WriteValues(unsigned FirstVal, unsigned LastVal, LastBlockID = bitc::METADATA_BLOCK_ID; Stream.EnterSubblock(bitc::METADATA_BLOCK_ID, 3); - } - } - if (const MDString *MDS = dyn_cast<MDString>(V)) { - if (MDSAbbrev == 0) { // Abbrev for METADATA_STRING. BitCodeAbbrev *Abbv = new BitCodeAbbrev(); Abbv->Add(BitCodeAbbrevOp(bitc::METADATA_STRING)); @@ -515,6 +511,8 @@ static void WriteValues(unsigned FirstVal, unsigned LastVal, Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 8)); MDSAbbrev = Stream.EmitAbbrev(Abbv); } + } + if (const MDString *MDS = dyn_cast<MDString>(V)) { // Code: [strchar x N] const char *StrBegin = MDS->begin(); for (unsigned i = 0, e = MDS->length(); i != e; ++i) |