diff options
Diffstat (limited to 'include/llvm/MC')
-rw-r--r-- | include/llvm/MC/MCAsmBackend.h | 13 | ||||
-rw-r--r-- | include/llvm/MC/MCAssembler.h | 6 | ||||
-rw-r--r-- | include/llvm/MC/MCFragment.h | 2 | ||||
-rw-r--r-- | include/llvm/MC/MCSection.h | 2 | ||||
-rw-r--r-- | include/llvm/MC/MCSymbolWasm.h | 4 | ||||
-rw-r--r-- | include/llvm/MC/MCValue.h | 2 | ||||
-rw-r--r-- | include/llvm/MC/MCWinCOFFObjectWriter.h | 4 |
7 files changed, 17 insertions, 16 deletions
diff --git a/include/llvm/MC/MCAsmBackend.h b/include/llvm/MC/MCAsmBackend.h index fb21e195b1dfe..a270973204f29 100644 --- a/include/llvm/MC/MCAsmBackend.h +++ b/include/llvm/MC/MCAsmBackend.h @@ -63,19 +63,16 @@ public: /// Target hook to adjust the literal value of a fixup if necessary. /// IsResolved signals whether the caller believes a relocation is needed; the /// target can modify the value. The default does nothing. - virtual void processFixupValue(const MCAssembler &Asm, - const MCAsmLayout &Layout, - const MCFixup &Fixup, const MCFragment *DF, - const MCValue &Target, uint64_t &Value, - bool &IsResolved) {} + virtual void processFixupValue(const MCAssembler &Asm, const MCFixup &Fixup, + const MCValue &Target, bool &IsResolved) {} /// Apply the \p Value for given \p Fixup into the provided data fragment, at /// the offset specified by the fixup and following the fixup kind as /// appropriate. Errors (such as an out of range fixup value) should be /// reported via \p Ctx. - virtual void applyFixup(const MCFixup &Fixup, char *Data, unsigned DataSize, - uint64_t Value, bool IsPCRel, - MCContext &Ctx) const = 0; + virtual void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup, + const MCValue &Target, MutableArrayRef<char> Data, + uint64_t Value, bool IsPCRel) const = 0; /// @} diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h index 63f7057a7076f..4f1b5a8b3d72e 100644 --- a/include/llvm/MC/MCAssembler.h +++ b/include/llvm/MC/MCAssembler.h @@ -195,8 +195,8 @@ private: /// finishLayout - Finalize a layout, including fragment lowering. void finishLayout(MCAsmLayout &Layout); - std::pair<uint64_t, bool> handleFixup(const MCAsmLayout &Layout, - MCFragment &F, const MCFixup &Fixup); + std::tuple<MCValue, uint64_t, bool> + handleFixup(const MCAsmLayout &Layout, MCFragment &F, const MCFixup &Fixup); public: /// Construct a new assembler instance. @@ -413,7 +413,7 @@ public: /// @} - void dump(); + void dump() const; }; /// \brief Compute the amount of padding required before the fragment \p F to diff --git a/include/llvm/MC/MCFragment.h b/include/llvm/MC/MCFragment.h index 0aca922e3cf58..284ca50e19d5b 100644 --- a/include/llvm/MC/MCFragment.h +++ b/include/llvm/MC/MCFragment.h @@ -130,7 +130,7 @@ public: /// \brief Return true if given frgment has FT_Dummy type. bool isDummy() const { return Kind == FT_Dummy; } - void dump(); + void dump() const; }; class MCDummyFragment : public MCFragment { diff --git a/include/llvm/MC/MCSection.h b/include/llvm/MC/MCSection.h index cc306d47250d4..2771b1e67eaba 100644 --- a/include/llvm/MC/MCSection.h +++ b/include/llvm/MC/MCSection.h @@ -167,7 +167,7 @@ public: MCSection::iterator getSubsectionInsertionPoint(unsigned Subsection); - void dump(); + void dump() const; virtual void PrintSwitchToSection(const MCAsmInfo &MAI, const Triple &T, raw_ostream &OS, diff --git a/include/llvm/MC/MCSymbolWasm.h b/include/llvm/MC/MCSymbolWasm.h index 1b87095552d6b..7ea89629efda6 100644 --- a/include/llvm/MC/MCSymbolWasm.h +++ b/include/llvm/MC/MCSymbolWasm.h @@ -17,6 +17,7 @@ namespace llvm { class MCSymbolWasm : public MCSymbol { private: bool IsFunction = false; + bool IsWeak = false; std::string ModuleName; SmallVector<wasm::ValType, 1> Returns; SmallVector<wasm::ValType, 4> Params; @@ -39,6 +40,9 @@ public: bool isFunction() const { return IsFunction; } void setIsFunction(bool isFunc) { IsFunction = isFunc; } + bool isWeak() const { return IsWeak; } + void setWeak(bool isWeak) { IsWeak = isWeak; } + const StringRef getModuleName() const { return ModuleName; } const SmallVector<wasm::ValType, 1> &getReturns() const { return Returns; } diff --git a/include/llvm/MC/MCValue.h b/include/llvm/MC/MCValue.h index ead08fd90ca06..aa1eaf022c555 100644 --- a/include/llvm/MC/MCValue.h +++ b/include/llvm/MC/MCValue.h @@ -42,7 +42,7 @@ class MCValue { int64_t Cst; uint32_t RefKind; public: - + MCValue() : SymA(nullptr), SymB(nullptr), Cst(0), RefKind(0) {} int64_t getConstant() const { return Cst; } const MCSymbolRefExpr *getSymA() const { return SymA; } const MCSymbolRefExpr *getSymB() const { return SymB; } diff --git a/include/llvm/MC/MCWinCOFFObjectWriter.h b/include/llvm/MC/MCWinCOFFObjectWriter.h index 57bed213aad47..6e14cefaa0abc 100644 --- a/include/llvm/MC/MCWinCOFFObjectWriter.h +++ b/include/llvm/MC/MCWinCOFFObjectWriter.h @@ -30,8 +30,8 @@ class raw_pwrite_stream; virtual ~MCWinCOFFObjectTargetWriter() = default; unsigned getMachine() const { return Machine; } - virtual unsigned getRelocType(const MCValue &Target, const MCFixup &Fixup, - bool IsCrossSection, + virtual unsigned getRelocType(MCContext &Ctx, const MCValue &Target, + const MCFixup &Fixup, bool IsCrossSection, const MCAsmBackend &MAB) const = 0; virtual bool recordRelocation(const MCFixup &) const { return true; } }; |