diff options
author | Dan Gohman <dan433584@gmail.com> | 2017-12-07 00:14:30 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2017-12-07 00:14:30 +0000 |
commit | 113753f1f65a96c18833e19fe61645b144f0bbdd (patch) | |
tree | 78f65005a35ddac8100e0378df827c5bce83c81d /test/CodeGen/WebAssembly | |
parent | dea3d88348ba066bdd7b3e12d908f64addfa055d (diff) |
[WebAssembly] Don't try to emit size information for unsized types
Patch by John Sully!
Fixes PR35164.
Differential Revision: https://reviews.llvm.org/D39519
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319991 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/WebAssembly')
-rw-r--r-- | test/CodeGen/WebAssembly/global.ll | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CodeGen/WebAssembly/global.ll b/test/CodeGen/WebAssembly/global.ll index 599eb53b431..bb942bee560 100644 --- a/test/CodeGen/WebAssembly/global.ll +++ b/test/CodeGen/WebAssembly/global.ll @@ -213,3 +213,10 @@ define i8* @call_memcpy(i8* %p, i8* nocapture readonly %q, i32 %n) { ; CHECK-NEXT: .size pointer_to_array, 4 @array = internal constant [8 x i8] zeroinitializer, align 1 @pointer_to_array = constant i8* getelementptr inbounds ([8 x i8], [8 x i8]* @array, i32 0, i32 4), align 4 + +; Handle external objects with opaque type. +%struct.ASTRUCT = type opaque +@g_struct = external global %struct.ASTRUCT, align 1 +define i32 @address_of_opaque() { + ret i32 ptrtoint (%struct.ASTRUCT* @g_struct to i32) +} |