forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Verifier] Stop accepting broken DIGlobalVariable(s).
The code wasn't yelling at the user when there's a reference from a DIGlobalVariableExpression. Thanks to Adrian for the reduced testcase. Fixes PR34672. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314069 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
3 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
; RUN: not opt -verify %s 2>&1 | FileCheck %s | ||
; CHECK: invalid type ref | ||
; CHECK-NOT: invalid type ref | ||
|
||
@global = common global i32 0, align 4, !dbg !2 | ||
|
||
!llvm.dbg.cu = !{!0} | ||
!llvm.module.flags = !{!5, !6} | ||
|
||
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "adrian", emissionKind: FullDebug) | ||
!1 = !DIFile(filename: "broken.c", directory: "/") | ||
!2 = !DIGlobalVariableExpression(var: !3, expr: !DIExpression()) | ||
!3 = !DIGlobalVariable(name: "g", scope: !0, file: !1, line: 1, type: !1, isLocal: false, isDefinition: true) | ||
!5 = !{i32 2, !"Dwarf Version", i32 4} | ||
!6 = !{i32 1, !"Debug Info Version", i32 3} | ||
|