[lldb] [llvm] Add support for using foreign type units in .debug_names. (PR #87740)

Alex Langford via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 5 14:24:17 PDT 2024


================
@@ -48,15 +60,31 @@ DebugNamesDWARFIndex::GetUnits(const DebugNames &debug_names) {
   return result;
 }
 
+DWARFTypeUnit *
+DebugNamesDWARFIndex::GetForeignTypeUnit(const DebugNames::Entry &entry) const {
+  std::optional<uint64_t> type_sig = entry.getForeignTUTypeSignature();
+  if (type_sig)
----------------
bulbazord wrote:

nit: You can merge these lines:
```
if (std::optional<uint64_t> type_sig = entry.getForeignTUTypeSignature())
```

https://github.com/llvm/llvm-project/pull/87740


More information about the llvm-commits mailing list