From adfeeb980ba5d77da4d35aae6cbd1678ef503ff9 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Thu, 22 Aug 2019 19:43:27 +0000 Subject: [PATCH] Fight a bit against global initializers. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369695 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/WindowsManifest/WindowsManifestMerger.cpp | 2 +- tools/llvm-objcopy/ELF/Object.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/WindowsManifest/WindowsManifestMerger.cpp b/lib/WindowsManifest/WindowsManifestMerger.cpp index de03e232aaa..031a963cd3b 100644 --- a/lib/WindowsManifest/WindowsManifestMerger.cpp +++ b/lib/WindowsManifest/WindowsManifestMerger.cpp @@ -58,7 +58,7 @@ private: #if LLVM_LIBXML2_ENABLED -static const std::pair MtNsHrefsPrefixes[] = { +static constexpr std::pair 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"}, diff --git a/tools/llvm-objcopy/ELF/Object.cpp b/tools/llvm-objcopy/ELF/Object.cpp index 2862af1c09a..79245aef026 100644 --- a/tools/llvm-objcopy/ELF/Object.cpp +++ b/tools/llvm-objcopy/ELF/Object.cpp @@ -397,7 +397,7 @@ void SectionWriter::visit(const OwnedDataSection &Sec) { llvm::copy(Sec.Data, Out.getBufferStart() + Sec.Offset); } -static const std::vector ZlibGnuMagic = {'Z', 'L', 'I', 'B'}; +static constexpr std::array ZlibGnuMagic = {'Z', 'L', 'I', 'B'}; static bool isDataGnuCompressed(ArrayRef Data) { return Data.size() > ZlibGnuMagic.size() && -- 2.40.0