[llvm] [BOLT][DWARF] Refactor updateDWARFObjectAddressRanges (PR #96006)

Amir Ayupov via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 20 10:36:08 PDT 2024


================
@@ -1605,6 +1618,26 @@ void DWARFRewriter::finalizeCompileUnits(DIEBuilder &DIEBlder,
                                          DIEStreamer &Streamer,
                                          CUOffsetMap &CUMap,
                                          const std::list<DWARFUnit *> &CUs) {
+  size_t BufferSize = 0;
+  for (DWARFUnit *CU : CUs) {
+    if (CU->getVersion() != 4)
+      continue;
+    std::optional<uint64_t> DWOId;
+    DWOId = CU->getDWOId();
+    if (DWOId) {
----------------
aaupov wrote:

nit:
```suggestion
    if (!DWOId)
      continue;
```

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


More information about the llvm-commits mailing list