[Lldb-commits] [PATCH] D63171: Don't try to parse ObjC method if CU isn't ObjC

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 11 16:06:24 PDT 2019


clayborg marked an inline comment as done.
clayborg added inline comments.


================
Comment at: source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp:255
+          bool is_objc_method = false;
+          if (check_objc) {
+            ObjCLanguage::MethodName objc_method(name, true);
----------------
aprantl wrote:
> Since check_objc is only used here, I think it would be better for readability to say 
> ```
> if (cu_language == eLanguageTypeObjC ||
>     cu_language == eLanguageTypeObjC_plus_plus)
> ```
> here
This is a hot loop. As long as the compiler will compute this once when optimizations are enabled, I am fine with inlining it into the if statement. But I pulled it out of the loop to ensure it only gets calculated once.


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

https://reviews.llvm.org/D63171





More information about the lldb-commits mailing list