[PATCH] D64531: [NFC] Adjust "invalid.ll.bc" tests to check for AttrKind #255 not #63

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 14:21:47 PDT 2019


jdoerfert created this revision.
jdoerfert added reviewers: hfinkel, arsenm, lebedev.ri.
Herald added subscribers: dexonsmith, steven_wu, bollu, wdng, mehdi_amini.
Herald added a project: LLVM.

We are about to add enum attributes with AttrKind numbers >= 63. This
means we cannot use AttrKind #63 to test for an invalid attribute number
in the RAW format anymore. This patch changes the number of an invalid
attribute to #255. There is no change to the character of the tests.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D64531

Files:
  llvm/test/Bindings/llvm-c/Inputs/invalid.ll.bc
  llvm/test/Bindings/llvm-c/invalid-bitcode.test
  llvm/test/Bitcode/invalid.ll
  llvm/test/Bitcode/invalid.ll.bc
  llvm/test/LTO/X86/Inputs/invalid.ll.bc
  llvm/test/LTO/X86/invalid.ll


Index: llvm/test/LTO/X86/invalid.ll
===================================================================
--- llvm/test/LTO/X86/invalid.ll
+++ llvm/test/LTO/X86/invalid.ll
@@ -1,4 +1,4 @@
 ; RUN: not llvm-lto %S/Inputs/invalid.ll.bc 2>&1 | FileCheck %s
 
 
-; CHECK: llvm-lto{{.*}}: error loading file '{{.*}}/Inputs/invalid.ll.bc': Unknown attribute kind (63)
+; CHECK: llvm-lto{{.*}}: error loading file '{{.*}}/Inputs/invalid.ll.bc': Unknown attribute kind (255)
Index: llvm/test/Bitcode/invalid.ll
===================================================================
--- llvm/test/Bitcode/invalid.ll
+++ llvm/test/Bitcode/invalid.ll
@@ -1,6 +1,6 @@
 ; RUN:  not llvm-dis < %s.bc 2>&1 | FileCheck %s
 
-; CHECK: llvm-dis{{(\.EXE|\.exe)?}}: error: Unknown attribute kind (63)
+; CHECK: llvm-dis{{(\.EXE|\.exe)?}}: error: Unknown attribute kind (255)
 
 ; invalid.ll.bc has an invalid attribute number.
 ; The test checks that LLVM reports the error and doesn't access freed memory
Index: llvm/test/Bindings/llvm-c/invalid-bitcode.test
===================================================================
--- llvm/test/Bindings/llvm-c/invalid-bitcode.test
+++ llvm/test/Bindings/llvm-c/invalid-bitcode.test
@@ -1,13 +1,13 @@
 ; RUN: not llvm-c-test --module-dump < %S/Inputs/invalid.ll.bc 2>&1 | FileCheck %s
 ; RUN: not llvm-c-test --lazy-module-dump < %S/Inputs/invalid.ll.bc 2>&1 | FileCheck %s
 
-CHECK: Error parsing bitcode: Unknown attribute kind (63)
+CHECK: Error parsing bitcode: Unknown attribute kind (255)
 
 
 ; RUN: not llvm-c-test --new-module-dump < %S/Inputs/invalid.ll.bc 2>&1 | FileCheck --check-prefix=NEW %s
 ; RUN: not llvm-c-test --lazy-new-module-dump < %S/Inputs/invalid.ll.bc 2>&1 | FileCheck --check-prefix=NEW %s
 
-NEW: Error with new bitcode parser: Unknown attribute kind (63)
+NEW: Error with new bitcode parser: Unknown attribute kind (255)
 
 ; RUN: llvm-c-test --test-diagnostic-handler < %S/Inputs/invalid.ll.bc 2>&1 | FileCheck --check-prefix=DIAGNOSTIC %s
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64531.209067.patch
Type: text/x-patch
Size: 1994 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190710/9d7d6b2c/attachment.bin>


More information about the llvm-commits mailing list