1
Fork 0

regroup LinkerPluginLto blocks

This commit is contained in:
Rémy Rakic 2023-06-21 17:54:27 +00:00
parent 5ea0f63733
commit 5bc887020b

View file

@ -201,6 +201,15 @@ pub enum LinkerPluginLto {
Disabled,
}
impl LinkerPluginLto {
pub fn enabled(&self) -> bool {
match *self {
LinkerPluginLto::LinkerPlugin(_) | LinkerPluginLto::LinkerPluginAuto => true,
LinkerPluginLto::Disabled => false,
}
}
}
/// Used with `-Z assert-incr-state`.
#[derive(Clone, Copy, PartialEq, Hash, Debug)]
pub enum IncrementalStateAssertion {
@ -213,15 +222,6 @@ pub enum IncrementalStateAssertion {
NotLoaded,
}
impl LinkerPluginLto {
pub fn enabled(&self) -> bool {
match *self {
LinkerPluginLto::LinkerPlugin(_) | LinkerPluginLto::LinkerPluginAuto => true,
LinkerPluginLto::Disabled => false,
}
}
}
/// The different settings that can be enabled via the `-Z location-detail` flag.
#[derive(Copy, Clone, PartialEq, Hash, Debug)]
pub struct LocationDetail {