Skip to content

Commit 9d22754

Browse files
committed
Fix lld build after 5881dcf
1 parent df052e1 commit 9d22754

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lld/wasm/Writer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ void Writer::populateTargetFeatures() {
518518

519519
// Validate that used features are allowed in output
520520
if (!inferFeatures) {
521-
for (auto &feature : used.keys()) {
521+
for (const auto &feature : used.keys()) {
522522
if (!allowed.count(std::string(feature)))
523523
error(Twine("Target feature '") + feature + "' used by " +
524524
used[feature] + " is not allowed.");
@@ -529,7 +529,7 @@ void Writer::populateTargetFeatures() {
529529
for (ObjFile *file : symtab->objectFiles) {
530530
StringRef fileName(file->getName());
531531
SmallSet<std::string, 8> objectFeatures;
532-
for (auto &feature : file->getWasmObj()->getTargetFeatures()) {
532+
for (const auto &feature : file->getWasmObj()->getTargetFeatures()) {
533533
if (feature.Prefix == WASM_FEATURE_PREFIX_DISALLOWED)
534534
continue;
535535
objectFeatures.insert(feature.Name);
@@ -538,7 +538,7 @@ void Writer::populateTargetFeatures() {
538538
fileName + " is disallowed by " + disallowed[feature.Name] +
539539
". Use --no-check-features to suppress.");
540540
}
541-
for (auto &feature : required.keys()) {
541+
for (const auto &feature : required.keys()) {
542542
if (!objectFeatures.count(std::string(feature)))
543543
error(Twine("Missing target feature '") + feature + "' in " + fileName +
544544
", required by " + required[feature] +

0 commit comments

Comments
 (0)