[llvm] r365477 - [CodeGen] AccelTable - remove non-constexpr (MSVC) Atom defs
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 9 06:07:48 PDT 2019
Author: rksimon
Date: Tue Jul 9 06:07:48 2019
New Revision: 365477
URL: http://llvm.org/viewvc/llvm-project?rev=365477&view=rev
Log:
[CodeGen] AccelTable - remove non-constexpr (MSVC) Atom defs
Now that we've dropped VS2015 support (D64326) we can enable the constexpr variables on MSVC builds as VS2017+ correctly handles them
Modified:
llvm/trunk/include/llvm/CodeGen/AccelTable.h
llvm/trunk/lib/CodeGen/AsmPrinter/AccelTable.cpp
Modified: llvm/trunk/include/llvm/CodeGen/AccelTable.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AccelTable.h?rev=365477&r1=365476&r2=365477&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/AccelTable.h (original)
+++ llvm/trunk/include/llvm/CodeGen/AccelTable.h Tue Jul 9 06:07:48 2019
@@ -326,14 +326,8 @@ public:
void emit(AsmPrinter *Asm) const override;
-#ifndef _MSC_VER
- // The line below is rejected by older versions (TBD) of MSVC.
static constexpr Atom Atoms[] = {
Atom(dwarf::DW_ATOM_die_offset, dwarf::DW_FORM_data4)};
-#else
- // FIXME: Erase this path once the minimum MSCV version has been bumped.
- static const SmallVector<Atom, 4> Atoms;
-#endif
#ifndef NDEBUG
void print(raw_ostream &OS) const override;
@@ -351,16 +345,10 @@ public:
void emit(AsmPrinter *Asm) const override;
-#ifndef _MSC_VER
- // The line below is rejected by older versions (TBD) of MSVC.
static constexpr Atom Atoms[] = {
Atom(dwarf::DW_ATOM_die_offset, dwarf::DW_FORM_data4),
Atom(dwarf::DW_ATOM_die_tag, dwarf::DW_FORM_data2),
Atom(dwarf::DW_ATOM_type_flags, dwarf::DW_FORM_data1)};
-#else
- // FIXME: Erase this path once the minimum MSCV version has been bumped.
- static const SmallVector<Atom, 4> Atoms;
-#endif
#ifndef NDEBUG
void print(raw_ostream &OS) const override;
@@ -375,14 +363,8 @@ public:
void emit(AsmPrinter *Asm) const override;
-#ifndef _MSC_VER
- // The line below is rejected by older versions (TBD) of MSVC.
static constexpr Atom Atoms[] = {
Atom(dwarf::DW_ATOM_die_offset, dwarf::DW_FORM_data4)};
-#else
- // FIXME: Erase this path once the minimum MSCV version has been bumped.
- static const SmallVector<Atom, 4> Atoms;
-#endif
#ifndef NDEBUG
void print(raw_ostream &OS) const override;
@@ -406,16 +388,10 @@ public:
void emit(AsmPrinter *Asm) const override;
-#ifndef _MSC_VER
- // The line below is rejected by older versions (TBD) of MSVC.
static constexpr Atom Atoms[] = {
Atom(dwarf::DW_ATOM_die_offset, dwarf::DW_FORM_data4),
Atom(dwarf::DW_ATOM_die_tag, dwarf::DW_FORM_data2),
Atom(5, dwarf::DW_FORM_data1), Atom(6, dwarf::DW_FORM_data4)};
-#else
- // FIXME: Erase this path once the minimum MSCV version has been bumped.
- static const SmallVector<Atom, 4> Atoms;
-#endif
#ifndef NDEBUG
void print(raw_ostream &OS) const override;
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AccelTable.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AccelTable.cpp?rev=365477&r1=365476&r2=365477&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AccelTable.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AccelTable.cpp Tue Jul 9 06:07:48 2019
@@ -614,30 +614,10 @@ void AppleAccelTableStaticTypeData::emit
Asm->emitInt32(QualifiedNameHash);
}
-#ifndef _MSC_VER
-// The lines below are rejected by older versions (TBD) of MSVC.
constexpr AppleAccelTableData::Atom AppleAccelTableTypeData::Atoms[];
constexpr AppleAccelTableData::Atom AppleAccelTableOffsetData::Atoms[];
constexpr AppleAccelTableData::Atom AppleAccelTableStaticOffsetData::Atoms[];
constexpr AppleAccelTableData::Atom AppleAccelTableStaticTypeData::Atoms[];
-#else
-// FIXME: Erase this path once the minimum MSCV version has been bumped.
-const SmallVector<AppleAccelTableData::Atom, 4>
- AppleAccelTableOffsetData::Atoms = {
- Atom(dwarf::DW_ATOM_die_offset, dwarf::DW_FORM_data4)};
-const SmallVector<AppleAccelTableData::Atom, 4> AppleAccelTableTypeData::Atoms =
- {Atom(dwarf::DW_ATOM_die_offset, dwarf::DW_FORM_data4),
- Atom(dwarf::DW_ATOM_die_tag, dwarf::DW_FORM_data2),
- Atom(dwarf::DW_ATOM_type_flags, dwarf::DW_FORM_data1)};
-const SmallVector<AppleAccelTableData::Atom, 4>
- AppleAccelTableStaticOffsetData::Atoms = {
- Atom(dwarf::DW_ATOM_die_offset, dwarf::DW_FORM_data4)};
-const SmallVector<AppleAccelTableData::Atom, 4>
- AppleAccelTableStaticTypeData::Atoms = {
- Atom(dwarf::DW_ATOM_die_offset, dwarf::DW_FORM_data4),
- Atom(dwarf::DW_ATOM_die_tag, dwarf::DW_FORM_data2),
- Atom(5, dwarf::DW_FORM_data1), Atom(6, dwarf::DW_FORM_data4)};
-#endif
#ifndef NDEBUG
void AppleAccelTableWriter::Header::print(raw_ostream &OS) const {
More information about the llvm-commits
mailing list