[llvm] 82e177b - [ORC] Fix name shadowing issue, NFC.
via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 9 14:07:51 PST 2023
Author: bzcheeseman
Date: 2023-03-09T14:07:43-08:00
New Revision: 82e177bbde888f1dd846359a9d05665591488275
URL: https://github.com/llvm/llvm-project/commit/82e177bbde888f1dd846359a9d05665591488275
DIFF: https://github.com/llvm/llvm-project/commit/82e177bbde888f1dd846359a9d05665591488275.diff
LOG: [ORC] Fix name shadowing issue, NFC.
Testing the COFFPlatform on MSVC, a name shadowing issue surfaced where `LoadDynLibrary` inside the constructor was actually using the moved-from function argument. This patch simply renames the argument to avoid that shadowing.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D145710
Added:
Modified:
llvm/include/llvm/ExecutionEngine/Orc/COFFPlatform.h
llvm/lib/ExecutionEngine/Orc/COFFPlatform.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/COFFPlatform.h b/llvm/include/llvm/ExecutionEngine/Orc/COFFPlatform.h
index 767d336753581..969c6f0b15afc 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/COFFPlatform.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/COFFPlatform.h
@@ -138,7 +138,7 @@ class COFFPlatform : public Platform {
COFFPlatform(ExecutionSession &ES, ObjectLinkingLayer &ObjLinkingLayer,
JITDylib &PlatformJD, const char *OrcRuntimePath,
- LoadDynamicLibrary LoadDynLibrary, bool StaticVCRuntime,
+ LoadDynamicLibrary LoadDynamicLibrary, bool StaticVCRuntime,
const char *VCRuntimePath, Error &Err);
// Associate COFFPlatform JIT-side runtime support functions with handlers.
diff --git a/llvm/lib/ExecutionEngine/Orc/COFFPlatform.cpp b/llvm/lib/ExecutionEngine/Orc/COFFPlatform.cpp
index a3cef492ad018..dfafc429843fb 100644
--- a/llvm/lib/ExecutionEngine/Orc/COFFPlatform.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/COFFPlatform.cpp
@@ -352,11 +352,11 @@ bool COFFPlatform::supportedTarget(const Triple &TT) {
COFFPlatform::COFFPlatform(ExecutionSession &ES,
ObjectLinkingLayer &ObjLinkingLayer,
JITDylib &PlatformJD, const char *OrcRuntimePath,
- LoadDynamicLibrary LoadDynLibrary,
+ LoadDynamicLibrary LoadDynamicLibrary,
bool StaticVCRuntime, const char *VCRuntimePath,
Error &Err)
: ES(ES), ObjLinkingLayer(ObjLinkingLayer),
- LoadDynLibrary(std::move(LoadDynLibrary)),
+ LoadDynLibrary(std::move(LoadDynamicLibrary)),
StaticVCRuntime(StaticVCRuntime),
COFFHeaderStartSymbol(ES.intern("__ImageBase")) {
ErrorAsOutParameter _(&Err);
More information about the llvm-commits
mailing list