Merge "Delete unused functions"

This commit is contained in:
Treehugger Robot 2021-07-01 22:20:04 +00:00 committed by Gerrit Code Review
commit 31b9a0c9da
6 changed files with 0 additions and 57 deletions

View file

@ -525,8 +525,6 @@ type DepsContext interface {
// feature represents additional (optional) steps to building cc-related modules, such as invocation
// of clang-tidy.
type feature interface {
begin(ctx BaseModuleContext)
deps(ctx DepsContext, deps Deps) Deps
flags(ctx ModuleContext, flags Flags) Flags
props() []interface{}
}
@ -1898,21 +1896,12 @@ func (c *Module) begin(ctx BaseModuleContext) {
if c.coverage != nil {
c.coverage.begin(ctx)
}
if c.sabi != nil {
c.sabi.begin(ctx)
}
if c.vndkdep != nil {
c.vndkdep.begin(ctx)
}
if c.lto != nil {
c.lto.begin(ctx)
}
if c.pgo != nil {
c.pgo.begin(ctx)
}
for _, feature := range c.features {
feature.begin(ctx)
}
if ctx.useSdk() && c.IsSdkVariant() {
version, err := nativeApiLevelFromUser(ctx, ctx.sdkVersion())
if err != nil {
@ -1936,24 +1925,9 @@ func (c *Module) deps(ctx DepsContext) Deps {
if c.stl != nil {
deps = c.stl.deps(ctx, deps)
}
if c.sanitize != nil {
deps = c.sanitize.deps(ctx, deps)
}
if c.coverage != nil {
deps = c.coverage.deps(ctx, deps)
}
if c.sabi != nil {
deps = c.sabi.deps(ctx, deps)
}
if c.vndkdep != nil {
deps = c.vndkdep.deps(ctx, deps)
}
if c.lto != nil {
deps = c.lto.deps(ctx, deps)
}
for _, feature := range c.features {
deps = feature.deps(ctx, deps)
}
deps.WholeStaticLibs = android.LastUniqueStrings(deps.WholeStaticLibs)
deps.StaticLibs = android.LastUniqueStrings(deps.StaticLibs)

View file

@ -80,10 +80,6 @@ func (lto *lto) begin(ctx BaseModuleContext) {
}
}
func (lto *lto) deps(ctx BaseModuleContext, deps Deps) Deps {
return deps
}
func (lto *lto) useClangLld(ctx BaseModuleContext) bool {
if lto.Properties.Use_clang_lld != nil {
return Bool(lto.Properties.Use_clang_lld)

View file

@ -45,12 +45,6 @@ func (sabi *sabi) props() []interface{} {
return []interface{}{&sabi.Properties}
}
func (sabi *sabi) begin(ctx BaseModuleContext) {}
func (sabi *sabi) deps(ctx BaseModuleContext, deps Deps) Deps {
return deps
}
func (sabi *sabi) flags(ctx ModuleContext, flags Flags) Flags {
// Filter out flags which libTooling don't understand.
// This is here for legacy reasons and future-proof, in case the version of libTooling and clang

View file

@ -499,14 +499,6 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
}
}
func (sanitize *sanitize) deps(ctx BaseModuleContext, deps Deps) Deps {
if !sanitize.Properties.SanitizerEnabled { // || c.static() {
return deps
}
return deps
}
func toDisableImplicitIntegerChange(flags []string) bool {
// Returns true if any flag is fsanitize*integer, and there is
// no explicit flag about sanitize=implicit-integer-sign-change.

View file

@ -61,13 +61,6 @@ func (tidy *tidyFeature) props() []interface{} {
return []interface{}{&tidy.Properties}
}
func (tidy *tidyFeature) begin(ctx BaseModuleContext) {
}
func (tidy *tidyFeature) deps(ctx DepsContext, deps Deps) Deps {
return deps
}
func (tidy *tidyFeature) flags(ctx ModuleContext, flags Flags) Flags {
CheckBadTidyFlags(ctx, "tidy_flags", tidy.Properties.Tidy_flags)
CheckBadTidyChecks(ctx, "tidy_checks", tidy.Properties.Tidy_checks)

View file

@ -100,12 +100,6 @@ func (vndk *vndkdep) props() []interface{} {
return []interface{}{&vndk.Properties}
}
func (vndk *vndkdep) begin(ctx BaseModuleContext) {}
func (vndk *vndkdep) deps(ctx BaseModuleContext, deps Deps) Deps {
return deps
}
func (vndk *vndkdep) isVndk() bool {
return Bool(vndk.Properties.Vndk.Enabled)
}