[clang] [KeyInstr] Disable key-instructions for coroutine scopes (PR #147551)
Orlando Cazalet-Hyams via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 11 03:30:29 PDT 2025
================
@@ -0,0 +1,81 @@
+// RUN: %clang_cc1 -disable-llvm-optzns -std=c++20 \
+// RUN: -triple=x86_64 -dwarf-version=4 -debug-info-kind=limited \
+// RUN: -emit-llvm -o - %s -gkey-instructions | \
+// RUN: FileCheck %s
+
+// Check that for the coroutine below, we mark the created DISubprogram as
+// not having key instructions. This will prevent AsmPrinter from trying to
+// instrument the linetable with key-instructions for source-locations in
+// the coroutine scope.
+//
+// This is a temporary workaround for key instructions: we can instrument
+// coroutine code in the future, but it hasn't been done yet.
+//
+// File contents copied from coro-dwarf.cpp.
----------------
OCHyams wrote:
It's needed as this test directory is skipped if the LLVM build-support of the feature is not enabled
https://github.com/llvm/llvm-project/pull/147551
More information about the cfe-commits
mailing list