Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
lld/wasm/Symbols.cpp
Show First 20 Lines • Show All 215 Lines • ▼ Show 20 Lines | void Symbol::setHidden(bool isHidden) { | ||||
LLVM_DEBUG(dbgs() << "setHidden: " << name << " -> " << isHidden << "\n"); | LLVM_DEBUG(dbgs() << "setHidden: " << name << " -> " << isHidden << "\n"); | ||||
flags &= ~WASM_SYMBOL_VISIBILITY_MASK; | flags &= ~WASM_SYMBOL_VISIBILITY_MASK; | ||||
if (isHidden) | if (isHidden) | ||||
flags |= WASM_SYMBOL_VISIBILITY_HIDDEN; | flags |= WASM_SYMBOL_VISIBILITY_HIDDEN; | ||||
else | else | ||||
flags |= WASM_SYMBOL_VISIBILITY_DEFAULT; | flags |= WASM_SYMBOL_VISIBILITY_DEFAULT; | ||||
} | } | ||||
bool Symbol::isImported() const { | |||||
return isUndefined() && (importName.has_value() || forceImport); | |||||
} | |||||
bool Symbol::isExported() const { | bool Symbol::isExported() const { | ||||
if (!isDefined() || isLocal()) | if (!isDefined() || isLocal()) | ||||
return false; | return false; | ||||
// Shared libraries must export all weakly defined symbols | // Shared libraries must export all weakly defined symbols | ||||
// in case they contain the version that will be chosen by | // in case they contain the version that will be chosen by | ||||
// the dynamic linker. | // the dynamic linker. | ||||
if (config->shared && isLive() && isWeak() && !isHidden()) | if (config->shared && isLive() && isWeak() && !isHidden()) | ||||
▲ Show 20 Lines • Show All 233 Lines • Show Last 20 Lines |