[RuntimeDyld] Guard UsedTLSStorage to x86 ELF only

UsedTLSStorage is only used in allocateTLSSection,
guarded in x87 ELF only.
So clang will emit error with -Werror on.

.../llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp:288:12:
error: private field 'UsedTLSStorage' is not used
[-Werror,-Wunused-private-field]
  unsigned UsedTLSStorage = 0;
           ^
This commit is contained in:
Jinsong Ji 2021-09-07 01:20:35 +00:00
parent c57c4f888c
commit 878c2a42ec
1 changed files with 2 additions and 0 deletions

View File

@ -285,7 +285,9 @@ private:
uintptr_t SlabSize = 0;
uintptr_t CurrentSlabOffset = 0;
SectionIDMap *SecIDMap = nullptr;
#if defined(__x86_64__) && defined(__ELF__)
unsigned UsedTLSStorage = 0;
#endif
};
uint8_t *TrivialMemoryManager::allocateCodeSection(uintptr_t Size,