[lld] [LLD] Improve linker script handing in LLD (PR #106334)
Hongyu Chen via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 29 22:52:13 PDT 2024
================
@@ -161,8 +264,12 @@ struct MemoryRegion {
uint32_t negInvFlags;
uint64_t curPos = 0;
- uint64_t getOrigin() const { return origin().getValue(); }
- uint64_t getLength() const { return length().getValue(); }
+ uint64_t getOrigin() const {
----------------
yugier wrote:
Thank you for the review! I removed the precondition and added assert for `origin` and `length`. Yes I think they should not be `nullptr` since they are passed in the constructor but still have to make sure that they are not passed in as `nullptr` so an assert would be perfect here.
https://github.com/llvm/llvm-project/pull/106334
More information about the llvm-commits
mailing list