[compiler-rt] 3e04ad4 - [ORC-RT] Remove double underscore from the orc_rt namespace.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 9 01:04:37 PDT 2024


Author: Lang Hames
Date: 2024-09-09T18:04:28+10:00
New Revision: 3e04ad428313dde40c779af6d675b162e150125e

URL: https://github.com/llvm/llvm-project/commit/3e04ad428313dde40c779af6d675b162e150125e
DIFF: https://github.com/llvm/llvm-project/commit/3e04ad428313dde40c779af6d675b162e150125e.diff

LOG: [ORC-RT] Remove double underscore from the orc_rt namespace.

We should use `orc_rt` as the public C++ API namespace for the ORC runtime and
control symbol visibility to hide implementation details, rather than rely on
the '__' prefix.

Added: 
    

Modified: 
    compiler-rt/lib/orc/adt.h
    compiler-rt/lib/orc/bitmask_enum.h
    compiler-rt/lib/orc/coff_platform.cpp
    compiler-rt/lib/orc/coff_platform.h
    compiler-rt/lib/orc/debug.cpp
    compiler-rt/lib/orc/debug.h
    compiler-rt/lib/orc/dlfcn_wrapper.cpp
    compiler-rt/lib/orc/elfnix_platform.cpp
    compiler-rt/lib/orc/elfnix_platform.h
    compiler-rt/lib/orc/endianness.h
    compiler-rt/lib/orc/error.h
    compiler-rt/lib/orc/executor_address.h
    compiler-rt/lib/orc/executor_symbol_def.h
    compiler-rt/lib/orc/extensible_rtti.cpp
    compiler-rt/lib/orc/extensible_rtti.h
    compiler-rt/lib/orc/interval_map.h
    compiler-rt/lib/orc/interval_set.h
    compiler-rt/lib/orc/macho_platform.cpp
    compiler-rt/lib/orc/macho_platform.h
    compiler-rt/lib/orc/run_program_wrapper.cpp
    compiler-rt/lib/orc/simple_packed_serialization.h
    compiler-rt/lib/orc/stl_extras.h
    compiler-rt/lib/orc/string_pool.h
    compiler-rt/lib/orc/wrapper_function_utils.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/orc/adt.h b/compiler-rt/lib/orc/adt.h
index 8884cc8812be55..43fa9a8ea678bd 100644
--- a/compiler-rt/lib/orc/adt.h
+++ b/compiler-rt/lib/orc/adt.h
@@ -18,7 +18,7 @@
 #include <ostream>
 #include <string>
 
-namespace __orc_rt {
+namespace orc_rt {
 
 constexpr std::size_t dynamic_extent = std::numeric_limits<std::size_t>::max();
 
@@ -58,6 +58,6 @@ template <typename T, std::size_t Extent = dynamic_extent> class span {
   size_type Size = 0;
 };
 
-} // end namespace __orc_rt
+} // namespace orc_rt
 
 #endif // ORC_RT_ADT_H

diff  --git a/compiler-rt/lib/orc/bitmask_enum.h b/compiler-rt/lib/orc/bitmask_enum.h
index b9fb776bdf231e..77f4ca6b0fd691 100644
--- a/compiler-rt/lib/orc/bitmask_enum.h
+++ b/compiler-rt/lib/orc/bitmask_enum.h
@@ -18,7 +18,7 @@
 #include <cassert>
 #include <type_traits>
 
-namespace __orc_rt {
+namespace orc_rt {
 
 /// ORC_RT_MARK_AS_BITMASK_ENUM lets you opt in an individual enum type so you
 /// can perform bitwise operations on it without putting static_cast everywhere.
@@ -146,6 +146,6 @@ E &operator^=(E &LHS, E RHS) {
   return LHS;
 }
 
-} // end namespace __orc_rt
+} // namespace orc_rt
 
 #endif // ORC_RT_BITMASK_ENUM_H

diff  --git a/compiler-rt/lib/orc/coff_platform.cpp b/compiler-rt/lib/orc/coff_platform.cpp
index 9fe5c0b062897b..346d896f6c9484 100644
--- a/compiler-rt/lib/orc/coff_platform.cpp
+++ b/compiler-rt/lib/orc/coff_platform.cpp
@@ -29,9 +29,9 @@
 
 #define DEBUG_TYPE "coff_platform"
 
-using namespace __orc_rt;
+using namespace orc_rt;
 
-namespace __orc_rt {
+namespace orc_rt {
 
 using COFFJITDylibDepInfo = std::vector<ExecutorAddr>;
 using COFFJITDylibDepInfoMap =
@@ -45,7 +45,7 @@ using SPSCOFFJITDylibDepInfo = SPSSequence<SPSExecutorAddr>;
 using SPSCOFFJITDylibDepInfoMap =
     SPSSequence<SPSTuple<SPSExecutorAddr, SPSCOFFJITDylibDepInfo>>;
 
-} // namespace __orc_rt
+} // namespace orc_rt
 
 ORC_RT_JIT_DISPATCH_TAG(__orc_rt_coff_symbol_lookup_tag)
 ORC_RT_JIT_DISPATCH_TAG(__orc_rt_coff_push_initializers_tag)
@@ -752,7 +752,7 @@ ORC_RT_INTERFACE int64_t __orc_rt_coff_run_program(const char *JITDylibName,
   using MainTy = int (*)(int, char *[]);
 
   void *H =
-      __orc_rt_coff_jit_dlopen(JITDylibName, __orc_rt::coff::ORC_RT_RTLD_LAZY);
+      __orc_rt_coff_jit_dlopen(JITDylibName, orc_rt::coff::ORC_RT_RTLD_LAZY);
   if (!H) {
     __orc_rt_log_error(__orc_rt_coff_jit_dlerror());
     return -1;

diff  --git a/compiler-rt/lib/orc/coff_platform.h b/compiler-rt/lib/orc/coff_platform.h
index c84185d40b608f..aae57bc6100e53 100644
--- a/compiler-rt/lib/orc/coff_platform.h
+++ b/compiler-rt/lib/orc/coff_platform.h
@@ -23,7 +23,7 @@ ORC_RT_INTERFACE int __orc_rt_coff_jit_dlclose(void *header);
 ORC_RT_INTERFACE void *__orc_rt_coff_jit_dlsym(void *header,
                                                const char *symbol);
 
-namespace __orc_rt {
+namespace orc_rt {
 namespace coff {
 
 enum dlopen_mode : int {
@@ -33,7 +33,7 @@ enum dlopen_mode : int {
   ORC_RT_RTLD_GLOBAL = 0x8
 };
 
-} // end namespace coff
-} // end namespace __orc_rt
+} // namespace coff
+} // namespace orc_rt
 
 #endif

diff  --git a/compiler-rt/lib/orc/debug.cpp b/compiler-rt/lib/orc/debug.cpp
index af20fa4e6f4e14..341fceaf002c52 100644
--- a/compiler-rt/lib/orc/debug.cpp
+++ b/compiler-rt/lib/orc/debug.cpp
@@ -18,8 +18,7 @@
 #include <cstdlib>
 #include <cstring>
 
-
-namespace __orc_rt {
+namespace orc_rt {
 
 #ifndef NDEBUG
 
@@ -80,4 +79,4 @@ void printdbg(const char *format, ...) {
 
 #endif // !NDEBUG
 
-} // end namespace __orc_rt
+} // namespace orc_rt

diff  --git a/compiler-rt/lib/orc/debug.h b/compiler-rt/lib/orc/debug.h
index a0bc653d032ebd..587994e484af6e 100644
--- a/compiler-rt/lib/orc/debug.h
+++ b/compiler-rt/lib/orc/debug.h
@@ -17,7 +17,7 @@
 
 #ifndef NDEBUG
 
-namespace __orc_rt {
+namespace orc_rt {
 
 extern std::atomic<const char *> DebugTypes;
 extern char DebugTypesAll;
@@ -27,18 +27,16 @@ const char *initializeDebug();
 bool debugTypeEnabled(const char *Type, const char *Types);
 void printdbg(const char *format, ...);
 
-} // namespace __orc_rt
+} // namespace orc_rt
 
 #define ORC_RT_DEBUG_WITH_TYPE(TYPE, X)                                        \
   do {                                                                         \
-    const char *Types =                                                        \
-        ::__orc_rt::DebugTypes.load(std::memory_order_relaxed);                \
+    const char *Types = ::orc_rt::DebugTypes.load(std::memory_order_relaxed);  \
     if (!Types)                                                                \
       Types = initializeDebug();                                               \
     if (Types == &DebugTypesNone)                                              \
       break;                                                                   \
-    if (Types == &DebugTypesAll ||                                             \
-        ::__orc_rt::debugTypeEnabled(TYPE, Types)) {                           \
+    if (Types == &DebugTypesAll || ::orc_rt::debugTypeEnabled(TYPE, Types)) {  \
       X;                                                                       \
     }                                                                          \
   } while (false)

diff  --git a/compiler-rt/lib/orc/dlfcn_wrapper.cpp b/compiler-rt/lib/orc/dlfcn_wrapper.cpp
index ece63da2cb48e7..fd9dce40d6738c 100644
--- a/compiler-rt/lib/orc/dlfcn_wrapper.cpp
+++ b/compiler-rt/lib/orc/dlfcn_wrapper.cpp
@@ -16,7 +16,7 @@
 
 #include <vector>
 
-using namespace __orc_rt;
+using namespace orc_rt;
 
 extern "C" const char *__orc_rt_jit_dlerror();
 extern "C" void *__orc_rt_jit_dlopen(const char *path, int mode);

diff  --git a/compiler-rt/lib/orc/elfnix_platform.cpp b/compiler-rt/lib/orc/elfnix_platform.cpp
index c087e71038f950..dc6af65dc996a0 100644
--- a/compiler-rt/lib/orc/elfnix_platform.cpp
+++ b/compiler-rt/lib/orc/elfnix_platform.cpp
@@ -24,8 +24,8 @@
 #include <unordered_map>
 #include <vector>
 
-using namespace __orc_rt;
-using namespace __orc_rt::elfnix;
+using namespace orc_rt;
+using namespace orc_rt::elfnix;
 
 // Declare function tags for functions in the JIT process.
 ORC_RT_JIT_DISPATCH_TAG(__orc_rt_elfnix_get_initializers_tag)
@@ -601,7 +601,7 @@ ORC_RT_INTERFACE int64_t __orc_rt_elfnix_run_program(
   using MainTy = int (*)(int, char *[]);
 
   void *H = __orc_rt_elfnix_jit_dlopen(JITDylibName,
-                                       __orc_rt::elfnix::ORC_RT_RTLD_LAZY);
+                                       orc_rt::elfnix::ORC_RT_RTLD_LAZY);
   if (!H) {
     __orc_rt_log_error(__orc_rt_elfnix_jit_dlerror());
     return -1;

diff  --git a/compiler-rt/lib/orc/elfnix_platform.h b/compiler-rt/lib/orc/elfnix_platform.h
index e0ee9591dfc622..3efac4b2327f32 100644
--- a/compiler-rt/lib/orc/elfnix_platform.h
+++ b/compiler-rt/lib/orc/elfnix_platform.h
@@ -29,7 +29,7 @@ ORC_RT_INTERFACE int __orc_rt_elfnix_jit_dlclose(void *dso_handle);
 ORC_RT_INTERFACE void *__orc_rt_elfnix_jit_dlsym(void *dso_handle,
                                                  const char *symbol);
 
-namespace __orc_rt {
+namespace orc_rt {
 namespace elfnix {
 
 struct ELFNixPerObjectSectionsToRegister {
@@ -65,7 +65,7 @@ enum dlopen_mode : int {
   ORC_RT_RTLD_GLOBAL = 0x8
 };
 
-} // end namespace elfnix
+} // namespace elfnix
 
 using SPSELFNixPerObjectSectionsToRegister =
     SPSTuple<SPSExecutorAddrRange, SPSExecutorAddrRange>;
@@ -126,6 +126,6 @@ class SPSSerializationTraits<SPSELFNixJITDylibInitializers,
   }
 };
 
-} // end namespace __orc_rt
+} // namespace orc_rt
 
 #endif // ORC_RT_ELFNIX_PLATFORM_H

diff  --git a/compiler-rt/lib/orc/endianness.h b/compiler-rt/lib/orc/endianness.h
index 4ee5505ce6ddf1..ac65d83744c7f5 100644
--- a/compiler-rt/lib/orc/endianness.h
+++ b/compiler-rt/lib/orc/endianness.h
@@ -46,7 +46,7 @@
 #endif
 #endif
 
-namespace __orc_rt {
+namespace orc_rt {
 
 /// ByteSwap_16 - This function returns a byte-swapped representation of
 /// the 16-bit argument.
@@ -138,6 +138,6 @@ template <typename T> inline void swapByteOrder(T &Value) {
   Value = getSwappedBytes(Value);
 }
 
-} // end namespace __orc_rt
+} // namespace orc_rt
 
 #endif // ORC_RT_ENDIAN_H

diff  --git a/compiler-rt/lib/orc/error.h b/compiler-rt/lib/orc/error.h
index b5da0769c63726..c833313ee55c1f 100644
--- a/compiler-rt/lib/orc/error.h
+++ b/compiler-rt/lib/orc/error.h
@@ -18,7 +18,7 @@
 #include <string>
 #include <type_traits>
 
-namespace __orc_rt {
+namespace orc_rt {
 
 /// Base class for all errors.
 class ErrorInfoBase : public RTTIExtends<ErrorInfoBase, RTTIRoot> {
@@ -421,6 +421,6 @@ class StringError : public RTTIExtends<StringError, ErrorInfoBase> {
   std::string ErrMsg;
 };
 
-} // end namespace __orc_rt
+} // namespace orc_rt
 
 #endif // ORC_RT_ERROR_H

diff  --git a/compiler-rt/lib/orc/executor_address.h b/compiler-rt/lib/orc/executor_address.h
index 1542ee96bd92bd..56a5e88c84a2dc 100644
--- a/compiler-rt/lib/orc/executor_address.h
+++ b/compiler-rt/lib/orc/executor_address.h
@@ -22,7 +22,7 @@
 #include <cassert>
 #include <type_traits>
 
-namespace __orc_rt {
+namespace orc_rt {
 
 using ExecutorAddrDiff = uint64_t;
 
@@ -30,7 +30,7 @@ using ExecutorAddrDiff = uint64_t;
 class ExecutorAddr {
 public:
   /// A wrap/unwrap function that leaves pointers unmodified.
-  template <typename T> using rawPtr = __orc_rt::identity<T *>;
+  template <typename T> using rawPtr = orc_rt::identity<T *>;
 
   /// Default wrap function to use on this host.
   template <typename T> using defaultWrap = rawPtr<T>;
@@ -247,13 +247,13 @@ class SPSSerializationTraits<SPSExecutorAddrRange, ExecutorAddrRange> {
 
 using SPSExecutorAddrRangeSequence = SPSSequence<SPSExecutorAddrRange>;
 
-} // End namespace __orc_rt
+} // End namespace orc_rt
 
 namespace std {
 
 // Make ExecutorAddr hashable.
-template <> struct hash<__orc_rt::ExecutorAddr> {
-  size_t operator()(const __orc_rt::ExecutorAddr &A) const {
+template <> struct hash<orc_rt::ExecutorAddr> {
+  size_t operator()(const orc_rt::ExecutorAddr &A) const {
     return hash<uint64_t>()(A.getValue());
   }
 };

diff  --git a/compiler-rt/lib/orc/executor_symbol_def.h b/compiler-rt/lib/orc/executor_symbol_def.h
index 454cefe525cfaa..78c3c35e50b60d 100644
--- a/compiler-rt/lib/orc/executor_symbol_def.h
+++ b/compiler-rt/lib/orc/executor_symbol_def.h
@@ -20,7 +20,7 @@
 #include "executor_address.h"
 #include "simple_packed_serialization.h"
 
-namespace __orc_rt {
+namespace orc_rt {
 
 /// Flags for symbols in the JIT.
 class JITSymbolFlags {
@@ -146,6 +146,6 @@ class SPSSerializationTraits<SPSExecutorSymbolDef, ExecutorSymbolDef> {
   }
 };
 
-} // End namespace __orc_rt
+} // End namespace orc_rt
 
 #endif // ORC_RT_EXECUTOR_SYMBOL_DEF_H

diff  --git a/compiler-rt/lib/orc/extensible_rtti.cpp b/compiler-rt/lib/orc/extensible_rtti.cpp
index c6951a449a3d97..fce7d044a80161 100644
--- a/compiler-rt/lib/orc/extensible_rtti.cpp
+++ b/compiler-rt/lib/orc/extensible_rtti.cpp
@@ -16,9 +16,9 @@
 
 #include "extensible_rtti.h"
 
-namespace __orc_rt {
+namespace orc_rt {
 
 char RTTIRoot::ID = 0;
 void RTTIRoot::anchor() {}
 
-} // end namespace __orc_rt
+} // namespace orc_rt

diff  --git a/compiler-rt/lib/orc/extensible_rtti.h b/compiler-rt/lib/orc/extensible_rtti.h
index 72f68242e7c455..d0363b4f1ee0f7 100644
--- a/compiler-rt/lib/orc/extensible_rtti.h
+++ b/compiler-rt/lib/orc/extensible_rtti.h
@@ -59,7 +59,7 @@
 #ifndef ORC_RT_EXTENSIBLE_RTTI_H
 #define ORC_RT_EXTENSIBLE_RTTI_H
 
-namespace __orc_rt {
+namespace orc_rt {
 
 template <typename ThisT, typename ParentT> class RTTIExtends;
 
@@ -140,6 +140,6 @@ template <typename To, typename From> bool isa(const From &Value) {
   return To::classof(&Value);
 }
 
-} // end namespace __orc_rt
+} // namespace orc_rt
 
 #endif // ORC_RT_EXTENSIBLE_RTTI_H

diff  --git a/compiler-rt/lib/orc/interval_map.h b/compiler-rt/lib/orc/interval_map.h
index 8c1609d72f57f8..3db990f1f11531 100644
--- a/compiler-rt/lib/orc/interval_map.h
+++ b/compiler-rt/lib/orc/interval_map.h
@@ -17,7 +17,7 @@
 #include <cassert>
 #include <map>
 
-namespace __orc_rt {
+namespace orc_rt {
 
 enum class IntervalCoalescing { Enabled, Disabled };
 
@@ -163,6 +163,6 @@ class IntervalMap<KeyT, ValT, IntervalCoalescing::Disabled>
   }
 };
 
-} // End namespace __orc_rt
+} // End namespace orc_rt
 
 #endif // ORC_RT_INTERVAL_MAP_H

diff  --git a/compiler-rt/lib/orc/interval_set.h b/compiler-rt/lib/orc/interval_set.h
index 20f40f9c7d370c..df104a3be6422e 100644
--- a/compiler-rt/lib/orc/interval_set.h
+++ b/compiler-rt/lib/orc/interval_set.h
@@ -15,7 +15,7 @@
 
 #include "interval_map.h"
 
-namespace __orc_rt {
+namespace orc_rt {
 
 /// Implements a coalescing interval set.
 ///
@@ -82,6 +82,6 @@ class IntervalSet {
   ImplMap Map;
 };
 
-} // End namespace __orc_rt
+} // End namespace orc_rt
 
 #endif // ORC_RT_INTERVAL_SET_H

diff  --git a/compiler-rt/lib/orc/macho_platform.cpp b/compiler-rt/lib/orc/macho_platform.cpp
index 9b4f6e5fd417c2..1974d3f0ef33f8 100644
--- a/compiler-rt/lib/orc/macho_platform.cpp
+++ b/compiler-rt/lib/orc/macho_platform.cpp
@@ -30,8 +30,8 @@
 
 #define DEBUG_TYPE "macho_platform"
 
-using namespace __orc_rt;
-using namespace __orc_rt::macho;
+using namespace orc_rt;
+using namespace orc_rt::macho;
 
 // Declare function tags for functions in the JIT process.
 ORC_RT_JIT_DISPATCH_TAG(__orc_rt_macho_push_initializers_tag)
@@ -82,7 +82,7 @@ using MachOJITDylibDepInfoMap =
 
 } // anonymous namespace
 
-namespace __orc_rt {
+namespace orc_rt {
 
 using SPSMachOObjectPlatformSectionsMap =
     SPSSequence<SPSTuple<SPSString, SPSExecutorAddrRange>>;
@@ -139,7 +139,7 @@ class SPSSerializationTraits<SPSUnwindSectionInfo, UnwindSectionInfo> {
   }
 };
 
-} // namespace __orc_rt
+} // namespace orc_rt
 
 namespace {
 struct TLVDescriptor {
@@ -406,7 +406,7 @@ class MachOPlatformRuntimeState {
 
 } // anonymous namespace
 
-namespace __orc_rt {
+namespace orc_rt {
 
 class SPSMachOExecutorSymbolFlags;
 
@@ -441,7 +441,7 @@ class SPSSerializationTraits<
   }
 };
 
-} // namespace __orc_rt
+} // namespace orc_rt
 
 namespace {
 
@@ -1532,8 +1532,8 @@ ORC_RT_INTERFACE int64_t __orc_rt_macho_run_program(const char *JITDylibName,
                                                     int argc, char *argv[]) {
   using MainTy = int (*)(int, char *[]);
 
-  void *H = __orc_rt_macho_jit_dlopen(JITDylibName,
-                                      __orc_rt::macho::ORC_RT_RTLD_LAZY);
+  void *H =
+      __orc_rt_macho_jit_dlopen(JITDylibName, orc_rt::macho::ORC_RT_RTLD_LAZY);
   if (!H) {
     __orc_rt_log_error(__orc_rt_macho_jit_dlerror());
     return -1;

diff  --git a/compiler-rt/lib/orc/macho_platform.h b/compiler-rt/lib/orc/macho_platform.h
index 3b2242ab27ce83..62234039437c09 100644
--- a/compiler-rt/lib/orc/macho_platform.h
+++ b/compiler-rt/lib/orc/macho_platform.h
@@ -28,7 +28,7 @@ ORC_RT_INTERFACE int __orc_rt_macho_jit_dlclose(void *dso_handle);
 ORC_RT_INTERFACE void *__orc_rt_macho_jit_dlsym(void *dso_handle,
                                                 const char *symbol);
 
-namespace __orc_rt {
+namespace orc_rt {
 namespace macho {
 
 enum dlopen_mode : int {
@@ -38,7 +38,7 @@ enum dlopen_mode : int {
   ORC_RT_RTLD_GLOBAL = 0x8
 };
 
-} // end namespace macho
-} // end namespace __orc_rt
+} // namespace macho
+} // namespace orc_rt
 
 #endif // ORC_RT_MACHO_PLATFORM_H

diff  --git a/compiler-rt/lib/orc/run_program_wrapper.cpp b/compiler-rt/lib/orc/run_program_wrapper.cpp
index 24a7b4fc3cbe0d..c9565e742908f7 100644
--- a/compiler-rt/lib/orc/run_program_wrapper.cpp
+++ b/compiler-rt/lib/orc/run_program_wrapper.cpp
@@ -16,7 +16,7 @@
 
 #include <vector>
 
-using namespace __orc_rt;
+using namespace orc_rt;
 
 extern "C" int64_t __orc_rt_run_program(const char *JITDylibName,
                                         const char *EntrySymbolName, int argc,

diff  --git a/compiler-rt/lib/orc/simple_packed_serialization.h b/compiler-rt/lib/orc/simple_packed_serialization.h
index 488d2407ddd434..b4726da08e342a 100644
--- a/compiler-rt/lib/orc/simple_packed_serialization.h
+++ b/compiler-rt/lib/orc/simple_packed_serialization.h
@@ -48,7 +48,7 @@
 #include <utility>
 #include <vector>
 
-namespace __orc_rt {
+namespace orc_rt {
 
 /// Output char buffer with overflow check.
 class SPSOutputBuffer {
@@ -576,7 +576,7 @@ Expected<T> fromSPSSerializable(SPSSerializableExpected<T> BSE) {
     return make_error<StringError>(BSE.ErrMsg);
 }
 
-} // end namespace detail
+} // namespace detail
 
 /// Serialize to a SPSError from a detail::SPSSerializableError.
 template <>
@@ -684,6 +684,6 @@ class SPSSerializationTraits<SPSExpected<SPSTagT>, T> {
   }
 };
 
-} // end namespace __orc_rt
+} // namespace orc_rt
 
 #endif // ORC_RT_SIMPLE_PACKED_SERIALIZATION_H

diff  --git a/compiler-rt/lib/orc/stl_extras.h b/compiler-rt/lib/orc/stl_extras.h
index 80a6cd13ac2810..ad7b661024065f 100644
--- a/compiler-rt/lib/orc/stl_extras.h
+++ b/compiler-rt/lib/orc/stl_extras.h
@@ -17,7 +17,7 @@
 #include <utility>
 #include <tuple>
 
-namespace __orc_rt {
+namespace orc_rt {
 
 /// Substitute for std::identity.
 /// Switch to std::identity once we can use c++20.
@@ -40,6 +40,6 @@ constexpr uint64_t bit_ceil(uint64_t Val) noexcept {
   return Val + 1;
 }
 
-} // namespace __orc_rt
+} // namespace orc_rt
 
 #endif // ORC_RT_STL_EXTRAS

diff  --git a/compiler-rt/lib/orc/string_pool.h b/compiler-rt/lib/orc/string_pool.h
index c0ba4ea8980ed2..4d6e1b78c54ff5 100644
--- a/compiler-rt/lib/orc/string_pool.h
+++ b/compiler-rt/lib/orc/string_pool.h
@@ -22,7 +22,7 @@
 #include <string>
 #include <unordered_map>
 
-namespace __orc_rt {
+namespace orc_rt {
 
 class PooledStringPtr;
 
@@ -156,7 +156,7 @@ inline bool StringPool::empty() const {
   return Pool.empty();
 }
 
-} // end namespace __orc_rt
+} // namespace orc_rt
 
 namespace std {
 

diff  --git a/compiler-rt/lib/orc/wrapper_function_utils.h b/compiler-rt/lib/orc/wrapper_function_utils.h
index 8009438547a32c..e65aac0fe4e53e 100644
--- a/compiler-rt/lib/orc/wrapper_function_utils.h
+++ b/compiler-rt/lib/orc/wrapper_function_utils.h
@@ -20,7 +20,7 @@
 #include "simple_packed_serialization.h"
 #include <type_traits>
 
-namespace __orc_rt {
+namespace orc_rt {
 
 /// C++ wrapper function result: Same as CWrapperFunctionResult but
 /// auto-releases memory.
@@ -504,6 +504,6 @@ class SPSSerializationTraits<SPSWrapperFunctionCall, WrapperFunctionCall> {
   }
 };
 
-} // end namespace __orc_rt
+} // namespace orc_rt
 
 #endif // ORC_RT_WRAPPER_FUNCTION_UTILS_H


        


More information about the llvm-commits mailing list