sgraenitz added a comment.

Thanks for tackling this! Yes, I hit it as well during development and wondered 
what is the right thing to do. The effect of the proposed change will be log 
messages like this right?

  ... which resolves to a constant value of mismatched width (-1 bits). 
Ignoring constant.

I think it would be great to log the actual issue (constant width not 
accessible) and bail out if `value.Type == llvm::pdb::Empty`. Even before 
requesting `qual_type`. What do you think?



================
Comment at: lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp:1307
+        unsigned constant_width =
+            value.Type == llvm::pdb::Empty ? - 1 : value.getBitWidth();
 
----------------
Is the `-1` intended to express an invalid value? Maybe this should become a 
signed `int` then?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146536

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to