[llvm] 6e4f501 - [Utils] Remove redundant calls to std::unique_ptr<T>::get (NFC) (#139352)
via llvm-commits
llvm-commits at lists.llvm.org
Sat May 10 07:27:32 PDT 2025
Author: Kazu Hirata
Date: 2025-05-10T07:27:29-07:00
New Revision: 6e4f501b1b67b9d45cbf97b959d43e776983b9c6
URL: https://github.com/llvm/llvm-project/commit/6e4f501b1b67b9d45cbf97b959d43e776983b9c6
DIFF: https://github.com/llvm/llvm-project/commit/6e4f501b1b67b9d45cbf97b959d43e776983b9c6.diff
LOG: [Utils] Remove redundant calls to std::unique_ptr<T>::get (NFC) (#139352)
Added:
Modified:
llvm/lib/Transforms/Utils/CloneFunction.cpp
llvm/lib/Transforms/Utils/InlineFunction.cpp
Removed:
################################################################################
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
diff erent to existing behaviour).
- DebugLoc TheCallDL = TheCall->getDebugLoc().get()->getWithoutAtom();
+ DebugLoc TheCallDL = TheCall->getDebugLoc()->getWithoutAtom();
auto &Ctx = Fn->getContext();
DILocation *InlinedAtNode = TheCallDL;
More information about the llvm-commits
mailing list