Commit Graph

3112 Commits

Author SHA1 Message Date
Axel Naumann
3bd3ff18cb Make sure required symbols are exported:
and use a standard mechanism that plays well with -fvisibility.
Given that several symbols now use declspec(dllexport), remove them from
the ad-hoc cling_exports in ROOT's CMakeLists.txt.
2021-05-25 16:29:06 +02:00
Axel Naumann
fc5b3e6f16 Silence GCC 4.8 / CentOS7 warnings:
cling/include/cling/Interpreter/LookupHelper.h:61:69: warning: missing initializer for member ‘std::array<const clang::Type*, 4ul>::_M_elems’ [-Wmissing-field-initializers]
     std::array<const clang::Type*, kNumCachedStrings> m_StringTy = {};
                                                                     ^
2021-05-21 09:44:08 +02:00
Javier Lopez-Gomez
668dfdcc7f cleanup MetaSema.cpp
Additionally, this commit extends the behavior of `.x`. Specifically, it adds
support for a list of function names whose execution will be tried in order.

To be compliant with the old behavior, this list currently only includes an
entry that matches the macro filename.
2021-05-12 17:59:06 +02:00
Vassil Vassilev
561e905b24 Use the dyld to show more meaningful message when a symbol is missing.
The dynamic library manager's dyld can search a symbol in the library path.
This patch uses that functionality to aid the 'unresolved while linking'
diagnostics.

Now we get:

cling -L lib/

****************** CLING ******************
* Type C++ code and press enter to run it *
*             Type .q to exit             *
*******************************************
[cling]$ extern int gErrorIgnoreLevel;
[cling]$ gErrorIgnoreLevel
IncrementalExecutor::executeFunction: symbol 'gErrorIgnoreLevel' unresolved while linking [cling interface function]!
Symbol found in '/.../lib/libCore.so'; did you mean to load it with .L /.../lib/libCore.so ?
[cling]$
2021-05-08 20:59:07 +02:00
Vassil Vassilev
74f74a7d0b Remove the include to IncrementalExecutor.
This exposed a set of missing includes and constructors to destroy the
backend passes.
2021-05-08 20:59:07 +02:00
Vassil Vassilev
d466a98e30 Consider only dll files to be shared libraries.
This avoids problems where we consider other executables and object files as
libraries and the dyld decides to scan them. Upon this we hit files opened by
other processes and locked by the system (such as bootstat.dat :))

Thanks to Bertrand Bellenot for the diagnosis!
2021-05-08 20:59:06 +02:00
Axel Naumann
db2c5de3f2 Lifetime of MetaParser is that of its input:
Before, MetaParser might have pointed to a StringRef whose storage
was gone, see asan failure in roottest/cling/other/runfileClose.C below.

This was caused by recursive uses of MetaParser; see stack trace below:
the inner recursion returned, but as the same MetaParser object was used
by both frames, the objects cursor now pointed to freed memory.

Instead, create a MetaParser (and MetaLexer) object per input. That way,
their lifetime corresponds to the lifetime of their input.

=================================================================
==529104==ERROR: AddressSanitizer: stack-use-after-return on address 0x7ffff3afd82a at pc 0x7fffea18df6d bp 0x7fffffff8170 sp 0x7fffffff8168
READ of size 1 at 0x7ffff3afd82a thread T0
[Detaching after fork from child process 529183]
    #0 0x7fffea18df6c in cling::MetaLexer::Lex(cling::Token&) src/interpreter/cling/lib/MetaProcessor/MetaLexer.cpp:58:11
    #1 0x7fffea190d7c in cling::MetaParser::lookAhead(unsigned int) src/interpreter/cling/lib/MetaProcessor/MetaParser.cpp:89:15
    #2 0x7fffea190bd5 in cling::MetaParser::consumeToken() src/interpreter/cling/lib/MetaProcessor/MetaParser.cpp:49:5
    #3 0x7fffea191d4d in cling::MetaParser::isLCommand(cling::MetaSema::ActionResult&) src/interpreter/cling/lib/MetaProcessor/MetaParser.cpp:147:9
    #4 0x7fffea1914dd in cling::MetaParser::isCommand(cling::MetaSema::ActionResult&, cling::Value*) src/interpreter/cling/lib/MetaProcessor/MetaParser.cpp:123:12
    #5 0x7fffea191216 in cling::MetaParser::isMetaCommand(cling::MetaSema::ActionResult&, cling::Value*) src/interpreter/cling/lib/MetaProcessor/MetaParser.cpp:101:33
    #6 0x7fffea14e5aa in cling::MetaProcessor::process(llvm::StringRef, cling::Interpreter::CompilationResult&, cling::Value*, bool) src/interpreter/cling/lib/MetaProcessor/MetaProcessor.cpp:317:24
    #7 0x7fffe99b67b7 in HandleInterpreterException(cling::MetaProcessor*, char const*, cling::Interpreter::CompilationResult&, cling::Value*) src/core/metacling/src/TCling.cxx:2431:29
    #8 0x7fffe99bde30 in TCling::Load(char const*, bool) src/core/metacling/src/TCling.cxx:3454:10
    #9 0x7ffff7865f11 in TSystem::Load(char const*, char const*, bool) src/core/base/src/TSystem.cxx:1941:27
    #10 0x7ffff7b8a0e3 in TUnixSystem::Load(char const*, char const*, bool) src/core/unix/src/TUnixSystem.cxx:2789:20
    #11 0x7fffd78dd08b  (<unknown module>)
    #12 0x7fffe9f8a5d9 in cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const src/interpreter/cling/lib/Interpreter/IncrementalExecutor.cpp:376:3
    #13 0x7fffe9d73dc2 in cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) src/interpreter/cling/lib/Interpreter/Interpreter.cpp:1141:20
    #14 0x7fffe9d6e317 in cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) src/interpreter/cling/lib/Interpreter/Interpreter.cpp:1391:29
    #15 0x7fffe9d6c1fe in cling::Interpreter::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::Value*, cling::Transaction**, bool) src/interpreter/cling/lib/Interpreter/Interpreter.cpp:819:9
    #16 0x7fffea151826 in cling::MetaProcessor::readInputFromFile(llvm::StringRef, cling::Value*, unsigned long, bool) src/interpreter/cling/lib/MetaProcessor/MetaProcessor.cpp:507:22
    #17 0x7fffe99b585b in TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) src/core/metacling/src/TCling.cxx:2570:39
    #18 0x7fffe99bbfee in TCling::ProcessLineSynch(char const*, TInterpreter::EErrorCode*) src/core/metacling/src/TCling.cxx:3496:17
    #19 0x7ffff77203d3 in TApplication::ExecuteFile(char const*, int*, bool) src/core/base/src/TApplication.cxx:1608:30
    #20 0x7ffff771ebdf in TApplication::ProcessFile(char const*, int*, bool) src/core/base/src/TApplication.cxx:1480:11
    #21 0x7ffff771e385 in TApplication::ProcessLine(char const*, bool, int*) src/core/base/src/TApplication.cxx:1453:14
    #22 0x7ffff7f8157a in TRint::ProcessLineNr(char const*, char const*, int*) src/core/rint/src/TRint.cxx:766:11
    #23 0x7ffff7f802f0 in TRint::Run(bool) src/core/rint/src/TRint.cxx:424:22
    #24 0x4ff96d in main src/main/src/rmain.cxx:30:12
    #25 0x7ffff6e040b2 in __libc_start_main /build/glibc-YbNSs7/glibc-2.31/csu/../csu/libc-start.c:308:16
    #26 0x41f35d in _start (asan/bin/root.exe+0x41f35d)

Address 0x7ffff3afd82a is located in stack of thread T0 at offset 42 in frame
    #0 0x7fffe99b3d8f in TCling::ProcessLine(char const*, TInterpreter::EErrorCode*) src/core/metacling/src/TCling.cxx:2456

  This frame has 21 object(s):
    [32, 56) 'sLine' (line 2462) <== Memory access at offset 42 is inside this variable
    [96, 104) 'R__guard2471' (line 2471)
    [128, 136) 'R__guard2488' (line 2488)
    [160, 176) 'interpreterFlagsRAII' (line 2491)
    [192, 240) 'result' (line 2511)
    [272, 276) 'compRes' (line 2512)
    [288, 312) 'mod_line' (line 2517)
    [352, 376) 'aclicMode' (line 2518)
    [416, 440) 'arguments' (line 2519)
    [480, 504) 'io' (line 2520)
    [544, 568) 'fname' (line 2521)
    [608, 632) 'ref.tmp' (line 2547)
    [672, 696) 'ref.tmp145' (line 2547)
    [736, 768) 'code' (line 2555)
    [800, 832) 'codeline' (line 2556)
    [864, 1384) 'in' (line 2559)
    [1520, 1552) 'ref.tmp176' (line 2562)
    [1584, 1600) 'agg.tmp'
    [1616, 1624) 'ref.tmp198' (line 2568)
    [1648, 1664) 'agg.tmp207'
    [1680, 1696) 'autoParseRaii' (line 2588)
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-use-after-return src/interpreter/cling/lib/MetaProcessor/MetaLexer.cpp:58:11 in cling::MetaLexer::Lex(cling::Token&)
Shadow bytes around the buggy address:
  0x10007e757ab0: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x10007e757ac0: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x10007e757ad0: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x10007e757ae0: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x10007e757af0: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
=>0x10007e757b00: f5 f5 f5 f5 f5[f5]f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x10007e757b10: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x10007e757b20: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x10007e757b30: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x10007e757b40: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
  0x10007e757b50: f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5 f5
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==529104==ABORTING

    at src/interpreter/cling/lib/MetaProcessor/MetaLexer.cpp:49
    at src/interpreter/cling/lib/MetaProcessor/MetaParser.cpp:41
    compRes=@0x7ffff3afd910: cling::Interpreter::kSuccess, result=0x7ffff3afd8c0, disableValuePrinting=false)
    at src/interpreter/cling/lib/MetaProcessor/MetaProcessor.cpp:314
    input_line=0x7ffff3afd829 "#define XYZ 21", compRes=@0x7ffff3afd910: cling::Interpreter::kSuccess,
    result=0x7ffff3afd8c0) at src/core/metacling/src/TCling.cxx:2431
    error=0x7fffd78cb0f4 <x>) at src/core/metacling/src/TCling.cxx:2591
    sync=false, err=0x7fffd78cb0f4 <x>) at src/core/base/src/TApplication.cxx:1472
    line=0x7fffd78c9000 "#define XYZ 21", error=0x7fffd78cb0f4 <x>)
    at src/core/base/src/TROOT.cxx:2328
   from asan/roottest/cling/other/fileClose_C.so
    filename=0x6070000f0fd0 "asan/roottest/cling/other/fileClose_C.so", flag=257)
    at /home/axel/build/llvm/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:6270
    at src/interpreter/cling/lib/Utils/PlatformPosix.cpp:118
    permanent=false, resolved=true)
    at src/interpreter/cling/lib/Interpreter/DynamicLibraryManager.cpp:184
    at src/interpreter/cling/lib/Interpreter/Interpreter.cpp:1444
    T=0x0) at src/interpreter/cling/lib/Interpreter/Interpreter.cpp:1560
    at src/interpreter/cling/lib/MetaProcessor/MetaSema.cpp:57
    actionResult=@0x7ffff39532b0: cling::MetaSema::AR_Success)
2021-05-05 09:44:04 +02:00
Vassil Vassilev
682b7b9505 Reimplement HandleInvalidTagDeclDefinition without clang support.
See https://reviews.llvm.org/D92248
2021-05-03 19:29:03 +02:00
Axel Naumann
7a35c2ddbc LookupHelper: suppress diags from adding templt funcs:
Sema::AddTemplateOverloadCandidate() can issue diagnostics as part of the
template instantiation it performs. The LookupHelper just wants to know
whether there is a matching function, which is similar to a SFINAE context
and a good reason to silence potential diagnostics if asked to do so!

Do get there, simple increase the scope of the setSuppressAllDiagnostics()
calls, and make it an RAII for robustness.
2021-04-27 11:29:05 +02:00
Jonas Hahnfeld
fd2212c84e Create new CompoundStmt instead of replacing children
For the update of LLVM 9, Cling required another patch to Clang for
replacing the children of a CompoundStmt. Instead solve this by
creating a new CompoundStmt with the right Stmts attached.

Co-authored-by: Jonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>
Co-authored-by: Jonas Hahnfeld <hahnjo@hahnjo.de>
2021-04-23 09:29:06 +02:00
Jonas Hahnfeld
e13eff3119 Skip recursive visits in EvaluateTSynthesizer
As Node is still a CompoundStmt, this will call the same function
recursively and again visit all previously visited and replaced
children, which doesn't seem necessary.
2021-04-23 09:29:06 +02:00
Jonas Hahnfeld
9e43996a41 Set full target for Apple M1 (#7787)
The argument -Xclang -triple=... completely bypasses Clang's Driver
logic and only sets the triple in CC1. This suffices for most code
generation tasks, but the Driver cannot compute the correct ABI and
sets the generic AArch64 "aapcs" instead of the specific "darwinpcs".
In turn, this causes integer arguments with less than 32 bits not
being sign-extended but being passed directly, which for example
manifests as (short)-1 being read as 65535 on the callee side.

The new argument --target=arm64-apple-darwin20.3.0 matches what
Apple's and LLVM main's clang return for --print-target-triple.

Fixes #7090
2021-04-06 17:29:06 +02:00
Axel Naumann
9432fb6582 LookupHelper must not unload Transactions:
Outer RAIIs might still reference the Transaction, and unload is
assuming that it owns the transaction and can delete it / put it
into the TransactionPool.

This fixes https://github.com/root-project/root/issues/7657

We still need to track ownership as what has happened here (unload
of a Transaction held by an RAII) can happen again / elsewhere.
This will be addressed by a subsequent PR in master.
2021-04-06 00:14:05 +02:00
Axel Naumann
4edb1ed0f2 Assert released transaction is != last in pool:
a cheap way to notice what went wrong in https://github.com/root-project/root/issues/7657.
2021-04-06 00:14:05 +02:00
Axel Naumann
2555c8f542 Remove historical leftover in TransactionPool size (NFC). 2021-04-06 00:14:05 +02:00
Axel Naumann
8b80e83595 Assert that no nested attaches to unloading Transaction. 2021-04-06 00:14:05 +02:00
Axel Naumann
db8d306106 Fix alignment of Transaction allocation:
new of a char array might not have the correct alignment to hold a Transaction.
Allocate a Transaction itself directly, instead of in-place constructing it in
the character array.

Each Transaction in the pool is thus constructed through `new Transaction(S)`
and destructed through `delete T`, which is nicely symmetrical. The use of
`::operator new` and `::operator delete` isn't actually necessary.

While I'm at it, improve the assert message's wording.
2021-04-06 00:14:05 +02:00
Vassil Vassilev
0a3384a342 Remove comment, clarify intent. 2021-04-02 08:59:05 +02:00
Axel Naumann
cfc6f86de1 Throw less exceptions on Apple M1:
As llvm JIT cannot catch exceptions on Apple M1 (see
https://github.com/root-project/root/issues/7541) cling
should throw less. This is a hack to reduce the impact
a bit.
2021-03-31 15:29:04 +02:00
Vassil Vassilev
a89bbcbb04 Do not bind cling's sysroot to a particular version of osx sdk.
The CMAKE_OSX_SYSROOT exports the exact version of the sdk which we build
against. However, this means that binary releases become sensitive to minor sdk
upgrades (eg. MacOSX11.1.sdk -> MacOSX11.2.sdk). Our infrastructure is
relatively resilient to such changes.

This patch introduces a workaround to address this issue -- it uses the fact
that the current sdk's parent directory has a symlink MacOSX.sdk which points
to the current sdk.

This should resolve root-project/root#7021.
2021-03-21 21:59:03 +01:00
Axel Naumann
2b1af22926 In failed lookup, unload only decls produced, not existing fwd decl:
Before, pre-existing fwd decls of specializations got unloaded.

OTOH, any decl produced during (failed) template instantiation must
also be unloaded; see #6331. Those are easiest identified by unloading
the whole (failed) transaction.

```
error: no member named 'value' in 'std::__and_<std::is_copy_assignable<std::__cxx11::basic_string<char> >, std::is_copy_assignable<Inner<int> > >'
                       is_copy_assignable<_T2>>::value,
                       ~~~~~~~~~~~~~~~~~~~~~~~~~~^
```

which is due to the first decl being invalid (as `Inner<int>` does not have a deinition and a `static_assert` /usr/lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/type_traits:1093 being triggered), then not unloaded, and then picked up again where we *do* have the definition for `Inner<int>`.

Add test for templt spec lookup vs unloading.
2021-03-18 19:59:03 +01:00
Axel Naumann
9ca9606a74 PushTransactionRAII: do not commit broken transactions:
There is no point in emitting a transaction that has been rolled back to
CodeGen. To make matters worse, a rolled-back transaction will not show up
in the list of transactions.
2021-03-18 19:59:03 +01:00
Axel Naumann
e66ea9ad58 Allow unloading of Transactions that have not been committed:
If Lookup fails to instantiate, its transaction should not be committed,
as we know it's useless and must be unloaded as it might contain invalid
Decls.
But that means Lookup needs to unload a non-committed transaction.
2021-03-18 19:59:03 +01:00
Axel Naumann
2fc0a3c5c4 Skip non-regular files to find dylibs:
To determine the file magic, the file needs to be opened and read.
This is done with *each* file in $LD_LIBRARY_PATH, including ./
If one of them is e.g. a FIFO then reading blocks until someone
writes into the FIFO, which might cause the process to hang. This
was reported a couple of times, such as at https://root-forum.cern.ch/t/compiling-from-source-first-interactive-command-hangs/43997/5

Solution: only check for the file magic of *regular* files.

Sadly, llvm::sys::fs::get_file_type never sets file_not_found but
returns an unspecific status_error.
2021-03-18 19:44:06 +01:00
Axel Naumann
81b683bf1d When injecting symbols, do not rely on the last Module:
With llvm9, the module ptr gets reset upon emission.
Instead, just look for the symbol in the JIT - where it should be found,
as Init() is injecting it there, and we want to find *that* symbol,
not the one from the binary.

Fixes `CodeUnloading/AtExit.C` cling test.
2021-03-16 09:59:04 +01:00
Axel Naumann
0ae95fb193 Improve diag on #pragma load failure. 2021-03-16 09:59:03 +01:00
Jonas Hahnfeld
b38192f29f Disable GlobalISel on AArch64 (#7419)
In tests on an Apple M1 after the upgrade to LLVM 9, this new
instruction selection framework emits branches / calls that expect
all code to be reachable in +/- 128 MB. This cannot be guaranteed
during JIT, which generates code into allocated pages on the heap
and could span the entire address space of the process.
2021-03-09 21:29:04 +01:00
Axel Naumann
d1c49f4397 Put else back to handle CastExpr of DeclRefExpr 2021-03-07 00:14:03 +01:00
Axel Naumann
e0249a77d2 ForwardDeclPrinter: also log skipped types. 2021-03-07 00:14:03 +01:00
Axel Naumann
44f304c672 skipDecl if template arg cannot be fwd declared:
Fixes CMS dictionary build issue with forward declaring a template argument
of enum constant type - something we do not forward declare.
2021-03-07 00:14:03 +01:00
Axel Naumann
31cbf79eb6 A CastExpr cannot be a DeclRefExpr. 2021-03-07 00:14:03 +01:00
Simeon Ehrig
6fddcc0e42 Fix bug in cling's diagnostic engine, if CUDA mode is enable
- solves the bug, that error messages of the device compiler was
not prefixed with "cling-ptx"
2021-03-06 09:29:07 +01:00
Axel Naumann
7c83a3e0ae Windows needs more symbols to be injected:
such as __dllonexit() and _onexit(). Without, static destruction
does not happen, as can be seen by roottest/cling/staticinit/execROOT-7775.C
failing to call the static destructors.
2021-02-25 20:44:19 +01:00
Javier Lopez-Gomez
b5348025ef DeclExtractor: exit early if there is nothing to do
In LLVM 9, the `CompoundStmt::replaceStmts()` call seems to write to an invalid
memory location if the body was empty. This may happen after a parse error and
might end up corrupting the program state.

This patch makes `DeclExtractor` to exit early if there is nothing to do, which
solves the aforementioned problem.
2021-02-25 20:44:19 +01:00
Vassil Vassilev
dad7ed462e removeRedeclFromChain is a template static. Fixes osx warning. 2021-02-25 20:44:19 +01:00
Vassil Vassilev
f2e5f43acf Fix warnings about the ignored quals. 2021-02-25 20:44:19 +01:00
Simeon Ehrig
be5ea3a651 Fixed CUDA mode for Clang/LLVM 9 upgrade
- fix bug, which was caused by executing a transaction in the device
interpreter
- fixed warning from the device compiler
- update test cases
2021-02-25 20:44:19 +01:00
Vassil Vassilev
84bcd07963 Add a module for Vc.
This should fix a problem where the ClingTest unit test fails due to the fact
that std::vector is copied and delivered by Vc pulling a wrong dependency.
2021-02-25 20:44:19 +01:00
Vassil Vassilev
fedeedc2cd Improve "[cling] DefinitionShadower: allow shadowing of non-user-defined declarations (#6571)"
The patch applies a patch to remove duplicated entries from the StoredDeclsList.
Apparently, reading a yet-to-be-determined PCM file adds the same `Decl *` to
the lookup table. Trying to remove it using `StoredDeclsList::remove()` makes
an internal assertion to fail, as it expects the Decl to disappear from the
lookup table after being removed.

So far, `darwin.pcm` seems like one of the possible causes of this problem, but
more investigation is needed.
2021-02-25 20:44:18 +01:00
Axel Naumann
74e4407225 Unload even if no T->module:
Modules are constructed lazily; not having one still means
DeferredDecls need to be unloaded. This fixes stressInterpreter.
2021-02-25 20:44:18 +01:00
Axel Naumann
400f7c7ffb Remove pseudo-conditional / simplify (NFC). 2021-02-25 20:44:18 +01:00
Axel Naumann
eac42c613b Reset Sema::CurContext to TU before auto-import:
Sema create an ImportDecl, and that should not end up e.g. inside
a class definition, or wherever else the "autoparsing" was triggered.
Fixes roottest-root-meta-assertVarOffset.

(cherry picked from commit 4d8fcf0984118663a356d462eeec6cb6c34ebfef)
2021-02-25 20:44:18 +01:00
Axel Naumann
02ec8bf986 Only JIT symbols that are unavailable:
fixes CodeGeneration/Symbols.C
2021-02-25 20:44:18 +01:00
Vassil Vassilev
0ae75bafcd cling::Transaction::Initialize does not need Sema. 2021-02-25 20:44:18 +01:00
Vassil Vassilev
a4a06e0fdf Fix warnings coming from shadowing names. 2021-02-25 20:44:18 +01:00
Vassil Vassilev
d0904c1ec2 Remove unused member from the JIT. 2021-02-25 20:44:18 +01:00
Vassil Vassilev
deafa47202 Remove unused parameters. Fixes -Wunused-parameter. 2021-02-25 20:44:18 +01:00
Vassil Vassilev
cad5c25c17 Implement -Dbuiltin_cling=Off
Cling needs to be built and installed as part of llvm/clang and
then we need to specify paths as we do for builtin_clang=Off.
2021-02-25 20:44:18 +01:00
Vassil Vassilev
b4daff130e LLVM_ON_WIN32 was dropped.
See llvm-mirror/llvm@4833be0
2021-02-25 20:44:18 +01:00
Vassil Vassilev
f66cd2585a Store the llvm::Module ptr before moving it. 2021-02-25 20:44:17 +01:00