mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
fe42afc0e5
Add missing checks for `templateParams:` in `MDCompositeType`. Pull the current check for `MDSubprogram` to reduce duplicated code and fix it up to print a good message when the immediate operand isn't an `MDTuple` (as a drive-by, make the same fix to `variables:` in `MDSubprogram`). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234177 91177308-0d34-0410-b5e6-96231b3b80d8
13 lines
470 B
LLVM
13 lines
470 B
LLVM
; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
|
|
|
|
; CHECK: invalid template parameter
|
|
; CHECK-NEXT: !2 = !MDCompositeType(
|
|
; CHECK-SAME: templateParams: !1
|
|
; CHECK-NEXT: !1 = !{!0}
|
|
; CHECK-NEXT: !0 = !MDBasicType(
|
|
|
|
!named = !{!0, !1, !2}
|
|
!0 = !MDBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
|
|
!1 = !{!0}
|
|
!2 = !MDCompositeType(tag: DW_TAG_structure_type, name: "IntTy", size: 32, align: 32, templateParams: !1)
|