aboutsummaryrefslogtreecommitdiff
path: root/llvm/include/llvm/MC/MCSectionWasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/MC/MCSectionWasm.h')
-rw-r--r--llvm/include/llvm/MC/MCSectionWasm.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/llvm/include/llvm/MC/MCSectionWasm.h b/llvm/include/llvm/MC/MCSectionWasm.h
index 6211afef71db..f34dd6b3507c 100644
--- a/llvm/include/llvm/MC/MCSectionWasm.h
+++ b/llvm/include/llvm/MC/MCSectionWasm.h
@@ -37,14 +37,18 @@ class MCSectionWasm final : public MCSection {
// segment
uint32_t SegmentIndex = 0;
- // Whether this data segment is passive
+ // For data sections, whether to use a passive segment
bool IsPassive = false;
+ // For data sections, bitfield of WasmSegmentFlag
+ unsigned SegmentFlags;
+
// The storage of Name is owned by MCContext's WasmUniquingMap.
friend class MCContext;
- MCSectionWasm(StringRef Name, SectionKind K, const MCSymbolWasm *group,
- unsigned UniqueID, MCSymbol *Begin)
- : MCSection(SV_Wasm, Name, K, Begin), UniqueID(UniqueID), Group(group) {}
+ MCSectionWasm(StringRef Name, SectionKind K, unsigned SegmentFlags,
+ const MCSymbolWasm *Group, unsigned UniqueID, MCSymbol *Begin)
+ : MCSection(SV_Wasm, Name, K, Begin), UniqueID(UniqueID), Group(Group),
+ SegmentFlags(SegmentFlags) {}
public:
/// Decides whether a '.section' directive should be printed before the
@@ -52,6 +56,7 @@ public:
bool shouldOmitSectionDirective(StringRef Name, const MCAsmInfo &MAI) const;
const MCSymbolWasm *getGroup() const { return Group; }
+ unsigned getSegmentFlags() const { return SegmentFlags; }
void PrintSwitchToSection(const MCAsmInfo &MAI, const Triple &T,
raw_ostream &OS,