Adds implementation flag for swift (#7202)

* Adds implementation flag for swift

Forces internal flag when using @_implementationOnly in swift

Fixes access type for verifier functions & encoder functions

Updates generated code

* Addresses PR comments & adds a code gen dir within the swift tests

* Adds test case for no-include

* Fixes code gen script

Removes prefix
This commit is contained in:
mustiikhalil
2022-04-06 22:31:38 +02:00
committed by GitHub
parent 14615699fa
commit 832c618f5f
10 changed files with 234 additions and 8 deletions

View File

@@ -86,6 +86,8 @@ const static FlatCOption options[] = {
{ "", "scoped-enums", "",
"Use C++11 style scoped and strongly typed enums. Also implies "
"--no-prefix." },
{ "", "swift-implementation-only", "",
"Adds a @_implementationOnly to swift imports" },
{ "", "gen-inclues", "",
"(deprecated), this is the default behavior. If the original behavior is "
"required (no include statements) use --no-includes." },
@@ -490,6 +492,8 @@ int FlatCompiler::Compile(int argc, const char **argv) {
opts.java_checkerframework = true;
} else if (arg == "--gen-generated") {
opts.gen_generated = true;
} else if (arg == "--swift-implementation-only") {
opts.swift_implementation_only = true;
} else if (arg == "--gen-json-emit") {
opts.gen_json_coders = true;
} else if (arg == "--object-prefix") {