@@ -67,27 +67,27 @@ pub fn naked(val: ValueRef, is_naked: bool) {
6767 Attribute :: Naked . toggle_llfn ( Function , val, is_naked) ;
6868}
6969
70- pub fn set_frame_pointer_elimination ( ccx : & CodegenCx , llfn : ValueRef ) {
70+ pub fn set_frame_pointer_elimination ( cx : & CodegenCx , llfn : ValueRef ) {
7171 // FIXME: #11906: Omitting frame pointers breaks retrieving the value of a
7272 // parameter.
73- if ccx . sess ( ) . must_not_eliminate_frame_pointers ( ) {
73+ if cx . sess ( ) . must_not_eliminate_frame_pointers ( ) {
7474 llvm:: AddFunctionAttrStringValue (
7575 llfn, llvm:: AttributePlace :: Function ,
7676 cstr ( "no-frame-pointer-elim\0 " ) , cstr ( "true\0 " ) ) ;
7777 }
7878}
7979
80- pub fn set_probestack ( ccx : & CodegenCx , llfn : ValueRef ) {
80+ pub fn set_probestack ( cx : & CodegenCx , llfn : ValueRef ) {
8181 // Only use stack probes if the target specification indicates that we
8282 // should be using stack probes
83- if !ccx . sess ( ) . target . target . options . stack_probes {
83+ if !cx . sess ( ) . target . target . options . stack_probes {
8484 return
8585 }
8686
8787 // Currently stack probes seem somewhat incompatible with the address
8888 // sanitizer. With asan we're already protected from stack overflow anyway
8989 // so we don't really need stack probes regardless.
90- match ccx . sess ( ) . opts . debugging_opts . sanitizer {
90+ match cx . sess ( ) . opts . debugging_opts . sanitizer {
9191 Some ( Sanitizer :: Address ) => return ,
9292 _ => { }
9393 }
@@ -101,13 +101,13 @@ pub fn set_probestack(ccx: &CodegenCx, llfn: ValueRef) {
101101
102102/// Composite function which sets LLVM attributes for function depending on its AST (#[attribute])
103103/// attributes.
104- pub fn from_fn_attrs ( ccx : & CodegenCx , llfn : ValueRef , id : DefId ) {
104+ pub fn from_fn_attrs ( cx : & CodegenCx , llfn : ValueRef , id : DefId ) {
105105 use syntax:: attr:: * ;
106- let attrs = ccx . tcx . get_attrs ( id) ;
107- inline ( llfn, find_inline_attr ( Some ( ccx . sess ( ) . diagnostic ( ) ) , & attrs) ) ;
106+ let attrs = cx . tcx . get_attrs ( id) ;
107+ inline ( llfn, find_inline_attr ( Some ( cx . sess ( ) . diagnostic ( ) ) , & attrs) ) ;
108108
109- set_frame_pointer_elimination ( ccx , llfn) ;
110- set_probestack ( ccx , llfn) ;
109+ set_frame_pointer_elimination ( cx , llfn) ;
110+ set_probestack ( cx , llfn) ;
111111
112112 for attr in attrs. iter ( ) {
113113 if attr. check_name ( "cold" ) {
@@ -124,7 +124,7 @@ pub fn from_fn_attrs(ccx: &CodegenCx, llfn: ValueRef, id: DefId) {
124124 }
125125 }
126126
127- let target_features = ccx . tcx . target_features_enabled ( id) ;
127+ let target_features = cx . tcx . target_features_enabled ( id) ;
128128 if !target_features. is_empty ( ) {
129129 let val = CString :: new ( target_features. join ( "," ) ) . unwrap ( ) ;
130130 llvm:: AddFunctionAttrStringValue (
0 commit comments