mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-12-09 18:22:46 +00:00
Verifier: Check debug info intrinsic arguments
Verify that debug info intrinsic arguments are valid. (These checks
will not recurse through the full debug info graph, so they don't need
to be cordoned of in `DebugInfoVerifier`.)
With those checks in place, changing the `DbgIntrinsicInst` accessors to
downcast to `MDLocalVariable` and `MDExpression` is natural (added isa
specializations in `Metadata.h` to support this).
Added tests to `test/Verifier` for the new -verify checks, and fixed the
debug info in all the in-tree tests.
If you have out-of-tree testcases that have started to fail to -verify,
hopefully the verify checks are helpful. The most likely problem is
that the expression argument is `!{}` (instead of `!MDExpression()`).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232296 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -11,14 +11,14 @@ entry:
|
||||
%z_addr.i = alloca i8* ; <i8**> [#uses=2]
|
||||
%a_addr = alloca i32 ; <i32*> [#uses=2]
|
||||
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
|
||||
call void @llvm.dbg.declare(metadata i32* %a_addr, metadata !0, metadata !{}), !dbg !7
|
||||
call void @llvm.dbg.declare(metadata i32* %a_addr, metadata !0, metadata !MDExpression()), !dbg !7
|
||||
store i32 %a, i32* %a_addr
|
||||
%0 = load i32, i32* %a_addr, align 4, !dbg !8 ; <i32> [#uses=1]
|
||||
call void @llvm.dbg.declare(metadata i32* %x_addr.i, metadata !9, metadata !{}) nounwind, !dbg !15
|
||||
call void @llvm.dbg.declare(metadata i32* %x_addr.i, metadata !9, metadata !MDExpression()) nounwind, !dbg !15
|
||||
store i32 %0, i32* %x_addr.i
|
||||
call void @llvm.dbg.declare(metadata i64* %y_addr.i, metadata !16, metadata !{}) nounwind, !dbg !15
|
||||
call void @llvm.dbg.declare(metadata i64* %y_addr.i, metadata !16, metadata !MDExpression()) nounwind, !dbg !15
|
||||
store i64 55, i64* %y_addr.i
|
||||
call void @llvm.dbg.declare(metadata i8** %z_addr.i, metadata !17, metadata !{}) nounwind, !dbg !15
|
||||
call void @llvm.dbg.declare(metadata i8** %z_addr.i, metadata !17, metadata !MDExpression()) nounwind, !dbg !15
|
||||
store i8* bitcast (void (i32)* @baz to i8*), i8** %z_addr.i
|
||||
%1 = load i32, i32* %x_addr.i, align 4, !dbg !18 ; <i32> [#uses=1]
|
||||
%2 = load i64, i64* %y_addr.i, align 8, !dbg !18 ; <i64> [#uses=1]
|
||||
|
||||
Reference in New Issue
Block a user