llvm-mc: MCStreamer cleanups. - Remove EmitLocalSymbol, this is unsupported for now.

- Switch Emit{CommonSymbol,Zerofill} to take alignment in bytes (for consistency).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80484 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/llvm-mc/AsmParser.cpp b/tools/llvm-mc/AsmParser.cpp
index 74512ca..032b25e 100644
--- a/tools/llvm-mc/AsmParser.cpp
+++ b/tools/llvm-mc/AsmParser.cpp
@@ -1257,15 +1257,17 @@
   if (!Sym->isUndefined())
     return Error(IDLoc, "invalid symbol redefinition");
 
+  // '.lcomm' is equivalent to '.zerofill'.
   // Create the Symbol as a common or local common with Size and Pow2Alignment
-  if (IsLocal)
+  if (IsLocal) {
     Out.EmitZerofill(getMachOSection("__DATA", "__bss",
                                      MCSectionMachO::S_ZEROFILL, 0,
                                      SectionKind()),
-                     Sym, Size, Pow2Alignment);
-  else 
-    Out.EmitCommonSymbol(Sym, Size, Pow2Alignment);
+                     Sym, Size, 1 << Pow2Alignment);
+    return false;
+  }
 
+  Out.EmitCommonSymbol(Sym, Size, 1 << Pow2Alignment);
   return false;
 }
 
@@ -1355,7 +1357,7 @@
   Out.EmitZerofill(getMachOSection(Segment, Section,
                                  MCSectionMachO::S_ZEROFILL, 0,
                                  SectionKind()),
-                   Sym, Size, Pow2Alignment);
+                   Sym, Size, 1 << Pow2Alignment);
 
   return false;
 }
@@ -1426,10 +1428,11 @@
   
   Lexer.Lex();
 
-  // Create the Sym with the value of the Expr
-  Out.EmitLocalSymbol(Sym, Expr);
-
-  return false;
+  // We don't currently support this directive.
+  //
+  // FIXME: Diagnostic location!
+  (void) Sym;
+  return TokError("directive '.lsym' is unsupported");
 }
 
 /// ParseDirectiveInclude