
This patch makes the final major change of the RemoveDIs project, changing the default IR output from debug intrinsics to debug records. This is expected to break a large number of tests: every single one that tests for uses or declarations of debug intrinsics and does not explicitly disable writing records. If this patch has broken your downstream tests (or upstream tests on a configuration I wasn't able to run): 1. If you need to immediately unblock a build, pass `--write-experimental-debuginfo=false` to LLVM's option processing for all failing tests (remember to use `-mllvm` for clang/flang to forward arguments to LLVM). 2. For most test failures, the changes are trivial and mechanical, enough that they can be done by script; see the migration guide for a guide on how to do this: https://llvm.org/docs/RemoveDIsDebugInfo.html#test-updates 3. If any tests fail for reasons other than FileCheck check lines that need updating, such as assertion failures, that is most likely a real bug with this patch and should be reported as such. For more information, see the recent PSA: https://discourse.llvm.org/t/psa-ir-output-changing-from-debug-intrinsics-to-debug-records/79578
27 lines
783 B
Objective-C
27 lines
783 B
Objective-C
// RUN: %clang_cc1 -emit-llvm -dwarf-version=2 -debug-info-kind=limited -fblocks -o - -x objective-c %s| FileCheck %s
|
|
// This code triggered a bug where a dbg.declare intrinsic ended up with the
|
|
// wrong parent and subsequently failed the Verifier.
|
|
void baz(id b);
|
|
void fub(id block);
|
|
int foo(void);
|
|
void bar(void) {
|
|
fub(^() {
|
|
id a;
|
|
id b = [a bar:^(int e){}];
|
|
if (b) {
|
|
^() {
|
|
if ((0 && foo()) ? 1 : 0) {
|
|
baz([a aMessage]);
|
|
}
|
|
};
|
|
}
|
|
});
|
|
}
|
|
|
|
// Verify that debug info for BlockPointerDbgLoc is emitted for the
|
|
// innermost block.
|
|
//
|
|
// CHECK: define {{.*}}void @__bar_block_invoke_3(ptr noundef %.block_descriptor)
|
|
// CHECK: %[[BLOCKADDR:.*]] = alloca ptr, align
|
|
// CHECK: #dbg_declare({{.*}}%[[BLOCKADDR]]
|