[PATCH] D20026: Parse each module's module info stream
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Fri May 6 15:01:48 PDT 2016
zturner added inline comments.
================
Comment at: lib/DebugInfo/PDB/Raw/ByteStream.cpp:27-29
@@ -26,5 +26,5 @@
void ByteStream::reset() {
- if (Owned)
+ if (Owned && Data.size() > 0)
delete[] Data.data();
Owned = false;
Data = MutableArrayRef<uint8_t>();
----------------
ruiu wrote:
> Why do you manage ownership by hand instead of unique_ptr?
Whether or not the data is owned should be optional. I could change the bool to a unique_ptr and only initialize it optionally, seems like that would work and be fine.
http://reviews.llvm.org/D20026
More information about the llvm-commits
mailing list