diff options
| author | bors <bors@rust-lang.org> | 2024-10-17 19:33:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-17 19:33:39 +0000 |
| commit | 3ed6e3cc69857129c1d314daec00119ff47986ed (patch) | |
| tree | 9421deb43c8926a7e1fc9773eb0f731de2c1b2f9 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 86bd45979a964678b40b79156744f0057759d840 (diff) | |
| parent | c9f3a7de1ec2d33043275854a4564c4dafad93ca (diff) | |
| download | rust-3ed6e3cc69857129c1d314daec00119ff47986ed.tar.gz rust-3ed6e3cc69857129c1d314daec00119ff47986ed.zip | |
Auto merge of #131848 - matthiaskrgr:rollup-l29a75j, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #129620 (Provide a more convinient way of developing rustc on NixOS) - #131805 (rustc_llvm: Fix flattened CLI args) - #131818 (Enable XRay instrumentation for LoongArch Linux targets) - #131825 (SolverDelegate add assoc type for Infcx) - #131833 (Add `must_use` to `CommandExt::exec`) - #131835 (Do not run test where it cannot run) - #131844 (Add mailmap entry for kobzol) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 8f0b1b81276..4b303511dbc 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -490,13 +490,13 @@ extern "C" LLVMTargetMachineRef LLVMRustCreateTargetMachine( assert(ArgsCstrBuff[ArgsCstrBuffLen - 1] == '\0'); auto Arg0 = std::string(ArgsCstrBuff); buffer_offset = Arg0.size() + 1; - auto ArgsCppStr = - std::string(ArgsCstrBuff + buffer_offset, ArgsCstrBuffLen - 1); + auto ArgsCppStr = std::string(ArgsCstrBuff + buffer_offset, + ArgsCstrBuffLen - buffer_offset); auto i = 0; while (i != std::string::npos) { i = ArgsCppStr.find('\0', i + 1); if (i != std::string::npos) - ArgsCppStr.replace(i, i + 1, " "); + ArgsCppStr.replace(i, 1, " "); } Options.MCOptions.Argv0 = Arg0; Options.MCOptions.CommandlineArgs = ArgsCppStr; |
