[llvm] [Docs] Fix a DIExpression fragment example (PR #214839)
Eric Christopher via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 12:51:44 PDT 2026
https://github.com/echristo created https://github.com/llvm/llvm-project/pull/214839
Use DW_OP_LLVM_fragment for the source-variable fragment example. The previous DW_OP_bit_piece form is not valid in LLVM DIExpression metadata - the other code was changed a bit ago, this is just some documentation that didn't catch up.
>From 58ac9e98af08b072705a3e1079920f3d4fdeaddf Mon Sep 17 00:00:00 2001
From: Eric Christopher <echristopher at nvidia.com>
Date: Fri, 7 Aug 2026 10:01:18 -0700
Subject: [PATCH] [Docs] Fix a DIExpression fragment example
Use DW_OP_LLVM_fragment for the source-variable fragment example. The previous DW_OP_bit_piece form is not valid in LLVM DIExpression metadata.
Assisted-by: AI
---
llvm/docs/LangRef.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/docs/LangRef.md b/llvm/docs/LangRef.md
index 6a3194271b838..9c35cd920ad2e 100644
--- a/llvm/docs/LangRef.md
+++ b/llvm/docs/LangRef.md
@@ -7207,7 +7207,7 @@ Some examples of expressions:
!DIExpression(DW_OP_deref)
!DIExpression(DW_OP_plus_uconst, 3)
!DIExpression(DW_OP_constu, 3, DW_OP_plus)
-!DIExpression(DW_OP_bit_piece, 3, 7)
+!DIExpression(DW_OP_LLVM_fragment, 3, 7)
!DIExpression(DW_OP_deref, DW_OP_constu, 3, DW_OP_plus, DW_OP_LLVM_fragment, 3, 7)
!DIExpression(DW_OP_constu, 2, DW_OP_swap, DW_OP_xderef)
!DIExpression(DW_OP_constu, 42, DW_OP_stack_value)
More information about the llvm-commits
mailing list