[llvm] 29fcad0 - AVR: Replace deprecated MCExpr::print with MCAsmInfo::printExpr

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 15 21:27:17 PDT 2025


Author: Fangrui Song
Date: 2025-06-15T21:27:12-07:00
New Revision: 29fcad000ca63078d28dd231e0727b7811df43b0

URL: https://github.com/llvm/llvm-project/commit/29fcad000ca63078d28dd231e0727b7811df43b0
DIFF: https://github.com/llvm/llvm-project/commit/29fcad000ca63078d28dd231e0727b7811df43b0.diff

LOG: AVR: Replace deprecated MCExpr::print with MCAsmInfo::printExpr

Added: 
    

Modified: 
    llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.cpp b/llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.cpp
index bf512dd07c0a0..1e4b2e27a1837 100644
--- a/llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.cpp
+++ b/llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.cpp
@@ -14,6 +14,7 @@
 
 #include "MCTargetDesc/AVRMCTargetDesc.h"
 
+#include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCExpr.h"
 #include "llvm/MC/MCInst.h"
 #include "llvm/MC/MCInstrDesc.h"
@@ -133,7 +134,7 @@ void AVRInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
     O << formatImm(Op.getImm());
   } else {
     assert(Op.isExpr() && "Unknown operand kind in printOperand");
-    O << *Op.getExpr();
+    MAI.printExpr(O, *Op.getExpr());
   }
 }
 


        


More information about the llvm-commits mailing list