From d24184591fb7223fe6fea724be901ee501bf1cc3 Mon Sep 17 00:00:00 2001 From: Puyan Lotfi Date: Thu, 22 Aug 2019 23:29:22 +0000 Subject: [clang][ifs] New interface stubs format (llvm triple based). After posting llvm-ifs on phabricator, I made some progress in hardening up how I think the format for Interface Stubs should look. There are a number of things I think the TBE format was missing (no endianness, no info about the Object Format because it assumes ELF), so I have added those and broken off from being as similar to the TBE schema. In a subsequent commit I can drop the other formats. An example of how The format will look is as follows: --- !experimental-ifs-v1 IfsVersion: 1.0 Triple: x86_64-unknown-linux-gnu ObjectFileFormat: ELF Symbols: _Z9nothiddenv: { Type: Func } _Z10cmdVisiblev: { Type: Func } ... The format is still marked experimental. Differential Revision: https://reviews.llvm.org/D66446 llvm-svn: 369715 --- clang/lib/Frontend/CompilerInvocation.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 66684e5c961..c0539cda110 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1737,11 +1737,14 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args, frontend::GenerateInterfaceYAMLExpV1) .Case("experimental-tapi-elf-v1", frontend::GenerateInterfaceTBEExpV1) + .Case("experimental-ifs-v1", + frontend::GenerateInterfaceIfsExpV1) .Default(llvm::None); if (!ProgramAction) Diags.Report(diag::err_drv_invalid_value) << "Must specify a valid interface stub format type using " << "-interface-stub-version="; Opts.ProgramAction = *ProgramAction; break; @@ -3185,6 +3188,7 @@ static bool isStrictlyPreprocessorAction(frontend::ActionKind Action) { case frontend::GeneratePCH: case frontend::GenerateInterfaceYAMLExpV1: case frontend::GenerateInterfaceTBEExpV1: + case frontend::GenerateInterfaceIfsExpV1: case frontend::ParseSyntaxOnly: case frontend::ModuleFileInfo: case frontend::VerifyPCH: -- cgit v1.2.3