Adding reportWarning() to MCContext, so that it can be used from
the Hexagon assembler backend.
More context for this change:
- "--no-warn" is present already, target-independent, and it's supported by llvm-mc (and other MC tools) because it's already present in include/llvm/MC/MCTargetOptionsCommandFlags.inc.
- Only the AsmParser has access to the MCTargetOptions that contains NoWarn.
- This change adds a MCTargetOptions * to the MCContext so that assemblers can emit warnings outside of their AsmParser and still conform to --no-warn/--fatal-warnings.
- Hexagon has a check performed in its AsmBackend that can emit warnings, those warnings were not silenced by --no-warn.
- The .warning directive is already correctly silenced by llvm-mc --no-warn (but not clang -Wa,--no-warn).
- A corresponding change to clang has been added to support -Wa,--no-warn -- https://reviews.llvm.org/D61309