diff options
author | Puyan Lotfi <puyan@puyan.org> | 2019-08-22 23:44:34 +0000 |
---|---|---|
committer | Puyan Lotfi <puyan@puyan.org> | 2019-08-22 23:44:34 +0000 |
commit | 926f4f76c3f819d5c8441574c560ddc476f84722 (patch) | |
tree | 962e13e6dd9fdbd9d61c0ad9035e485f387be4cf /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 83f533349137d47fec057f944cf06c7b396edfca (diff) | |
download | llvm-926f4f76c3f819d5c8441574c560ddc476f84722.zip llvm-926f4f76c3f819d5c8441574c560ddc476f84722.tar.gz llvm-926f4f76c3f819d5c8441574c560ddc476f84722.tar.bz2 |
[clang][ifs] Dropping older experimental interface stub formats.
I've been working on a new tool, llvm-ifs, for merging interface stub files
generated by clang and I've iterated on my derivative format of TBE to a newer
format. llvm-ifs will only support the new format, so I am going to drop the
older experimental interface stubs formats in this commit to make things
simpler.
Differential Revision: https://reviews.llvm.org/D66573
llvm-svn: 369719
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index c0539cd..c45b751 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1728,25 +1728,28 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args, case OPT_emit_pch: Opts.ProgramAction = frontend::GeneratePCH; break; case OPT_emit_iterface_stubs: { + StringRef ArgStr = + Args.hasArg(OPT_iterface_stub_version_EQ) + ? Args.getLastArgValue(OPT_iterface_stub_version_EQ) + : ""; llvm::Optional<frontend::ActionKind> ProgramAction = - llvm::StringSwitch<llvm::Optional<frontend::ActionKind>>( - Args.hasArg(OPT_iterface_stub_version_EQ) - ? Args.getLastArgValue(OPT_iterface_stub_version_EQ) - : "") - .Case("experimental-yaml-elf-v1", - frontend::GenerateInterfaceYAMLExpV1) - .Case("experimental-tapi-elf-v1", - frontend::GenerateInterfaceTBEExpV1) - .Case("experimental-ifs-v1", - frontend::GenerateInterfaceIfsExpV1) + llvm::StringSwitch<llvm::Optional<frontend::ActionKind>>(ArgStr) + .Case("experimental-ifs-v1", frontend::GenerateInterfaceIfsExpV1) .Default(llvm::None); - if (!ProgramAction) + if (!ProgramAction) { + std::string ErrorMessage = + "Invalid interface stub format: " + ArgStr.str() + + ((ArgStr == "experimental-yaml-elf-v1" || + ArgStr == "experimental-tapi-elf-v1") + ? " is deprecated." + : "."); Diags.Report(diag::err_drv_invalid_value) - << "Must specify a valid interface stub format type using " - << "-interface-stub-version=<experimental-tapi-elf-v1 | " - "experimental-ifs-v1 | " - "experimental-yaml-elf-v1>"; - Opts.ProgramAction = *ProgramAction; + << "Must specify a valid interface stub format type, ie: " + "-interface-stub-version=experimental-ifs-v1" + << ErrorMessage; + } else { + Opts.ProgramAction = *ProgramAction; + } break; } case OPT_init_only: @@ -3186,8 +3189,6 @@ static bool isStrictlyPreprocessorAction(frontend::ActionKind Action) { case frontend::GenerateModuleInterface: case frontend::GenerateHeaderModule: case frontend::GeneratePCH: - case frontend::GenerateInterfaceYAMLExpV1: - case frontend::GenerateInterfaceTBEExpV1: case frontend::GenerateInterfaceIfsExpV1: case frontend::ParseSyntaxOnly: case frontend::ModuleFileInfo: |