summaryrefslogtreecommitdiff
path: root/src/inc
diff options
context:
space:
mode:
authorSinan Kaya <41809318+franksinankaya@users.noreply.github.com>2019-02-14 14:06:57 -0500
committerJan Kotas <jkotas@microsoft.com>2019-02-14 11:06:57 -0800
commit36931ac7b24249201547f7ca667105014b2e4c7f (patch)
tree1ad562f7776e57f14a884fadcd17e23911637ec8 /src/inc
parent84eaa7ac079e625f2fbe36ba976f735dbdacdc6b (diff)
downloadcoreclr-36931ac7b24249201547f7ca667105014b2e4c7f.tar.gz
coreclr-36931ac7b24249201547f7ca667105014b2e4c7f.tar.bz2
coreclr-36931ac7b24249201547f7ca667105014b2e4c7f.zip
Gnuport cleanup 3 (#22581)
* Reorder extern "C" and visibility statements In file included from coreclr/src/pal/inc/pal.h:70:0, coreclr/src/pal/inc/pal_mstypes.h:30:25: error: expected unqualified-id before string constant #define EXTERN_C extern "C" ^ coreclr/src/pal/inc/rt/palrt.h:216:30: note: in expansion of macro 'EXTERN_C' #define STDAPI_(type) EXTERN_C type STDAPICALLTYPE * Need double quotes around single quotes in error statements fix error statements Can't have ' character in error statement * Abstract __declspec(noinline) Generate compiler independent macros for noinline request. * Remove unused DBG_NOINLINE_X86__RET_INLINE * Abstract __declspec(nothrow)
Diffstat (limited to 'src/inc')
-rw-r--r--src/inc/contract.h6
-rw-r--r--src/inc/cor.h10
-rw-r--r--src/inc/metadatatracker.h4
-rw-r--r--src/inc/palclr.h16
-rw-r--r--src/inc/slist.h2
-rw-r--r--src/inc/utilcode.h11
-rw-r--r--src/inc/winrt/paraminstanceapi.h2
7 files changed, 25 insertions, 26 deletions
diff --git a/src/inc/contract.h b/src/inc/contract.h
index 0e3206c77c..a497424d39 100644
--- a/src/inc/contract.h
+++ b/src/inc/contract.h
@@ -989,10 +989,10 @@ class BaseContract
};
- __declspec(nothrow) BaseContract() : m_pClrDebugState(NULL), m_testmask(0)
+ NOTHROW_DECL BaseContract() : m_pClrDebugState(NULL), m_testmask(0)
{
}
- __declspec(nothrow) void Restore()
+ NOTHROW_DECL void Restore()
{
// m_pClrDebugState is setup in BaseContract::DoChecks. If an SO happens after the
// BaseContract object is constructed but before DoChecks is invoked, m_pClrDebugState
@@ -1160,7 +1160,7 @@ class Contract: public BaseContract
virtual void DestructorDefinedThatCallsRestore(){}
public:
- __declspec(nothrow) ~Contract()
+ NOTHROW_DECL ~Contract()
{
Restore();
}
diff --git a/src/inc/cor.h b/src/inc/cor.h
index 3494b05e4f..31484f66b8 100644
--- a/src/inc/cor.h
+++ b/src/inc/cor.h
@@ -2026,20 +2026,12 @@ typedef enum
#ifndef DEBUG_NOINLINE
#if defined(_DEBUG)
-#define DEBUG_NOINLINE __declspec(noinline)
+#define DEBUG_NOINLINE NOINLINE
#else
#define DEBUG_NOINLINE
#endif
#endif
-#ifndef DBG_NOINLINE_X86__RET_INLINE
-#if defined(_DEBUG) && defined(_X86_)
-#define DBG_NOINLINE_X86__RET_INLINE __declspec(noinline)
-#else
-#define DBG_NOINLINE_X86__RET_INLINE FORCEINLINE
-#endif
-#endif
-
#ifndef NOINLINE
#ifdef _MSC_VER
#define NOINLINE __declspec(noinline)
diff --git a/src/inc/metadatatracker.h b/src/inc/metadatatracker.h
index 27c8c2746b..1427b189a7 100644
--- a/src/inc/metadatatracker.h
+++ b/src/inc/metadatatracker.h
@@ -182,7 +182,7 @@ public:
return NoteAccessWorker(address);
}
- __declspec(noinline) static void* NoteAccessWorker(void *address)
+ NOINLINE static void* NoteAccessWorker(void *address)
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
@@ -204,7 +204,7 @@ public:
NoteSearchWorker(result);
}
- __declspec(noinline) static void NoteSearchWorker(void *result)
+ NOINLINE static void NoteSearchWorker(void *result)
{
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
diff --git a/src/inc/palclr.h b/src/inc/palclr.h
index a9dbe0deab..fbb8975c1a 100644
--- a/src/inc/palclr.h
+++ b/src/inc/palclr.h
@@ -37,6 +37,22 @@
#endif
#endif
+#ifndef NOTHROW_DECL
+#ifdef _MSC_VER
+#define NOTHROW_DECL __declspec(nothrow)
+#else
+#define NOTHROW_DECL __attribute__((nothrow))
+#endif // !_MSC_VER
+#endif // !NOTHROW_DECL
+
+#ifndef NOINLINE
+#ifdef _MSC_VER
+#define NOINLINE __declspec(noinline)
+#else
+#define NOINLINE __attribute__((noinline))
+#endif // !_MSC_VER
+#endif // !NOINLINE
+
//
// CPP_ASSERT() can be used within a class definition, to perform a
// compile-time assertion involving private names within the class.
diff --git a/src/inc/slist.h b/src/inc/slist.h
index 9a75e1d6d5..f05d763dc6 100644
--- a/src/inc/slist.h
+++ b/src/inc/slist.h
@@ -20,7 +20,7 @@
//-----------------------------------------------------------------------------
//#ifndef _H_UTIL
-//#error I am a part of util.hpp Please don't include me alone !
+//#error "I am a part of util.hpp Please don't include me alone !"
//#endif
diff --git a/src/inc/utilcode.h b/src/inc/utilcode.h
index a647d0c8d4..ebeaf7370a 100644
--- a/src/inc/utilcode.h
+++ b/src/inc/utilcode.h
@@ -144,21 +144,12 @@ typedef LPSTR LPUTF8;
#ifndef DEBUG_NOINLINE
#if defined(_DEBUG)
-#define DEBUG_NOINLINE __declspec(noinline)
+#define DEBUG_NOINLINE NOINLINE
#else
#define DEBUG_NOINLINE
#endif
#endif
-#ifndef DBG_NOINLINE_X86__RET_INLINE
-#if defined(_DEBUG) && defined(_TARGET_X86_)
-// this exists to make scan work on x86.
-#define DBG_NOINLINE_X86__RET_INLINE __declspec(noinline)
-#else
-#define DBG_NOINLINE_X86__RET_INLINE FORCEINLINE
-#endif
-#endif
-
#include <stddef.h> // for offsetof
#ifndef NumItems
diff --git a/src/inc/winrt/paraminstanceapi.h b/src/inc/winrt/paraminstanceapi.h
index 1a8dde13d7..ad3fd17b91 100644
--- a/src/inc/winrt/paraminstanceapi.h
+++ b/src/inc/winrt/paraminstanceapi.h
@@ -79,7 +79,7 @@ namespace Ro { namespace detail {
// to see HRESULT propagation.
//
#ifdef DEBUG
- inline HRESULT __declspec(noinline) _FailedHR(HRESULT hr) { static HRESULT _hr = hr; return hr; }
+ inline HRESULT NOINLINE _FailedHR(HRESULT hr) { static HRESULT _hr = hr; return hr; }
#else
inline HRESULT _FailedHR(HRESULT hr) { return hr; }
#endif