[PATCH] D102115: [LLD] [COFF] Add an assert regarding the RVA of exported symbols. NFC.

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 11 03:09:32 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG518b7f913526: [LLD] [COFF] Add an assert regarding the RVA of exported symbols. NFC. (authored by mstorsjo).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102115

Files:
  lld/COFF/DLL.cpp


Index: lld/COFF/DLL.cpp
===================================================================
--- lld/COFF/DLL.cpp
+++ lld/COFF/DLL.cpp
@@ -525,6 +525,8 @@
       if (e.forwardChunk) {
         write32le(p, e.forwardChunk->getRVA() | bit);
       } else {
+        assert(cast<Defined>(e.sym)->getRVA() != 0 &&
+               "Exported symbol unmapped");
         write32le(p, cast<Defined>(e.sym)->getRVA() | bit);
       }
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102115.344340.patch
Type: text/x-patch
Size: 431 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210511/c9de4f97/attachment.bin>


More information about the llvm-commits mailing list