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
// 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());