Skip to content

Commit a46d4e8

Browse files
committed
Add dllexport_decl for generated default instance.
1 parent f450ce2 commit a46d4e8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • src/google/protobuf/compiler/cpp

src/google/protobuf/compiler/cpp/file.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ void FileGenerator::GenerateSourceDefaultInstance(int idx, io::Printer* p) {
562562
};
563563
};
564564
565-
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
565+
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT$dllexport_decl $
566566
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const $type$ $name$;
567567
)cc");
568568
}
@@ -590,7 +590,7 @@ void FileGenerator::GenerateSourceDefaultInstance(int idx, io::Printer* p) {
590590
};
591591
};
592592
593-
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
593+
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT$dllexport_decl $
594594
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 $type$ $name$;
595595
)cc");
596596
} else {
@@ -609,7 +609,7 @@ void FileGenerator::GenerateSourceDefaultInstance(int idx, io::Printer* p) {
609609
};
610610
};
611611
612-
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
612+
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT$dllexport_decl $
613613
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 $type$ $name$;
614614
)cc");
615615
}

0 commit comments

Comments
 (0)