Fix modular build issues caused by BitCodes.h
authorKristina Brooks <notstina@gmail.com>
Wed, 10 Jul 2019 03:52:31 +0000 (03:52 +0000)
committerKristina Brooks <notstina@gmail.com>
Wed, 10 Jul 2019 03:52:31 +0000 (03:52 +0000)
Consolidate llvm::BWH_* statics into an enum to fix
module build issues. This fixes the LLVM_Bitcode module,
getting rid of -Wmodules-ambiguous-internal-linkage.

Differential Revision: https://reviews.llvm.org/D64469

llvm-svn: 365594

llvm/include/llvm/Bitstream/BitCodes.h

index 60de962..adf54ba 100644 (file)
 
 namespace llvm {
 /// Offsets of the 32-bit fields of bitstream wrapper header.
-static const unsigned BWH_MagicField = 0 * 4;
-static const unsigned BWH_VersionField = 1 * 4;
-static const unsigned BWH_OffsetField = 2 * 4;
-static const unsigned BWH_SizeField = 3 * 4;
-static const unsigned BWH_CPUTypeField = 4 * 4;
-static const unsigned BWH_HeaderSize = 5 * 4;
+enum BitstreamWrapperHeader : unsigned {
+  BWH_MagicField   = 0 * 4,
+  BWH_VersionField = 1 * 4,
+  BWH_OffsetField  = 2 * 4,
+  BWH_SizeField    = 3 * 4,
+  BWH_CPUTypeField = 4 * 4,
+  BWH_HeaderSize   = 5 * 4
+};
 
 namespace bitc {
   enum StandardWidths {