Commit Graph

5175 Commits

Author SHA1 Message Date
Jonas Hahnfeld
174d4529ab Expect additional error in Prompt/BlockComments.C 2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
25ebd992ac Update expected types in output checks 2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
a7dd6fde7e Update expected error messages in tests 2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
5fda6d38d2 Remove elaborated keyword from output checks
LLVM 16 honors how the declarations were written, without the class
or struct keywords.
2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
fc12e238fc Remove expected space before array brackets in tests 2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
908728f3b0 Expect normalized alias option offload_device_only
See also commit de84bfc508 during the previous LLVM upgrade...
2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
444a841163 Fix preprocessor option parsing
Exclude options::DXCOption to avoid confusing the parser with the
second -E option.
2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
8c369bf487 Avoid unloading Decls not found in DeclContext
This fixes roottest/root/meta/tuple/exec_configtype_unload.C on Windows.

Co-authored-by: Bertrand Bellenot <Bertrand.Bellenot@cern.ch>
2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
3d5ba159c6 Desugar UnaryTransformType
This fixes PyROOT's handling of smart pointers, such as shared_ptr,
with the new macOS SDK 14.0 resulting in a remove_extent transform.
2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
f636e21faa Handle UsingType in GetPartiallyDesugaredType
According to https://github.com/llvm/llvm-project/commit/af27466c50,
it is used to represent types pulled in with a using declaration, for
example `using std::error_code; error_code x;`.

This fixes the build of the ROOTTMVASofie module on macOS where this
was causing `std::size_t` not be fully desugared to `unsigned long`
at first to later end up with two identical classes in a list that
must not have duplicates.
2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
78f9595644 Update registration of atexit handlers
GenericLLVMIRPlatformSupport now declares atexit, which leads to a
duplicate symbol error during startup and fails the transaction.
Completely switch to the provided infrastructure and just override
the helpers to register the functions with our Interpreter.
2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
a1598cba14 Update handling of ElaboratedType in GetFullyQualifiedType
In LLVM 16, we now get ElaboratedType far more often, but they don't
have all namespace qualifiers we need. This fixes the build of the
RooFitCore module, but many other places are likely affected as well.
2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
f62bbfff85 Remove extension of legacy pass manager
adjustPassManager was only used for a few backends, such as AMDGPU
and NVPTX, but not on the CPU architectures we care about.
The DiscriminatorsPass was also removed upstream Clang, see commit
https://github.com/llvm/llvm-project/commit/2978d02681.
2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
6960639412 Adapt to updated forgetDecl signature
The GlobalDecl parameter wasn't used since quite some time.
2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
826478d826 Don't print name of EnumDecl if there is none
The function overload without PrintingPolicy is not available in
LLVM 16, see https://reviews.llvm.org/D134813.
2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
6bfe4c2213 Misc adaptations for updated APIs 2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
3b4ec36268 Set MSVolatile in LangOpts 2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
733c2eadfa Remove PMBuilder members
These two fields don't exist anymore in LLVM 16.
2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
8994be448b Resource directory based on major version only 2023-12-11 08:59:21 +01:00
Jonas Hahnfeld
f4951f96e9 Update InvocationOptions 2023-12-11 08:59:20 +01:00
Jonas Hahnfeld
aa2213e121 Update for new FileNotFound callback 2023-12-11 08:59:20 +01:00
Jonas Hahnfeld
2c98e68e68 Lexer does not expose getLangOpts() anymore
Store a reference ourselves. Also Lexer::isIdentifierBodyChar() was
renamed to Lexer::isAsciiIdentifierContinueChar().
2023-12-11 08:59:20 +01:00
Jonas Hahnfeld
95a4fc8875 Adapt and heavily simplify ClingJITLinkMemoryManager
Now we can just inherit from InProcessMemoryManager and override the
deallocate() method.
2023-12-11 08:59:20 +01:00
Jonas Hahnfeld
799baa2781 Some changes from JITEvaluatedSymbol to ExecutorAddr 2023-12-11 08:59:20 +01:00
Jonas Hahnfeld
1f68ba7928 MultiLevelTemplateArgumentList
... takes a Decl and a boolean argument Final.
2023-12-11 08:59:20 +01:00
Jonas Hahnfeld
15b5de6398 getQualifiedTemplateName takes a TemplateName 2023-12-11 08:59:20 +01:00
Jonas Hahnfeld
85c348828f CompoundStmt::Create takes FPOptionsOverride 2023-12-11 08:59:20 +01:00
Jonas Hahnfeld
d5aec8274b Adapt arguments for updated APIs
Forwarding data (differently) or passing trivial parameters.
2023-12-11 08:59:20 +01:00
Jonas Hahnfeld
fae810094c Misc renamings and type changes 2023-12-11 08:59:20 +01:00
Jonas Hahnfeld
1144ecf217 Update ClingMemoryManager with llvm::Align 2023-12-11 08:59:20 +01:00
Jonas Hahnfeld
fb4be6f374 InclusionDirective takes an clang::OptionalFileEntryRef 2023-12-11 08:59:20 +01:00
Jonas Hahnfeld
490a3a9359 LookupFile takes arguments as ConstSearchDirIterator 2023-12-11 08:59:20 +01:00
Jonas Hahnfeld
2113534493 llvm::Optional::hasValue was renamed to has_value 2023-12-11 08:59:20 +01:00
Jonas Hahnfeld
2213f5ca92 TargetRegistry.h moved to MC/ 2023-12-11 08:59:20 +01:00
Vassil Vassilev
ada3befa98 Bump cling version to 1.1~dev. 2023-12-09 17:44:02 +01:00
Vassil Vassilev
ab81cdcc61 Prepare for releasing cling v1.0 2023-12-09 16:44:07 +01:00
Vassil Vassilev
fa520028cb Add docs how to build from the mono repo 2023-12-09 09:44:03 +01:00
Axel Naumann
33084d36ad Revert "[Cling] Simplify std::tuple/pair value printer"
This reverts commit bfbb58e6f74c38b883ce6e6e096b6c6e44028869.
cling needs to be able to interpret C++11, even if built with C++17.
2023-12-09 09:29:10 +01:00
Jonas Hahnfeld
aacb57ada4 Provide fallback for LLVM_INCLUDE_DIRS
In standalone builds, it could otherwise happen that the variable is
not set during the first CMake invocation and tests fail because they
are unable to locate the LLVM headers.
2023-12-05 15:44:05 +01:00
Axel Naumann
cbd1dcf8da test/Driver/CommandHistory.C: env -u also works on macOS. 2023-12-05 15:44:05 +01:00
Vassil Vassilev
93153b9971 Correctly infer the SDKROOT.
This fixes the -lSystem issues we saw on recent osx platforms.
2023-12-05 14:14:03 +01:00
Vassil Vassilev
8069aa7a73 Handle llvm::Errors correctly.
This fixes several tests on osx.
2023-12-05 14:14:03 +01:00
Jonas Hahnfeld
5cf51d53dd Handle variable templates in DeclUnloader
Fixes #13815
2023-11-30 09:29:02 +01:00
Jonas Hahnfeld
df71846ee9 Refactor unloading of template specializations
Also quite a bit of simplification.

Co-authored-by: Axel Naumann <Axel.Naumann@cern.ch>
2023-11-30 09:29:02 +01:00
Jonas Hahnfeld
788b2b2be7 DeclUnloader: Avoid iterator invalidation
... when unloading template declarations and their specializations.
2023-11-30 09:29:02 +01:00
Jonas Hahnfeld
aeba3fa2c7 DeclUnloader: Remove extra check isInstantiatedInPCH
This effectively reverts commit 74472caaa9 ("[cling] Fixes issue in
DeclUnloader: do not unload templates intantiated in the PCH"), it's
not needed anymore, all tests pass and the snippet in the summary of
https://github.com/root-project/root/pull/4447 works, but it filters
too many declarations from the unloader.
2023-11-30 08:59:08 +01:00
Javier Lopez-Gomez
d3e42235c1 DeclUnloader: do not delete instantiated member functions
The body of member functions of a templated class only gets instantiated
when the function is used.  These `CXXMethodDecl` should not be deleted
from the AST; instead return them to the 'instantiation pending' state.
2023-11-30 08:59:08 +01:00
Javier Lopez-Gomez
33a63913b3 DeclUnloader: remove StaticVarCollector
StaticVarCollector recursively visited descendants of a `FunctionDecl`
node to collect static local variables.  However, these always appear
in the enclosing DeclContext.
2023-11-30 08:59:08 +01:00
Danilo Piparo
a292a61b28 Simplify std::tuple/pair value printer
By using std::apply, now available after moving to C++17,
the implementation can be greatly simplified.
2023-10-18 06:59:05 +02:00
Jonas Hahnfeld
41e07b3b23 Handle length modifiers in IsClassOrFunction
This expands the handling introduced in commit 31e46a65f6 to include
the length modifiers 'short' and 'long' as mentioned back then. It
still doesn't handle the cases of multiple modifiers such as "unsigned
long long int" and "long int unsigned long" (being the same type).

Fixes https://github.com/root-project/root/issues/13288
2023-10-13 10:14:07 +02:00