1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00

Add relax all support to the COFF object streamer.

llvm-svn: 109947
This commit is contained in:
Michael J. Spencer 2010-07-31 06:22:29 +00:00
parent 439e7b1d73
commit b52ff1ba41
3 changed files with 8 additions and 4 deletions

View File

@ -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.

View File

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

View File

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