Skip to content

Commit f2efe74

Browse files
author
Amirhossein Pashaeehir
committed
Use make unique instead of newing a raw pointer
1 parent c8c6582 commit f2efe74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/tools/llvm-mc/llvm-mc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,9 +531,9 @@ int main(int argc, char **argv) {
531531
std::unique_ptr<MCInstPrinter> IP;
532532
if (ValidateCFI) {
533533
assert(FileType == OFT_Null);
534-
auto *FFS = new CFIFunctionFrameStreamer(Ctx, std::move(FFA));
534+
auto FFS = std::make_unique<CFIFunctionFrameStreamer>(Ctx, std::move(FFA));
535535
TheTarget->createNullTargetStreamer(*FFS);
536-
Str.reset(FFS);
536+
Str = std::move(FFS);
537537
} else if (FileType == OFT_AssemblyFile) {
538538
IP.reset(TheTarget->createMCInstPrinter(
539539
Triple(TripleName), OutputAsmVariant, *MAI, *MCII, *MRI));

0 commit comments

Comments
 (0)