[PATCH] D64428: Teach `llvm-pdbutil pretty -native` about `-injected-sources`

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 16 09:05:43 PDT 2019


zturner added inline comments.


================
Comment at: llvm/lib/DebugInfo/PDB/Native/NativeEnumInjectedSources.cpp:50
+    if (!Name) {
+      consumeError(Name.takeError());
+      return "(invalid file name ref)";
----------------
rnk wrote:
> Hm. I guess perhaps we should've allowed error propagation out of these APIs. I guess that's not fixable without an interface change.
The thinking at the time was that anything that might generate an error should happen during load, not on lazy evaluation of the properties.  That's why most of the classes have a `initialize` or `reload()` static method which returns an `Expected<T>`, so that all validation can be done up front.  I'm open to the possibility that that wasn't the best decision though, but it kept the code simple and handled most of the cases we would expect to see in practice.


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

https://reviews.llvm.org/D64428





More information about the llvm-commits mailing list