]> granicus.if.org Git - llvm/commitdiff
Fight a bit against global initializers. NFC.
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 22 Aug 2019 19:43:27 +0000 (19:43 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 22 Aug 2019 19:43:27 +0000 (19:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369695 91177308-0d34-0410-b5e6-96231b3b80d8

lib/WindowsManifest/WindowsManifestMerger.cpp
tools/llvm-objcopy/ELF/Object.cpp

index de03e232aaa61af2912fbe8985f9afe15d533c9e..031a963cd3b0c65f341a1c0102d00bfb135d7e87 100644 (file)
@@ -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"},
index 2862af1c09aeeb93915a64819917c3a976b7c5bb..79245aef026376fae7d052d36ffd602822743567 100644 (file)
@@ -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() &&