[llvm] r299602 - StringTableBuilder: Don't assert when writing an empty raw string table.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 5 17:10:17 PDT 2017
Author: pcc
Date: Wed Apr 5 19:10:17 2017
New Revision: 299602
URL: http://llvm.org/viewvc/llvm-project?rev=299602&view=rev
Log:
StringTableBuilder: Don't assert when writing an empty raw string table.
Modified:
llvm/trunk/lib/MC/StringTableBuilder.cpp
Modified: llvm/trunk/lib/MC/StringTableBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/StringTableBuilder.cpp?rev=299602&r1=299601&r2=299602&view=diff
==============================================================================
--- llvm/trunk/lib/MC/StringTableBuilder.cpp (original)
+++ llvm/trunk/lib/MC/StringTableBuilder.cpp Wed Apr 5 19:10:17 2017
@@ -54,7 +54,7 @@ void StringTableBuilder::write(raw_ostre
assert(isFinalized());
SmallString<0> Data;
Data.resize(getSize());
- write((uint8_t *)&Data[0]);
+ write((uint8_t *)Data.data());
OS << Data;
}
More information about the llvm-commits
mailing list