[llvm-commits] [llvm] r84465 - /llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
Chris Lattner
sabre at nondot.org
Sun Oct 18 22:51:03 PDT 2009
Author: lattner
Date: Mon Oct 19 00:51:03 2009
New Revision: 84465
URL: http://llvm.org/viewvc/llvm-project?rev=84465&view=rev
Log:
simplify.
Modified:
llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=84465&r1=84464&r2=84465&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Mon Oct 19 00:51:03 2009
@@ -517,9 +517,7 @@
}
// 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);
More information about the llvm-commits
mailing list