-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[NFC][LLVM] Apply std::move to object being pushed back in findSymbolCommon #135290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NFC][LLVM] Apply std::move to object being pushed back in findSymbolCommon #135290
Conversation
…Common Static analysis found that we could move LineInfo into the Result vector instead of just copying it.
@llvm/pr-subscribers-debuginfo @llvm/pr-subscribers-llvm-binary-utilities Author: Shafik Yaghmour (shafik) ChangesStatic analysis found that we could move LineInfo into the Result vector instead of just copying it. Full diff: https://github.com/llvm/llvm-project/pull/135290.diff 1 Files Affected:
diff --git a/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp b/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
index b96f97a159243..d154f16f272bd 100644
--- a/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
+++ b/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
@@ -257,7 +257,7 @@ LLVMSymbolizer::findSymbolCommon(const T &ModuleSpecifier, StringRef Symbol,
if (LineInfo.FileName != DILineInfo::BadString) {
if (Opts.Demangle)
LineInfo.FunctionName = DemangleName(LineInfo.FunctionName, Info);
- Result.push_back(LineInfo);
+ Result.push_back(std::move(LineInfo));
}
}
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/20065 Here is the relevant piece of the build log for the reference
|
* origin/main: [mlir][vector] Prevent folding non memref-type gather into maskedload (llvm#135371) [mlir][SMT] remove custom forall/exists builder because of asan memory leak [bazel] Fix a typo (llvm#135460) [bazel] Add support for SMT Dialect (llvm#135454) [clang] ASTImporter: fix SubstNonTypeTemplateParmExpr source location (llvm#135450) [RISCV] Don't fold offsets into auipc if offset is larger than the reference global variable. (llvm#135297) [gn] port d1fd977 [NFC][LLVM] Apply std::move to object being pushed back in findSymbolCommon (llvm#135290) [AMDGPU] Teach iterative schedulers about IGLP (llvm#134953)
Failure does not look related and subsequent builds look good. So maybe a flaky test. |
…Common (llvm#135290) Static analysis found that we could move LineInfo into the Result vector instead of just copying it.
Static analysis found that we could move LineInfo into the Result vector instead of just copying it.