[llvm] 03df67e - [JITLink] Drop using namespace
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 27 06:21:22 PDT 2023
Author: Benjamin Kramer
Date: 2023-03-27T15:20:40+02:00
New Revision: 03df67e7858ef56910f6c08a95c7156ae00ef984
URL: https://github.com/llvm/llvm-project/commit/03df67e7858ef56910f6c08a95c7156ae00ef984
DIFF: https://github.com/llvm/llvm-project/commit/03df67e7858ef56910f6c08a95c7156ae00ef984.diff
LOG: [JITLink] Drop using namespace
I don't think these are holding their weight and cause nasty to debug
compiler issues with some versions of MSVC as seen in
https://reviews.llvm.org/D144083#4220866
Just qualify the types with the full name.
Added:
Modified:
llvm/lib/ExecutionEngine/JITLink/aarch32.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp b/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp
index 9f22ad5ea303a..28fa0b6d5895c 100644
--- a/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/aarch32.cpp
@@ -25,9 +25,6 @@ namespace llvm {
namespace jitlink {
namespace aarch32 {
-using namespace support;
-using namespace support::endian;
-
/// Encode 22-bit immediate value for branch instructions without J1J2 range
/// extension (formats B T4, BL T1 and BLX T2).
///
@@ -194,8 +191,8 @@ void writeImmediate(WritableThumbRelocation &R, HalfWords Imm) {
}
Expected<int64_t> readAddendData(LinkGraph &G, Block &B, const Edge &E) {
- endianness Endian = G.getEndianness();
- assert(Endian != native && "Declare as little or big explicitly");
+ support::endianness Endian = G.getEndianness();
+ assert(Endian != support::native && "Declare as little or big explicitly");
Edge::Kind Kind = E.getKind();
const char *BlockWorkingMem = B.getContent().data();
@@ -203,8 +200,7 @@ Expected<int64_t> readAddendData(LinkGraph &G, Block &B, const Edge &E) {
switch (Kind) {
case Data_Delta32:
- return SignExtend64<32>((Endian == little) ? read32<little>(FixupPtr)
- : read32<big>(FixupPtr));
+ return SignExtend64<32>(support::endian::read32(FixupPtr, Endian));
default:
return make_error<JITLinkError>(
"In graph " + G.getName() + ", section " + B.getSection().getName() +
More information about the llvm-commits
mailing list