diff options
| author | Jubilee Young <workingjubilee@gmail.com> | 2024-05-04 16:19:42 -0700 |
|---|---|---|
| committer | Jubilee Young <workingjubilee@gmail.com> | 2024-06-23 00:36:33 -0700 |
| commit | b3a1975cdc82753ef51a784c91b3b5f9a6997054 (patch) | |
| tree | 29b54642ba9ec55431bc3388dd861155c8fa89fa /compiler/rustc_codegen_llvm/src/attributes.rs | |
| parent | 7c0b5cf99fc8c0f575d6e6304d4b3fc247beb298 (diff) | |
| download | rust-b3a1975cdc82753ef51a784c91b3b5f9a6997054.tar.gz rust-b3a1975cdc82753ef51a784c91b3b5f9a6997054.zip | |
compiler(nfc): -Cforce-frame-pointers is a FramePointer
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/attributes.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/attributes.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/attributes.rs b/compiler/rustc_codegen_llvm/src/attributes.rs index 870e5ab3296..48693895da1 100644 --- a/compiler/rustc_codegen_llvm/src/attributes.rs +++ b/compiler/rustc_codegen_llvm/src/attributes.rs @@ -108,9 +108,10 @@ pub fn frame_pointer_type_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> Option<&'ll Attr let opts = &cx.sess().opts; // "mcount" function relies on stack pointer. // See <https://sourceware.org/binutils/docs/gprof/Implementation.html>. - if opts.unstable_opts.instrument_mcount || matches!(opts.cg.force_frame_pointers, Some(true)) { - fp = FramePointer::Always; + if opts.unstable_opts.instrument_mcount { + fp.ratchet(FramePointer::Always); } + fp.ratchet(opts.cg.force_frame_pointers); let attr_value = match fp { FramePointer::Always => "all", FramePointer::NonLeaf => "non-leaf", |
