Commit Graph

27 Commits

Author SHA1 Message Date
Vassil Vassilev
b1f4287c67 Reduce includes. 2014-03-24 14:25:58 +01:00
Vassil Vassilev
e5a0df500e Add support for C tentative definitions. 2014-02-06 14:50:57 +01:00
Vassil Vassilev
17387d8db0 Blanks. 2014-02-06 14:50:56 +01:00
Axel Naumann
44481ace1e Fix license; remove $Id$ version. 2014-01-07 11:14:04 +01:00
CristinaCristescu
1d06b2725b Workaround multiple DeclCollector instances. 2013-11-25 13:56:02 +01:00
CristinaCristescu
d6e2f85d1c Fix and improve macro error recovery. 2013-11-25 13:56:02 +01:00
CristinaCristescu
46f07198b0 Add comments and fix trailing spaces. 2013-11-25 13:56:01 +01:00
CristinaCristescu
85b4232729 Revert macro def for error recovery. 2013-11-25 13:56:01 +01:00
CristinaCristescu
0490caaa99 Macro recovery 2013-11-25 13:56:00 +01:00
Vassil Vassilev
59ced3f193 Move codegenning of deserialized declarations in the IncrementalParser.
We had two different codepath for codegeneration. The first one was for
declarations that came from text and the second one for declarations that came
from 'ExternalSource' such as PCH. In the latter case we had to do some
extra equilibristics to emulate a PCM and ignore generating code for decls with
static storage, because it will clash with the loading of the library that already
contains them.

The advantage of the new implementation is that instead of communicating the
deserialized decls to ROOT via some fishy deserialization listeners we can use
the cling::Transaction as we use it for decls that came from code.
2013-08-28 16:44:01 +02:00
Philippe Canal
f65616bffe Add assert 2013-08-12 21:38:56 +02:00
Vassil Vassilev
a8c9e880e9 Transactions that triggered deserialization shouldn't be considered as empty, because logically they are not and because ROOT needs the callbacks to be fired. 2013-08-02 17:34:57 +02:00
Axel Naumann
52bb894ffd Also pass global inline functions to the ASTDeserListener (aka ROOT Meta) 2013-05-17 06:48:40 +02:00
Axel Naumann
70695fe2be Update to clang/llvm r179269 (llvm vendor branch r49215):
Parser::Scope versus Sema::DeclContext are now checked for cross-vailidity.
Emit the TU-transaction explicitly instead of relying on a first transaction.
The typename extraction now takes a stream instead of a string to write to.
The llvm::Linker has much reduced functionality; use llvm::sys::Path instead to find dynamic libraries.


git-svn-id: http://root.cern.ch/svn/root/trunk@49325 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-24 16:28:08 +00:00
Axel Naumann
48b4a4e934 For Decls coming from a parsed file that describes the content of a library:
the callbacks must be triggered for those, too.
As they are not part of a transaction (think "module") they are now sent to the deserialization listener.
This can be removed once the modules work.

Set the state of the transaction to Committing before the static init - which might trigger more decls even though CodeGen has been run over the decls.

Forward DeclCollector::HandleInterestingDecl() to DeclCollector::HandleTopLevelDecl() for decls from the AST reader / from headers describing libraries.

Empty transactions must be passed to TCling; they trigger the sending of deserialized decls to ROOT/Meta.

Don't start TCling's artificial TU Transaction if the transaction coming in is empty - we need a decl to get the ASTContext.

Swap the deserialized decls before handling them in TCling, such that nested calls don't see the same decls again.


git-svn-id: http://root.cern.ch/svn/root/trunk@49197 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-10 15:15:49 +00:00
Axel Naumann
e70dfc300b Recurse over Namespaces; add comments / doc.
git-svn-id: http://root.cern.ch/svn/root/trunk@49169 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-10 06:57:36 +00:00
Axel Naumann
95db59648c Logic improvement: if a decl comes from an ASTReader is should not be collected, even if no codegen object exists.
Don't codegen statics and non-inline functions if from AST file or "forModules" is set:
Filter decls to be sent to codegen also based on the "forModules" flag, not only on whether it's from an AST file - in the end they are the same (forModules will vanish once we have modules).
Iterate over NamespaceDecls before emitting, to be able to filter their elements.


git-svn-id: http://root.cern.ch/svn/root/trunk@49152 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-09 15:38:50 +00:00
Vassil Vassilev
e9c68e3d38 One more (final) of "Resurrect the trunk" series:
Implement a shortcut for the deserialized decls to codegen. We do not need to put
the deserialized declaration in a transaction, because they are not interesting.
They are valid so we don't need to do sanity checks and if we'd want to unload
we would unload the entire PCH/PCM, which contains a list of all the deserialized
declarations.

NOTE that the implementation is rough and needs further polishing, which will 
happen some time soon...


git-svn-id: http://root.cern.ch/svn/root/trunk@49076 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-04 15:40:05 +00:00
Axel Naumann
c759ab29ed Add two missing ASTConsumer interfaces to the DeclCollector.
git-svn-id: http://root.cern.ch/svn/root/trunk@47986 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-12 08:08:56 +00:00
Vassil Vassilev
ef8d4e85ba Readd support (which we had long time ago) for tracking down which decl came from.
This "is meant" to help us generating the missing symbols in the llvm::Module.


git-svn-id: http://root.cern.ch/svn/root/trunk@47790 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-03 16:28:24 +00:00
Vassil Vassilev
fdd88b8a47 Implement basic infrastruction to begin tracking down the interfaces from which the decls came.
git-svn-id: http://root.cern.ch/svn/root/trunk@47787 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-03 14:27:12 +00:00
Philippe Canal
63ea4e20db avoid crashing when seeing module 'import' thingies
git-svn-id: http://root.cern.ch/svn/root/trunk@47653 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-27 15:54:36 +00:00
Vassil Vassilev
3a684ca4d6 HandleVTable assert is far too intrusive to stay.
git-svn-id: http://root.cern.ch/svn/root/trunk@47416 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-18 22:44:58 +00:00
Vassil Vassilev
991d6c55c8 Assert actually on use of one of those routines in Sema.
git-svn-id: http://root.cern.ch/svn/root/trunk@47411 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-18 20:52:41 +00:00
Vassil Vassilev
314d9a362c The decls for a transactions should be collected using single interface.
git-svn-id: http://root.cern.ch/svn/root/trunk@46724 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-22 16:43:57 +00:00
Vassil Vassilev
e087402f78 * Implement interpreter callbacks, which the Interpreter owns.
* Implement new callback functions - on transaction committed and transaction unloaded.
* Publish the Transaction class so that it can be visible by TCintWithCling.
* Publish the CompilationOptions needed by Transaction.
* Fix the references of Transaction and CompilationOptions.
* Forward declare where possible.
* Add missing keywords.
* Improve include style.


git-svn-id: http://root.cern.ch/svn/root/trunk@46264 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-02 10:30:25 +00:00
Axel Naumann
05ba8a3a07 Move cling from cint/ to interpreter/ (Will add a "we have moved" readme to cint/cling.)
git-svn-id: http://root.cern.ch/svn/root/trunk@45844 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-05 09:37:39 +00:00