[llvm] c2d7ee7 - [RISCV] Add a test with unknown argument of .attribute directive

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 1 10:50:57 PDT 2023


Author: Sergei Barannikov
Date: 2023-07-01T20:50:32+03:00
New Revision: c2d7ee79b97345c8ca69c7ba1120f192af6bca9e

URL: https://github.com/llvm/llvm-project/commit/c2d7ee79b97345c8ca69c7ba1120f192af6bca9e
DIFF: https://github.com/llvm/llvm-project/commit/c2d7ee79b97345c8ca69c7ba1120f192af6bca9e.diff

LOG: [RISCV] Add a test with unknown argument of .attribute directive

Added: 
    

Modified: 
    llvm/test/MC/RISCV/invalid-attribute.s

Removed: 
    


################################################################################
diff  --git a/llvm/test/MC/RISCV/invalid-attribute.s b/llvm/test/MC/RISCV/invalid-attribute.s
index 3e1fc3b81221b7..1d732af83cda35 100644
--- a/llvm/test/MC/RISCV/invalid-attribute.s
+++ b/llvm/test/MC/RISCV/invalid-attribute.s
@@ -1,4 +1,5 @@
 ## Negative tests:
+##  - Unknown attribute name.
 ##  - Feed integer value to string type attribute.
 ##  - Feed string value to integer type attribute.
 ##  - Invalid arch string.
@@ -6,6 +7,9 @@
 # RUN: not llvm-mc %s -triple=riscv32 -filetype=asm 2>&1 | FileCheck %s
 # RUN: not llvm-mc %s -triple=riscv64 -filetype=asm 2>&1 | FileCheck %s
 
+.attribute unknown, "unknown"
+# CHECK: [[@LINE-1]]:12: error: attribute name not recognised: unknown
+
 .attribute arch, "foo"
 # CHECK: [[@LINE-1]]:18: error: invalid arch name 'foo', string must begin with rv32{i,e,g} or rv64{i,e,g}
 


        


More information about the llvm-commits mailing list