1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
llvm-mirror/include/llvm/MC
Reid Kleckner bdfdb24819 [codeview] Add new directives to record inlined call site line info
Summary:
Previously we were trying to represent this with the "contains" list of
the .cv_inline_linetable directive, which was not enough information.
Now we directly represent the chain of inlined call sites, so we know
what location to emit when we encounter a .cv_loc directive of an inner
inlined call site while emitting the line table of an outer function or
inlined call site. Fixes PR29146.

Also fixes PR29147, where we would crash when .cv_loc directives crossed
sections. Now we write down the section of the first .cv_loc directive,
and emit an error if any other .cv_loc directive for that function is in
a different section.

Also fixes issues with discontiguous inlined source locations, like in
this example:

  volatile int unlikely_cond = 0;
  extern void __declspec(noreturn) abort();
  __forceinline void f() {
    if (!unlikely_cond) abort();
  }
  int main() {
    unlikely_cond = 0;
    f();
    unlikely_cond = 0;
  }

Previously our tables gave bad location information for the 'abort'
call, and the debugger wouldn't snow the inlined stack frame for 'f'.
It is important to emit good line tables for this code pattern, because
it comes up whenever an asan bug occurs in an inlined function. The
__asan_report* stubs are generally placed after the normal function
epilogue, leading to discontiguous regions of inlined code.

Reviewers: majnemer, amccarth

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D24014

llvm-svn: 280822
2016-09-07 16:15:31 +00:00
..
MCDisassembler [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
MCParser (LLVM part) Implement MASM-flavor intel syntax behavior for inline MS asm block: 2016-09-02 23:15:29 +00:00
ConstantPools.h
MachineLocation.h
MCAsmBackend.h Remove MCAsmInfo.h include from TargetOptions.h 2016-07-27 16:03:57 +00:00
MCAsmInfo.h [mips][ias] Support .dtprel[d]word and .tprel[d]word directives 2016-08-22 16:18:42 +00:00
MCAsmInfoCOFF.h
MCAsmInfoDarwin.h
MCAsmInfoELF.h [WebAssembly] Don't create a needless .note.GNU-stack section 2016-01-15 23:59:13 +00:00
MCAsmLayout.h
MCAssembler.h Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
MCCodeEmitter.h
MCCodeView.h [codeview] Add new directives to record inlined call site line info 2016-09-07 16:15:31 +00:00
MCContext.h [MC] Move .cv_loc management logic out of MCContext 2016-08-26 17:58:37 +00:00
MCDirectives.h [MachO] Add MachO alt-entry directive support. 2016-03-15 01:43:05 +00:00
MCDwarf.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
MCELFObjectWriter.h Prune some includes from headers and sink some inline functions 2016-06-22 23:23:08 +00:00
MCELFStreamer.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
MCExpr.h [mips] Use MipsMCExpr instead of MCSymbolRefExpr for all relocations. 2016-05-03 13:35:44 +00:00
MCFixedLenDisassembler.h
MCFixup.h [mips][ias] Support .dtprel[d]word and .tprel[d]word directives 2016-08-22 16:18:42 +00:00
MCFixupKindInfo.h
MCFragment.h [codeview] Add new directives to record inlined call site line info 2016-09-07 16:15:31 +00:00
MCInst.h
MCInstBuilder.h
MCInstPrinter.h [LLVM] Fix some Clang-tidy modernize-use-using and Include What You Use warnings 2016-08-18 17:56:27 +00:00
MCInstrAnalysis.h
MCInstrDesc.h Replace uint16_t with the MCPhysReg typedef in many places. A lot of physical register arrays already use this typedef. 2015-12-05 07:13:35 +00:00
MCInstrInfo.h
MCInstrItineraries.h Fix typo in comment. NFC. 2015-11-18 15:02:59 +00:00
MCLabel.h
MCLinkerOptimizationHint.h Prune some includes from headers and sink some inline functions 2016-06-22 23:23:08 +00:00
MCMachObjectWriter.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
MCObjectFileInfo.h Move code only used by codegen out of MC. NFC. 2016-08-29 12:33:42 +00:00
MCObjectStreamer.h [codeview] Add new directives to record inlined call site line info 2016-09-07 16:15:31 +00:00
MCObjectWriter.h Move MCTargetAsmParser.h to llvm/MC/MCParser where it belongs. 2016-01-27 10:01:28 +00:00
MCRegisterInfo.h Avoid accessing LLVM/DWARF register mappings if undefined 2016-08-12 23:12:59 +00:00
MCSchedule.h [MCSchedule] Remove comments about MinLatency. NFC 2016-03-14 00:36:19 +00:00
MCSection.h ADT: Split ilist_node_traits into alloc and callback, NFC 2016-08-30 18:40:47 +00:00
MCSectionCOFF.h [MC] Create unique .pdata sections for every .text section 2016-05-02 23:22:18 +00:00
MCSectionELF.h Recommit 270977 - [llvm-mc] - Teach llvm-mc to generate zlib styled compression sections. 2016-05-27 12:27:32 +00:00
MCSectionMachO.h
MCStreamer.h [codeview] Add new directives to record inlined call site line info 2016-09-07 16:15:31 +00:00
MCSubtargetInfo.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
MCSymbol.h Use the same underlying type for bitfields 2016-06-24 04:05:25 +00:00
MCSymbolCOFF.h
MCSymbolELF.h
MCSymbolMachO.h Add missing include. Should fix modules builds. 2016-06-23 07:30:12 +00:00
MCTargetOptions.h Remove MCAsmInfo.h include from TargetOptions.h 2016-07-27 16:03:57 +00:00
MCTargetOptionsCommandFlags.h [MC, COFF] Support link /incremental conditionally 2015-12-21 22:09:27 +00:00
MCValue.h
MCWin64EH.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
MCWinCOFFObjectWriter.h
MCWinCOFFStreamer.h [Assembler] Make fatal assembler errors non-fatal 2015-11-17 10:00:43 +00:00
MCWinEH.h [MC] Create unique .pdata sections for every .text section 2016-05-02 23:22:18 +00:00
SectionKind.h [X86] Create mergeable constant pool entries for AVX 2016-02-22 22:23:11 +00:00
StringTableBuilder.h Make StringTableBuilder to cache hash values. 2016-05-06 00:51:58 +00:00
SubtargetFeature.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00