Commit graph

21 commits

Author SHA1 Message Date
Elie Morisse
bf8cd786e7 Differentiate C++ catch clauses from D ones by wrapping std::type_info pointers inside __cpp_type_info_ptr class instances like DMD does. (#2590)
Previously assuming in the personality routine that encountering a C++ exception meant that catch clauses were raw std::type_info pointers was wrong in cases like:

try {
   throwStdException(); // external C++ function throwing a std::exception
} catch (Throwable t) {
   (...)
}

Generated __cpp_type_info_ptr constants receive the same mangling that they do within DMD.
2018-02-24 13:50:30 +01:00
Martin
c6a9affc8f Support catching C++ exceptions for MSVC targets 2017-11-27 18:59:29 +01:00
Martin
dfe45715ba Enable catching C++ exceptions for non-MSVC targets 2017-11-26 18:41:01 +01:00
kinke
426f8c0593
Fix PGO for MSVC targets (issue #1943) (#2398) 2017-10-31 22:30:47 +01:00
Martin
2616261fd2 Revise all LDC-specific errors/warnings/deprecs and insert backticks
For DMD's new syntax highlighting. I grepped in all .{h,cpp} files only.
2017-08-03 22:53:49 +02:00
Martin
1fb269f940 Drop support for LLVM < 3.7 2017-07-16 02:18:00 +02:00
Rainer Schuetze
ae7f1a7f2c fix buildinng against LLVM master (#2111) 2017-05-16 20:43:29 +02:00
Johan Engelen
64df1687a8 Fix LLVM 5.0 compilation. 2017-04-14 12:55:19 +02:00
Ivan Butygin
a26bfc1223 Refactor code to hide direct IrFunction->func usage and add convenient functions (#1911) 2017-01-17 22:40:32 +01:00
Martin
4b72aad875 Fix issue #1774
Running a cleanup with a dummy target BB and later replacing all uses of
that dummy with the actual BB is buggy, as the cleanup keeps track of its
exit targets (via pointers) which aren't updated.
2016-10-02 12:11:05 +02:00
Martin
f8f9269055 Fix linking error when using LLVM < 3.8 and enabled LDC assertions 2016-09-24 11:33:49 +02:00
David Nadlinger
01ad624be7 gen/trycatchfinally: Remove unused parameter [nfc] 2016-09-03 14:38:10 +01:00
David Nadlinger
11572489d5 clang-format again some files touched in the next commits [nfc] 2016-09-03 00:52:00 +01:00
Martin
cac96fd0e9 Add some more comments for TryCatchFinallyScopes 2016-08-08 23:33:27 +02:00
Martin
963dd722dd Move EH ptr & selector and resume-unwind block to TryCatchFinallyScopes
To properly encapsulate landing pad emission.
2016-08-08 22:43:01 +02:00
Martin
25b186ce2d TryCatchFinallyScopes: Encapsulate unresolved gotos properly 2016-08-08 22:15:23 +02:00
Martin
92e9ad85fc Some minor improvements for gen/trycatchfinally 2016-08-08 22:15:20 +02:00
Martin
7b238f36c8 Move landing pads to the end of the function, in emission order 2016-08-08 01:26:51 +02:00
Martin
7d15ab9ffc Reduce ScopeStack to JumpTargets
Add some comments after this more or less clean separation, and move
callOrInvoke() to FuncGenState.
2016-08-07 21:29:47 +02:00
Martin
73652977e9 Move unresolved gotos from ScopeStack to TryCatchFinallyScopes 2016-08-07 20:32:20 +02:00
Martin
caf5397f6f Extend TryCatchScopes to TryCatchFinallyScopes 2016-08-07 18:45:59 +02:00