diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-01-29 15:23:34 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-01-29 15:23:34 +0000 |
commit | ba8daf0964c74ec394e905cc07ca3042360b51bf (patch) | |
tree | bac6398d9bb07c8585af130c455003b4f49d3efc | |
parent | 278e2d1a260152f354bf4b80a51e7d6f1c9d6dfd (diff) | |
download | llvm-ba8daf0964c74ec394e905cc07ca3042360b51bf.zip llvm-ba8daf0964c74ec394e905cc07ca3042360b51bf.tar.gz llvm-ba8daf0964c74ec394e905cc07ca3042360b51bf.tar.bz2 |
[AccelTable] Try making MSVC happy
MSVC complains that the constexpr "expression did not evaluate to a
constant". Trying to make it happy by adding a `const` specifier as
suggested in https://stackoverflow.com/questions/37574343.
llvm-svn: 323659
-rw-r--r-- | llvm/include/llvm/CodeGen/AccelTable.h | 8 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/llvm/include/llvm/CodeGen/AccelTable.h b/llvm/include/llvm/CodeGen/AccelTable.h index 27b7863..f3db36c 100644 --- a/llvm/include/llvm/CodeGen/AccelTable.h +++ b/llvm/include/llvm/CodeGen/AccelTable.h @@ -368,7 +368,7 @@ public: void emit(AsmPrinter *Asm) const override; - static constexpr AppleAccelTableHeader::Atom Atoms[] = { + static constexpr const AppleAccelTableHeader::Atom Atoms[] = { AppleAccelTableHeader::Atom(dwarf::DW_ATOM_die_offset, dwarf::DW_FORM_data4)}; @@ -391,7 +391,7 @@ public: void emit(AsmPrinter *Asm) const override; - static constexpr AppleAccelTableHeader::Atom Atoms[] = { + static constexpr const AppleAccelTableHeader::Atom Atoms[] = { AppleAccelTableHeader::Atom(dwarf::DW_ATOM_die_offset, dwarf::DW_FORM_data4), AppleAccelTableHeader::Atom(dwarf::DW_ATOM_die_tag, dwarf::DW_FORM_data2), @@ -414,7 +414,7 @@ public: void emit(AsmPrinter *Asm) const override; - static constexpr AppleAccelTableHeader::Atom Atoms[] = { + static constexpr const AppleAccelTableHeader::Atom Atoms[] = { AppleAccelTableHeader::Atom(dwarf::DW_ATOM_die_offset, dwarf::DW_FORM_data4)}; @@ -443,7 +443,7 @@ public: void emit(AsmPrinter *Asm) const override; - static constexpr AppleAccelTableHeader::Atom Atoms[] = { + static constexpr const AppleAccelTableHeader::Atom Atoms[] = { AppleAccelTableHeader::Atom(dwarf::DW_ATOM_die_offset, dwarf::DW_FORM_data4), AppleAccelTableHeader::Atom(dwarf::DW_ATOM_die_tag, dwarf::DW_FORM_data2), diff --git a/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp b/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp index 5c80206..597c2e7 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp @@ -70,10 +70,10 @@ void AppleAccelTableHeader::setBucketAndHashCount(uint32_t HashCount) { Header.HashCount = HashCount; } -constexpr AppleAccelTableHeader::Atom AppleAccelTableTypeData::Atoms[]; -constexpr AppleAccelTableHeader::Atom AppleAccelTableOffsetData::Atoms[]; -constexpr AppleAccelTableHeader::Atom AppleAccelTableStaticOffsetData::Atoms[]; -constexpr AppleAccelTableHeader::Atom AppleAccelTableStaticTypeData::Atoms[]; +constexpr const AppleAccelTableHeader::Atom AppleAccelTableTypeData::Atoms[]; +constexpr const AppleAccelTableHeader::Atom AppleAccelTableOffsetData::Atoms[]; +constexpr const AppleAccelTableHeader::Atom AppleAccelTableStaticOffsetData::Atoms[]; +constexpr const AppleAccelTableHeader::Atom AppleAccelTableStaticTypeData::Atoms[]; void AppleAccelTableBase::emitHeader(AsmPrinter *Asm) { Header.emit(Asm); } |