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 | 272b5247eb1b7e7c3784b24a0dc9dc996527b0fc (patch) | |
tree | 2b58bb5e251c7220216e479d86bd230b45a880e5 /lib/Frontend/CompilerInvocation.cpp | |
parent | f9ea87c3e3ab0d6772b1c16a0f5734dc29791724 (diff) | |
download | clang-272b5247eb1b7e7c3784b24a0dc9dc996527b0fc.tar.gz |
[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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369719 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index c0539cda11..c45b751713 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/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: |