aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bitcode
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-19 05:51:03 +0000
committerChris Lattner <sabre@nondot.org>2009-10-19 05:51:03 +0000
commit12f031d0058db993da506638228f16b10ec7912f (patch)
tree860e4b9229a9ddeca8a591edf29dce8b99ab4c97 /lib/Bitcode
parent13435d93838f673a3a1a89eae2565b98068470c6 (diff)
downloadexternal_llvm-12f031d0058db993da506638228f16b10ec7912f.zip
external_llvm-12f031d0058db993da506638228f16b10ec7912f.tar.gz
external_llvm-12f031d0058db993da506638228f16b10ec7912f.tar.bz2
simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84465 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode')
-rw-r--r--lib/Bitcode/Writer/BitcodeWriter.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp
index 304900f..3e4c823 100644
--- a/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -517,9 +517,7 @@ static void WriteModuleMetadata(const ValueEnumerator &VE,
}
// Code: [strchar x N]
- const char *StrBegin = MDS->begin();
- for (unsigned i = 0, e = MDS->length(); i != e; ++i)
- Record.push_back(StrBegin[i]);
+ Record.append(MDS->begin(), MDS->end());
// Emit the finished record.
Stream.EmitRecord(bitc::METADATA_STRING, Record, MDSAbbrev);