Skip to content

Commit f53670b

Browse files
committed
Move _SWIFT_ATTR_SUPPORTS_MACROS to the right place
1 parent 688dd23 commit f53670b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -622,11 +622,6 @@ void importer::getNormalInvocationArguments(
622622
if (clangSupportsPragmaAttributeWithSwiftAttr())
623623
invocationArgStrs.push_back("-D__SWIFT_ATTR_SUPPORTS_SENDABLE_DECLS=1");
624624

625-
// Indicate that the compiler will respect macros applied to imported
626-
// declarations via '__attribute__((swift_attr("@...")))'.
627-
if (LangOpts.hasFeature(Feature::MacrosOnImports))
628-
invocationArgStrs.push_back("-D__SWIFT_ATTR_SUPPORTS_MACROS=1");
629-
630625
if (triple.isXROS()) {
631626
// FIXME: This is a gnarly hack until some macros get adjusted in the SDK.
632627
invocationArgStrs.insert(invocationArgStrs.end(), {
@@ -688,6 +683,11 @@ void importer::getNormalInvocationArguments(
688683
if (LangOpts.hasFeature(Feature::SendingArgsAndResults))
689684
invocationArgStrs.push_back("-D__SWIFT_ATTR_SUPPORTS_SENDING=1");
690685

686+
// Indicate that the compiler will respect macros applied to imported
687+
// declarations via '__attribute__((swift_attr("@...")))'.
688+
if (LangOpts.hasFeature(Feature::MacrosOnImports))
689+
invocationArgStrs.push_back("-D__SWIFT_ATTR_SUPPORTS_MACROS=1");
690+
691691
if (searchPathOpts.getSDKPath().empty()) {
692692
invocationArgStrs.push_back("-Xclang");
693693
invocationArgStrs.push_back("-nostdsysteminc");

0 commit comments

Comments
 (0)