summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2019-03-01 00:12:13 +0000
committerThomas Lively <tlively@google.com>2019-03-01 00:12:13 +0000
commitae79f42a2fdd1321430a9266476b66eb932da0c9 (patch)
treecaa33832056c5dc9f40e930b890f7912bbbad8dd /llvm/test/CodeGen
parent41f32196a0b3850fb578b741fb81f44dbd30a68b (diff)
downloadbcm5719-llvm-ae79f42a2fdd1321430a9266476b66eb932da0c9.tar.gz
bcm5719-llvm-ae79f42a2fdd1321430a9266476b66eb932da0c9.zip
[WebAssembly] Fix crash when @llvm.global_dtors is external
Reviewers: aheejin Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58799 llvm-svn: 355157
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/WebAssembly/global_dtors.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/WebAssembly/global_dtors.ll b/llvm/test/CodeGen/WebAssembly/global_dtors.ll
new file mode 100644
index 00000000000..9321dc511d4
--- /dev/null
+++ b/llvm/test/CodeGen/WebAssembly/global_dtors.ll
@@ -0,0 +1,9 @@
+; RUN: llc < %s
+
+target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
+target triple = "wasm32-unknown-unknown"
+
+; Check that we do not crash when attempting to lower away
+; global_dtors without a definition.
+
+@llvm.global_dtors = external global [2 x { i32, void ()*, i8* }]
OpenPOWER on IntegriCloud