summaryrefslogtreecommitdiffstats
path: root/llvm/lib/BinaryFormat/Dwarf.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-03-21 12:18:03 +0000
committerPavel Labath <labath@google.com>2018-03-21 12:18:03 +0000
commit646ab4113f0501a0e5da0f4d10c12f3a3048f9a0 (patch)
treebb555609c876d7d3573a7668ac1e1a7e8709520d /llvm/lib/BinaryFormat/Dwarf.cpp
parent14cfb0de5d8252d6f7951117b1fdd1d9f4d86ffe (diff)
downloadbcm5719-llvm-646ab4113f0501a0e5da0f4d10c12f3a3048f9a0.tar.gz
bcm5719-llvm-646ab4113f0501a0e5da0f4d10c12f3a3048f9a0.zip
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
Diffstat (limited to 'llvm/lib/BinaryFormat/Dwarf.cpp')
-rw-r--r--llvm/lib/BinaryFormat/Dwarf.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/BinaryFormat/Dwarf.cpp b/llvm/lib/BinaryFormat/Dwarf.cpp
index 3a97ddebf8e..dd1ecea1782 100644
--- a/llvm/lib/BinaryFormat/Dwarf.cpp
+++ b/llvm/lib/BinaryFormat/Dwarf.cpp
@@ -676,7 +676,7 @@ bool llvm::dwarf::isValidFormForVersion(Form F, unsigned Version,
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[];
OpenPOWER on IntegriCloud