Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions llvm/include/llvm/TargetParser/ARMTargetParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ struct ExtName {
StringRef NegFeature;
};

const ExtName ARCHExtNames[] = {
constexpr ExtName ARCHExtNames[] = {
#define ARM_ARCH_EXT_NAME(NAME, ID, FEATURE, NEGFEATURE) \
{NAME, ID, FEATURE, NEGFEATURE},
#include "ARMTargetParser.def"
};

// List of HWDiv names (use getHWDivSynonym) and which architectural
// features they correspond to (use getHWDivFeatures).
const struct {
constexpr struct {
StringRef Name;
uint64_t ID;
} HWDivNames[] = {
Expand All @@ -112,7 +112,7 @@ struct CpuNames {
uint64_t DefaultExtensions;
};

const CpuNames CPUNames[] = {
constexpr CpuNames CPUNames[] = {
#define ARM_CPU_NAME(NAME, ID, DEFAULT_FPU, IS_DEFAULT, DEFAULT_EXT) \
{NAME, ARM::ArchKind::ID, IS_DEFAULT, DEFAULT_EXT},
#include "ARMTargetParser.def"
Expand Down Expand Up @@ -173,7 +173,7 @@ struct FPUName {
FPURestriction Restriction;
};

static const FPUName FPUNames[] = {
static constexpr FPUName FPUNames[] = {
#define ARM_FPU(NAME, KIND, VERSION, NEON_SUPPORT, RESTRICTION) \
{NAME, KIND, VERSION, NEON_SUPPORT, RESTRICTION},
#include "llvm/TargetParser/ARMTargetParser.def"
Expand All @@ -199,7 +199,7 @@ struct ArchNames {
StringRef getSubArch() const { return ArchFeature.substr(1); }
};

static const ArchNames ARMArchNames[] = {
static constexpr ArchNames ARMArchNames[] = {
#define ARM_ARCH(NAME, ID, CPU_ATTR, ARCH_FEATURE, ARCH_ATTR, ARCH_FPU, \
ARCH_BASE_EXT) \
{NAME, CPU_ATTR, ARCH_FEATURE, ARCH_FPU, \
Expand Down
1 change: 0 additions & 1 deletion llvm/lib/IR/AsmWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2117,7 +2117,6 @@ static void writeDIGenericSubrange(raw_ostream &Out, const DIGenericSubrange *N,
};

auto GetConstant = [&](Metadata *Bound) -> int64_t {
assert(IsConstant(Bound) && "Expected constant");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this unrelated to the constexpr?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Sorry for the confusion. That was supposed to be on a different PR. It was just another thing noticed.

auto *BE = dyn_cast_or_null<DIExpression>(Bound);
return static_cast<int64_t>(BE->getElement(1));
};
Expand Down