From e087912321e0f130b03040a1406580eb7c57c3d0 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 12 Aug 2022 12:51:50 -0700 Subject: [PATCH] [BOLT] Use Optional::emplace to avoid move assignment. NFC (cherry picked from commit 53113515cdaa19a86e4b807808b7b99dc1c91685) --- bolt/lib/Core/DebugData.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bolt/lib/Core/DebugData.cpp b/bolt/lib/Core/DebugData.cpp index c96330796014..f0c59fb69523 100644 --- a/bolt/lib/Core/DebugData.cpp +++ b/bolt/lib/Core/DebugData.cpp @@ -1593,7 +1593,7 @@ void DwarfLineTable::emit(BinaryContext &BC, MCStreamer &Streamer) { // Some versions of GCC output DWARF5 .debug_info, but DWARF4 or lower // .debug_line if (LineStrSection) { - LineStr = MCDwarfLineStr(*BC.Ctx); + LineStr.emplace(*BC.Ctx); parseAndPopulateDebugLineStr(*LineStrSection, *LineStr, BC, Streamer); }