lto: Rename Disabled to Never to reduce confusion
Having different name from the underlying property is confusing...
Test: build
Change-Id: Ia24b664d6cded68abed2966455193f0e20757e06
diff --git a/cc/lto.go b/cc/lto.go
index 3e1acdf..acdc767 100644
--- a/cc/lto.go
+++ b/cc/lto.go
@@ -133,7 +133,7 @@
// Can be called with a null receiver
func (lto *lto) LTO() bool {
- if lto == nil || lto.Disabled() {
+ if lto == nil || lto.Never() {
return false
}
@@ -146,7 +146,7 @@
func (lto *lto) ThinLTO() bool {
if Bool(lto.Properties.GlobalThin) {
- if !lto.Disabled() && !lto.FullLTO() {
+ if !lto.Never() && !lto.FullLTO() {
return true
}
}
@@ -155,8 +155,8 @@
}
// Is lto.never explicitly set to true?
-func (lto *lto) Disabled() bool {
- return lto.Properties.Lto.Never != nil && *lto.Properties.Lto.Never
+func (lto *lto) Never() bool {
+ return Bool(lto.Properties.Lto.Never)
}
// Propagate lto requirements down from binaries
@@ -184,7 +184,7 @@
}
if dep, ok := dep.(*Module); ok && dep.lto != nil &&
- !dep.lto.Disabled() {
+ !dep.lto.Never() {
if full && !dep.lto.FullLTO() {
dep.lto.Properties.FullDep = true
}