[PATCH] D61236: [NFC] Add a static function to do the endian check

Artur Pilipenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 09:24:44 PDT 2019


apilipenko added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:6135
+// IsBigEndian, otherwise, the match failed.
+static bool matchEndian(const SmallVector<int64_t, 4> &ByteOffsets,
+                        int64_t FirstOffset, bool &IsBigEndian) {
----------------
Small stylistic suggestion. This function essentially returns a tri-state: big, little, neither. An explicit enum for the return value might be a cleaner way to express this.


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

https://reviews.llvm.org/D61236





More information about the llvm-commits mailing list