SwiftCompilerSources: forward assertion and precondition failures to the assertion-handling in the C++ code base.

This commit is contained in:
Erik Eckstein
2024-06-25 14:14:43 +02:00
parent 718ea4b018
commit 81005c18a2
3 changed files with 31 additions and 6 deletions

View File

@@ -10,6 +10,7 @@
//
//===----------------------------------------------------------------------===//
#include "swift/Basic/Assertions.h"
#include "swift/Basic/BasicBridging.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/raw_ostream.h"
@@ -22,6 +23,11 @@
using namespace swift;
void assertFail(const char * _Nonnull msg, const char * _Nonnull file,
SwiftUInt line, const char * _Nonnull function) {
ASSERT_failure(msg, file, line, function);
}
//===----------------------------------------------------------------------===//
// MARK: BridgedStringRef
//===----------------------------------------------------------------------===//