[llvm] 878c2a4 - [RuntimeDyld] Guard UsedTLSStorage to x86 ELF only
Jinsong Ji via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 6 18:34:50 PDT 2021
Author: Jinsong Ji
Date: 2021-09-07T01:20:38Z
New Revision: 878c2a42ec6c83f88618ee24af02b6d82db9c28e
URL: https://github.com/llvm/llvm-project/commit/878c2a42ec6c83f88618ee24af02b6d82db9c28e
DIFF: https://github.com/llvm/llvm-project/commit/878c2a42ec6c83f88618ee24af02b6d82db9c28e.diff
LOG: [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;
^
Added:
Modified:
llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp b/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
index 278f83bfef1da..02c11f7689fb6 100644
--- a/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
+++ b/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
@@ -285,7 +285,9 @@ class TrivialMemoryManager : public RTDyldMemoryManager {
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,
More information about the llvm-commits
mailing list