[llvm] 183ddef - [MC][ELF] Have an assert catching creating group sections without signatures. (#113553)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 25 05:06:35 PDT 2024
Author: Ivan Kosarev
Date: 2024-10-25T13:06:32+01:00
New Revision: 183ddefff60f560466ec3bf271c6008067d746db
URL: https://github.com/llvm/llvm-project/commit/183ddefff60f560466ec3bf271c6008067d746db
DIFF: https://github.com/llvm/llvm-project/commit/183ddefff60f560466ec3bf271c6008067d746db.diff
LOG: [MC][ELF] Have an assert catching creating group sections without signatures. (#113553)
Added:
Modified:
llvm/include/llvm/MC/MCSectionELF.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/MC/MCSectionELF.h b/llvm/include/llvm/MC/MCSectionELF.h
index d43ffbd885c961..f09d30591a3cf6 100644
--- a/llvm/include/llvm/MC/MCSectionELF.h
+++ b/llvm/include/llvm/MC/MCSectionELF.h
@@ -62,6 +62,8 @@ class MCSectionELF final : public MCSection {
type == ELF::SHT_NOBITS, Begin),
Type(type), Flags(flags), UniqueID(UniqueID), EntrySize(entrySize),
Group(group, IsComdat), LinkedToSym(LinkedToSym) {
+ assert((!(Flags & ELF::SHF_GROUP) || Group.getPointer()) &&
+ "Group section without signature!");
if (Group.getPointer())
Group.getPointer()->setIsSignature();
}
More information about the llvm-commits
mailing list