about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-07 00:04:02 +0000
committerbors <bors@rust-lang.org>2024-03-07 00:04:02 +0000
commitd03b986db1f4146b58078c9dde5b0fa6d808f031 (patch)
treeef91b65adefe2107711823fff9abbcb37e648745 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parent7d3702e472b99be0f5de6608dd87af1df8f99428 (diff)
parent5642b0418667b4d4db1faa35b3b60f67b7fb644d (diff)
downloadrust-d03b986db1f4146b58078c9dde5b0fa6d808f031.tar.gz
rust-d03b986db1f4146b58078c9dde5b0fa6d808f031.zip
Auto merge of #122117 - matthiaskrgr:rollup-3yrv3j6, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #122015 (Add better explanation for `rustc_index::IndexVec`)
 - #122061 (Clarify FatalErrorHandler)
 - #122062 (Explicitly assign constructed C++ classes)
 - #122072 (Refer to "slice" instead of "vector" in Ord and PartialOrd trait impl of slices)
 - #122088 (Remove unnecessary fixme on new thread stack size)
 - #122094 (Remove outdated footnote "missing-stack-probe" in platform-support)
 - #122107 (Temporarily make allow-by-default the `non_local_definitions` lint)
 - #122109 (compiletest: Add a `//@ needs-threads` directive)

Failed merges:

 - #122104 (Rust is a proper name: rust → Rust)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
index 627be997513..60789b07e54 100644
--- a/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
@@ -120,7 +120,7 @@ extern "C" void LLVMRustCoverageWriteFilenamesSectionToBuffer(
   }
   auto FilenamesWriter =
       coverage::CoverageFilenamesSectionWriter(ArrayRef<std::string>(FilenameRefs));
-  RawRustStringOstream OS(BufferOut);
+  auto OS = RawRustStringOstream(BufferOut);
   FilenamesWriter.write(OS);
 }
 
@@ -160,7 +160,7 @@ extern "C" void LLVMRustCoverageWriteMappingToBuffer(
       ArrayRef<unsigned>(VirtualFileMappingIDs, NumVirtualFileMappingIDs),
       Expressions,
       MappingRegions);
-  RawRustStringOstream OS(BufferOut);
+  auto OS = RawRustStringOstream(BufferOut);
   CoverageMappingWriter.write(OS);
 }
 
@@ -168,23 +168,23 @@ extern "C" LLVMValueRef LLVMRustCoverageCreatePGOFuncNameVar(
     LLVMValueRef F,
     const char *FuncName,
     size_t FuncNameLen) {
-  StringRef FuncNameRef(FuncName, FuncNameLen);
+  auto FuncNameRef = StringRef(FuncName, FuncNameLen);
   return wrap(createPGOFuncNameVar(*cast<Function>(unwrap(F)), FuncNameRef));
 }
 
 extern "C" uint64_t LLVMRustCoverageHashByteArray(
     const char *Bytes,
     size_t NumBytes) {
-  StringRef StrRef(Bytes, NumBytes);
+  auto StrRef = StringRef(Bytes, NumBytes);
   return IndexedInstrProf::ComputeHash(StrRef);
 }
 
 static void WriteSectionNameToString(LLVMModuleRef M,
                                      InstrProfSectKind SK,
                                      RustStringRef Str) {
-  Triple TargetTriple(unwrap(M)->getTargetTriple());
+  auto TargetTriple = Triple(unwrap(M)->getTargetTriple());
   auto name = getInstrProfSectionName(SK, TargetTriple.getObjectFormat());
-  RawRustStringOstream OS(Str);
+  auto OS = RawRustStringOstream(Str);
   OS << name;
 }
 
@@ -200,7 +200,7 @@ extern "C" void LLVMRustCoverageWriteFuncSectionNameToString(LLVMModuleRef M,
 
 extern "C" void LLVMRustCoverageWriteMappingVarNameToString(RustStringRef Str) {
   auto name = getCoverageMappingVarName();
-  RawRustStringOstream OS(Str);
+  auto OS = RawRustStringOstream(Str);
   OS << name;
 }