llvm-project/llvm/lib/CodeGen/AsmPrinter
Jeremy Morse ef0dcb5063 [DWARF] Create subprogram's DIE in DISubprogram's unit
This is a fix for PR48790. Over in D70350, subprogram DIEs were permitted
to be shared between CUs. However, the creation of a subprogram DIE can be
triggered early, from other CUs. The subprogram definition is then created
in one CU, and when the function is actually emitted children are attached
to the subprogram that expect to be in another CU. This breaks internal CU
references in the children.

Fix this by redirecting the creation of subprogram DIEs in
getOrCreateContextDIE to the CU specified by it's DISubprogram definition.
This ensures that the subprogram DIE is always created in the correct CU.

Differential Revision: https://reviews.llvm.org/D94976
2021-01-27 12:36:14 +00:00
..
AIXException.cpp [XCOFF][AIX] Emit EH information in traceback table 2020-12-16 09:34:59 -05:00
ARMException.cpp [MC] De-capitalize another set of MCStreamer::Emit* functions 2020-02-14 19:26:52 -08:00
AccelTable.cpp [DebugInfo] Make offsets of dwarf units 64-bit (19/19). 2020-09-15 12:23:32 +07:00
AddressPool.cpp [DebugInfo] Fix emitting DWARF64 .debug_addr sections (15/19). 2020-09-15 12:23:31 +07:00
AddressPool.h Recommit "PR44685: DebugInfo: Handle address-use-invalid type units referencing non-type units" 2020-08-18 13:43:28 -07:00
AsmPrinter.cpp [NFC][AsmPrinter] Windows warning: Use explicit cast 2021-01-14 09:10:31 +00:00
AsmPrinterDwarf.cpp [XCOFF][AIX] Generate LSDA data and compact unwind section on AIX 2020-12-02 18:42:44 +00:00
AsmPrinterInlineAsm.cpp [llvm] Use isDigit (NFC) 2021-01-21 19:59:50 -08:00
ByteStreamer.h [AsmPrinter] Rename ByteStreamer::EmitInt8 to emitInt8 2020-11-06 20:02:56 -08:00
CMakeLists.txt [CSSPGO] Pseudo probe encoding and emission. 2020-12-10 17:29:28 -08:00
CodeViewDebug.cpp [CodeView] Avoid emitting empty debug globals subsection. 2020-11-25 16:13:32 -08:00
CodeViewDebug.h [CodeView] Remove unused declaration collectInlineSiteChildren (NFC) 2020-11-30 22:28:26 -08:00
DIE.cpp [DebugInfo] Simplify DIEInteger::SizeOf(). 2020-09-17 12:47:38 +07:00
DIEHash.cpp DebugInfo: Hash DIE referevences (DW_OP_convert) when computing Split DWARF signatures 2020-10-22 20:09:33 -07:00
DIEHash.h DebugInfo: Hash DIE referevences (DW_OP_convert) when computing Split DWARF signatures 2020-10-22 20:09:33 -07:00
DIEHashAttributes.def
DbgEntityHistoryCalculator.cpp [CodeGen, Transforms] Use llvm::sort (NFC) 2021-01-14 20:30:31 -08:00
DebugHandlerBase.cpp make the AsmPrinterHandler array public 2020-11-03 10:02:09 -05:00
DebugLocEntry.h [NFCI] Removed an un-used declaration got accidentally introduced in f91d18eaa9 2020-09-01 15:59:04 +05:30
DebugLocStream.cpp
DebugLocStream.h
DwarfCFIException.cpp Exception support for basic block sections 2020-09-30 11:05:55 -07:00
DwarfCompileUnit.cpp [WebAssembly] Fixed byval args missing DWARF DW_AT_LOCATION 2021-01-07 10:31:38 -08:00
DwarfCompileUnit.h [DebugInfo] Fix emitting DWARF64 compilation units (5/19). 2020-09-15 11:30:30 +07:00
DwarfDebug.cpp DebugInfo: Generalize the .debug_addr minimization flag to pave the way for including other strategies 2021-01-25 16:24:35 -08:00
DwarfDebug.h [DWARF] Create subprogram's DIE in DISubprogram's unit 2021-01-27 12:36:14 +00:00
DwarfException.h [XCOFF][AIX] Generate LSDA data and compact unwind section on AIX 2020-12-02 18:42:44 +00:00
DwarfExpression.cpp Revert "[DebugInfo] Refactor code for emitting DWARF expressions for FP constants" 2020-11-24 09:11:33 +01:00
DwarfExpression.h Revert "[DebugInfo] Refactor code for emitting DWARF expressions for FP constants" 2020-11-24 09:11:33 +01:00
DwarfFile.cpp DwarfFile.h - remove unnecessary includes. NFCI. 2020-09-17 12:12:18 +01:00
DwarfFile.h DwarfFile.h - remove unnecessary includes. NFCI. 2020-09-17 12:12:18 +01:00
DwarfStringPool.cpp DwarfStringPool.cpp - remove unnecessary StringRef include. NFCI. 2020-09-17 12:18:27 +01:00
DwarfStringPool.h [DebugInfo] Make the offset of string pool entries 64-bit (18/19). 2020-09-15 12:23:32 +07:00
DwarfUnit.cpp [DWARF] Create subprogram's DIE in DISubprogram's unit 2021-01-27 12:36:14 +00:00
DwarfUnit.h [DebugInfo] Delete unused DwarfUnit::addConstantFPValue & addConstantValue overloads. NFC 2020-11-04 00:05:57 -08:00
EHStreamer.cpp [XCOFF][AIX] Alternative path in EHStreamer for platforms do not have uleb128 support 2020-12-02 20:03:15 +00:00
EHStreamer.h Exception support for basic block sections 2020-09-30 11:05:55 -07:00
ErlangGCPrinter.cpp [AsmPrinter] De-capitalize all AsmPrinter::Emit* but EmitInstruction 2020-02-13 17:06:24 -08:00
OcamlGCPrinter.cpp Replace `T(x)` with `reinterpret_cast<T>(x)` everywhere it means reinterpret_cast. NFC. 2020-12-22 19:54:29 -05:00
PseudoProbePrinter.cpp [CSSPGO] Pseudo probe encoding and emission. 2020-12-10 17:29:28 -08:00
PseudoProbePrinter.h [CSSPGO] Pseudo probe encoding and emission. 2020-12-10 17:29:28 -08:00
WasmException.cpp [WebAssembly] Remove exnref and br_on_exn 2021-01-09 02:02:54 -08:00
WasmException.h Exception support for basic block sections 2020-09-30 11:05:55 -07:00
WinCFGuard.cpp [CodeGen] Use llvm::append_range (NFC) 2020-12-28 19:55:16 -08:00
WinCFGuard.h [CFGuard] Add address-taken IAT tables and delay-load support 2020-11-17 18:24:45 -08:00
WinException.cpp Reapply "[CodeGen] [WinException] Only produce handler data at the end of the function if needed" 2020-11-23 23:17:03 +02:00
WinException.h [AsmPrinter] Remove unused forward declarations. NFC. 2020-04-22 14:01:52 +01:00