================
@@ -541,8 +542,8 @@ static bool ExecuteAssemblerImpl(AssemblerInvocation &Opts,
 
   // FIXME: There is a bit of code duplication with addPassesToEmitFile.
   if (Opts.OutputType == AssemblerInvocation::FT_Asm) {
-    MCInstPrinter *IP = TheTarget->createMCInstPrinter(
-        llvm::Triple(Opts.Triple), Opts.OutputAsmVariant, *MAI, *MCII, *MRI);
+    std::unique_ptr<MCInstPrinter> IP(TheTarget->createMCInstPrinter(
----------------
MaskRay wrote:

Thanks for the review!

I agree... That said, a lot of `create*` functions in 
`llvm/include/llvm/MC/TargetRegistry.h` return a raw pointer, so I feel that 
we'll have to keep createMCInstPrinter behave so...

https://github.com/llvm/llvm-project/pull/135128
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to