Commit Graph

2461 Commits

Author SHA1 Message Date
Axel Naumann
9c383fcef3 clang is built without rtti; no chance to find its typeinfo. 2015-02-11 10:57:39 +01:00
Axel Naumann
e4da5f2858 Error now comes during reloc (static init). 2015-02-11 10:57:39 +01:00
Axel Naumann
1e8f686cf2 Update location of "missing symbol" error:
The resolution now happens during relocation, not just at the call.
A failure thereof causes the transaction to be reverted which makes
bar() undeclared.
2015-02-11 10:57:38 +01:00
Axel Naumann
6d3ab3f10f Re-enable inliner now that we have nice incremental modules. 2015-02-11 10:57:38 +01:00
Axel Naumann
11947dcbf2 Return failure if Transaction was rolled back! 2015-02-11 10:57:38 +01:00
Axel Naumann
67a20fea53 Static init triggers relocation which can fail; roll back. 2015-02-11 10:57:37 +01:00
Axel Naumann
9bae38af55 Check for missing symbols found during relocations. 2015-02-11 10:57:37 +01:00
Axel Naumann
e919b241c8 Remove unused struct. 2015-02-11 10:57:36 +01:00
Axel Naumann
061cd37390 Provide __cxa_atexit replacement through custom MemoryManager.
On some platforms, global destructors are registered through a call to
__cxa_atexit(dtor, 0/*args*/, __dso_handle). While __cxa_atexit can be resolved
by the regular MemoryManager, __dso_handle (representing the "current shared
library" such that the corresponding atexit function can be called on its
dlclose) can not be resolved by MCJIT. Instead, we provide our own, poining to
the ExecutionEngine, which in turn holds a "current module" that corresponds in
spirit to the shared library handle.

__cxa_atexit, on the other hand, needs to be re-wired: the interpreter needs to
destruct globals upon its destruction, and those globals from a certain module
when that module is unloaded.

Both is done through a custom MemoryManager, significantly reducing the
complexity of the previous ("JIT without MC") implementation.

The custom MemoryManager also forwards in case of a unknown symbols to the LazyFunctionCreators instead of using the generic
ExecutionEngine::InstallLazyFunctionCreator() which has no effect with MCJIT.
2015-02-11 10:57:36 +01:00
Axel Naumann
9e68b58517 We will simply have to capture global dtors differently on Windows. 2015-02-11 10:57:35 +01:00
Axel Naumann
2ee6383c36 Remove inline asm boost hack: not needed for MCJIT. 2015-02-11 10:57:35 +01:00
Axel Naumann
baf51f6b04 Create a new llvm::Module per codegen'ed transaction.
MCJIT needs to finalize modules. To simplify the interface with MCJIT, each
transaction now has its own module. It gets created when the previous module
gets passed to the execution engine; the first one is created by
clang::CreateLLVMCodeGen(). CodeGen now releases the module such that it can be
added to the execution engine.

This enables simple use cases of cling with MCJIT; most notably cross-module
linking is still missing.
2015-02-11 10:57:34 +01:00
Philippe Canal
39c7e56770 typo 2015-02-05 17:25:25 +01:00
Axel Naumann
5cbc3fec0f Keep default args once there is a template definition (ROOT-7037). 2015-02-05 16:57:37 +01:00
Axel Naumann
e1bc2a432a Document crucial data member. 2015-02-05 16:57:36 +01:00
Axel Naumann
e49e187721 Protect from nullptr deref. 2015-01-29 14:24:29 +01:00
Axel Naumann
cf466c8d13 Request _ZN9__gnu_cxxL27__exchange_and_add_dispatchEPii, missing on some SLC6.
When building with RedHat's devtoolset the system's libstdc++.so is used. Missing
symbols are patched in to the binary through a static archive. We need to pull
more symbols from the archive to make them available to cling. This list will
possibly need to grow...
2015-01-29 10:55:32 +01:00
Axel Naumann
899a5dde32 Use the end of the latest memory buffer as Diag pop point.
We might have a memory buffer taht causes the creation of other memory
buffers - which hang from our parent memory buffer, and get parsed before
we pop the diagnostics. The pop location must thus not be the end of our
memory buffer - because those later memory buffers might have created
later DiagStorePoints. Simply use the end location of the last memory
buffer - there cannot be any later Diag pop than that within our call.
2015-01-23 16:24:14 +01:00
Axel Naumann
e34dec8664 Move Diag suppression to IncrementalParser.
This gets rid of the messy pulling-SourceLocations-out-of-thin-air and instead simply
uses begin and end of the relevant memory buffer where diags are meant to be suppressed.
2015-01-23 16:24:13 +01:00
Axel Naumann
ee2ba35e0f Unsuppressed the warnings once done! 2015-01-23 16:24:13 +01:00
Axel Naumann
ba995aca73 Add flag whether prompt-style diagnostics should be suppressed. 2015-01-23 16:24:12 +01:00
Axel Naumann
5ff794a175 Prevent re-parse of "#include \"RuntimeUniverse.h\"". 2015-01-23 16:24:12 +01:00
Axel Naumann
e7a9c01eb0 Combine declare()s into one. 2015-01-23 16:24:11 +01:00
Axel Naumann
c86be214cb Fix doxygen warning. 2015-01-22 11:26:03 +01:00
Axel Naumann
7e981e541c Factor out unload point creation. 2015-01-21 16:59:05 +01:00
Axel Naumann
d6c812a25a Use compiler to generate .d file wherever possible (ROOT-7041).
This makes use of the "advanced" version of the compiler generated dependency
files which also works for missing / generated headers. It ignores dependencies
on system headers.

It simply comments the invocation of rmkdepend while still building it for other
users (for instance TMVA's stand-alone Makefile expects to find rmkdepend).
2015-01-21 16:59:05 +01:00
Axel Naumann
4f217d95b3 Veto fwd decl of complex template default argument expressions.
Works around issue with ATLAS forward decl of

namespace Eigen{
  namespace internal{
    template <typename T, int Size, int MatrixOrArrayOptions,
              int Alignment = (MatrixOrArrayOptions & DontAlign) ? 0 : (((Size * sizeof(T)) % 16) == 0) ? 16 : 0>
    struct plain_array;
}}
2015-01-09 16:23:11 +01:00
Axel Naumann
cb18d9bc09 Also store Parser paren numbers; likely fixes ROOT-6976:
The parser (or rather the BalancedDelimiterTracker) was doing a Parser::cutOffParsing() because
of an overflow of open ( - because we never reset the count.
2015-01-08 18:36:10 +01:00
Danilo Piparo
4dd0bb94ea Add protection in case no file is associated to the decl 2014-12-17 18:35:14 +01:00
Bertrand Bellenot
76d6fff7c9 Disable exceptions on Windows (until they are properly supported by clang) 2014-12-17 14:06:04 +01:00
Axel Naumann
3e25ce86e0 Refactor, do not touch disk if coming from PCH (slc6->slc7). 2014-12-16 16:39:06 +01:00
Axel Naumann
1497128ee7 Add test for ROOT-6650. 2014-12-16 11:06:04 +01:00
Axel Naumann
46aca4b23e InstantiationDependent is dependent, too; fix logic. (ROOT-6650) 2014-12-16 10:34:17 +01:00
Axel Naumann
3d4398f54a Remove leftover variable. 2014-12-16 10:34:16 +01:00
Axel Naumann
5bf6da8e73 Use Module::getNamedValue() to check for existing symbols (ROOT-6909). 2014-12-15 15:40:05 +01:00
Axel Naumann
dc9fbe901a Use the newly serialized tokens instead of hitting disk (ROOT-6942). 2014-12-15 15:40:04 +01:00
Bertrand Bellenot
2a87d75fed Fix a compilation error on Windows with VS2013
As reported on the forum (http://root.cern.ch/phpBB3/viewtopic.php?f=21&t=19033), a macro called IN is defined on Windows, causing a compilation error. Renaming the iterator fixes the problem.
2014-12-10 09:22:16 +01:00
Philippe Canal
185f135b06 Avoid spurrious complaint about one of the dynamic scope artefact.
This is related to ROOT-6721.
root [1] RooPlot * pl = x.frame(Title(x));
input_line_39:2:36: error: hexadecimal floating constants require an exponent
(*(class RooRealVar*)0x10c746058.frame(Title(x)))
                                   ^
2014-12-09 23:42:12 +01:00
Axel Naumann
232f3616d5 Only call GetFullyQualifiedName() if wrapper does not exist (ROOT-6909). 2014-12-05 18:35:14 +01:00
Axel Naumann
5080b386fb Errors are errors (ROOT-5698). 2014-12-03 15:47:13 +01:00
Axel Naumann
c77803890e Buffer the pending instantiations in case or recursive parsing. 2014-12-03 12:06:34 +01:00
Axel Naumann
ad54637904 Argument parsing can trigger ASTReading; needs transaction (ROOT-6625). 2014-11-20 11:22:17 +01:00
Axel Naumann
0008e18493 More override fixes - thanks, clang! 2014-11-06 21:05:09 +01:00
Axel Naumann
0313d05fea Fix new clang warning: missing override. 2014-11-06 18:00:05 +01:00
Maxim Ivanov
8b00d8b7a4 Fix a sneaky typo
💄
2014-11-06 12:13:29 +01:00
Axel Naumann
73a77da3c6 Do not call and action a failure if it is not handled here (ROOT-6611). 2014-10-31 04:42:03 +01:00
Axel Naumann
10ffea0818 Default to successful action (ROOT-6611). 2014-10-31 04:42:03 +01:00
Axel Naumann
8300b4ba43 Ensure redecls are part of the chain when unloading (ROOT-6832). 2014-10-31 01:02:11 +01:00
Axel Naumann
c15be9ff4b Memory error: getSpelling() returns a std::string (thanks, valgrind). 2014-10-27 16:15:11 +01:00
Axel Naumann
d22c54fd61 Return 0 to signal missing symbols. 2014-10-22 19:16:06 +02:00