[llvm] r200051 - [Mips] TargetStreamer ELF flag Support for default and commandline options.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Sat Jan 25 06:58:17 PST 2014


> +  getTargetStreamer().emitMipsELFFlags(EFlags);
> +}

This is incorrect. If there is no assembly directive that takes and
sets eflags, there should not be any emitMipsELFFlags. At first look
this is not better than the hack version that was there before.


> +void MipsTargetAsmStreamer::emitMipsELFFlags(unsigned Flags) { return; }

At a second look this is *far* worse. You once again has put the mips
backend in a position where it has a different code path for text and
object files. Please revert this.

If there are common flags that are set by default when reading a .s
file that should be implemented in the target streamer creation. It
should *not* be part of the streamer interface.
> +void MipsAsmPrinter::processInitialEFlags() {
> +  // Not having this check would work too, but would have us chew through
> +  // code that it doesn't use for RawText.
> +  if (OutStreamer.hasRawTextSupport())
> +    return;

Adding calls to hasRawTextSupport is not acceptable.

Cheers,
Rafael



More information about the llvm-commits mailing list