96 Commits

Author SHA1 Message Date
Axel Naumann
30cc58a5c6 Reset diagnostics after parsing arguments: we shall issue an error but survive (ROOT-7619, ROOT-7614 and others). 2015-11-03 00:01:43 +01:00
Philippe Canal
8065dfa723 Support gcc 4.9.3's C++14-ish 2015-09-30 23:42:06 +02:00
Pere Mato
768254099f Enable C++14 in Cling when compiling with C++14 enabled 2015-08-17 18:45:02 +02:00
Pere Mato
5e5af173cf Forward the c++14 flag to building LLVM/CLING. Enable c++14 in the interpreter if compiled with -std=c++1y or -std=c++14. 2015-08-17 18:45:02 +02:00
Axel Naumann
2a73fc3b9e Grab lang, PP, target opts from PCH if it exists. 2015-08-17 18:45:02 +02:00
Axel Naumann
cfd091955e Pass pthread to CIFactory; enable it in LangOpts. 2015-06-23 21:30:17 +02:00
Axel Naumann
aa24ff9e20 Do not leak on error (Coverity). 2015-06-03 11:01:27 +02:00
Axel Naumann
5aa38ee07a Enable new GCC 5.1 ABI. 2015-05-08 01:06:49 +02:00
Axel Naumann
ea307f050c Factor out PP binary and target defines. 2015-05-08 01:06:49 +02:00
Philippe Canal
2fc94b3fa9 Remove code duplication 2015-04-17 02:50:36 +02:00
Philippe Canal
e216aea985 Add __CLING__clang__ and __CLING__GNUC__.
Those macros are define only in 'interpreted' code and respectively
only if cling itself was built with clang or gcc.
2015-04-16 08:44:51 +02:00
Bertrand Bellenot
9532d5481e Add missing include 2015-04-02 10:18:06 +02:00
Axel Naumann
c4a8f069d3 Register $PWD with its full name (ROOT-7114). 2015-03-25 20:03:28 +01:00
Axel Naumann
c431fc9d3e Make debug symbols optional (.debug). 2015-03-20 15:39:23 +01:00
Axel Naumann
ad16c82748 Enable debug info in CodeGenOptions. 2015-03-20 15:39:23 +01:00
Bertrand Bellenot
c2224aeff7 Enable asm parser in cling
Use PROJECT_SOURCE_DIR (full path to the root of the project source directory) instead of CMAKE_SOURCE_DIR (the directory from which cmake was started) in order to properly find AsmParser/CMakeLists.txt and call llvm::InitializeNativeTargetAsmParser();
2015-02-25 11:21:31 +01:00
Axel Naumann
276ff16454 No DeclCollector in interface; much more efficient OnlyLex path. 2015-02-11 10:57:46 +01:00
Axel Naumann
b59de8a40a Adapt to clang/llvm changes (mostly ownership). 2015-02-11 10:57:43 +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
73d7c51ea9 Fix clang / cling LangOpt discrepency on Linux. 2014-10-22 11:40:23 +02:00
Axel Naumann
71fc16baf4 Give cling the LangOpts clang has. 2014-10-21 20:09:02 +02:00
Axel Naumann
a17a1f35bc Move CheckABICompatibility() to IncrParser; move funcs into unnamed namespace.
The IncrParser has the ability to check the stdlib that the interpreter sees,
versus what the compiler sees. Of course what we want to check is the
interpreter's stdlib - including any -I passed at the prompt. The other
advantage of this change is that system headers are now pulled from the PCH
if it exists (ROOT-6794)
2014-10-14 09:08:06 +02:00
Axel Naumann
ad3f84987b -Xclang -x is insufficient; add -c - at the end (-x is position dependent). 2014-10-02 16:20:03 +02:00
Vassil Vassilev
2e202367f3 Handle cases such as -xc, i.e no space between x and c. 2014-09-30 17:34:12 +02:00
Vassil Vassilev
08a9274c02 Mark implicit members coming from a PCH as used.
Implicitly generated members from a CXXRecordDecls coming from a PCH should not be
unloaded. CodeGen 'records' that it once emitted the implicit members and if they
get unloaded it would be out of sync. The key difference is the information about
all the implicitly generated members (trivial ctors/dtors, etc) comes from an
ASTMutationListener and they are not part of the transaction. We still do not
record it as a part of the transaction, we just mark them as used so that they
don't get unloaded from the llvm::Module.

Once the list of llvm.used decls is emitted we need to clear it, otherwise we
end up emitting one and the same thing over and over.

Fixes ROOT-6722
Tests should be coming shortly.
2014-09-29 15:51:10 +02:00
Vassil Vassilev
9df81a3156 Pass in correct llvmdir to the nested instance. 2014-08-23 15:44:07 +02:00
Vassil Vassilev
13167385c2 Silence an error and add a fixme. 2014-08-22 15:23:05 +02:00
Vassil Vassilev
0aa2a31fa0 llvm::OwningPtr is now std::unique_ptr. 2014-08-14 14:56:44 +02:00
Vassil Vassilev
cc7bb99497 MSCVersion -> MSCompatibilityVersion . 2014-08-14 14:56:37 +02:00
Vassil Vassilev
c7a71f9c1f setForcedLangOptions -> adjust. 2014-08-14 14:56:37 +02:00
Vassil Vassilev
3c62160e63 getTargetOpts -> TargetOpts. 2014-08-14 14:56:37 +02:00
Vassil Vassilev
3b523e05b1 Follow recent llvm interface changes getPtr()->get() . 2014-08-14 14:56:37 +02:00
Vassil Vassilev
8c3561bdd7 Use the shortcut to create the ASTContext. 2014-08-14 14:56:33 +02:00
Vassil Vassilev
0dae68f749 Replace createMainFileID with the new interface. 2014-08-14 14:56:33 +02:00
Vassil Vassilev
e464ac0ea1 The new driver doesn't take default image name. 2014-08-14 14:56:33 +02:00
Philippe Canal
576ca3ca96 Remove trailing spaces 2014-08-13 16:08:36 +02:00
Lukas Vacek
ce008b07fc Fix input files processing (cling foo.c should work now) 2014-05-02 19:01:01 +02:00
Axel Naumann
b8c48f15f8 CLING_CXXABI* is unused for MSVC. 2014-04-30 15:27:01 +02:00
Bertrand Bellenot
a39879b286 Check in the system registry for the version of Visual Studio with which we compiled cling (instead of the highest version) 2014-04-30 15:27:01 +02:00
Bertrand Bellenot
a172bc0e07 Fix some of the error messages when starting cling.exe on Windows
Fixes the following error messages:
The system cannot find the path specified.
ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
    echo | LC_ALL=C C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/cl.exe  /DWIN32 /D_WINDOWS /W3    -xc++ -E -v - 2>&1 >/dev/null | awk '/^#include
 </,/^End of search/{if (!/^#include </ && !/^End of search/){ print }}' | grep -E "(c|g)\+\+"
results in
The system cannot find the path specified.
with exit code 255
Warning in cling::CIFactory::createCI():
  C++ ABI check not implemented for this standard library

Note there are still a few remaining errors at startup time:

error: cannot mangle RTTI descriptors for type 'exception' yet
error: cannot mangle the name of type 'exception' into RTTI descriptors yet

Apparently coming from the following statement (at line 284 in Interpreter.cpp, in Interpreter::IncludeCXXRuntime()):

    declare("#include \"cling/Interpreter/ValuePrinter.h\"");
2014-04-30 15:27:01 +02:00
Vassil Vassilev
234bfb7770 Simplify some of the changes due to the new diag mapping. 2014-04-01 17:09:58 +02:00
Vassil Vassilev
ffc9fe50b5 Disable useless warnings only for the wrapper functions.
We simulate programatically:
void __cling_Unique {
  #pragma push
  #pragma ... ignore ...
  {code}
  #pragma pop
}
2014-04-01 17:09:58 +02:00
Vassil Vassilev
3e7f2aa7aa If -verify specified don't apply any custom diagnostic mappings. 2014-03-31 14:03:07 +02:00
Vassil Vassilev
3dd8d2e900 The CompilerInvocation is the owner of the DiagnosticOptions, all the rest point to them.
It used some default diagnostic options, which are different from the ones that
come from the driver passing the invocation options.
2014-03-31 14:03:06 +02:00
Vassil Vassilev
d87e58b4f5 Simplify. 2014-03-31 14:03:03 +02:00
Vassil Vassilev
5e6b8590be Do not leak the diagnostics engine. 2014-03-31 14:03:03 +02:00
Vassil Vassilev
5e3a83bd3b Set the ignored diags before the driver does parse from args.
This allows the driver to override our custom diagnostics if the user wants any
special treatment.
2014-03-31 14:03:01 +02:00
Vassil Vassilev
59b980dd69 Don't recreate the diagnosic client, just set it to the tweaked instance. 2014-03-31 14:03:00 +02:00
Vassil Vassilev
d28bc43cd1 Suppress warnings coming from system headers. 2014-03-31 14:02:59 +02:00
Axel Naumann
ba642a2869 Be more precise when comparing compilation and runtime libc++.
For instance XCode 5.1 braught a libc++ that was sufficiently different to cause havok
all over the place. Thus ABI_VERSION is clearly not enough.
2014-03-29 15:38:56 +01:00