0

Remove CDECL

`__cdecl` is the default calling convention on Windows, so this has no
effect and can be removed.

Bug: none
Change-Id: I7d3bb4a199a7e5c233d029df7964d4f565687cad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5803679
Reviewed-by: Will Harris <wfh@chromium.org>
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1345272}
This commit is contained in:
Peter Kasting
2024-08-22 06:29:31 +00:00
committed by Chromium LUCI CQ
parent 8226b84e00
commit a91ca8ea00
4 changed files with 4 additions and 13 deletions

@ -212,15 +212,6 @@
#define DISABLE_CFI_DLSYM
#endif
// Macro useful for writing cross-platform function pointers.
#if !defined(CDECL)
#if BUILDFLAG(IS_WIN)
#define CDECL __cdecl
#else // BUILDFLAG(IS_WIN)
#define CDECL
#endif // BUILDFLAG(IS_WIN)
#endif // !defined(CDECL)
// Compiler feature-detection.
// clang.llvm.org/docs/LanguageExtensions.html#has-feature-and-has-extension
#if defined(__has_feature)

@ -19,7 +19,7 @@ namespace {
// Pointer to the function that's called by DumpWithoutCrashing* to dump the
// process's memory.
void(CDECL* dump_without_crashing_function_)() = nullptr;
void (*dump_without_crashing_function_)() = nullptr;
template <typename Map, typename Key>
bool ShouldDump(Map& map, Key& key, base::TimeDelta time_between_dumps) {
@ -132,7 +132,7 @@ bool DumpWithoutCrashingWithUniqueId(size_t unique_identifier,
return false;
}
void SetDumpWithoutCrashingFunction(void (CDECL *function)()) {
void SetDumpWithoutCrashingFunction(void (*function)()) {
#if !defined(COMPONENT_BUILD)
// In component builds, the same base is shared between modules
// so might be initialized several times. However in non-

@ -78,7 +78,7 @@ NOT_TAIL_CALLED BASE_EXPORT bool DumpWithoutCrashingWithUniqueId(
// Sets a function that'll be invoked to dump the current process when
// DumpWithoutCrashing* is called. May be called with null to remove a
// previously set function.
BASE_EXPORT void SetDumpWithoutCrashingFunction(void (CDECL *function)());
BASE_EXPORT void SetDumpWithoutCrashingFunction(void (*function)());
// Clear both maps used to throttle calls to DumpWithoutCrashing for testing.
BASE_EXPORT void ClearMapsForTesting();

@ -161,7 +161,7 @@ class CopyHelper<const wchar_t*> {
// We provide our not very optimized version of wcslen(), since we don't
// want to risk having the linker use the version in the CRT since the CRT
// might not be present when we do an early IPC call.
static size_t CDECL StringLength(const wchar_t* wcs) {
static size_t StringLength(const wchar_t* wcs) {
const wchar_t* eos = wcs;
while (*eos++)
;