[llvm] Reformat code due to an strict order of evaluation in C++17 (PR #89472)

Isaac David via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 19 16:21:48 PDT 2024


https://github.com/orion160 created https://github.com/llvm/llvm-project/pull/89472

current LLVM_REQUIRED_CXX_STANDARD=17

>From bf63f0eff151e970980eaf59215fdbd3421fd9a9 Mon Sep 17 00:00:00 2001
From: orion <idbl64 at outlook.com>
Date: Fri, 19 Apr 2024 17:59:27 -0500
Subject: [PATCH] Reformat code due to an strict order of evaluation in C++17
 (LLVM_REQUIRED_CXX_STANDARD=17)

---
 llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h b/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h
index e5d05e6b1b7bfc..f9aa73f51468c9 100644
--- a/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h
+++ b/llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h
@@ -115,13 +115,7 @@ template <typename LinkerImpl> class JITLinker : public JITLinkerBase {
 
     // Ownership of the linker is passed into the linker's doLink function to
     // allow it to be passed on to async continuations.
-    //
-    // FIXME: Remove LTmp once we have c++17.
-    // C++17 sequencing rules guarantee that function name expressions are
-    // sequenced before arguments, so L->linkPhase1(std::move(L), ...) will be
-    // well formed.
-    auto &LTmp = *L;
-    LTmp.linkPhase1(std::move(L));
+    L->linkPhase1(std::move(L));
   }
 
 private:



More information about the llvm-commits mailing list