summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/InputFiles.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index 71ca4a1934e..4db990774e5 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -638,17 +638,15 @@ Symbol *BitcodeFile::createSymbol(const DenseSet<const Comdat *> &KeptComdats,
uint32_t Binding = (Flags & BasicSymbolRef::SF_Weak) ? STB_WEAK : STB_GLOBAL;
uint8_t Type = STT_NOTYPE;
+ uint8_t Visibility;
bool CanOmitFromDynSym = false;
+ bool HasUnnamedAddr = false;
+
// FIXME: Expose a thread-local flag for module asm symbols.
if (GV) {
if (GV->isThreadLocal())
Type = STT_TLS;
CanOmitFromDynSym = canBeOmittedFromSymbolTable(GV);
- }
-
- uint8_t Visibility;
- bool HasUnnamedAddr = false;
- if (GV) {
Visibility = getGvVisibility(GV);
HasUnnamedAddr =
GV->getUnnamedAddr() == llvm::GlobalValue::UnnamedAddr::Global;
OpenPOWER on IntegriCloud