290 Commits

Author SHA1 Message Date
Axel Naumann
711a136562 Add and use Interpreter::makeDefaultCompilationOpts(). 2017-04-12 15:44:35 +02:00
Axel Naumann
52100eb2f1 Pass OptLevel to addModule. 2017-04-12 15:44:35 +02:00
Frederich Munch
f28c04c1a2 Add Interpreter::getMacroValue method. 2017-03-23 15:59:04 +01:00
Frederich Munch
9b3084f955 Add Interpreter::getMacro method. 2017-03-23 15:59:04 +01:00
Frederich Munch
5229194db4 Fix writing to freed memory if Interpreter::executeTransaction fails. 2017-03-23 15:14:04 +01:00
Frederich Munch
df47b1259a Formatting. 2017-02-21 16:34:19 +01:00
Frederich Munch
097a4e3fbd Only check DiagnosticsEngine::hasErrorOccurred, hasFatalErrorOccurred cannot be true without it. 2017-02-17 20:45:04 +01:00
Frederich Munch
de62978dad Fix error from ParseTopLevelDecl not always being propagated to the current Transaction. Fix LangOpts.AccessControl not begin set in AccessCtrlRAII_t, a regression this exposed. 2017-02-17 20:45:03 +01:00
Frederich Munch
eb40609ab2 Add -noruntime flag to force cling not load or use support for value-printing or null dereferencing. This makes it tons easier to debug DeclUnload and discover what isn't being unloaded. 2017-02-09 16:45:11 +01:00
Frederich Munch
efd446871c Fix LLVM API misuse when trying to replace and keep a DiagnosticConsumer. 2017-02-02 11:44:05 +01:00
Frederich Munch
439275025a Use Preprocessor::getSpelling to retrieve a macro string. 2017-02-02 10:14:15 +01:00
Frederich Munch
592e61ba1e Feature to generate precompiled headers. 2017-02-01 13:14:11 +01:00
Frederich Munch
e33b02a0e7 Stop initialization if the PCH contained errors. 2017-02-01 13:14:11 +01:00
Frederich Munch
6aa837920e Check initialization is proceeding as expecting.
Don't blindly run through initialization; make sure things are going according to plan.
If not handle it and run destructors without crashing.
Return standard error codes from main.
2017-02-01 13:14:11 +01:00
Frederich Munch
0e6023ed67 Add argument to IncrementalParser::commitTransaction to avoid clearing the DiagnosticsConsumer. Remove temporary variable. 2017-02-01 13:14:10 +01:00
Axel Naumann
8579aea04d Style. 2017-01-12 11:14:34 +01:00
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