Vassil Vassilev
de1c0feddc
Update the comment, we still need this if g++ > 5
2022-12-09 08:44:18 +01:00
Vassil Vassilev
6c35a3a41e
The OrcV2 now can iterate over the globals and run the static init for us.
2022-12-09 08:44:18 +01:00
Vassil Vassilev
44de0d81dd
Rework the symbol injection mechanism to also allow symbol replacement.
2022-12-09 08:44:18 +01:00
Vassil Vassilev
112e25e92a
Jitlink does not support all necessary platfroms, switch to RuntimeDyld.
2022-12-09 08:44:18 +01:00
Vassil Vassilev
51905a3b6f
IncrementalJIT::getSymbolAddress is expected to return 0 and never complain.
2022-12-09 08:44:18 +01:00
Vassil Vassilev
c8ffc972b7
Implement a solution to the JIT-owned llvm::Modules.
...
When removing code, we need to recover Clang's CodeGen and this happens by
iterating over the clang::Decls and the llvm::Module for a given Transaction in
the TransactionUnloader.
The problem is that now OrcV2 takes the ownership of the llvm::Module from the
Transaction for itself and then it can notify us when the module was compiled on
demand. Unfortuantely, there is no good way to guarantee that the same module
will be attached to the same transaction. This approach allows the
TransactionUnloader::unloadModule logic to recover CodeGen.
In a longer term, when we switch to partial translation units from clang-repl
we might be able to recover CodeGen without needing to know details about the
generated llvm::Module.
2022-12-09 08:44:18 +01:00
Vassil Vassilev
c903730344
Drop the unused Interpreter::addSymbol function.
...
It just adds to the complexity and confusion of the addSymbol implementation
2022-12-09 08:44:18 +01:00
Vassil Vassilev
357a4c8377
OrcV2 is more strict with linkage.
...
When we compile incremental inputs we store each input in a separate
llvm::Module. In order to preserve the semantics, we make all symbols from
each module with external linkage, that is, accessible from other modules.
This model works well for almost all symbols, except for the clang-generated
ones which have the same name. For example clang stores strings in variables
`.strN` which may clash accross modules. Luckily, these strings are used within
a single module and thus we can avoid the JIT error by keeping them with their
non-external linkage.
2022-12-09 08:44:18 +01:00
Stefan Gränitz
7b27b283f9
Implement --debug-only option in order to easily dump LLVM debug output
...
For example: `cling --debug-only="orc,jitlink"`
2022-12-09 08:44:18 +01:00
Vassil Vassilev
6254189e8b
Connect the JIT with the lazy symbol creation infrastructure.
2022-12-09 08:44:18 +01:00
Vassil Vassilev
6385f4c1be
The new API requires the address of the files
2022-12-09 08:44:18 +01:00
Vassil Vassilev
af078b845e
llvm::StringRef::*lower became insensitive.
...
See llvm/llvm-project@2e4a2b8430
2022-12-09 08:44:18 +01:00
Vassil Vassilev
f2520d9a39
PrintHelp is now lower case.
2022-12-09 08:44:18 +01:00
Vassil Vassilev
085224eb0c
Use AnnotateAttr::CreateImplicit function which is now available.
...
See llvm/llvm-project@d093401a26
2022-12-09 08:44:18 +01:00
Vassil Vassilev
fde158fced
OPT_fmodule_name was dropped.
2022-12-09 08:44:18 +01:00
Vassil Vassilev
871a7366ac
LookupFile returns FileEntryRef.
2022-12-09 08:44:18 +01:00
Vassil Vassilev
790815d584
Target::adjust takes DiagnosticsEngine
2022-12-09 08:44:18 +01:00
Vassil Vassilev
b1b1d72178
CreateASTDumper takes another bool arg.
...
See llvm/llvm-project@e135cf8a03
2022-12-09 08:44:17 +01:00
Vassil Vassilev
04cb65dcb2
DirectoryLookup takes a DirectoryRef.
...
See llvm/llvm-project@0377ca641c
2022-12-09 08:44:17 +01:00
Vassil Vassilev
a40bf8e573
DisablePCHValidation became an enum
...
See llvm/llvm-project@b0e89906f5
2022-12-09 08:44:17 +01:00
Vassil Vassilev
c72f7a1109
ParseUnqualifiedId has new set of params.
...
See llvm/llvm-project@0dd0b1017c
2022-12-09 08:44:17 +01:00
Vassil Vassilev
ec413fe1a8
setSuppressAllDiagnostics has no default anymore.
...
Remove duplicate line of code.
2022-12-09 08:44:17 +01:00
Vassil Vassilev
0c183d3adf
APSInt::toString returning std::string was removed.
...
See llvm/llvm-project@61cdaf66fe
2022-12-09 08:44:17 +01:00
Vassil Vassilev
0861ee91c2
getTypeAnnotation returns now TypeResult.
...
See llvm/llvm-project@3308732300
2022-12-09 08:44:17 +01:00
Vassil Vassilev
ff6ccd2dab
TypeNameContext was renamed to TypeName.
...
See llvm/llvm-project@e4d27932a5
2022-12-09 08:44:17 +01:00
Vassil Vassilev
db5f9b7874
Use the synonym interface getBuffer->getBufferData
2022-12-09 08:44:17 +01:00
Vassil Vassilev
c543cc715a
createModuleManager and friends was renamed to *ASTReader.
...
See llvm/llvm-project@20d51b2f14
2022-12-09 08:44:17 +01:00
Vassil Vassilev
6d00a9a9db
VK_RValue -> VK_PRValue
...
See llvm/llvm-project@aef5d8fdc7
2022-12-09 08:44:17 +01:00
Vassil Vassilev
23e7fe2951
Add the override qualifier to suppress warnings
2022-12-09 08:44:17 +01:00
Vassil Vassilev
b47016f2da
TemplateArgument::print takes one more argument.
...
See llvm/llvm-project@99d63ccff0
2022-12-09 08:44:17 +01:00
Vassil Vassilev
4798c95740
Dropped compatibility flags F_{Text,None} -> OF_{Text,None}
...
See llvm/llvm-project@3302af9
2022-12-09 08:44:17 +01:00
Stefan Gränitz
ace63db064
Rework the cling JIT to use the ORCv2 interface.
...
The ORCv1 JIT was deprecated and removed in llvm13. The ORCv2 provides several
benefits such as parallel compilation.
2022-12-09 08:44:17 +01:00
Vassil Vassilev
b6689404a0
Use the real name not it's synonym.
...
See llvm/llvm-project@518d955f9d
2022-12-09 08:44:17 +01:00
Vassil Vassilev
3ed9f6c114
Add an include to TargetInfo.h
2022-12-09 08:44:17 +01:00
Vassil Vassilev
ff94269b05
llvm::make_unique -> std::make_unique
2022-12-09 08:44:17 +01:00
Vassil Vassilev
dfcbac8b76
createDriverOptTable became a singleton.
...
See llvm/llvm-project@433927595d
2022-12-09 08:44:17 +01:00
Vassil Vassilev
6fb14e3f8a
The StoredDeclsList is reworked and more user-friendly.
...
See llvm/llvm-project@0cb7e7ca0c
2022-12-09 08:44:17 +01:00
Vassil Vassilev
1320eb67c6
CGFT_AssemblyFile was moved to the llvm namespace.
...
See llvm/llvm-project@1dfede3122
2022-12-09 08:44:17 +01:00
Vassil Vassilev
e91023391e
dump() takes an ASTContext now.
...
See llvm/llvm-project@473fbc90d1
2022-12-09 08:44:17 +01:00
Vassil Vassilev
1b0fffe4ba
Expr dependence was reworked and made protected.
...
By default we should get no dependence, assert that instead.
See llvm/llvm-project@ec3060c72d
2022-12-09 08:44:16 +01:00
Vassil Vassilev
1afd43b6da
stripPointerCastsNoFollowAliases got renamed to stripPointerCasts
...
See llvm/llvm-project@2452d7030b
2022-12-09 08:44:16 +01:00
Vassil Vassilev
cef10fdf63
createOutputFile was simplified.
...
See llvm/llvm-project@ad7aaa475e
2022-12-09 08:44:16 +01:00
Vassil Vassilev
7fcc35181a
FileInfo always has content cache and replaceBuffer became setBuffer.
...
See llvm/llvm-project@296314516d
2022-12-09 08:44:16 +01:00
Vassil Vassilev
0041450ed4
ContentCache::getRawBuffer is replaced with getBufferDataIfLoaded
...
See llvm/llvm-project@156e8b3702
2022-12-09 08:44:16 +01:00
Vassil Vassilev
62dc043874
Qualify DestroyTemplateIdAnnotationsRAIIObj.
2022-12-09 08:44:16 +01:00
Vassil Vassilev
62d600d2cf
FileManager::getFile returns an llvm::ErrorOr which needs to be checked.
2022-12-09 08:44:16 +01:00
Vassil Vassilev
f086a7e06f
getFlags returns llvm::Expected.
2022-12-09 08:44:16 +01:00
Vassil Vassilev
a82c91dbc1
The BuiltinContext is in a separate header.
2022-12-09 08:44:16 +01:00
Vassil Vassilev
dd4a124b8f
OmitFramePointer flag became an enum.
...
See llvm/llvm-project@ff22ec3d70
2022-12-09 08:44:16 +01:00
Vassil Vassilev
0679bcbd75
ShowTimers went in CodeGenOptions.
...
See llvm/llvm-project@1821265db6
2022-12-09 08:44:16 +01:00