Print an error message when someone tries -integrated-as on an unsupported target.

- The COFF backend doesn't support MingW/Cygwin at the moment, it'll report an
  error, but it's still much better than random assertions from the MachO backend.
- We want to make ELF the default eventually, it's what the majority of targets use.

llvm-svn: 110197
This commit is contained in:
Benjamin Kramer 2010-08-04 13:16:30 +00:00
parent 33f893ec69
commit 968cc0119f

View File

@ -46,10 +46,16 @@ static MCStreamer *createMCStreamer(const Target &T, const std::string &TT,
bool RelaxAll) {
Triple TheTriple(TT);
switch (TheTriple.getOS()) {
case Triple::Darwin:
return createMachOStreamer(Ctx, TAB, _OS, _Emitter, RelaxAll);
case Triple::MinGW32:
case Triple::MinGW64:
case Triple::Cygwin:
case Triple::Win32:
return createWinCOFFStreamer(Ctx, TAB, *_Emitter, _OS, RelaxAll);
default:
return createMachOStreamer(Ctx, TAB, _OS, _Emitter, RelaxAll);
// FIXME: default to ELF.
report_fatal_error("object emission not implemented for this target.");
}
}