[PATCH] D53885: MachineModuleInfo: Initialize DbgInfoAvailable depending on debug_cus existing

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 30 14:47:19 PDT 2018


dblaikie added a comment.

Sounds like this could have a test case, if it's meant to facilitate easier testing?



================
Comment at: lib/CodeGen/MachineModuleInfo.cpp:214
+  DbgInfoAvailable =
+      M.debug_compile_units_begin() != M.debug_compile_units_end();
   return false;
----------------
maybe:

  empty(M.debug_compile_units());

(we should have/add an llvm::empty(Range) template somewhere in STLExtras or the like, I think - that compares begin/end - maybe it should be called is_empty, I guess, to clarify that it isn't mutating a container... )


Repository:
  rL LLVM

https://reviews.llvm.org/D53885





More information about the llvm-commits mailing list