try! error message should reprt the right location

At the moment the location being reported is inside the standard
library, which is not very helpful. Instead, the location should point
at the `try!` expression in the application code.

Fixes: rdar://problem/21407683
This commit is contained in:
Maxim Moiseev
2018-09-21 10:13:57 -07:00
parent de697dcae1
commit 5f17e64be0
7 changed files with 46 additions and 15 deletions

View File

@@ -214,7 +214,11 @@ void swift_willThrow(SWIFT_CONTEXT void *unused,
SWIFT_CC(swift) SWIFT_RUNTIME_STDLIB_API LLVM_ATTRIBUTE_NORETURN
void swift_errorInMain(SwiftError *object);
SWIFT_CC(swift) SWIFT_RUNTIME_STDLIB_API LLVM_ATTRIBUTE_NORETURN
void swift_unexpectedError(SwiftError *object);
void swift_unexpectedError(SwiftError *object,
OpaqueValue *filenameStart,
long filenameLength,
bool isAscii,
unsigned long line);
#if SWIFT_OBJC_INTEROP