diff options
| author | Victor Leschuk <vleschuk@accesssoftek.com> | 2016-10-26 08:55:27 +0000 |
|---|---|---|
| committer | Victor Leschuk <vleschuk@accesssoftek.com> | 2016-10-26 08:55:27 +0000 |
| commit | e398c6afa9f5fc5cfce9bbf5f73cf00b885d57fa (patch) | |
| tree | 1408f523286d01595e682750c74e26401c121ca4 /llvm/include | |
| parent | 4bddef9b3982739a96e1dd68dbc300de6fe8e29e (diff) | |
| download | bcm5719-llvm-e398c6afa9f5fc5cfce9bbf5f73cf00b885d57fa.tar.gz bcm5719-llvm-e398c6afa9f5fc5cfce9bbf5f73cf00b885d57fa.zip | |
DebugInfo: support for DWARFv5 DW_AT_alignment attribute
* Assume that clang passes non-zero alignment value to DIBuilder
only in case when it was forced by C++11 'alignas', C11 '_Alignas'
or compiler attribute '__attribute__((aligned (N)))'.
* Emit DW_AT_alignment if alignment is specified for type/object.
Differential Revision: https://reviews.llvm.org/D24425
llvm-svn: 285181
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/IR/DebugInfoMetadata.h | 4 | ||||
| -rw-r--r-- | llvm/include/llvm/Support/Dwarf.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/include/llvm/IR/DebugInfoMetadata.h b/llvm/include/llvm/IR/DebugInfoMetadata.h index a4c103c9504..b97054204fd 100644 --- a/llvm/include/llvm/IR/DebugInfoMetadata.h +++ b/llvm/include/llvm/IR/DebugInfoMetadata.h @@ -1842,8 +1842,8 @@ public: StringRef getName() const { return getStringOperand(1); } DIFile *getFile() const { return cast_or_null<DIFile>(getRawFile()); } DITypeRef getType() const { return DITypeRef(getRawType()); } - uint64_t getAlignInBits() const { return AlignInBits; } - uint64_t getAlignInBytes() const { return getAlignInBits() / CHAR_BIT; } + DIAlignment getAlignInBits() const { return AlignInBits; } + DIAlignment getAlignInBytes() const { return getAlignInBits() / CHAR_BIT; } StringRef getFilename() const { if (auto *F = getFile()) diff --git a/llvm/include/llvm/Support/Dwarf.h b/llvm/include/llvm/Support/Dwarf.h index fa7c6486659..8448dae4124 100644 --- a/llvm/include/llvm/Support/Dwarf.h +++ b/llvm/include/llvm/Support/Dwarf.h @@ -198,6 +198,7 @@ enum Attribute : uint16_t { DW_AT_rvalue_reference = 0x78, DW_AT_macros = 0x79, DW_AT_noreturn = 0x87, + DW_AT_alignment = 0x88, DW_AT_lo_user = 0x2000, DW_AT_hi_user = 0x3fff, |

