brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 1fb8ae9 Raw
39 lines · plain
1; RUN: llc -filetype=obj %s -o - | llvm-dwarfdump -debug-frame - | FileCheck %s2 3; IR reduced from a dummy:4; void foo() {}5 6; x86 Darwin uses different register mappings for eh_frame and debug_frame7; sections. Check that the right mapping is used in debug_frame.8; In the debug_frame mapping, register 4 is ESP, thus the below tests that9; the CFA is ESP+4 upon function entry.10 11; CHECK: .debug_frame contents:12; CHECK: ffffffff CIE13; CHECK-NOT: {{CIE|FDE}}14; CHECK:   DW_CFA_def_cfa: ESP +415 16; ModuleID = 'foo.c'17target datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128"18target triple = "i386-apple-macosx10.10.0"19 20; Function Attrs: nounwind ssp21define void @foo() #0 {22entry:23  ret void24}25 26attributes #0 = { nounwind }27 28!llvm.dbg.cu = !{!0}29!llvm.module.flags = !{!3, !4, !5}30!llvm.ident = !{!6}31 32!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.7.0 (trunk 230514) (llvm/trunk 230518)", isOptimized: false, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2)33!1 = !DIFile(filename: "foo.c", directory: "/tmp")34!2 = !{}35!3 = !{i32 2, !"Dwarf Version", i32 2}36!4 = !{i32 2, !"Debug Info Version", i32 3}37!5 = !{i32 1, !"PIC Level", i32 2}38!6 = !{!"clang version 3.7.0 (trunk 230514) (llvm/trunk 230518)"}39