274 Commits

Author SHA1 Message Date
Axel Naumann
bfe5e722e4 Grab the diag count from the target. 2017-01-12 11:14:34 +01:00
Axel Naumann
a5581de0fd Fix warning: moving a temporary object prevents copy elision. Thanks, clang! 2017-01-10 16:14:10 +01:00
Axel Naumann
8c3e5b2e2b Reset error count when hitting ext_return_has_expr. 2017-01-10 15:59:34 +01:00
Axel Naumann
4b78d08dfa Use a filtering diagclient for prompt input.
Before, cling was thrashing the location specific diag map making any diag emission really slow.
2017-01-10 15:59:34 +01:00
Frederich Munch
d68ef916ac Use LLVM stream wrappers to reduce complexity and line counts. 2016-12-20 12:29:06 +01:00
Frederich Munch
075f4ffa83 Add cling output streams to cling/Utils/Output.h 2016-12-19 13:59:11 +01:00
Axel Naumann
2e4b59990d Move BackendPasses to IncrementalExecutor.
They need the TargetMachine - and that's in the IncrementalExecutor.
2016-11-15 16:44:32 +01:00
Axel Naumann
87a972e570 Improve consistency for cling -x cuda. 2016-11-09 17:59:49 +01:00
Axel Naumann
3711cd0658 Unloaded Decls are now put back into CodeGen, no need to mark used. 2016-11-07 13:02:51 +01:00
Roman Zulak
71eb51a1d2 Windows: Make CheckABICompatibility check a header dependent constant.
Previously the check was for a standard installation of VisualStudio.
That check will have likely passed already, but the user could have
forced the include paths making the prior check somewhat meaningless.

Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-10-18 17:53:21 +02:00
Roman Zulak
1dadbe2495 Refactor CheckABICompatibility into a more legible version. Standardize error message. Return whether the ABI matched or not.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-10-18 17:53:21 +02:00
Roman Zulak
6c2ab5c9d2 Reformat includes and remove Windows.h dependency.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-10-18 17:53:21 +02:00
Roman Zulak
35c0ef1cdd Remove unused stream argument.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-10-05 10:53:00 +02:00
Axel Naumann
109ed8c33d Remove consumer's dangling reference. 2016-09-13 09:59:43 +02:00
Axel Naumann
26580a75ee Fix Coverity CID60778 - control flow depends on compile time constant. 2016-09-12 22:31:56 +02:00
Frederich Munch
c6b24d764c Fix TransactionPool placement new and delete.
TransactionPool was using placement new and delete improperly which could lead to Transaction::~Transaction running twice.
Make Transaction constructor private to make sure TransactionPool has allocated all Transactions it contains.
Remove "*Very useful for debugging purposes" leak on every allocation.
2016-09-12 17:29:20 +02:00
Frederich Munch
7e26a469c4 Windows: Fix redefinition warning of NOMINMAX. 2016-09-09 09:29:49 +02:00
Frederich Munch
5ee1cfb7c3 Refactor all argument parsing into InvocationOptions.cpp.
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-08-18 15:44:18 +02:00
Frederich Munch
4cdbc0461e Honor clangs -nostdinc++ and -nobuiltininc flags.
Rename AddHostCXXIncludes  to AddHostIncludes and delineate between -nostdinc++
and -nobuiltininc. When cling is invoked with -nobuiltininc, do not #include any runtime
files on startup.  Make ABI incompatability error consistent across platforms and add a test to verify behavior when this occurs.

More importantly this allow for easier debugging of Decl unloading as the amount of
declarations on startup is greatly reduced.

Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2016-08-18 15:44:17 +02:00
Axel Naumann
762942581e Remove unused function IncrementalParser::Parse(). 2016-07-22 16:14:11 +02:00
Axel Naumann
431e6e6815 Add clarifying comment. 2016-07-22 16:14:11 +02:00
CristinaCristescu
5e2df99165 Call compile for code completion and reset diagnostics after completion. 2016-07-22 16:14:11 +02:00
Frederich Munch
79afcba73d Fix needless assert in CheckABICompatibility for Debug builds. Trying to get a macro definition was using dyn_cast (which assert on NULL). The function is already handling that case later, so use dyn_cast_or_null. 2016-07-22 12:44:12 +02:00
Axel Naumann
12d10b3145 Fix unused var warning. 2016-07-21 15:59:24 +02:00
Axel Naumann
b3592df5c0 Fix (un)signed comparison warning. From Cristina! 2016-07-18 15:59:14 +02:00
CristinaCristescu
528b16faf6 Refactoring ROOT & Cling code completion. 2016-07-18 14:29:14 +02:00
CristinaCristescu
cc5da51f21 Cling patch for code completion. 2016-07-18 14:29:13 +02:00
Axel Naumann
97c5bafb2f Merge transaction unlinking into deregisterTransaction; pass nullptr if Transaction gets unloaded. 2016-06-26 10:29:17 +02:00
Axel Naumann
1ec7136eeb Refactor, centralize all TransactionUnloading in Interpreter. 2016-06-26 10:29:17 +02:00
Axel Naumann
6ba0924300 Trigger call to IncrementalJIT::removeModules()! 2016-06-26 10:29:17 +02:00
Axel Naumann
ab21611239 Change sequence of PP.EnterMainSourceFile() vs Sema.
Any source locs deserialized from the AST must know about the MainSourceFile to be rewired
into the existing AST / its source locations. Deserialization is triggered by m_Parser->Initialize().
2016-06-15 14:14:34 +02:00
Axel Naumann
61e474fda4 llvm upgrade. 2016-06-15 14:14:33 +02:00
Axel Naumann
8e5514f5b5 Only inject pointer checks if we run.
Fixes an issue visible on Ubuntu, where we deserialize a pointer check call from the PCH, that now has completely bogus (deserialized) pointers to Expr and Sema.
2016-04-21 19:14:47 +02:00
Axel Naumann
cec046a44f Dump stack trace when throwing a null deref exception. 2016-04-21 19:14:47 +02:00
CristinaCristescu
1cb874532b Correct DiagnoseIfInterpreterException in iterpreter. 2016-04-08 15:44:11 +02:00
CristinaCristescu
1472015449 Create function member of IncrementalParser for setting the transformers.
The transformers have to be set later in the initialization for 2 reasons:
- to avoid the null deref check before the check pointer function is declared
in the RuntimeUniverse;
- to avoid useless checks.
2016-04-08 15:44:11 +02:00
CristinaCristescu
8cd5175dd7 Add the null derefrencing transformer to the AST transformers.
Checking all cases will be beneficial if it does not compromise
stability and performance.
2016-04-08 15:44:11 +02:00
Bertrand Bellenot
2649f0d318 Fix cling compilation errors on Windows (with VS 2015) 2016-02-23 09:29:07 +01:00
Elisavet Sakellari
8f51dd1617 Remove default values in IncrementalParser functions 2016-01-14 20:44:14 +01:00
Elisavet Sakellari
b0bdcf4c56 First commit for the Multiple Interpreters. 2016-01-14 20:44:14 +01:00
Elisavet Sakellari
ee92892ad4 First commit for the Multiple Interpreters 2016-01-14 20:44:14 +01:00
CristinaCristescu
8ab37ec3d6 Enable Baozeng Ding's NullDeref protection for ROOT; use exceptions.
The function HandleInterpreterException catches the NullDerefException.
Remove pre-exception longjmp code.
2015-12-15 20:24:15 +01:00
Philippe Canal
432884aada Add a callback during Transaction's rollback. 2015-10-22 14:56:16 +02:00
Axel Naumann
a0618d59f4 whitespace. 2015-08-17 18:45:02 +02:00
Axel Naumann
1c190f711f RevertTransaction() changes parent: assert on m_Transactions.back() first. 2015-06-09 11:03:18 +02:00
Axel Naumann
886f586b08 Add assert; spelling. 2015-06-08 14:58:27 +02:00
Axel Naumann
14719848cc Do not shadow parameter name (Coverity 60786). 2015-06-07 20:54:00 +02:00
Axel Naumann
a1d3eabd7e Revert "Remove dupe code: CurT->setIssuedDiags() already done in endTransaction()."
ParseResult could be failure withous Diags noticing.

This reverts commit 6d0a73cb0acb3cbb62460759bc17e85ff9aba53f.
2015-06-04 12:05:04 +02:00
Axel Naumann
816232980c Delay resetting Diags until the Module has been released by Codegen. 2015-06-04 09:56:12 +02:00
Axel Naumann
6fc85c1883 Remove dupe code: CurT->setIssuedDiags() already done in endTransaction(). 2015-06-04 09:56:10 +02:00