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 {
13851385 MayOmit ,
13861386}
13871387
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+
13881402impl FromStr for FramePointer {
13891403 type Err = ( ) ;
13901404 fn from_str ( s : & str ) -> Result < Self , ( ) > {
You can’t perform that action at this time.
0 commit comments