[lld] [LLD] Implement --enable-non-contiguous-regions (PR #90007)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 10:28:23 PDT 2024


================
@@ -1066,8 +1126,16 @@ void LinkerScript::assignOffsets(OutputSection *sec) {
     // Handle a single input section description command.
     // It calculates and assigns the offsets for each section and also
     // updates the output section size.
-    for (InputSection *isec : cast<InputSectionDescription>(cmd)->sections) {
+
+    DenseSet<InputSection *> spills;
+    auto &sections = cast<InputSectionDescription>(cmd)->sections;
+    for (InputSection *isec : sections) {
       assert(isec->getParent() == sec);
+
+      // Skip all possible spills.
----------------
smithp35 wrote:

Would "Skip all potential spill locations." be better here. Just to keep the language consistent with previous uses.

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


More information about the llvm-commits mailing list