[llvm] [Utils] Remove redundant calls to std::unique_ptr<T>::get (NFC) (PR #139352)
via llvm-commits
llvm-commits at lists.llvm.org
Fri May 9 21:42:06 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/139352.diff
2 Files Affected:
- (modified) llvm/lib/Transforms/Utils/CloneFunction.cpp (+1-1)
- (modified) llvm/lib/Transforms/Utils/InlineFunction.cpp (+1-1)
``````````diff
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index 7b3e0729f5a74..0e0c012a9d676 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -44,7 +44,7 @@ using namespace llvm;
STATISTIC(RemappedAtomMax, "Highest global NextAtomGroup (after mapping)");
void llvm::mapAtomInstance(const DebugLoc &DL, ValueToValueMapTy &VMap) {
- auto CurGroup = DL.get()->getAtomGroup();
+ auto CurGroup = DL->getAtomGroup();
if (!CurGroup)
return;
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index 24121465530cd..b4aae88819e5b 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -1835,7 +1835,7 @@ static void fixupLineNumbers(Function *Fn, Function::iterator FI,
// not-nodebug instructions. FIXME: Possibly worth transferring/generating
// an atom for the returned value, otherwise we miss stepping on inlined
// nodebug functions (which is different to existing behaviour).
- DebugLoc TheCallDL = TheCall->getDebugLoc().get()->getWithoutAtom();
+ DebugLoc TheCallDL = TheCall->getDebugLoc()->getWithoutAtom();
auto &Ctx = Fn->getContext();
DILocation *InlinedAtNode = TheCallDL;
``````````
</details>
https://github.com/llvm/llvm-project/pull/139352
More information about the llvm-commits
mailing list