diff options
author | Dan Gohman <dan433584@gmail.com> | 2015-12-17 20:50:45 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2015-12-17 20:50:45 +0000 |
commit | 670a60ed5282ae118b51f1f9318bccb6c2a3e655 (patch) | |
tree | 6e5156285caf151a104b2258fc17ba5cd07f1725 /llvm | |
parent | febeff791bd138a6a9b2151ef85252d48801046d (diff) | |
download | bcm5719-llvm-670a60ed5282ae118b51f1f9318bccb6c2a3e655.tar.gz bcm5719-llvm-670a60ed5282ae118b51f1f9318bccb6c2a3e655.zip |
[WebAssembly] Switch WebAssemblyMCAsmInfo.h from MCAsmInfo to MCAsmInfoELF.
llvm-svn: 255925
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h | 4 | ||||
-rw-r--r-- | llvm/test/CodeGen/WebAssembly/global.ll | 10 | ||||
-rw-r--r-- | llvm/test/CodeGen/WebAssembly/ident.ll | 12 |
3 files changed, 24 insertions, 2 deletions
diff --git a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h index d2b8fb7748f..2dcf2cd3c89 100644 --- a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h +++ b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h @@ -15,13 +15,13 @@ #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_MCTARGETDESC_WEBASSEMBLYMCASMINFO_H #define LLVM_LIB_TARGET_WEBASSEMBLY_MCTARGETDESC_WEBASSEMBLYMCASMINFO_H -#include "llvm/MC/MCAsmInfo.h" +#include "llvm/MC/MCAsmInfoELF.h" namespace llvm { class Triple; -class WebAssemblyMCAsmInfo final : public MCAsmInfo { +class WebAssemblyMCAsmInfo final : public MCAsmInfoELF { public: explicit WebAssemblyMCAsmInfo(const Triple &T); ~WebAssemblyMCAsmInfo() override; diff --git a/llvm/test/CodeGen/WebAssembly/global.ll b/llvm/test/CodeGen/WebAssembly/global.ll index 32a5e5c606c..5f149ed067c 100644 --- a/llvm/test/CodeGen/WebAssembly/global.ll +++ b/llvm/test/CodeGen/WebAssembly/global.ll @@ -165,3 +165,13 @@ define i8* @call_memcpy(i8* %p, i8* nocapture readonly %q, i32 %n) { ; CHECK-NEXT: .size ptr, 4 @arr = global [128 x i32] zeroinitializer, align 16 @ptr = global i32* getelementptr inbounds ([128 x i32], [128 x i32]* @arr, i32 0, i32 20), align 4 + +; Constant global. +; CHECK: .type rom,@object{{$}} +; CHECK: .section .rodata,"a",@progbits{{$}} +; CHECK: .globl rom{{$}} +; CHECK: .align 4{{$}} +; CHECK: rom: +; CHECK: .zero 512{{$}} +; CHECK: .size rom, 512{{$}} +@rom = constant [128 x i32] zeroinitializer, align 16 diff --git a/llvm/test/CodeGen/WebAssembly/ident.ll b/llvm/test/CodeGen/WebAssembly/ident.ll new file mode 100644 index 00000000000..1e0dc2aa672 --- /dev/null +++ b/llvm/test/CodeGen/WebAssembly/ident.ll @@ -0,0 +1,12 @@ +; RUN: llc < %s -asm-verbose=false | FileCheck %s + +; Test llvm.ident. + +target datalayout = "e-p:32:32-i64:64-n32:64-S128" +target triple = "wasm32-unknown-unknown" + +; CHECK: .ident "hello world" + +!llvm.ident = !{!0} + +!0 = !{!"hello world"} |