forked from OSchip/llvm-project
Add relax all support to the COFF object streamer.
llvm-svn: 109947
This commit is contained in:
parent
cd5fc7bef1
commit
6b4925e223
|
@ -355,7 +355,8 @@ namespace llvm {
|
|||
/// Takes ownership of \arg TAB and \arg CE.
|
||||
MCStreamer *createWinCOFFStreamer(MCContext &Ctx,
|
||||
TargetAsmBackend &TAB,
|
||||
MCCodeEmitter &CE, raw_ostream &OS);
|
||||
MCCodeEmitter &CE, raw_ostream &OS,
|
||||
bool RelaxAll = false);
|
||||
|
||||
/// createLoggingStreamer - Create a machine code streamer which just logs the
|
||||
/// API calls and then dispatches to another streamer.
|
||||
|
|
|
@ -339,7 +339,10 @@ namespace llvm
|
|||
MCStreamer *createWinCOFFStreamer(MCContext &Context,
|
||||
TargetAsmBackend &TAB,
|
||||
MCCodeEmitter &CE,
|
||||
raw_ostream &OS) {
|
||||
return new WinCOFFStreamer(Context, TAB, CE, OS);
|
||||
raw_ostream &OS,
|
||||
bool RelaxAll) {
|
||||
WinCOFFStreamer *S = new WinCOFFStreamer(Context, TAB, CE, OS);
|
||||
S->getAssembler().setRelaxAll(RelaxAll);
|
||||
return S;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ static MCStreamer *createMCStreamer(const Target &T, const std::string &TT,
|
|||
Triple TheTriple(TT);
|
||||
switch (TheTriple.getOS()) {
|
||||
case Triple::Win32:
|
||||
return createWinCOFFStreamer(Ctx, TAB, *_Emitter, _OS);
|
||||
return createWinCOFFStreamer(Ctx, TAB, *_Emitter, _OS, RelaxAll);
|
||||
default:
|
||||
return createMachOStreamer(Ctx, TAB, _OS, _Emitter, RelaxAll);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue