Quick-fix DebugInfo build on Windows
authorTimur Iskhodzhanov <timurrrr@google.com>
Tue, 29 Oct 2013 12:13:22 +0000 (12:13 +0000)
committerTimur Iskhodzhanov <timurrrr@google.com>
Tue, 29 Oct 2013 12:13:22 +0000 (12:13 +0000)
MSVC can't comprehend
  template<typename T, size_t N>
  ArrayRef<T> makeArrayRef(const T (&Arr)[N]) {
    return ArrayRef<T>(Arr);
  }
if Arr is
  static const uint8_t sizes[];
declared in a templated and defined a few lines later.

I'll send a proper fix (i.e. get rid of unnecessary templates) for review soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193604 91177308-0d34-0410-b5e6-96231b3b80d8

lib/DebugInfo/DWARFFormValue.cpp

index 2ee393494ec5ecaf67521ee952912cc6001d8a40..c28f0dd5997883a499a310a7cd68ea5e46b42cc0 100644 (file)
@@ -22,7 +22,9 @@ using namespace dwarf;
 
 namespace {
 template <uint8_t AddrSize, uint8_t RefAddrSize> struct FixedFormSizes {
-  static const uint8_t sizes[];
+  // FIXME: do we need a template here?  Will a stack-allocated struct with
+  // an initializer in getFixedFormSizes() work just fine?
+  static const uint8_t sizes[27];
 };
 }