Fix build broken by r328090
- constexpr is needed for out-of-class definition of the Type static
member by some compilers
- MSVC is confused by the initialization of the static constexpr char[]
member when it happens in a template specialization. Explicitly
specifying the length of the array seems to be enough to help it
figure things out.
llvm-svn: 328093
diff --git a/llvm/lib/BinaryFormat/Dwarf.cpp b/llvm/lib/BinaryFormat/Dwarf.cpp
index 3a97dde..dd1ecea1 100644
--- a/llvm/lib/BinaryFormat/Dwarf.cpp
+++ b/llvm/lib/BinaryFormat/Dwarf.cpp
@@ -676,7 +676,7 @@
return ExtensionsOk;
}
-const char llvm::dwarf::EnumTraits<Attribute>::Type[];
-const char llvm::dwarf::EnumTraits<Form>::Type[];
-const char llvm::dwarf::EnumTraits<Index>::Type[];
-const char llvm::dwarf::EnumTraits<Tag>::Type[];
+constexpr char llvm::dwarf::EnumTraits<Attribute>::Type[];
+constexpr char llvm::dwarf::EnumTraits<Form>::Type[];
+constexpr char llvm::dwarf::EnumTraits<Index>::Type[];
+constexpr char llvm::dwarf::EnumTraits<Tag>::Type[];