Do the same for .weak (not implemented for now, but may as well to it). Update comment string to two semicolons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245982
91177308-0d34-0410-b5e6-
96231b3b80d8
// TODO: What should MaxInstLength be?
// The s-expression format of WebAssembly uses LISP-style comments.
- CommentString = ";";
+ CommentString = ";;";
PrivateGlobalPrefix = "";
PrivateLabelPrefix = "";
// For now, WebAssembly does not support exceptions.
ExceptionsType = ExceptionHandling::None;
+ WeakDirective = "\t;; .weak\t";
+ GlobalDirective = "\t;; .globl\t";
+
// TODO: UseIntegratedAssembler?
}
--- /dev/null
+; RUN: llc < %s -asm-verbose=false | FileCheck %s
+
+; Test that the `.globl` directive is commented out.
+
+target datalayout = "e-p:32:32-i64:64-v128:8:128-n32:64-S128"
+target triple = "wasm32-unknown-unknown"
+
+; CHECK-NOT: globl
+; CHECK: ;; .globl foo
+; CHECK-NOT: globl
+; CHECK-LABEL: foo:
+define void @foo() {
+ ret void
+}