blob: 440e242c1201545db07bece6d0b0af1cd5e0d7d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/**
* Implementation of exception handling support routines.
*
* Copyright: Copyright Digital Mars 1999 - 2013.
* License: Distributed under the
* $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).
* (See accompanying file LICENSE)
* Authors: Walter Bright
* Source: $(DRUNTIMESRC src/rt/deh.d)
*/
/* NOTE: This file has been patched from the original DMD distribution to
* work with the GDC compiler.
*/
module rt.deh;
extern (C)
{
Throwable.TraceInfo _d_traceContext(void* ptr = null);
void _d_createTrace(Object o, void* context)
{
auto t = cast(Throwable) o;
if (t !is null && t.info is null &&
cast(byte*) t !is typeid(t).initializer.ptr)
{
t.info = _d_traceContext(context);
}
}
}
version (GNU)
public import gcc.deh;
else version (Win32)
public import rt.deh_win32;
else version (Win64)
public import rt.deh_win64_posix;
else version (Posix)
public import rt.deh_win64_posix;
else
static assert (0, "Unsupported architecture");
|