Fix ODR violations

On a shared build, these symbols exist in both libglslang.so and
libSPIRV.so, leading to an ODR violation at runtime.
This commit is contained in:
Pedro Olsen Ferreira 2023-08-21 09:28:46 +01:00 committed by arcady-lunarg
parent f1cb8608b3
commit adfcaba7ae
6 changed files with 15 additions and 21 deletions

View file

@ -118,11 +118,16 @@ private:
unsigned char* mem; // beginning of our allocation (pts to header)
TAllocation* prevAlloc; // prior allocation in the chain
const static unsigned char guardBlockBeginVal;
const static unsigned char guardBlockEndVal;
const static unsigned char userDataFill;
static inline constexpr unsigned char guardBlockBeginVal = 0xfb;
static inline constexpr unsigned char guardBlockEndVal = 0xfe;
static inline constexpr unsigned char userDataFill = 0xcd;
# ifdef GUARD_BLOCKS
static inline constexpr size_t guardBlockSize = 16;
# else
static inline constexpr size_t guardBlockSize = 0;
# endif
const static size_t guardBlockSize;
# ifdef GUARD_BLOCKS
inline static size_t headerSize() { return sizeof(TAllocation); }
# else