[PATCH] D67328: [llvm-readobj] Warn user when dumping not supported version of stack map (PR38278).

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 10 01:28:56 PDT 2019


grimar added inline comments.


================
Comment at: llvm/include/llvm/Object/StackMapParser.h:325
 
-  /// Get the version number of this stackmap. (Always returns 3).
-  unsigned getVersion() const { return 3; }
+  /// Get the version number that this parser currently supported. (Always
+  /// returns 3).
----------------
jhenderson wrote:
> supported -> supports
> 
> Maybe this should return an array of versions, and be called "getSupportedVersions"? Obviously in the first case, the array has only one member, but it would make it easy to add more in the future.
I'd refactor it to `bool isVersionSupported(unsigned Ver)` then. Returning an array perhaps a bit overcomplicated thing for a public API.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67328/new/

https://reviews.llvm.org/D67328





More information about the llvm-commits mailing list