[lld] [LLD] Add CLASS syntax to SECTIONS (PR #95323)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 22 14:27:06 PDT 2024


================
@@ -228,6 +234,10 @@ class InputSectionDescription : public SectionCommand {
   // SectionPatterns can be filtered with the INPUT_SECTION_FLAGS command.
   uint64_t withFlags;
   uint64_t withoutFlags;
+
+  // If present, input section matching uses class membership instead of file
----------------
MaskRay wrote:

If non-empty, this indicates a CLASS(class_name) reference, and filePat/sectionPatterns are not used.

Suggest to move this after sectionPatterns to make it clear they are mutual exclusive.

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


More information about the llvm-commits mailing list