Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/core/thread.d
Original file line number Diff line number Diff line change
Expand Up @@ -3905,6 +3905,10 @@ version( LDC )
version( X86 ) version = CheckFiberMigration;
version( X86_64 ) version = CheckFiberMigration;
}
else version( Windows )
{
version( X86 ) version = CheckFiberMigration;
}
}

// Fiber support for SjLj style exceptions
Expand Down
18 changes: 18 additions & 0 deletions src/ldc/attributes.d
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,21 @@ struct section {
struct target {
string specifier;
}

/**
* When applied to a function and building for Win32, creates a SAFESEH
* entry in the binary, so that the function is considered safe to be called
* as an exception handler.
*
* Examples:
* ---
* import ldc.attributes;
*
* @safeseh() extern(C) int myExceptionHandler(void*, void*, void*, void*)
* {
* return ExceptionContinueSearch;
* }
* ---
*/
struct safeseh {
};
3 changes: 3 additions & 0 deletions src/ldc/eh/common.d
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ extern(C) void fatalerror(in char* format, ...)
abort();
}

version(Win32) {} else version = notMSVC;
version(notMSVC):

// ------------------------
// Reading DWARF data
// ------------------------
Expand Down
Loading