Convert getFdoProfilePathFromDep and addStubDependencyProviders to use
ModuleProxy.
Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: If06de5f852e6e4574ce0e383ba0bc4fc3508b4b4
diff --git a/cc/afdo.go b/cc/afdo.go
index 03dc271..828e494 100644
--- a/cc/afdo.go
+++ b/cc/afdo.go
@@ -65,8 +65,8 @@
}
func getFdoProfilePathFromDep(ctx ModuleContext) string {
- fdoProfileDeps := ctx.GetDirectDepsWithTag(FdoProfileTag)
- if len(fdoProfileDeps) > 0 && fdoProfileDeps[0] != nil {
+ fdoProfileDeps := ctx.GetDirectDepsProxyWithTag(FdoProfileTag)
+ if len(fdoProfileDeps) > 0 {
if info, ok := android.OtherModuleProvider(ctx, fdoProfileDeps[0], FdoProfileProvider); ok {
return info.Path.String()
}