diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-09-07 21:08:01 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-09-07 21:08:01 +0000 |
commit | a9e37c5eaf79c3a32f2921536fb7e12514e86fb2 (patch) | |
tree | b0906a5545739e94cfa1a199df774d59929bba12 /include | |
parent | b72a90e05b296d13b6fb4efc54eee9f6f5c0ea7b (diff) |
Fix alignment of .comm and .lcomm on mingw32.
For some reason .lcomm uses byte alignment and .comm log2 alignment so we can't
use the same setting for both. Fix this by reintroducing the LCOMM enum.
I verified this against mingw's gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163420 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/MC/MCAsmInfo.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h index 73709364fe..97aad71fd9 100644 --- a/include/llvm/MC/MCAsmInfo.h +++ b/include/llvm/MC/MCAsmInfo.h @@ -32,6 +32,10 @@ namespace llvm { enum ExceptionsType { None, DwarfCFI, SjLj, ARM, Win64 }; } + namespace LCOMM { + enum LCOMMType { NoAlignment, ByteAlignment, Log2Alignment }; + } + /// MCAsmInfo - This class is intended to be used as a base class for asm /// properties and features specific to the target. class MCAsmInfo { @@ -247,9 +251,9 @@ namespace llvm { /// alignment is to be specified in bytes instead of log2(n). bool COMMDirectiveAlignmentIsInBytes; // Defaults to true; - /// LCOMMDirectiveSupportsAlignment - True if .lcomm supports an optional - /// alignment argument on this target. - bool LCOMMDirectiveSupportsAlignment; // Defaults to false. + /// LCOMMDirectiveAlignment - Describes if the .lcomm directive for the + /// target supports an alignment argument and how it is interpreted. + LCOMM::LCOMMType LCOMMDirectiveAlignmentType; // Defaults to NoAlignment. /// HasDotTypeDotSizeDirective - True if the target has .type and .size /// directives, this is true for most ELF targets. @@ -495,8 +499,8 @@ namespace llvm { bool getCOMMDirectiveAlignmentIsInBytes() const { return COMMDirectiveAlignmentIsInBytes; } - bool getLCOMMDirectiveSupportsAlignment() const { - return LCOMMDirectiveSupportsAlignment; + LCOMM::LCOMMType getLCOMMDirectiveAlignmentType() const { + return LCOMMDirectiveAlignmentType; } bool hasDotTypeDotSizeDirective() const {return HasDotTypeDotSizeDirective;} bool hasSingleParameterDotFile() const { return HasSingleParameterDotFile; } |