[PATCH] D20076: Start porting Type records over to using classes and accessors instead of raw casting
Adrian McCarthy via llvm-commits
llvm-commits at lists.llvm.org
Mon May 9 12:43:27 PDT 2016
amccarth accepted this revision.
amccarth added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: include/llvm/DebugInfo/CodeView/TypeRecord.h:342
@@ +341,3 @@
+ static ErrorOr<FuncId> create(ArrayRef<uint8_t> Data) {
+ if (Data.size() < sizeof(Layout))
+ return object::make_error_code(object::object_error::parse_failed);
----------------
Is there always a string? If so, then you could use `<=` to account for the fact that there should be at least a null character to terminate an empty string.
http://reviews.llvm.org/D20076
More information about the llvm-commits
mailing list