forked from OSchip/llvm-project
[llvm-mc-assemble-fuzzer] Update API - Pass MCObjectWriter instead of a stream
Fixes build breakage of llvm-mc-assemble-fuzzer introduced by r332749. Fix provided by pbhatu (Pratik Bhatu) llvm-svn: 339981
This commit is contained in:
parent
eac6e87118
commit
f72611b4d2
|
@ -18,6 +18,7 @@
|
||||||
#include "llvm/MC/MCInstPrinter.h"
|
#include "llvm/MC/MCInstPrinter.h"
|
||||||
#include "llvm/MC/MCInstrInfo.h"
|
#include "llvm/MC/MCInstrInfo.h"
|
||||||
#include "llvm/MC/MCObjectFileInfo.h"
|
#include "llvm/MC/MCObjectFileInfo.h"
|
||||||
|
#include "llvm/MC/MCObjectWriter.h"
|
||||||
#include "llvm/MC/MCParser/AsmLexer.h"
|
#include "llvm/MC/MCParser/AsmLexer.h"
|
||||||
#include "llvm/MC/MCParser/MCTargetAsmParser.h"
|
#include "llvm/MC/MCParser/MCTargetAsmParser.h"
|
||||||
#include "llvm/MC/MCRegisterInfo.h"
|
#include "llvm/MC/MCRegisterInfo.h"
|
||||||
|
@ -230,9 +231,9 @@ int AssembleOneInput(const uint8_t *Data, size_t Size) {
|
||||||
MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, Ctx);
|
MCCodeEmitter *CE = TheTarget->createMCCodeEmitter(*MCII, *MRI, Ctx);
|
||||||
MCAsmBackend *MAB = TheTarget->createMCAsmBackend(*STI, *MRI, MCOptions);
|
MCAsmBackend *MAB = TheTarget->createMCAsmBackend(*STI, *MRI, MCOptions);
|
||||||
Str.reset(TheTarget->createMCObjectStreamer(
|
Str.reset(TheTarget->createMCObjectStreamer(
|
||||||
TheTriple, Ctx, std::unique_ptr<MCAsmBackend>(MAB), *OS,
|
TheTriple, Ctx, std::unique_ptr<MCAsmBackend>(MAB),
|
||||||
std::unique_ptr<MCCodeEmitter>(CE), *STI, MCOptions.MCRelaxAll,
|
MAB->createObjectWriter(*OS), std::unique_ptr<MCCodeEmitter>(CE), *STI,
|
||||||
MCOptions.MCIncrementalLinkerCompatible,
|
MCOptions.MCRelaxAll, MCOptions.MCIncrementalLinkerCompatible,
|
||||||
/*DWARFMustBeAtTheEnd*/ false));
|
/*DWARFMustBeAtTheEnd*/ false));
|
||||||
}
|
}
|
||||||
const int Res = AssembleInput(ProgName, TheTarget, SrcMgr, Ctx, *Str, *MAI, *STI,
|
const int Res = AssembleInput(ProgName, TheTarget, SrcMgr, Ctx, *Str, *MAI, *STI,
|
||||||
|
|
Loading…
Reference in New Issue