Skip to content

Commit 0e06ddf

Browse files
committed
Revert "[APINotes] Upstream APINotesOptions"
This reverts commit c0a1857. A shared_ptr assertion always triggers causes all bots to fail.
1 parent 1c6c01f commit 0e06ddf

File tree

4 files changed

+0
-59
lines changed

4 files changed

+0
-59
lines changed

clang/include/clang/APINotes/APINotesOptions.h

Lines changed: 0 additions & 34 deletions
This file was deleted.

clang/include/clang/Driver/Options.td

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1733,10 +1733,6 @@ def fswift_async_fp_EQ : Joined<["-"], "fswift-async-fp=">,
17331733
NormalizedValuesScope<"CodeGenOptions::SwiftAsyncFramePointerKind">,
17341734
NormalizedValues<["Auto", "Always", "Never"]>,
17351735
MarshallingInfoEnum<CodeGenOpts<"SwiftAsyncFramePointer">, "Always">;
1736-
def fapinotes_swift_version : Joined<["-"], "fapinotes-swift-version=">,
1737-
Group<f_clang_Group>, Visibility<[ClangOption, CC1Option]>,
1738-
MetaVarName<"<version>">,
1739-
HelpText<"Specify the Swift version to use when filtering API notes">;
17401736

17411737
defm addrsig : BoolFOption<"addrsig",
17421738
CodeGenOpts<"Addrsig">, DefaultFalse,
@@ -4133,9 +4129,6 @@ def ibuiltininc : Flag<["-"], "ibuiltininc">, Group<clang_i_Group>,
41334129
def index_header_map : Flag<["-"], "index-header-map">,
41344130
Visibility<[ClangOption, CC1Option]>,
41354131
HelpText<"Make the next included directory (-I or -F) an indexer header map">;
4136-
def iapinotes_modules : JoinedOrSeparate<["-"], "iapinotes-modules">, Group<clang_i_Group>,
4137-
Visibility<[ClangOption, CC1Option]>,
4138-
HelpText<"Add directory to the API notes search path referenced by module name">, MetaVarName<"<directory>">;
41394132
def idirafter : JoinedOrSeparate<["-"], "idirafter">, Group<clang_i_Group>,
41404133
Visibility<[ClangOption, CC1Option]>,
41414134
HelpText<"Add directory to AFTER include search path">;

clang/include/clang/Frontend/CompilerInvocation.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#ifndef LLVM_CLANG_FRONTEND_COMPILERINVOCATION_H
1010
#define LLVM_CLANG_FRONTEND_COMPILERINVOCATION_H
1111

12-
#include "clang/APINotes/APINotesOptions.h"
1312
#include "clang/Basic/CodeGenOptions.h"
1413
#include "clang/Basic/DiagnosticOptions.h"
1514
#include "clang/Basic/FileSystemOptions.h"
@@ -93,9 +92,6 @@ class CompilerInvocationBase {
9392

9493
std::shared_ptr<MigratorOptions> MigratorOpts;
9594

96-
/// Options controlling API notes.
97-
std::shared_ptr<APINotesOptions> APINotesOpts;
98-
9995
/// Options controlling IRgen and the backend.
10096
std::shared_ptr<CodeGenOptions> CodeGenOpts;
10197

@@ -135,7 +131,6 @@ class CompilerInvocationBase {
135131
const PreprocessorOptions &getPreprocessorOpts() const { return *PPOpts; }
136132
const AnalyzerOptions &getAnalyzerOpts() const { return *AnalyzerOpts; }
137133
const MigratorOptions &getMigratorOpts() const { return *MigratorOpts; }
138-
const APINotesOptions &getAPINotesOpts() const { return *APINotesOpts; }
139134
const CodeGenOptions &getCodeGenOpts() const { return *CodeGenOpts; }
140135
const FileSystemOptions &getFileSystemOpts() const { return *FSOpts; }
141136
const FrontendOptions &getFrontendOpts() const { return *FrontendOpts; }
@@ -247,7 +242,6 @@ class CompilerInvocation : public CompilerInvocationBase {
247242
PreprocessorOptions &getPreprocessorOpts() { return *PPOpts; }
248243
AnalyzerOptions &getAnalyzerOpts() { return *AnalyzerOpts; }
249244
MigratorOptions &getMigratorOpts() { return *MigratorOpts; }
250-
APINotesOptions &getAPINotesOpts() { return *APINotesOpts; }
251245
CodeGenOptions &getCodeGenOpts() { return *CodeGenOpts; }
252246
FileSystemOptions &getFileSystemOpts() { return *FSOpts; }
253247
FrontendOptions &getFrontendOpts() { return *FrontendOpts; }

clang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3261,17 +3261,6 @@ static bool ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args,
32613261
return Diags.getNumErrors() == NumErrorsBefore;
32623262
}
32633263

3264-
static void ParseAPINotesArgs(APINotesOptions &Opts, ArgList &Args,
3265-
DiagnosticsEngine &diags) {
3266-
if (const Arg *A = Args.getLastArg(OPT_fapinotes_swift_version)) {
3267-
if (Opts.SwiftVersion.tryParse(A->getValue()))
3268-
diags.Report(diag::err_drv_invalid_value)
3269-
<< A->getAsString(Args) << A->getValue();
3270-
}
3271-
for (const Arg *A : Args.filtered(OPT_iapinotes_modules))
3272-
Opts.ModuleSearchPaths.push_back(A->getValue());
3273-
}
3274-
32753264
/// Check if input file kind and language standard are compatible.
32763265
static bool IsInputCompatibleWithStandard(InputKind IK,
32773266
const LangStandard &S) {
@@ -4549,7 +4538,6 @@ bool CompilerInvocation::CreateFromArgsImpl(
45494538
llvm::Triple T(Res.getTargetOpts().Triple);
45504539
ParseHeaderSearchArgs(Res.getHeaderSearchOpts(), Args, Diags,
45514540
Res.getFileSystemOpts().WorkingDir);
4552-
ParseAPINotesArgs(Res.getAPINotesOpts(), Args, Diags);
45534541

45544542
ParseLangArgs(LangOpts, Args, DashX, T, Res.getPreprocessorOpts().Includes,
45554543
Diags);

0 commit comments

Comments
 (0)