File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
compiler/rustc_target/src/spec Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1413,6 +1413,20 @@ pub enum FramePointer {
1413
1413
MayOmit ,
1414
1414
}
1415
1415
1416
+ impl FramePointer {
1417
+ /// It is intended that the "force frame pointer" transition is "one way"
1418
+ /// so this convenience assures such if used
1419
+ #[ inline]
1420
+ pub fn ratchet ( & mut self , rhs : FramePointer ) -> FramePointer {
1421
+ * self = match ( * self , rhs) {
1422
+ ( FramePointer :: Always , _) | ( _, FramePointer :: Always ) => FramePointer :: Always ,
1423
+ ( FramePointer :: NonLeaf , _) | ( _, FramePointer :: NonLeaf ) => FramePointer :: NonLeaf ,
1424
+ _ => FramePointer :: MayOmit ,
1425
+ } ;
1426
+ * self
1427
+ }
1428
+ }
1429
+
1416
1430
impl FromStr for FramePointer {
1417
1431
type Err = ( ) ;
1418
1432
fn from_str ( s : & str ) -> Result < Self , ( ) > {
You can’t perform that action at this time.
0 commit comments