1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2025-04-13 15:37:24 +00:00

Add relax all support to the COFF object streamer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109947 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael J. Spencer 2010-07-31 06:22:29 +00:00
parent 98e1479575
commit e2195d8b35
3 changed files with 8 additions and 4 deletions

@ -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);
}