summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/MIR/X86/inline-asm.mir
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-06-06 19:00:58 +0000
committerMatthias Braun <matze@braunis.de>2017-06-06 19:00:58 +0000
commit8b5f9e4438ed97a4134e17ff14da419a2cc6b9d6 (patch)
tree9b43a0fcc345cc71c91708bf3baaa510eab2f7c5 /llvm/test/CodeGen/MIR/X86/inline-asm.mir
parent49220fb6a132a17278337f770c0de91d37d889d4 (diff)
downloadbcm5719-llvm-8b5f9e4438ed97a4134e17ff14da419a2cc6b9d6.tar.gz
bcm5719-llvm-8b5f9e4438ed97a4134e17ff14da419a2cc6b9d6.zip
MIRPrinter: Avoid assert() when printing empty INLINEASM strings.
CodeGen uses MO_ExternalSymbol to represent the inline assembly strings. Empty strings for symbol names appear to be invalid. For now just special case the output code to avoid hitting an `assert()` in `printLLVMNameWithoutPrefix()`. This fixes https://llvm.org/PR33317 llvm-svn: 304815
Diffstat (limited to 'llvm/test/CodeGen/MIR/X86/inline-asm.mir')
-rw-r--r--llvm/test/CodeGen/MIR/X86/inline-asm.mir12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/MIR/X86/inline-asm.mir b/llvm/test/CodeGen/MIR/X86/inline-asm.mir
new file mode 100644
index 00000000000..be96517144b
--- /dev/null
+++ b/llvm/test/CodeGen/MIR/X86/inline-asm.mir
@@ -0,0 +1,12 @@
+# RUN: llc -o - %s -mtriple=x86_64-- -run-pass none | FileCheck %s
+---
+# Avoid crash/assert when using an emptystring in an INLINEASM.
+# CHECK-LABEL: name: emptystring
+# CHECK: bb.0:
+# CHECK: INLINEASM $"", 1
+# CHECK: RET 0
+name: emptystring
+body: |
+ bb.0:
+ INLINEASM $"", 1
+ RET 0
OpenPOWER on IntegriCloud