This revision was automatically updated to reflect the committed changes. Closed by commit rC350754: [CodeGen] Clarify comment about COFF common symbol alignment (authored by smeenai, committed by ).
Changed prior to commit: https://reviews.llvm.org/D56466?vs=180771&id=180897#toc Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56466/new/ https://reviews.llvm.org/D56466 Files: lib/CodeGen/CodeGenModule.cpp Index: lib/CodeGen/CodeGenModule.cpp =================================================================== --- lib/CodeGen/CodeGenModule.cpp +++ lib/CodeGen/CodeGenModule.cpp @@ -3761,8 +3761,12 @@ } } } - // COFF doesn't support alignments greater than 32, so these cannot be - // in common. + + // Microsoft's link.exe doesn't support alignments greater than 32 for common + // symbols, so symbols with greater alignment requirements cannot be common. + // Other COFF linkers (ld.bfd and LLD) support arbitrary power-of-two + // alignments for common symbols via the aligncomm directive, so this + // restriction only applies to MSVC environments. if (Context.getTargetInfo().getTriple().isKnownWindowsMSVCEnvironment() && Context.getTypeAlignIfKnown(D->getType()) > 32) return true;
Index: lib/CodeGen/CodeGenModule.cpp =================================================================== --- lib/CodeGen/CodeGenModule.cpp +++ lib/CodeGen/CodeGenModule.cpp @@ -3761,8 +3761,12 @@ } } } - // COFF doesn't support alignments greater than 32, so these cannot be - // in common. + + // Microsoft's link.exe doesn't support alignments greater than 32 for common + // symbols, so symbols with greater alignment requirements cannot be common. + // Other COFF linkers (ld.bfd and LLD) support arbitrary power-of-two + // alignments for common symbols via the aligncomm directive, so this + // restriction only applies to MSVC environments. if (Context.getTargetInfo().getTriple().isKnownWindowsMSVCEnvironment() && Context.getTypeAlignIfKnown(D->getType()) > 32) return true;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits