Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dllexport_decl for generated default instance. #13085

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/google/protobuf/compiler/cpp/file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ void FileGenerator::GenerateSourceDefaultInstance(int idx, io::Printer* p) {
};
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT$dllexport_decl $
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const $type$ $name$;
)cc");
}
Expand Down Expand Up @@ -590,7 +590,7 @@ void FileGenerator::GenerateSourceDefaultInstance(int idx, io::Printer* p) {
};
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT$dllexport_decl $
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 $type$ $name$;
)cc");
} else {
Expand All @@ -609,7 +609,7 @@ void FileGenerator::GenerateSourceDefaultInstance(int idx, io::Printer* p) {
};
};

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT$dllexport_decl $
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 $type$ $name$;
)cc");
}
Expand Down