mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
Emit prefix data after debug and EH directives.
This ensures that the prefix data is treated as part of the function for the purpose of debug info. This provides a better debugging experience, among other things by allowing a debug info client to correctly look up a function in debug info given a function pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193042 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e52fac1632
commit
0abc36205a
@ -462,10 +462,6 @@ void AsmPrinter::EmitFunctionHeader() {
|
||||
OutStreamer.EmitLabel(DeadBlockSyms[i]);
|
||||
}
|
||||
|
||||
// Emit the prefix data.
|
||||
if (F->hasPrefixData())
|
||||
EmitGlobalConstant(F->getPrefixData());
|
||||
|
||||
// Emit pre-function debug and/or EH information.
|
||||
if (DE) {
|
||||
NamedRegionTimer T(EHTimerName, DWARFGroupName, TimePassesIsEnabled);
|
||||
@ -475,6 +471,10 @@ void AsmPrinter::EmitFunctionHeader() {
|
||||
NamedRegionTimer T(DbgTimerName, DWARFGroupName, TimePassesIsEnabled);
|
||||
DD->beginFunction(MF);
|
||||
}
|
||||
|
||||
// Emit the prefix data.
|
||||
if (F->hasPrefixData())
|
||||
EmitGlobalConstant(F->getPrefixData());
|
||||
}
|
||||
|
||||
/// EmitFunctionEntryLabel - Emit the label that is the entrypoint for the
|
||||
|
@ -3,12 +3,14 @@
|
||||
@i = linkonce_odr global i32 1
|
||||
|
||||
; CHECK: f:
|
||||
; CHECK-NEXT: .cfi_startproc
|
||||
; CHECK-NEXT: .long 1
|
||||
define void @f() prefix i32 1 {
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK: g:
|
||||
; CHECK-NEXT: .cfi_startproc
|
||||
; CHECK-NEXT: .quad i
|
||||
define void @g() prefix i32* @i {
|
||||
ret void
|
||||
|
Loading…
Reference in New Issue
Block a user