[llvm] r365594 - Fix modular build issues caused by BitCodes.h

Kristina Brooks via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 20:52:31 PDT 2019


Author: kristina
Date: Tue Jul  9 20:52:31 2019
New Revision: 365594

URL: http://llvm.org/viewvc/llvm-project?rev=365594&view=rev
Log:
Fix modular build issues caused by BitCodes.h

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


Modified:
    llvm/trunk/include/llvm/Bitstream/BitCodes.h

Modified: llvm/trunk/include/llvm/Bitstream/BitCodes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitstream/BitCodes.h?rev=365594&r1=365593&r2=365594&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Bitstream/BitCodes.h (original)
+++ llvm/trunk/include/llvm/Bitstream/BitCodes.h Tue Jul  9 20:52:31 2019
@@ -24,12 +24,14 @@
 
 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 {




More information about the llvm-commits mailing list