Add dllexport_decl for generated default instance.

pull/13085/head
owent 2 years ago
parent f450ce2868
commit a46d4e81c2
No known key found for this signature in database
GPG Key ID: D47669FAAFD65E89
  1. 6
      src/google/protobuf/compiler/cpp/file.cc

@ -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");
}
@ -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 {
@ -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");
}

Loading…
Cancel
Save