From: Kazu Hirata Date: Sun, 16 Apr 2023 16:42:34 +0000 (-0700) Subject: [llvm] Remove redundant string initialization (NFC) X-Git-Tag: upstream/17.0.6~11448 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=282d114c21bfe5292db659579a944403bec345a2;p=platform%2Fupstream%2Fllvm.git [llvm] Remove redundant string initialization (NFC) Identified with readability-redundant-string-init. --- diff --git a/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h b/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h index acf91a2..f9ccad0 100644 --- a/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h +++ b/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h @@ -170,8 +170,7 @@ struct TargetRegionEntryInfo { unsigned Line; unsigned Count; - TargetRegionEntryInfo() - : ParentName(""), DeviceID(0), FileID(0), Line(0), Count(0) {} + TargetRegionEntryInfo() : DeviceID(0), FileID(0), Line(0), Count(0) {} TargetRegionEntryInfo(StringRef ParentName, unsigned DeviceID, unsigned FileID, unsigned Line, unsigned Count = 0) : ParentName(ParentName), DeviceID(DeviceID), FileID(FileID), Line(Line), diff --git a/llvm/lib/DebugInfo/LogicalView/Core/LVLocation.cpp b/llvm/lib/DebugInfo/LogicalView/Core/LVLocation.cpp index e11e56c..954ac04 100644 --- a/llvm/lib/DebugInfo/LogicalView/Core/LVLocation.cpp +++ b/llvm/lib/DebugInfo/LogicalView/Core/LVLocation.cpp @@ -659,7 +659,7 @@ void LVLocationSymbol::printExtra(raw_ostream &OS, bool Full) const { if (Full && Entries) { bool CodeViewLocation = getParentSymbol()->getHasCodeViewLocation(); std::stringstream Stream; - std::string Leading = ""; + std::string Leading; for (LVOperation *Operation : *Entries) { Stream << Leading << (CodeViewLocation ? Operation->getOperandsCodeViewInfo() diff --git a/llvm/unittests/Target/WebAssembly/WebAssemblyExceptionInfoTest.cpp b/llvm/unittests/Target/WebAssembly/WebAssemblyExceptionInfoTest.cpp index 617ff7b..eec1cc2 100644 --- a/llvm/unittests/Target/WebAssembly/WebAssemblyExceptionInfoTest.cpp +++ b/llvm/unittests/Target/WebAssembly/WebAssemblyExceptionInfoTest.cpp @@ -23,8 +23,8 @@ namespace { std::unique_ptr createTargetMachine() { auto TT(Triple::normalize("wasm32-unknown-unknown")); - std::string CPU(""); - std::string FS(""); + std::string CPU; + std::string FS; LLVMInitializeWebAssemblyTargetInfo(); LLVMInitializeWebAssemblyTarget();