llvm-6502/include/llvm/CodeGen
Bill Wendling d751c64a67 If we have a function with an unreachable statement such that the ending debug
information is in an unreachable block, then it's possible that the high/low pc
values won't be set for the dwarf information. E.g., this function:

void abort(void) __attribute__((__noreturn__));
void dead_beef(void) __attribute__ ((noreturn));

int *b;

void dead_beef(void) {
  *b=0xdeadbeef;
  abort();
}

has a call to "@llvm.dbg.region.end" only in the unreachable block:

define void @dead_beef() noreturn nounwind  {
entry:
	call void @llvm.dbg.func.start(...)
	call void @llvm.dbg.stoppoint(...)
...
	call void @abort( ) noreturn nounwind 
	unreachable

return:		; No predecessors!
	call void @llvm.dbg.stoppoint(...)
	call void @llvm.dbg.region.end(...)
	ret void
}

The dwarf information emitted is something like:

0x00000084:     TAG_subprogram [5]  
                 AT_name( "dead_beef" )
                 AT_external( 0x01 )
                 AT_prototyped( 0x01 )
                 AT_decl_file( 0x01 )
                 AT_decl_line( 0x08 )

Note that this is *not* the best fix for this problem, but a band-aid for an
gaping wound. This code needs to be changed when we revamp our debugging
information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56628 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 00:28:12 +00:00
..
AsmPrinter.h Use generic section-handling stuff to emit constant pool entries 2008-09-24 22:17:59 +00:00
BreakCriticalMachineEdge.h
CallingConvLower.h Define CallSDNode, an SDNode subclass for use with ISD::CALL. 2008-09-13 01:54:27 +00:00
DAGISelHeader.h erect abstraction boundaries for accessing SDValue members, rename Val -> Node to reflect semantics 2008-08-28 21:40:38 +00:00
DwarfWriter.h If we have a function with an unreachable statement such that the ending debug 2008-09-26 00:28:12 +00:00
ELFRelocation.h
FastISel.h FastISel support for debug info. 2008-09-25 17:05:24 +00:00
FileWriters.h
GCMetadata.h
GCMetadataPrinter.h
GCs.h
GCStrategy.h
IntrinsicLowering.h
LinkAllAsmWriterComponents.h
LinkAllCodegenComponents.h Add a new "fast" scheduler. This is currently basically just a 2008-09-18 16:26:26 +00:00
LiveInterval.h Next round of earlyclobber handling. Approach the 2008-09-24 01:07:17 +00:00
LiveIntervalAnalysis.h Remove AsmThatEarlyClobber etc. from LiveIntervalAnalysis 2008-09-19 01:02:35 +00:00
LiveStackAnalysis.h Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
LiveVariables.h Factor out code into HandleVirtRegDef, for consistency with 2008-09-21 21:11:41 +00:00
MachineBasicBlock.h Update VS projects. 2008-09-20 18:02:18 +00:00
MachineCodeEmitter.h
MachineConstantPool.h Fix these comments to reflect current reality. Surprisingly, 2008-09-16 20:45:53 +00:00
MachineDominators.h
MachineFrameInfo.h
MachineFunction.h Update VS projects. 2008-09-20 18:02:18 +00:00
MachineFunctionPass.h Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
MachineInstr.h Add a method to MachineInstr for testing whether it makes 2008-09-24 00:06:15 +00:00
MachineInstrBuilder.h Change ConstantSDNode and ConstantFPSDNode to use ConstantInt* and 2008-09-12 18:08:03 +00:00
MachineJumpTableInfo.h
MachineLocation.h
MachineLoopInfo.h
MachineMemOperand.h
MachineModuleInfo.h
MachineOperand.h Next round of earlyclobber handling. Approach the 2008-09-24 01:07:17 +00:00
MachinePassRegistry.h
MachineRegisterInfo.h
MachineRelocation.h
MachORelocation.h
Passes.h Add a new MachineInstr-level DCE pass. It is very simple, and is intended to 2008-09-17 00:43:24 +00:00
PseudoSourceValue.h Unbreak PseudoSourceValue::print. This fixes -print-machine-instrs 2008-08-27 15:24:43 +00:00
RegAllocRegistry.h
RegisterCoalescer.h
RegisterScavenging.h
RuntimeLibcalls.h Add intrinsics for log, log2, log10, exp, exp2. 2008-09-04 00:47:13 +00:00
ScheduleDAG.h Next round of earlyclobber handling. Approach the 2008-09-24 01:07:17 +00:00
SchedulerRegistry.h
SelectionDAG.h Reapplying r56550 2008-09-24 10:25:02 +00:00
SelectionDAGISel.h Arrange for FastISel code to have access to the MachineModuleInfo 2008-09-23 21:53:34 +00:00
SelectionDAGNodes.h Accept 'inreg' attribute on x86 functions as 2008-09-25 20:47:45 +00:00
ValueTypes.h fit in 80 cols, minor tweaks 2008-09-09 17:52:13 +00:00
ValueTypes.td