1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/test/MC/WebAssembly/data-symbol-in-text-section.ll
Thomas Lively 81bb5f99ad [WebAssembly] Remove datalayout strings from llc tests
The data layout strings do not have any effect on llc tests and will become
misleadingly out of date as we continue to update the canonical data layout, so
remove them from the tests.

Differential Revision: https://reviews.llvm.org/D105842
2021-07-14 11:17:08 -07:00

13 lines
435 B
LLVM

; RUN: not --crash llc -filetype=obj %s -o /dev/null 2>&1 | FileCheck %s
; CHECK: data symbols must live in a data section: data_symbol
target triple = "wasm32-unknown-unknown"
@data_symbol = constant [1024 x i32] zeroinitializer, section ".text", align 16
define hidden i32 @main() local_unnamed_addr #0 {
entry:
%0 = load i32, i32* getelementptr inbounds ([1024 x i32], [1024 x i32]* @data_symbol, i32 0, i32 10)
ret i32 %0
}