[llvm] r255925 - [WebAssembly] Switch WebAssemblyMCAsmInfo.h from MCAsmInfo to MCAsmInfoELF.
Dan Gohman via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 17 12:50:45 PST 2015
Author: djg
Date: Thu Dec 17 14:50:45 2015
New Revision: 255925
URL: http://llvm.org/viewvc/llvm-project?rev=255925&view=rev
Log:
[WebAssembly] Switch WebAssemblyMCAsmInfo.h from MCAsmInfo to MCAsmInfoELF.
Added:
llvm/trunk/test/CodeGen/WebAssembly/ident.ll
Modified:
llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h
llvm/trunk/test/CodeGen/WebAssembly/global.ll
Modified: llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h?rev=255925&r1=255924&r2=255925&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h (original)
+++ llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.h Thu Dec 17 14:50:45 2015
@@ -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;
Modified: llvm/trunk/test/CodeGen/WebAssembly/global.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/WebAssembly/global.ll?rev=255925&r1=255924&r2=255925&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/WebAssembly/global.ll (original)
+++ llvm/trunk/test/CodeGen/WebAssembly/global.ll Thu Dec 17 14:50:45 2015
@@ -165,3 +165,13 @@ define i8* @call_memcpy(i8* %p, i8* noca
; 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, at object{{$}}
+; CHECK: .section .rodata,"a", at progbits{{$}}
+; CHECK: .globl rom{{$}}
+; CHECK: .align 4{{$}}
+; CHECK: rom:
+; CHECK: .zero 512{{$}}
+; CHECK: .size rom, 512{{$}}
+ at rom = constant [128 x i32] zeroinitializer, align 16
Added: llvm/trunk/test/CodeGen/WebAssembly/ident.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/WebAssembly/ident.ll?rev=255925&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/WebAssembly/ident.ll (added)
+++ llvm/trunk/test/CodeGen/WebAssembly/ident.ll Thu Dec 17 14:50:45 2015
@@ -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"}
More information about the llvm-commits
mailing list