WebAssembly: comment out .globl when printing textual assembly
[oota-llvm.git] / lib / Target / WebAssembly / MCTargetDesc / WebAssemblyMCAsmInfo.cpp
index c3ab48fd405555bccc463c578e3c7e19efc15013..e8732abbbc759b9ffb854319b9eb9272b40670e4 100644 (file)
@@ -28,7 +28,7 @@ WebAssemblyMCAsmInfo::WebAssemblyMCAsmInfo(const Triple &T) {
   // TODO: What should MaxInstLength be?
 
   // The s-expression format of WebAssembly uses LISP-style comments.
-  CommentString = ";";
+  CommentString = ";;";
 
   PrivateGlobalPrefix = "";
   PrivateLabelPrefix = "";
@@ -52,5 +52,8 @@ WebAssemblyMCAsmInfo::WebAssemblyMCAsmInfo(const Triple &T) {
   // For now, WebAssembly does not support exceptions.
   ExceptionsType = ExceptionHandling::None;
 
+  WeakDirective = "\t;; .weak\t";
+  GlobalDirective = "\t;; .globl\t";
+
   // TODO: UseIntegratedAssembler?
 }