diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2022-03-03 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2022-03-04 16:57:34 +0100 |
| commit | b6f845f22524c161d94ab37d630086780c4aabc1 (patch) | |
| tree | 0b8768f0ac1ef0ee26fb25d10b14495f082d058b /compiler/rustc_codegen_llvm/src | |
| parent | 725c11ef3c6a40e7d9a7c9a8ea65f72b9448d1e0 (diff) | |
| download | rust-b6f845f22524c161d94ab37d630086780c4aabc1.tar.gz rust-b6f845f22524c161d94ab37d630086780c4aabc1.zip | |
Use SmallStr when building target-features LLVM attribute
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/attributes.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/attributes.rs b/compiler/rustc_codegen_llvm/src/attributes.rs index 6fd836946ff..31117e1c11f 100644 --- a/compiler/rustc_codegen_llvm/src/attributes.rs +++ b/compiler/rustc_codegen_llvm/src/attributes.rs @@ -1,6 +1,7 @@ //! Set and unset common attributes on LLVM values. use rustc_codegen_ssa::traits::*; +use rustc_data_structures::small_str::SmallStr; use rustc_hir::def_id::DefId; use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrFlags; use rustc_middle::ty::{self, TyCtxt}; @@ -382,7 +383,7 @@ pub fn from_fn_attrs<'ll, 'tcx>( let val = global_features .chain(function_features.iter().map(|s| &s[..])) .intersperse(",") - .collect::<String>(); + .collect::<SmallStr<1024>>(); to_add.push(llvm::CreateAttrStringValue(cx.llcx, "target-features", &val)); } |
