[llvm-dev] Issuing a warning from llc

Benjamin Kramer via llvm-dev llvm-dev at lists.llvm.org
Wed Jul 20 03:17:30 PDT 2016


You can get the LLVMContext from
MachineFunction->getFunction()->getContext() and call
LLVMContext::diagnose on it. But please use this sparingly, warnings
from the backend are generally not very user-friendly.

On Wed, Jul 20, 2016 at 11:39 AM, Chris.Dewhurst via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> I'm wondering if there's a way to issue a warning from llc during a machine
> function pass.
>
> I have access to a MachineFunction instance, but I can't find any kind of
> context instance that allows me to issue warnings.
>
> The warning is part of a hardware erratum fix. There are possible
> side-effects that the user would want to be warned about if they switch on
> this fix and I want to issue a warning to this effect.
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>


More information about the llvm-dev mailing list