forked from OSchip/llvm-project
parent
4cfc8d6afc
commit
196a440411
|
@ -491,7 +491,7 @@ bool SymbolTable::getFunctionVariant(Symbol* Sym, const WasmSignature *Sig,
|
|||
// Linear search through symbol variants. Should never be more than two
|
||||
// or three entries here.
|
||||
auto &Variants = SymVariants[CachedHashStringRef(Sym->getName())];
|
||||
if (Variants.size() == 0)
|
||||
if (Variants.empty())
|
||||
Variants.push_back(Sym);
|
||||
|
||||
for (Symbol* V : Variants) {
|
||||
|
|
|
@ -718,12 +718,12 @@ void Writer::createProducersSection() {
|
|||
}
|
||||
|
||||
void Writer::createTargetFeaturesSection() {
|
||||
if (TargetFeatures.size() == 0)
|
||||
if (TargetFeatures.empty())
|
||||
return;
|
||||
|
||||
SmallVector<std::string, 8> Emitted(TargetFeatures.begin(),
|
||||
TargetFeatures.end());
|
||||
std::sort(Emitted.begin(), Emitted.end());
|
||||
llvm::sort(Emitted);
|
||||
SyntheticSection *Section =
|
||||
createSyntheticSection(WASM_SEC_CUSTOM, "target_features");
|
||||
auto &OS = Section->getStream();
|
||||
|
|
|
@ -196,7 +196,7 @@ std::string lld::toString(const WasmSignature &Sig) {
|
|||
S += toString(Type);
|
||||
}
|
||||
S += ") -> ";
|
||||
if (Sig.Returns.size() == 0)
|
||||
if (Sig.Returns.empty())
|
||||
S += "void";
|
||||
else
|
||||
S += toString(Sig.Returns[0]);
|
||||
|
|
Loading…
Reference in New Issue