llvm-capstone/clang/test/CodeGen/debug-info-file-change.c
Duncan P. N. Exon Smith 9dd4e4e63a DebugInfo: Metadata constructs now start with DI*
LLVM r236120 renamed debug info IR constructs to use a `DI` prefix, now
that the `DIDescriptor` hierarchy has been gone for about a week.  This
commit was generated using the rename-md-di-nodes.sh upgrade script
attached to PR23080, followed by running clang-format-diff.py on the
`lib/` portion of the patch.

llvm-svn: 236121
2015-04-29 16:40:08 +00:00

23 lines
522 B
C

// RUN: %clang -emit-llvm -S -g %s -o - | FileCheck %s
// Radar 8396182
// There are no lexical blocks, but we need two DILexicalBlockFiles to
// correctly represent file info.
int foo() {
int i = 1;
# 4 "m.c"
# 1 "m.h" 1
int j = 2;
# 2 "m.h"
# 5 "m.c" 2
return i + j;
}
// CHECK-NOT: !DILexicalBlock
// CHECK: !DILexicalBlockFile({{.*}}file: ![[MH:[0-9]+]]
// CHECK: !DIFile(filename: "m.h"
// CHECK: !DILexicalBlockFile({{.*}}file: ![[MC:[0-9]+]]
// CHECK: !DIFile(filename: "m.c"
// CHECK-NOT: !DILexicalBlock