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 @@ -1385,6 +1385,20 @@ pub enum FramePointer {
1385
1385
MayOmit ,
1386
1386
}
1387
1387
1388
+ impl FramePointer {
1389
+ /// It is intended that the "force frame pointer" transition is "one way"
1390
+ /// so this convenience assures such if used
1391
+ #[ inline]
1392
+ pub fn ratchet ( & mut self , rhs : FramePointer ) -> FramePointer {
1393
+ * self = match ( * self , rhs) {
1394
+ ( FramePointer :: Always , _) | ( _, FramePointer :: Always ) => FramePointer :: Always ,
1395
+ ( FramePointer :: NonLeaf , _) | ( _, FramePointer :: NonLeaf ) => FramePointer :: NonLeaf ,
1396
+ _ => FramePointer :: MayOmit ,
1397
+ } ;
1398
+ * self
1399
+ }
1400
+ }
1401
+
1388
1402
impl FromStr for FramePointer {
1389
1403
type Err = ( ) ;
1390
1404
fn from_str ( s : & str ) -> Result < Self , ( ) > {
You can’t perform that action at this time.
0 commit comments