mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-01 01:31:26 +00:00
Fight a bit against global initializers. NFC.
llvm-svn: 369695
This commit is contained in:
parent
a1c022c791
commit
b3a991df3c
File diff suppressed because it is too large
Load Diff
@ -14,7 +14,8 @@ namespace clangd {
|
||||
llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, RefKind K) {
|
||||
if (K == RefKind::Unknown)
|
||||
return OS << "Unknown";
|
||||
static const std::vector<const char *> Messages = {"Decl", "Def", "Ref"};
|
||||
static constexpr std::array<const char *, 3> Messages = {"Decl", "Def",
|
||||
"Ref"};
|
||||
bool VisitedOnce = false;
|
||||
for (unsigned I = 0; I < Messages.size(); ++I) {
|
||||
if (static_cast<uint8_t>(K) & 1u << I) {
|
||||
|
@ -35,8 +35,8 @@ using namespace lld::coff;
|
||||
using SymbolMapTy =
|
||||
DenseMap<const SectionChunk *, SmallVector<DefinedRegular *, 4>>;
|
||||
|
||||
static const std::string indent8 = " "; // 8 spaces
|
||||
static const std::string indent16 = " "; // 16 spaces
|
||||
static constexpr char indent8[] = " "; // 8 spaces
|
||||
static constexpr char indent16[] = " "; // 16 spaces
|
||||
|
||||
// Print out the first three columns of a line.
|
||||
static void writeHeader(raw_ostream &os, uint64_t addr, uint64_t size,
|
||||
|
@ -39,8 +39,8 @@ using namespace lld::elf;
|
||||
|
||||
using SymbolMapTy = DenseMap<const SectionBase *, SmallVector<Defined *, 4>>;
|
||||
|
||||
static const std::string indent8 = " "; // 8 spaces
|
||||
static const std::string indent16 = " "; // 16 spaces
|
||||
static constexpr char indent8[] = " "; // 8 spaces
|
||||
static constexpr char indent16[] = " "; // 16 spaces
|
||||
|
||||
// Print out the first three columns of a line.
|
||||
static void writeHeader(raw_ostream &os, uint64_t vma, uint64_t lma,
|
||||
|
@ -58,7 +58,7 @@ private:
|
||||
|
||||
#if LLVM_LIBXML2_ENABLED
|
||||
|
||||
static const std::pair<StringRef, StringRef> MtNsHrefsPrefixes[] = {
|
||||
static constexpr std::pair<StringLiteral, StringLiteral> MtNsHrefsPrefixes[] = {
|
||||
{"urn:schemas-microsoft-com:asm.v1", "ms_asmv1"},
|
||||
{"urn:schemas-microsoft-com:asm.v2", "ms_asmv2"},
|
||||
{"urn:schemas-microsoft-com:asm.v3", "ms_asmv3"},
|
||||
|
@ -397,7 +397,7 @@ void SectionWriter::visit(const OwnedDataSection &Sec) {
|
||||
llvm::copy(Sec.Data, Out.getBufferStart() + Sec.Offset);
|
||||
}
|
||||
|
||||
static const std::vector<uint8_t> ZlibGnuMagic = {'Z', 'L', 'I', 'B'};
|
||||
static constexpr std::array<uint8_t, 4> ZlibGnuMagic = {'Z', 'L', 'I', 'B'};
|
||||
|
||||
static bool isDataGnuCompressed(ArrayRef<uint8_t> Data) {
|
||||
return Data.size() > ZlibGnuMagic.size() &&
|
||||
|
Loading…
Reference in New Issue
Block a user