Skip to content

Commit

Permalink
Fix lld build after 5881dcf
Browse files Browse the repository at this point in the history
  • Loading branch information
nico committed Sep 2, 2021
1 parent df052e1 commit 9d22754
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lld/wasm/Writer.cpp
Expand Up @@ -518,7 +518,7 @@ void Writer::populateTargetFeatures() {

// Validate that used features are allowed in output
if (!inferFeatures) {
for (auto &feature : used.keys()) {
for (const auto &feature : used.keys()) {
if (!allowed.count(std::string(feature)))
error(Twine("Target feature '") + feature + "' used by " +
used[feature] + " is not allowed.");
Expand All @@ -529,7 +529,7 @@ void Writer::populateTargetFeatures() {
for (ObjFile *file : symtab->objectFiles) {
StringRef fileName(file->getName());
SmallSet<std::string, 8> objectFeatures;
for (auto &feature : file->getWasmObj()->getTargetFeatures()) {
for (const auto &feature : file->getWasmObj()->getTargetFeatures()) {
if (feature.Prefix == WASM_FEATURE_PREFIX_DISALLOWED)
continue;
objectFeatures.insert(feature.Name);
Expand All @@ -538,7 +538,7 @@ void Writer::populateTargetFeatures() {
fileName + " is disallowed by " + disallowed[feature.Name] +
". Use --no-check-features to suppress.");
}
for (auto &feature : required.keys()) {
for (const auto &feature : required.keys()) {
if (!objectFeatures.count(std::string(feature)))
error(Twine("Missing target feature '") + feature + "' in " + fileName +
", required by " + required[feature] +
Expand Down

0 comments on commit 9d22754

Please sign in to comment.