Update prebuilt Clang to r416183b from Android.
https://android.googlesource.com/platform/prebuilts/clang/host/
linux-x86/+/06a71ddac05c22edb2d10b590e1769b3f8619bef
clang 12.0.5 (based on r416183b) from build 7284624.
Change-Id: I277a316abcf47307562d8b748b84870f31a72866
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/linux-x64/clang/include/llvm/MC/MCSectionELF.h b/linux-x64/clang/include/llvm/MC/MCSectionELF.h
index fe6b2d7..4136ea7 100644
--- a/linux-x64/clang/include/llvm/MC/MCSectionELF.h
+++ b/linux-x64/clang/include/llvm/MC/MCSectionELF.h
@@ -25,10 +25,6 @@
/// This represents a section on linux, lots of unix variants and some bare
/// metal systems.
class MCSectionELF final : public MCSection {
- /// This is the name of the section. The referenced memory is owned by
- /// TargetLoweringObjectFileELF's ELFUniqueMap.
- StringRef SectionName;
-
/// This is the sh_type field of a section, drawn from the enums below.
unsigned Type;
@@ -44,30 +40,33 @@
const MCSymbolELF *Group;
- /// sh_info for SHF_LINK_ORDER (can be null).
- const MCSymbol *AssociatedSymbol;
+ /// Used by SHF_LINK_ORDER. If non-null, the sh_link field will be set to the
+ /// section header index of the section where LinkedToSym is defined.
+ const MCSymbol *LinkedToSym;
private:
friend class MCContext;
- MCSectionELF(StringRef Section, unsigned type, unsigned flags, SectionKind K,
+ // The storage of Name is owned by MCContext's ELFUniquingMap.
+ MCSectionELF(StringRef Name, unsigned type, unsigned flags, SectionKind K,
unsigned entrySize, const MCSymbolELF *group, unsigned UniqueID,
- MCSymbol *Begin, const MCSymbolELF *AssociatedSymbol)
- : MCSection(SV_ELF, K, Begin), SectionName(Section), Type(type),
- Flags(flags), UniqueID(UniqueID), EntrySize(entrySize), Group(group),
- AssociatedSymbol(AssociatedSymbol) {
+ MCSymbol *Begin, const MCSymbolELF *LinkedToSym)
+ : MCSection(SV_ELF, Name, K, Begin), Type(type), Flags(flags),
+ UniqueID(UniqueID), EntrySize(entrySize), Group(group),
+ LinkedToSym(LinkedToSym) {
if (Group)
Group->setIsSignature();
}
- void setSectionName(StringRef Name) { SectionName = Name; }
+ // TODO Delete after we stop supporting generation of GNU-style .zdebug_*
+ // sections.
+ void setSectionName(StringRef Name) { this->Name = Name; }
public:
/// Decides whether a '.section' directive should be printed before the
/// section name
bool ShouldOmitSectionDirective(StringRef Name, const MCAsmInfo &MAI) const;
- StringRef getSectionName() const { return SectionName; }
unsigned getType() const { return Type; }
unsigned getFlags() const { return Flags; }
unsigned getEntrySize() const { return EntrySize; }
@@ -79,12 +78,15 @@
const MCExpr *Subsection) const override;
bool UseCodeAlign() const override;
bool isVirtualSection() const override;
+ StringRef getVirtualSectionKind() const override;
- bool isUnique() const { return UniqueID != ~0U; }
+ bool isUnique() const { return UniqueID != NonUniqueID; }
unsigned getUniqueID() const { return UniqueID; }
- const MCSection *getAssociatedSection() const { return &AssociatedSymbol->getSection(); }
- const MCSymbol *getAssociatedSymbol() const { return AssociatedSymbol; }
+ const MCSection *getLinkedToSection() const {
+ return &LinkedToSym->getSection();
+ }
+ const MCSymbol *getLinkedToSymbol() const { return LinkedToSym; }
static bool classof(const MCSection *S) {
return S->getVariant() == SV_ELF;