aboutsummaryrefslogtreecommitdiffstats
path: root/test/Assembler/invalid-mdcompileunit-language-overflow.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Assembler/invalid-mdcompileunit-language-overflow.ll')
-rw-r--r--test/Assembler/invalid-mdcompileunit-language-overflow.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Assembler/invalid-mdcompileunit-language-overflow.ll b/test/Assembler/invalid-mdcompileunit-language-overflow.ll
new file mode 100644
index 0000000..14dab17
--- /dev/null
+++ b/test/Assembler/invalid-mdcompileunit-language-overflow.ll
@@ -0,0 +1,9 @@
+; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s
+
+; CHECK-NOT: error
+!0 = !MDCompileUnit(language: 65535,
+ file: !MDFile(filename: "a", directory: "b"))
+
+; CHECK: <stdin>:[[@LINE+1]]:31: error: value for 'language' too large, limit is 65535
+!1 = !MDCompileUnit(language: 65536,
+ file: !MDFile(filename: "a", directory: "b"))