[llvm] ec6d621 - Remove a top-level using-directive from EPCDebugObjectRegistrar.h
Pavel Labath via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 28 06:14:33 PDT 2022
Author: Pavel Labath
Date: 2022-03-28T15:14:20+02:00
New Revision: ec6d6210500682e1f5cbf1863b3286304bb5f5bd
URL: https://github.com/llvm/llvm-project/commit/ec6d6210500682e1f5cbf1863b3286304bb5f5bd
DIFF: https://github.com/llvm/llvm-project/commit/ec6d6210500682e1f5cbf1863b3286304bb5f5bd.diff
LOG: Remove a top-level using-directive from EPCDebugObjectRegistrar.h
The directive pollutes the namespace of all files which include the
header.
Use alternate ways to reference the namespace constituents instead.
Added:
Modified:
llvm/include/llvm/ExecutionEngine/Orc/EPCDebugObjectRegistrar.h
llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp
llvm/lib/ExecutionEngine/Orc/EPCDebugObjectRegistrar.cpp
llvm/tools/llvm-jitlink/llvm-jitlink.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/EPCDebugObjectRegistrar.h b/llvm/include/llvm/ExecutionEngine/Orc/EPCDebugObjectRegistrar.h
index ac7051b5b75c1..241453320ad5b 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/EPCDebugObjectRegistrar.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/EPCDebugObjectRegistrar.h
@@ -23,8 +23,6 @@
#include <memory>
#include <vector>
-using namespace llvm::orc::shared;
-
namespace llvm {
namespace orc {
diff --git a/llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp b/llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp
index 24fa107792dc4..3c44fe81b4a99 100644
--- a/llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp
@@ -349,10 +349,11 @@ class MachODebugObjectSynthesizer : public MachODebugObjectSynthesizerBase {
}
SectionRange R(MachOContainerBlock->getSection());
- G.allocActions().push_back({cantFail(shared::WrapperFunctionCall::Create<
- SPSArgList<SPSExecutorAddrRange>>(
- RegisterActionAddr, R.getRange())),
- {}});
+ G.allocActions().push_back(
+ {cantFail(shared::WrapperFunctionCall::Create<
+ shared::SPSArgList<shared::SPSExecutorAddrRange>>(
+ RegisterActionAddr, R.getRange())),
+ {}});
return Error::success();
}
diff --git a/llvm/lib/ExecutionEngine/Orc/EPCDebugObjectRegistrar.cpp b/llvm/lib/ExecutionEngine/Orc/EPCDebugObjectRegistrar.cpp
index f3fe0555fa75b..c591acdd646be 100644
--- a/llvm/lib/ExecutionEngine/Orc/EPCDebugObjectRegistrar.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/EPCDebugObjectRegistrar.cpp
@@ -45,7 +45,8 @@ createJITLoaderGDBRegistrar(ExecutionSession &ES) {
Error EPCDebugObjectRegistrar::registerDebugObject(
ExecutorAddrRange TargetMem) {
- return ES.callSPSWrapper<void(SPSExecutorAddrRange)>(RegisterFn, TargetMem);
+ return ES.callSPSWrapper<void(shared::SPSExecutorAddrRange)>(RegisterFn,
+ TargetMem);
}
} // namespace orc
diff --git a/llvm/tools/llvm-jitlink/llvm-jitlink.cpp b/llvm/tools/llvm-jitlink/llvm-jitlink.cpp
index f3443faf7bc7f..480bc5078471e 100644
--- a/llvm/tools/llvm-jitlink/llvm-jitlink.cpp
+++ b/llvm/tools/llvm-jitlink/llvm-jitlink.cpp
@@ -1908,8 +1908,9 @@ static Expected<int> runWithRuntime(Session &S, ExecutorAddr EntryPointAddr) {
if (TT.getObjectFormat() == Triple::MachO &&
DemangledEntryPoint.front() == '_')
DemangledEntryPoint = DemangledEntryPoint.drop_front();
+ using llvm::orc::shared::SPSString;
using SPSRunProgramSig =
- int64_t(SPSString, SPSString, SPSSequence<SPSString>);
+ int64_t(SPSString, SPSString, shared::SPSSequence<SPSString>);
int64_t Result;
if (auto Err = S.ES.callSPSWrapper<SPSRunProgramSig>(
EntryPointAddr, Result, S.MainJD->getName(), DemangledEntryPoint,
More information about the llvm-commits
mailing list