[PATCH] D77143: [llvm-dwp] Refuse DWARFv5 input DWP files.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 1 14:38:23 PDT 2020


dblaikie added inline comments.


================
Comment at: llvm/tools/llvm-dwp/llvm-dwp.cpp:653
+      if (TUIndex.getVersion() != 2)
+        return make_error<DWPError>("unsupported tu_index version");
       addAllTypesFromDWP(
----------------
ikudrin wrote:
> grimar wrote:
> > Is it tested somewhere? I see you've added a test for "cu_index", but this line is about "tu_index".
> Well, not. This check is added for completeness. To get here, the DWP file should have a "cu_index" section of version 2 and a "tu_index" section of version 5, which seems weird. Or should I add such an odd test anyway?
Testing error cases is all about weird - yeah, would be good to have such a test case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77143





More information about the llvm-commits mailing list