FlagVector
FlagStaticMember
FlagIndirectVariable
- FlagArgumentNotModified
)
type DwarfLang uint32
These flags encode various properties of DINodes.
-The `ArgumentNotModified` flag marks a function argument whose value
-is not modified throughout of a function. This flag is used to decide
-whether a DW_OP_LLVM_entry_value can be used in a location description
-after the function prologue. The language frontend is expected to compute
-this property for each DILocalVariable. The flag should be used
-only in optimized code.
-
The `ExportSymbols` flag marks a class, struct or union whose members
may be referenced as if they were defined in the containing class or
union. This flag is used to decide whether the DW_AT_export_symbols can
HANDLE_DI_FLAG((1 << 18), IntroducedVirtual)
HANDLE_DI_FLAG((1 << 19), BitField)
HANDLE_DI_FLAG((1 << 20), NoReturn)
-HANDLE_DI_FLAG((1 << 21), ArgumentNotModified)
HANDLE_DI_FLAG((1 << 22), TypePassByValue)
HANDLE_DI_FLAG((1 << 23), TypePassByReference)
HANDLE_DI_FLAG((1 << 24), EnumClass)
bool isArtificial() const { return getFlags() & FlagArtificial; }
bool isObjectPointer() const { return getFlags() & FlagObjectPointer; }
- /// Check that an argument is unmodified.
- bool isNotModified() const { return getFlags() & FlagArgumentNotModified; }
- /// Set the flag if an argument is unmodified.
- void setIsNotModified() { Flags |= FlagArgumentNotModified; }
-
/// Check that a location is valid for this variable.
///
/// Check that \c DL exists, is in the same subprogram, and has the same
// TODO: Add support for modified arguments that can be expressed
// by using its entry value.
auto *DIVar = MI.getDebugVariable();
- if (!DIVar->isParameter() || !DIVar->isNotModified())
+ if (!DIVar->isParameter())
return false;
// Do not consider parameters that belong to an inlined function.
; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
; RUN: verify-uselistorder %s
-; CHECK: !named = !{!0, !0, !1, !2, !3, !4, !5, !6, !7, !8, !8, !9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22, !23, !24, !25, !26, !27, !27, !28, !29, !30, !31, !32, !33, !34, !35, !36, !37, !38, !39, !40, !41}
-!named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22, !23, !24, !25, !26, !27, !28, !29, !30, !31, !32, !33, !34, !35, !36, !37, !38, !39, !40, !41, !42, !43, !44}
+; CHECK: !named = !{!0, !0, !1, !2, !3, !4, !5, !6, !7, !8, !8, !9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22, !23, !24, !25, !26, !27, !27, !28, !29, !30, !31, !32, !33, !34, !35, !36, !37, !38, !39}
+!named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22, !23, !24, !25, !26, !27, !28, !29, !30, !31, !32, !33, !34, !35, !36, !37, !38, !39, !40, !41, !42}
; CHECK: !0 = !DISubrange(count: 3)
; CHECK-NEXT: !1 = !DISubrange(count: 3, lowerBound: 4)
; CHECK-NEXT: !39 = !DIBasicType(name: "u64.le", size: 64, align: 1, encoding: DW_ATE_unsigned, flags: DIFlagLittleEndian)
!41 = !DIBasicType(name: "u64.be", size: 64, align: 1, encoding: DW_ATE_unsigned, flags: DIFlagBigEndian)
!42 = !DIBasicType(name: "u64.le", size: 64, align: 1, encoding: DW_ATE_unsigned, flags: DIFlagLittleEndian)
-
-; CHECK-NEXT: !40 = distinct !DISubprogram(name: "fn", scope: {{.*}}, file: {{.*}}, spFlags: 0)
-; CHECK-NEXT: !41 = !DILocalVariable(name: "Name", arg: 1, scope: {{.*}}, file: {{.*}}, line: 13, type: {{.*}}, flags: DIFlagArgumentNotModified)
-!43 = distinct !DISubprogram(name: "fn", scope: !12, file: !12, spFlags: 0)
-!44 = !DILocalVariable(name: "Name", arg: 1, scope: !43, file: !12, line: 13, type: !7, flags: DIFlagArgumentNotModified)
!14 = !{!15, !6, !6}
!15 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!16 = !{!17, !18}
-!17 = !DILocalVariable(name: "a", arg: 1, scope: !12, file: !3, line: 6, type: !6, flags: DIFlagArgumentNotModified)
-!18 = !DILocalVariable(name: "b", arg: 2, scope: !12, file: !3, line: 6, type: !6, flags: DIFlagArgumentNotModified)
+!17 = !DILocalVariable(name: "a", arg: 1, scope: !12, file: !3, line: 6, type: !6)
+!18 = !DILocalVariable(name: "b", arg: 2, scope: !12, file: !3, line: 6, type: !6)
!19 = !DILocation(line: 0, scope: !12)
!20 = !DILocation(line: 7, scope: !12)
!21 = !DILocation(line: 8, scope: !12)
!14 = !DISubroutineType(types: !15)
!15 = !{!7, !7, !7, !7}
!16 = !{!17, !18, !19, !20}
- !17 = !DILocalVariable(name: "arg1", arg: 1, scope: !13, file: !1, line: 9, type: !7, flags: DIFlagArgumentNotModified)
- !18 = !DILocalVariable(name: "arg2", arg: 2, scope: !13, file: !1, line: 9, type: !7, flags: DIFlagArgumentNotModified)
+ !17 = !DILocalVariable(name: "arg1", arg: 1, scope: !13, file: !1, line: 9, type: !7)
+ !18 = !DILocalVariable(name: "arg2", arg: 2, scope: !13, file: !1, line: 9, type: !7)
!19 = !DILocalVariable(name: "arg3", arg: 3, scope: !13, file: !1, line: 9, type: !7)
!20 = !DILocalVariable(name: "a", scope: !13, file: !1, line: 10, type: !7)
!21 = !DILocation(line: 0, scope: !13)
!15 = !DISubroutineType(types: !16)
!16 = !{!7, !7, !7, !7}
!17 = !{!18, !19, !20, !21}
- !18 = !DILocalVariable(name: "arg1", arg: 1, scope: !14, file: !1, line: 9, type: !7, flags: DIFlagArgumentNotModified)
- !19 = !DILocalVariable(name: "arg2", arg: 2, scope: !14, file: !1, line: 9, type: !7, flags: DIFlagArgumentNotModified)
+ !18 = !DILocalVariable(name: "arg1", arg: 1, scope: !14, file: !1, line: 9, type: !7)
+ !19 = !DILocalVariable(name: "arg2", arg: 2, scope: !14, file: !1, line: 9, type: !7)
!20 = !DILocalVariable(name: "arg3", arg: 3, scope: !14, file: !1, line: 9, type: !7)
!21 = !DILocalVariable(name: "a", scope: !14, file: !1, line: 10, type: !7)
!22 = !DILocation(line: 0, scope: !14)
!30 = !DISubroutineType(types: !31)
!31 = !{null, !7, !7}
!32 = !{!33, !34}
- !33 = !DILocalVariable(name: "p1", arg: 1, scope: !29, file: !1, line: 5, type: !7, flags: DIFlagArgumentNotModified)
- !34 = !DILocalVariable(name: "p2", arg: 2, scope: !29, file: !1, line: 5, type: !7, flags: DIFlagArgumentNotModified)
+ !33 = !DILocalVariable(name: "p1", arg: 1, scope: !29, file: !1, line: 5, type: !7)
+ !34 = !DILocalVariable(name: "p2", arg: 2, scope: !29, file: !1, line: 5, type: !7)
!35 = !DILocation(line: 0, scope: !29)
!36 = !DILocation(line: 6, scope: !37)
!37 = distinct !DILexicalBlock(scope: !29, file: !1, line: 6)
!13 = !{!"clang version 10.0.0 "}
!14 = distinct !DISubprogram(name: "baa", scope: !1, file: !1, line: 14, type: !5, scopeLine: 15, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !15)
!15 = !{!16, !17}
- !16 = !DILocalVariable(name: "secptr", arg: 1, scope: !14, file: !1, line: 14, type: !7, flags: DIFlagArgumentNotModified)
- !17 = !DILocalVariable(name: "subseg", arg: 2, scope: !14, file: !1, line: 14, type: !8, flags: DIFlagArgumentNotModified)
+ !16 = !DILocalVariable(name: "secptr", arg: 1, scope: !14, file: !1, line: 14, type: !7)
+ !17 = !DILocalVariable(name: "subseg", arg: 2, scope: !14, file: !1, line: 14, type: !8)
!18 = !DILocation(line: 0, scope: !14)
!19 = !DILocation(line: 16, column: 17, scope: !20)
!20 = distinct !DILexicalBlock(scope: !14, file: !1, line: 16, column: 7)
!13 = !DISubroutineType(types: !14)
!14 = !{!7, !7}
!15 = !{!16}
- !16 = !DILocalVariable(name: "arg", arg: 1, scope: !12, file: !1, line: 3, type: !7, flags: DIFlagArgumentNotModified)
+ !16 = !DILocalVariable(name: "arg", arg: 1, scope: !12, file: !1, line: 3, type: !7)
!17 = !DILocation(line: 0, scope: !12)
!18 = !DILocation(line: 4, scope: !12)
!19 = !DILocation(line: 5, scope: !12)
!20 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 8, type: !13, scopeLine: 8, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !21)
!21 = !{!22}
- !22 = !DILocalVariable(name: "arg", arg: 1, scope: !20, file: !1, line: 8, type: !7, flags: DIFlagArgumentNotModified)
+ !22 = !DILocalVariable(name: "arg", arg: 1, scope: !20, file: !1, line: 8, type: !7)
!23 = !DILocation(line: 0, scope: !20)
!24 = !DILocation(line: 9, scope: !20)
!25 = !DILocation(line: 9, scope: !26)
!12 = !DISubroutineType(types: !13)
!13 = !{!6, !6, !6, !6}
!14 = !{!15, !16, !17}
- !15 = !DILocalVariable(name: "p", arg: 1, scope: !11, file: !3, line: 9, type: !6, flags: DIFlagArgumentNotModified)
- !16 = !DILocalVariable(name: "q", arg: 2, scope: !11, file: !3, line: 9, type: !6, flags: DIFlagArgumentNotModified)
- !17 = !DILocalVariable(name: "r", arg: 3, scope: !11, file: !3, line: 9, type: !6, flags: DIFlagArgumentNotModified)
+ !15 = !DILocalVariable(name: "p", arg: 1, scope: !11, file: !3, line: 9, type: !6)
+ !16 = !DILocalVariable(name: "q", arg: 2, scope: !11, file: !3, line: 9, type: !6)
+ !17 = !DILocalVariable(name: "r", arg: 3, scope: !11, file: !3, line: 9, type: !6)
!18 = !DILocation(line: 9, column: 13, scope: !11)
!19 = !{i32 213}
!13 = !DISubroutineType(types: !14)
!14 = !{null, !7, !7}
!15 = !{!16, !17}
- !16 = !DILocalVariable(name: "x", arg: 1, scope: !12, file: !1, line: 5, type: !7, flags: DIFlagArgumentNotModified)
+ !16 = !DILocalVariable(name: "x", arg: 1, scope: !12, file: !1, line: 5, type: !7)
!17 = !DILocalVariable(name: "y", scope: !12, file: !1, line: 5, type: !7)
!18 = !DILocation(line: 0, scope: !12)
!12 = !{!"clang version 10.0.0 (git@github.com:llvm/llvm-project.git 132f768649d8f21d577ee220e5e084904874cb3d)"}
!13 = distinct !DISubprogram(name: "caller", linkageName: "_Z6calleri", scope: !1, file: !1, line: 10, type: !5, scopeLine: 10, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !14)
!14 = !{!15}
- !15 = !DILocalVariable(name: "x", arg: 1, scope: !13, file: !1, line: 10, type: !7, flags: DIFlagArgumentNotModified)
+ !15 = !DILocalVariable(name: "x", arg: 1, scope: !13, file: !1, line: 10, type: !7)
!16 = !DILocation(line: 0, scope: !13)
!17 = !DILocation(line: 11, column: 3, scope: !13)
!18 = !{i32 -2147469811}
!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!13 = !{!14, !15, !16, !17, !18, !19, !20}
!14 = !DILocalVariable(name: "arg1", arg: 1, scope: !9, file: !1, line: 10, type: !12)
- !15 = !DILocalVariable(name: "arg2", arg: 2, scope: !9, file: !1, line: 10, type: !12, flags: DIFlagArgumentNotModified)
+ !15 = !DILocalVariable(name: "arg2", arg: 2, scope: !9, file: !1, line: 10, type: !12)
!16 = !DILocalVariable(name: "arg3", arg: 3, scope: !9, file: !1, line: 10, type: !12)
- !17 = !DILocalVariable(name: "arg4", arg: 4, scope: !9, file: !1, line: 10, type: !12, flags: DIFlagArgumentNotModified)
+ !17 = !DILocalVariable(name: "arg4", arg: 4, scope: !9, file: !1, line: 10, type: !12)
!18 = !DILocalVariable(name: "local1", scope: !9, file: !1, line: 11, type: !12)
!19 = !DILocalVariable(name: "local2", scope: !9, file: !1, line: 11, type: !12)
!20 = !DILocalVariable(name: "local3", scope: !9, file: !1, line: 11, type: !12)
!11 = !{null, !12, !12}
!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!13 = !{!14, !15, !16, !17}
- !14 = !DILocalVariable(name: "x", arg: 1, scope: !9, file: !1, line: 15, type: !12, flags: DIFlagArgumentNotModified)
- !15 = !DILocalVariable(name: "y", arg: 2, scope: !9, file: !1, line: 15, type: !12, flags: DIFlagArgumentNotModified)
- !16 = !DILocalVariable(name: "u", scope: !9, file: !1, line: 16, type: !12, flags: DIFlagArgumentNotModified)
- !17 = !DILocalVariable(name: "a", scope: !9, file: !1, line: 21, type: !12, flags: DIFlagArgumentNotModified)
+ !14 = !DILocalVariable(name: "x", arg: 1, scope: !9, file: !1, line: 15, type: !12)
+ !15 = !DILocalVariable(name: "y", arg: 2, scope: !9, file: !1, line: 15, type: !12)
+ !16 = !DILocalVariable(name: "u", scope: !9, file: !1, line: 16, type: !12)
+ !17 = !DILocalVariable(name: "a", scope: !9, file: !1, line: 21, type: !12)
!18 = !DILocation(line: 15, column: 10, scope: !9)
...
!12 = !{null, !13, !13, !13}
!13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!14 = !{!15, !16, !17, !18}
- !15 = !DILocalVariable(name: "arg1", arg: 1, scope: !10, file: !1, line: 4, type: !13, flags: DIFlagArgumentNotModified)
- !16 = !DILocalVariable(name: "arg2", arg: 2, scope: !10, file: !1, line: 4, type: !13, flags: DIFlagArgumentNotModified)
- !17 = !DILocalVariable(name: "arg3", arg: 3, scope: !10, file: !1, line: 4, type: !13, flags: DIFlagArgumentNotModified)
+ !15 = !DILocalVariable(name: "arg1", arg: 1, scope: !10, file: !1, line: 4, type: !13)
+ !16 = !DILocalVariable(name: "arg2", arg: 2, scope: !10, file: !1, line: 4, type: !13)
+ !17 = !DILocalVariable(name: "arg3", arg: 3, scope: !10, file: !1, line: 4, type: !13)
!18 = !DILocalVariable(name: "local1", scope: !10, file: !1, line: 5, type: !13)
!19 = !DILocation(line: 4, column: 14, scope: !10)
!20 = !DILocation(line: 4, column: 24, scope: !10)
!12 = !DISubroutineType(types: !13)
!13 = !{!6, !6, !6, !6}
!14 = !{!15, !16, !17}
- !15 = !DILocalVariable(name: "p", arg: 1, scope: !11, file: !3, line: 9, type: !6, flags: DIFlagArgumentNotModified)
- !16 = !DILocalVariable(name: "q", arg: 2, scope: !11, file: !3, line: 9, type: !6, flags: DIFlagArgumentNotModified)
- !17 = !DILocalVariable(name: "r", arg: 3, scope: !11, file: !3, line: 9, type: !6, flags: DIFlagArgumentNotModified)
+ !15 = !DILocalVariable(name: "p", arg: 1, scope: !11, file: !3, line: 9, type: !6)
+ !16 = !DILocalVariable(name: "q", arg: 2, scope: !11, file: !3, line: 9, type: !6)
+ !17 = !DILocalVariable(name: "r", arg: 3, scope: !11, file: !3, line: 9, type: !6)
!18 = !DILocation(line: 9, column: 13, scope: !11)
!19 = !{i32 213}
!14 = !{!15, !7}
!15 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!16 = !{!17}
-!17 = !DILocalVariable(name: "p", arg: 1, scope: !12, file: !3, line: 3, type: !7, flags: DIFlagArgumentNotModified)
+!17 = !DILocalVariable(name: "p", arg: 1, scope: !12, file: !3, line: 3, type: !7)
!18 = !DILocation(line: 0, scope: !12)
!19 = !DILocation(line: 4, scope: !12)
!20 = !DILocation(line: 5, scope: !12)
!17 = !DISubroutineType(types: !18)
!18 = !{null, !7, !7}
!19 = !{!20, !21, !22, !23}
-!20 = !DILocalVariable(name: "x", arg: 1, scope: !16, file: !1, line: 6, type: !7, flags: DIFlagArgumentNotModified)
-!21 = !DILocalVariable(name: "y", arg: 2, scope: !16, file: !1, line: 6, type: !7, flags: DIFlagArgumentNotModified)
+!20 = !DILocalVariable(name: "x", arg: 1, scope: !16, file: !1, line: 6, type: !7)
+!21 = !DILocalVariable(name: "y", arg: 2, scope: !16, file: !1, line: 6, type: !7)
!22 = !DILocalVariable(name: "u", scope: !16, file: !1, line: 8, type: !7)
!23 = !DILocalVariable(name: "a", scope: !16, file: !1, line: 18, type: !7)
!24 = !DILocation(line: 0, scope: !16)
!12 = !{null, !13, !13, !13}
!13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!14 = !{!15, !16, !17, !18}
-!15 = !DILocalVariable(name: "arg1", arg: 1, scope: !10, file: !1, line: 4, type: !13, flags: DIFlagArgumentNotModified)
-!16 = !DILocalVariable(name: "arg2", arg: 2, scope: !10, file: !1, line: 4, type: !13, flags: DIFlagArgumentNotModified)
-!17 = !DILocalVariable(name: "arg3", arg: 3, scope: !10, file: !1, line: 4, type: !13, flags: DIFlagArgumentNotModified)
+!15 = !DILocalVariable(name: "arg1", arg: 1, scope: !10, file: !1, line: 4, type: !13)
+!16 = !DILocalVariable(name: "arg2", arg: 2, scope: !10, file: !1, line: 4, type: !13)
+!17 = !DILocalVariable(name: "arg3", arg: 3, scope: !10, file: !1, line: 4, type: !13)
!18 = !DILocalVariable(name: "local1", scope: !10, file: !1, line: 5, type: !13)
!19 = !DILocation(line: 4, column: 14, scope: !10)
!20 = !DILocation(line: 4, column: 24, scope: !10)
!17 = !{null, !18}
!18 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64)
!19 = !{!20, !21}
-!20 = !DILocalVariable(name: "arg", arg: 1, scope: !15, file: !1, line: 6, type: !18, flags: DIFlagArgumentNotModified)
+!20 = !DILocalVariable(name: "arg", arg: 1, scope: !15, file: !1, line: 6, type: !18)
!21 = !DILocalVariable(name: "a", scope: !15, file: !1, line: 7, type: !7)
!22 = !DILocation(line: 0, scope: !15)
!23 = !DILocation(line: 7, column: 11, scope: !15)