[llvm] [Utils] Remove redundant calls to std::unique_ptr<T>::get (NFC) (PR #139352)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri May 9 21:41:37 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/139352
None
>From 749d64d1250a4c47974193e6e9d7549eb9365ee1 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Tue, 25 Mar 2025 00:24:37 -0700
Subject: [PATCH] [Utils] Remove redundant calls to std::unique_ptr<T>::get
(NFC)
---
llvm/lib/Transforms/Utils/CloneFunction.cpp | 2 +-
llvm/lib/Transforms/Utils/InlineFunction.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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;
More information about the llvm-commits
mailing list