Skip to content

Commit

Permalink
[ORC] Fix name shadowing issue, NFC.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bzcheeseman committed Mar 9, 2023
1 parent e1b3c5c commit 82e177b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion llvm/include/llvm/ExecutionEngine/Orc/COFFPlatform.h
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/ExecutionEngine/Orc/COFFPlatform.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 82e177b

Please sign in to comment.