Commit Graph

175 Commits

Author SHA1 Message Date
Philippe Canal
c926ac116c Add support for string arguments (allow spaces in them) for example: build.C("dummy18381.C"," " , "customConstructor.o customConstructorDict.o")
git-svn-id: http://root.cern.ch/svn/root/trunk@46847 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-27 01:09:08 +00:00
Philippe Canal
d1f4b8c39e Add code and testing for classes declared inside an anymous namespace
git-svn-id: http://root.cern.ch/svn/root/trunk@46841 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-26 19:51:56 +00:00
Vassil Vassilev
e979b92b16 Return 1 if the VerifyDiagnosticConsumer finds errors (eg. something seen but not
expected or expected but not seen).
Note this is going to break some of the tests, because there are some issues
with the way cling uses the VerifyDiagnosticClient.


git-svn-id: http://root.cern.ch/svn/root/trunk@46832 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-26 14:27:54 +00:00
Vassil Vassilev
516844befe Revert the parser cleanups. The RAII object is not sufficient for some routines.
Add BeginSourceFile so that the RAII object is happy when we do additional parser
recovery.


git-svn-id: http://root.cern.ch/svn/root/trunk@46828 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-26 13:32:41 +00:00
Vassil Vassilev
530c500d15 Add file to cmake build system.
git-svn-id: http://root.cern.ch/svn/root/trunk@46827 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-26 13:21:09 +00:00
Vassil Vassilev
4fd8ccc00d Rollback the transaction if there is an error occurred in one of the transformers.
git-svn-id: http://root.cern.ch/svn/root/trunk@46826 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-26 12:56:49 +00:00
Vassil Vassilev
b07eb9a4ec Move begin/end source file in commitCurrentTransaction to make sure that we
get relevant diagnostics from the transformers.
Fixes the text diagnostic printer bug #98434.


git-svn-id: http://root.cern.ch/svn/root/trunk@46822 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-26 10:08:00 +00:00
Vassil Vassilev
93adbbf34b Remove redundant cleanups.
git-svn-id: http://root.cern.ch/svn/root/trunk@46821 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-26 10:05:51 +00:00
Vassil Vassilev
e92073ebaf Think before commit - it helps... Fixes cling's testsuite.
git-svn-id: http://root.cern.ch/svn/root/trunk@46813 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-25 14:50:54 +00:00
Vassil Vassilev
b978876705 Flip the flag, because of the name change.
git-svn-id: http://root.cern.ch/svn/root/trunk@46810 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-25 14:10:41 +00:00
Vassil Vassilev
8c385cf901 Use better naming.
git-svn-id: http://root.cern.ch/svn/root/trunk@46809 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-25 14:07:19 +00:00
Vassil Vassilev
326c0b21b0 Give a chance to the eventual lazy function creators to do their job. (Thanks Philippe)
git-svn-id: http://root.cern.ch/svn/root/trunk@46804 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-25 12:58:50 +00:00
Vassil Vassilev
5d4af3ddc7 Add a way to disable the complaints of HandleMissing symbol, when it is ok for
the symbol to be missing.


git-svn-id: http://root.cern.ch/svn/root/trunk@46795 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-25 09:17:45 +00:00
Vassil Vassilev
f398425dbb Add note.
git-svn-id: http://root.cern.ch/svn/root/trunk@46791 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-25 08:33:40 +00:00
Philippe Canal
4215db4407 Always return the canonical decl of a function to ease comparison
git-svn-id: http://root.cern.ch/svn/root/trunk@46787 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-24 20:28:03 +00:00
Vassil Vassilev
09ca68c259 Don't dereference null ptr if the transaction has 0 decls
git-svn-id: http://root.cern.ch/svn/root/trunk@46753 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-24 07:34:53 +00:00
Vassil Vassilev
88bd362c63 Keep the const version only for now.
git-svn-id: http://root.cern.ch/svn/root/trunk@46742 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-23 13:03:08 +00:00
Vassil Vassilev
71ccaf68b7 Fix a typo, which will silence doxygen warnings.
git-svn-id: http://root.cern.ch/svn/root/trunk@46734 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-23 08:52:48 +00:00
Vassil Vassilev
10a8ff762d Protect in case no global variable is found.
git-svn-id: http://root.cern.ch/svn/root/trunk@46733 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-23 08:46:38 +00:00
Axel Naumann
835bb9fa1c Try to fix intermittent test failure (library not yet built)
git-svn-id: http://root.cern.ch/svn/root/trunk@46730 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-23 07:25:45 +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
50027e07fc std::vector::data() is not standartized and on windows it cause build failure.
GCC implements it but there is a comment saying:
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 464. Suggestion for new member functions in standard containers.
// data access
Use standartized alternative.


git-svn-id: http://root.cern.ch/svn/root/trunk@46710 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-22 12:35:32 +00:00
Axel Naumann
8e78058564 Revert r46665 until ROOT has an updated llvm == LastKnownGood is bumped.
git-svn-id: http://root.cern.ch/svn/root/trunk@46692 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 15:57:14 +00:00
Vassil Vassilev
cbd2ae5bac Keep just the head and the tail of the single-linked list.
git-svn-id: http://root.cern.ch/svn/root/trunk@46683 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 14:17:20 +00:00
Vassil Vassilev
acef61e88f Fix not only the address but the string too.
git-svn-id: http://root.cern.ch/svn/root/trunk@46681 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 13:49:34 +00:00
Philippe Canal
e60b8ce424 extend testing of typedef to reference
git-svn-id: http://root.cern.ch/svn/root/trunk@46679 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 13:33:38 +00:00
Vassil Vassilev
94994c05dc Publish the head of the transaction list so that the transactions become
iteratable. (We will use it in TCintWithCling)


git-svn-id: http://root.cern.ch/svn/root/trunk@46677 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 13:30:06 +00:00
Vassil Vassilev
da3a51f5f8 Make the transaction class single list.
git-svn-id: http://root.cern.ch/svn/root/trunk@46676 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 13:29:03 +00:00
Philippe Canal
51a176173b Use llvm::isa rathen that QualType::isXYZ as the later reports about the canonical type while we are interested in the direct type. Make sure to recurse if needed after removing the typedefs
git-svn-id: http://root.cern.ch/svn/root/trunk@46675 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 13:24:46 +00:00
Vassil Vassilev
d132d3d5ba evaluate now builds DeclRefExpr if there is DeclStmt.
Don't run the wrapper function when the transaction was rolled back.


git-svn-id: http://root.cern.ch/svn/root/trunk@46674 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 12:23:34 +00:00
Vassil Vassilev
d916876642 RunFunction takes FunctionDecl as an argument. Thus it avoids a lookup and
simplifies the implementation.


git-svn-id: http://root.cern.ch/svn/root/trunk@46673 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 11:56:52 +00:00
Vassil Vassilev
dac353c6df Each transaction has one wrapper function that we use all over.
Register the wrapper function in the transaction so that we can find it without
having to iterate over the rest of the declarations.


git-svn-id: http://root.cern.ch/svn/root/trunk@46672 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 11:49:49 +00:00
Vassil Vassilev
3fa63ae560 Make certain tests from the testsuite happy.
The issue was assert in codegen where the DeclRefExpr was built after the
declaration was extracted.


git-svn-id: http://root.cern.ch/svn/root/trunk@46671 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 10:46:53 +00:00
Vassil Vassilev
5b30c1e744 Why we didn't see that before. FileCheck is consuming the issued diagnostics,
which per se is terrible...


git-svn-id: http://root.cern.ch/svn/root/trunk@46669 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 10:07:41 +00:00
Vassil Vassilev
24cdb599f7 In many modes (eg like evaluate and value print) we need to find the last
expression in the wrapper function and do things with it. In some cases we 
must consider variable declarations as expressions (eg. int i = 5;) and take
the l-value and build a DeclRefExpr and return it.
Extract that common functionality out in a utility function and call it whenever
needed.


git-svn-id: http://root.cern.ch/svn/root/trunk@46668 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 09:22:36 +00:00
Vassil Vassilev
9fe2fb3239 Already in the mainline (r166208).
git-svn-id: http://root.cern.ch/svn/root/trunk@46665 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 08:05:57 +00:00
Vassil Vassilev
a209569ac5 * We need 0-terminated string (Thanks Axel for pointing that out) indeed.
* Add comment explaining it.
* Improve style of implementation.


git-svn-id: http://root.cern.ch/svn/root/trunk@46664 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 07:33:44 +00:00
Axel Naumann
9327a62ee1 Revert test r46655
git-svn-id: http://root.cern.ch/svn/root/trunk@46656 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 17:43:39 +00:00
Axel Naumann
5b0f6be89c Test for struct/class: who is complaining?
git-svn-id: http://root.cern.ch/svn/root/trunk@46655 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 17:42:39 +00:00
Vassil Vassilev
7f6039444b When we evaluate we *must* provide a value where the evaluated result to be stored
git-svn-id: http://root.cern.ch/svn/root/trunk@46642 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 12:24:04 +00:00
Vassil Vassilev
a952558fdc Reduce includes.
git-svn-id: http://root.cern.ch/svn/root/trunk@46640 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 12:10:29 +00:00
Vassil Vassilev
bdc04cd18e Extract the code duplication in separate routine.
git-svn-id: http://root.cern.ch/svn/root/trunk@46638 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 12:05:53 +00:00
Vassil Vassilev
f48a4881cd Add super efficient execute function. It doesn't do any fancy things with the
declarations - it just compiles and runs given expression or statement.


git-svn-id: http://root.cern.ch/svn/root/trunk@46636 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 11:56:20 +00:00
Vassil Vassilev
ff1861cfc2 Lit runs cling with --nologo.
git-svn-id: http://root.cern.ch/svn/root/trunk@46635 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 11:55:04 +00:00
Vassil Vassilev
2b27986ff9 Totally wrong assumptions. Pipe everything in FileCheck and we are done.
git-svn-id: http://root.cern.ch/svn/root/trunk@46633 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 10:25:24 +00:00
Vassil Vassilev
9ea3f22a54 Do not copy strings around when unneeded.
git-svn-id: http://root.cern.ch/svn/root/trunk@46632 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 09:43:05 +00:00
Vassil Vassilev
a907396350 Make it even simpler.
git-svn-id: http://root.cern.ch/svn/root/trunk@46631 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 09:38:39 +00:00
Vassil Vassilev
e8560dc77f This is definitely expected to fail.
git-svn-id: http://root.cern.ch/svn/root/trunk@46630 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 09:35:38 +00:00
Vassil Vassilev
59c03fda84 Simplify a bit the implementation. Make it more readable.
git-svn-id: http://root.cern.ch/svn/root/trunk@46629 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 09:33:29 +00:00
Vassil Vassilev
fe93a54d61 Silence doxygen warning.
git-svn-id: http://root.cern.ch/svn/root/trunk@46628 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 08:19:19 +00:00