Use android.InList for inList
Remove duplicate implementations of inList.
Test: m checkbuild
Change-Id: I6943b95f6d47e6722b9ff1ab61ab14c429fe33a0
diff --git a/cc/config/toolchain.go b/cc/config/toolchain.go
index 796ccfb..471db1d 100644
--- a/cc/config/toolchain.go
+++ b/cc/config/toolchain.go
@@ -199,20 +199,6 @@
return list
}
-func indexList(s string, list []string) int {
- for i, l := range list {
- if l == s {
- return i
- }
- }
-
- return -1
-}
-
-func inList(s string, list []string) bool {
- return indexList(s, list) != -1
-}
-
func SanitizerRuntimeLibrary(t Toolchain, sanitizer string) string {
arch := t.SanitizerRuntimeLibraryArch()
if arch == "" {
@@ -243,3 +229,5 @@
}
return filepath.Join(t.GccRoot(), t.GccTriple(), "bin")
}
+
+var inList = android.InList