Fix alignment of .comm and .lcomm on mingw32.
[oota-llvm.git] / lib / MC / MCAsmInfoCOFF.cpp
index 4b426f8a731a57721ea63d34e0a71c3c5a3935b6..fd79193073df369e0e9b2634700839cbf0c68310 100644 (file)
@@ -19,8 +19,10 @@ void MCAsmInfoCOFF::anchor() { }
 
 MCAsmInfoCOFF::MCAsmInfoCOFF() {
   GlobalPrefix = "_";
-  COMMDirectiveAlignmentIsInBytes = true;
-  LCOMMDirectiveSupportsAlignment = true;
+  // MingW 4.5 and later support .comm with log2 alignment, but .lcomm uses byte
+  // alignment.
+  COMMDirectiveAlignmentIsInBytes = false;
+  LCOMMDirectiveAlignmentType = LCOMM::ByteAlignment;
   HasDotTypeDotSizeDirective = false;
   HasSingleParameterDotFile = false;
   PrivateGlobalPrefix = "L";  // Prefix for private global symbols