diff options
| author | The Miri Conjob Bot <miri@cron.bot> | 2023-08-21 05:37:04 +0000 |
|---|---|---|
| committer | The Miri Conjob Bot <miri@cron.bot> | 2023-08-21 05:37:04 +0000 |
| commit | f2fb4633f17144b3b4cb8bb3f6c13fca46333d08 (patch) | |
| tree | ebd6e31fb06e39f241b5e4ae3fac0dcca5a83711 /compiler/rustc_codegen_llvm/src | |
| parent | c05fb4cbf99eea385c4c051fbbc1f652e37a9b08 (diff) | |
| parent | c40cfcf0494ff7506e753e750adb00eeea839f9c (diff) | |
| download | rust-f2fb4633f17144b3b4cb8bb3f6c13fca46333d08.tar.gz rust-f2fb4633f17144b3b4cb8bb3f6c13fca46333d08.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/attributes.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/attributes.rs b/compiler/rustc_codegen_llvm/src/attributes.rs index 4c9094bf1f5..b6c01545f30 100644 --- a/compiler/rustc_codegen_llvm/src/attributes.rs +++ b/compiler/rustc_codegen_llvm/src/attributes.rs @@ -128,7 +128,10 @@ fn instrument_function_attr<'ll>(cx: &CodegenCx<'ll, '_>) -> SmallVec<[&'ll Attr // The function name varies on platforms. // See test/CodeGen/mcount.c in clang. - let mcount_name = cx.sess().target.mcount.as_ref(); + let mcount_name = match &cx.sess().target.llvm_mcount_intrinsic { + Some(llvm_mcount_intrinsic) => llvm_mcount_intrinsic.as_ref(), + None => cx.sess().target.mcount.as_ref(), + }; attrs.push(llvm::CreateAttrStringValue( cx.llcx, |
