================
@@ -343,3 +348,32 @@ extern "C" LLVM_ABI LLVM_EXTERNAL_VISIBILITY void
LLVMInitializeAVRAsmPrinter() {
llvm::RegisterAsmPrinter<AVRAsmPrinter> X(getTheAVRTarget());
}
+
+PreservedAnalyses AVRAsmPrinterBeginPass::run(Module &M,
+ ModuleAnalysisManager &MAM) {
+ AVRAsmPrinter &AsmPrinter = static_cast<AVRAsmPrinter &>(
+ MAM.getResult<AsmPrinterAnalysis>(M).getPrinter());
+ setupModuleAsmPrinter(M, MAM, AsmPrinter);
+ AsmPrinter.doInitialization(M);
+ return PreservedAnalyses::all();
+}
+
+PreservedAnalyses AVRAsmPrinterPass::run(MachineFunction &MF,
+ MachineFunctionAnalysisManager &MFAM)
{
+ AVRAsmPrinter &AsmPrinter = static_cast<AVRAsmPrinter &>(
+ MFAM.getResult<ModuleAnalysisManagerMachineFunctionProxy>(MF)
+ .getCachedResult<AsmPrinterAnalysis>(*MF.getFunction().getParent())
----------------
arsenm wrote:
Unchecked getCachedResult? either this should use get result or needs an error
case?
https://github.com/llvm/llvm-project/pull/236491
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits