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

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 1 02:09:24 PDT 2020


grimar added a comment.

(I know little about llvm-dwp, but have 2 minor general comments)



================
Comment at: llvm/tools/llvm-dwp/llvm-dwp.cpp:616
+    if (CUIndex.getVersion() != 2)
+      return make_error<DWPError>("unsupported cu_index version");
 
----------------
I'd suggest to include the unsupported version number to new error messages.

e.g: "unsupported cu_index version: 99"


================
Comment at: llvm/tools/llvm-dwp/llvm-dwp.cpp:653
+      if (TUIndex.getVersion() != 2)
+        return make_error<DWPError>("unsupported tu_index version");
       addAllTypesFromDWP(
----------------
Is it tested somewhere? I see you've added a test for "cu_index", but this line is about "tu_index".


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