From 6cfebbd64d6a4dc80706d8f8eba066d3fb8b1749 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 25 Mar 2014 01:43:56 +0000 Subject: [PATCH] DebugInfo: Remove unnecessary zero-size check This seems excessive - switching section isn't expensive (or if it is we're already being wasteful, since we emitted the debug_loc section symbol earlier anyway) and otherwise there's no work that happens in this function when the list is empty. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204696 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index c50243af083..792a9c48cdf 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2377,9 +2377,6 @@ void DwarfDebug::emitDebugLocEntry(ByteStreamer &Streamer, // Emit locations into the debug loc section. void DwarfDebug::emitDebugLoc() { - if (DotDebugLocEntries.empty()) - return; - // Start the dwarf loc section. Asm->OutStreamer.SwitchSection( Asm->getObjFileLowering().getDwarfLocSection()); -- 2.34.1