diff options
Diffstat (limited to 'contrib/llvm/lib/MC/MCWasmStreamer.cpp')
| -rw-r--r-- | contrib/llvm/lib/MC/MCWasmStreamer.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/contrib/llvm/lib/MC/MCWasmStreamer.cpp b/contrib/llvm/lib/MC/MCWasmStreamer.cpp index 02fa070f0c57..d9cefbd3994f 100644 --- a/contrib/llvm/lib/MC/MCWasmStreamer.cpp +++ b/contrib/llvm/lib/MC/MCWasmStreamer.cpp @@ -15,16 +15,13 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/MC/MCAsmBackend.h" -#include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCAsmLayout.h" #include "llvm/MC/MCAssembler.h" #include "llvm/MC/MCCodeEmitter.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCInst.h" -#include "llvm/MC/MCObjectFileInfo.h" #include "llvm/MC/MCObjectStreamer.h" -#include "llvm/MC/MCObjectWriter.h" #include "llvm/MC/MCSection.h" #include "llvm/MC/MCSectionWasm.h" #include "llvm/MC/MCSymbol.h" @@ -98,9 +95,13 @@ bool MCWasmStreamer::EmitSymbolAttribute(MCSymbol *S, MCSymbolAttr Attribute) { case MCSA_WeakDefAutoPrivate: case MCSA_Invalid: case MCSA_IndirectSymbol: - case MCSA_Hidden: + case MCSA_Protected: return false; + case MCSA_Hidden: + Symbol->setHidden(true); + break; + case MCSA_Weak: case MCSA_WeakReference: Symbol->setWeak(true); @@ -156,7 +157,7 @@ void MCWasmStreamer::EmitValueToAlignment(unsigned ByteAlignment, int64_t Value, void MCWasmStreamer::EmitIdent(StringRef IdentString) { MCSection *Comment = getAssembler().getContext().getWasmSection( - ".comment", 0, 0); + ".comment", SectionKind::getMetadata()); PushSection(); SwitchSection(Comment); if (!SeenIdent) { @@ -200,10 +201,13 @@ void MCWasmStreamer::FinishImpl() { this->MCObjectStreamer::FinishImpl(); } -MCStreamer *llvm::createWasmStreamer(MCContext &Context, MCAsmBackend &MAB, - raw_pwrite_stream &OS, MCCodeEmitter *CE, +MCStreamer *llvm::createWasmStreamer(MCContext &Context, + std::unique_ptr<MCAsmBackend> &&MAB, + raw_pwrite_stream &OS, + std::unique_ptr<MCCodeEmitter> &&CE, bool RelaxAll) { - MCWasmStreamer *S = new MCWasmStreamer(Context, MAB, OS, CE); + MCWasmStreamer *S = + new MCWasmStreamer(Context, std::move(MAB), OS, std::move(CE)); if (RelaxAll) S->getAssembler().setRelaxAll(true); return S; |
