We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents efaa06f + 726ce35 commit bf931cfCopy full SHA for bf931cf
lib/IRGen/IRGenModule.cpp
@@ -1570,6 +1570,16 @@ bool IRGenModule::finalize() {
1570
DebugInfo->finalize();
1571
cleanupClangCodeGenMetadata();
1572
1573
+ // Clean up DSOLocal & DLLImport attributes, they cannot be applied together.
1574
+ // The imported declarations are marked as DSO local by default.
1575
+ for (auto &GV : Module.globals())
1576
+ if (GV.hasDLLImportStorageClass())
1577
+ GV.setDSOLocal(false);
1578
+
1579
+ for (auto &F : Module.functions())
1580
+ if (F.hasDLLImportStorageClass())
1581
+ F.setDSOLocal(false);
1582
1583
return true;
1584
}
1585
0 commit comments