[PATCH] D74991: Add methods to data extractor for extracting bytes and fixed length C strings.
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 24 08:49:20 PST 2020
aprantl added inline comments.
================
Comment at: llvm/include/llvm/Support/DataExtractor.h:173
+ /// offset plus the length of the C string is out of bounds,
+ /// a default-initialized StringRef will be returned.
+ Optional<StringRef> getFixedLengthString(uint64_t *OffsetPtr,
----------------
The comment is at odds with the return type. I think returning just a (potentially) empty StringRef as mentioned in the comment should be fine though.
================
Comment at: llvm/include/llvm/Support/DataExtractor.h:198
+ /// is out of bounds, a default-initialized StringRef will be returned.
+ Optional<StringRef> getBytes(uint64_t *OffsetPtr, uint64_t Length) const;
+
----------------
same here
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74991/new/
https://reviews.llvm.org/D74991
More information about the llvm-commits
mailing list