Revert 29ce4f6
authorMatt Ellis <matell@microsoft.com>
Thu, 17 Dec 2015 21:01:50 +0000 (13:01 -0800)
committerMatt Ellis <matell@microsoft.com>
Thu, 17 Dec 2015 21:01:50 +0000 (13:01 -0800)
29ce4f6 worked around an issue where we were exporting C++ operators
which caused some problems on OSX in some interop cases (see
dotnet/coreclr#946 and dotnet/coreclr#943 for more details).

With dotnet/coreclr#1065 we no longer export all symbols from libcoreclr
so these additional attributes are redudent and they cause issues when
trying to build with clang 3.7.  This commit removes them.

I verified that the sample AppKit app continues to work even with these
changes.

src/utilcode/clrhost_nodependencies.cpp

index 30000dc..967963a 100644 (file)
@@ -398,9 +398,6 @@ const NoThrow nothrow = { 0 };
 // use standard heap functions for address santizier
 #else
 
-#ifdef __llvm__
-__attribute__((visibility("hidden")))
-#endif
 void * __cdecl
 operator new(size_t n)
 {
@@ -422,9 +419,6 @@ operator new(size_t n)
     return result;
 }
 
-#ifdef __llvm__
-__attribute__((visibility("hidden")))
-#endif
 void * __cdecl
 operator new[](size_t n)
 {
@@ -448,9 +442,6 @@ operator new[](size_t n)
 
 #endif // HAS_ADDRESS_SANITIZER
 
-#ifdef __llvm__
-__attribute__((visibility("hidden")))
-#endif
 void * __cdecl operator new(size_t n, const NoThrow&)
 {
 #ifdef HAS_ADDRESS_SANITIZER
@@ -471,9 +462,6 @@ void * __cdecl operator new(size_t n, const NoThrow&)
     return result;
 }
 
-#ifdef __llvm__
-__attribute__((visibility("hidden")))
-#endif
 void * __cdecl operator new[](size_t n, const NoThrow&)
 {
 #ifdef HAS_ADDRESS_SANITIZER
@@ -497,9 +485,6 @@ void * __cdecl operator new[](size_t n, const NoThrow&)
 #ifdef HAS_ADDRESS_SANITIZER
 // use standard heap functions for address santizier
 #else
-#ifdef __llvm__
-__attribute__((visibility("hidden")))
-#endif
 void __cdecl
 operator delete(void *p) NOEXCEPT
 {
@@ -513,9 +498,6 @@ operator delete(void *p) NOEXCEPT
     TRASH_LASTERROR;
 }
 
-#ifdef __llvm__
-__attribute__((visibility("hidden")))
-#endif
 void __cdecl
 operator delete[](void *p) NOEXCEPT
 {