[llvm] [AMDGPU] Make use of getFunction and getMF. NFC. (PR #167872)
Juan Manuel Martinez CaamaƱo via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 13 06:00:21 PST 2025
================
@@ -55,7 +55,7 @@ void R600AsmPrinter::emitInstruction(const MachineInstr *MI) {
StringRef Err;
if (!STI.getInstrInfo()->verifyInstruction(*MI, Err)) {
- LLVMContext &C = MI->getParent()->getParent()->getFunction().getContext();
+ LLVMContext &C = MI->getMF()->getFunction().getContext();
C.emitError("Illegal instruction detected: " + Err);
----------------
jmmartinez wrote:
```suggestion
MI->emitGenericError("Illegal instruction detected: " + Err);
```
https://github.com/llvm/llvm-project/pull/167872
More information about the llvm-commits
mailing list