[PATCH] D85313: [DebugInfo] Don't error for zero-length arange entries

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 03:27:12 PDT 2020


ikudrin added inline comments.


================
Comment at: llvm/unittests/DebugInfo/DWARF/DWARFDebugArangeSetTest.cpp:191-194
       "\x01\x00\x00\x00" // Entry2: Address
-      "\x00\x00\x00\x00" //         Length (invalid)
+      "\x00\x00\x00\x00" //         Length
+      "\x00\x00\x00\x00" // Entry3: Address
+      "\x00\x00\x00\x00" //         Length
----------------
I'd prefer this test to be divided into more basic ones. All other tests in the suite follow the idea that a unit test should check just one particular case. This helps to improve readability and maintainability. So, I'd suggest creating separate tests for cases "allow zero-length entries" and "report premature termination but continue parsing".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85313



More information about the llvm-commits mailing list