[JITLink] Drop using namespace
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 27 Mar 2023 12:19:18 +0000 (14:19 +0200)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 27 Mar 2023 13:20:40 +0000 (15:20 +0200)
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.

llvm/lib/ExecutionEngine/JITLink/aarch32.cpp

index 9f22ad5..28fa0b6 100644 (file)
@@ -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() +