Commit Graph

60 Commits

Author SHA1 Message Date
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
Axel Naumann
d7b99d80fc Disable module validation: it takes ages. 2014-03-28 15:51:03 +01:00
Axel Naumann
3aea38dd3d CXXExceptions are C++, not Exceptions. 2014-03-25 10:25:01 +01:00
Axel Naumann
c65443727d Only turn on C++11 (and other C++ LangOpts) if C++ is enabled. 2014-03-24 16:25:00 +01:00
Axel Naumann
931608551b Enforce that cling uses clang with our patches, not a user-provided clang. 2014-03-18 09:18:07 +01:00
Vassil Vassilev
62318fcbc7 80 cols 2014-03-14 10:52:28 +01:00
Axel Naumann
ab0e63a547 Only use native target, avoids --enable-targets=host. 2014-03-08 18:47:08 +01:00
Axel Naumann
e0bc9916ab Use LC_ALL to unfrenchify (ROOT-6017). 2014-02-05 16:51:51 +01:00
Axel Naumann
db215325b9 Report if we cannot extract the stdlib -I. 2014-02-05 11:27:53 +01:00
Axel Naumann
c5d8345125 Force non-French; ROOT-6017. 2014-02-04 14:32:57 +01:00
Axel Naumann
287423d065 Be more verbose when unable to detect the stdlib version. 2014-02-03 19:00:55 +01:00
Axel Naumann
73da3a41bd Make ABI mismatch a warning (ROOT-5961). 2014-01-17 17:25:50 +01:00
Axel Naumann
4d577a9bf2 Generate cling/lib/Interpreter/cling-compiledata.h. 2014-01-14 16:20:14 +01:00
Axel Naumann
44481ace1e Fix license; remove $Id$ version. 2014-01-07 11:14:04 +01:00
Bertrand Bellenot
c5e6d0d0ed Fix compilation error on Windows (popen and pclose are called _popen and _pclose on Windows) 2013-12-20 13:55:55 +01:00
Axel Naumann
822b9363ef Move std lib check / -I to cling; use __GLIBCXX__ for libstdc++. Fixes cling on MacOS 10.9 2013-12-18 16:25:53 +01:00
Vassil Vassilev
41b685f2f1 Add clarification comment. 2013-11-25 13:56:02 +01:00
Vassil Vassilev
b2da538302 When non default memory buffer is provided add a common include file.
When a CI is created with a custom membory buffer, we can just set it as the
main memory buffer, becuase when clang tries to compare the include chains it
won't find common predecessor and either will infinite-loop or crash.
2013-11-25 13:56:02 +01:00
Vassil Vassilev
47df4b334b Comment 2013-11-25 13:56:02 +01:00
Vassil Vassilev
a0912520ee Reduce the hacky-ness of the state collector setup.
The second compilerInstance doesn't need to collect anything, thus we don't
need to attach it to the PP.
2013-11-25 13:56:02 +01:00
CristinaCristescu
1d06b2725b Workaround multiple DeclCollector instances. 2013-11-25 13:56:02 +01:00
CristinaCristescu
d6e2f85d1c Fix and improve macro error recovery. 2013-11-25 13:56:02 +01:00
CristinaCristescu
0490caaa99 Macro recovery 2013-11-25 13:56:00 +01:00
Axel Naumann
c31806dbbf SmallString needs 0 termination. 2013-09-26 17:54:19 +02:00
Axel Naumann
1873ced2f9 Better include. 2013-09-26 17:54:18 +02:00
Axel Naumann
2a8bc0226b Options moved to llvm; CI->createDiagnostics; Path 2013-09-26 17:54:17 +02:00
Vassil Vassilev
71910784b3 Instead of removing the FileEntry 'just' invalidate its cache.
When there is an error introduced by #include-ing a file we should be able to
hit the disk (in cling's context) the next time. The user could fix it in the
meanwhile.

Newer clang supports a flag which can be used to mark the user files as volatile.
This means that the file stat will be invalidated, causing clang to hit the
disk and fetch the new content of the FileEntry.

The complication comes from the fact that when the file size of the file entry
is invalidated the cache in the SourceManager is not syncronized, thus clang
issued an error. The patch in clang checks if the file size == 0 and the
modification time == 0 this means that we are in cling's context and have to sync
the cache and continue with no errors.

This fixes an issue exposed by Jerome's implementation. Before we removed the
entire FileEntry to achieve the same behavior, however the SourceManager kept
the reference to it. This leads to seg faults when iterating over the included
files (eg. .files or .storeState)
2013-09-18 20:33:04 +02:00
Vassil Vassilev
65f672f802 Add clarification comment. 2013-06-25 09:30:33 +02:00
Axel Naumann
09bf261456 Fix for __float128 / c++11; define __CLING__CXX11 for c++11 2013-06-13 14:03:03 +02:00
Vassil Vassilev
e74e7655d0 Revert "Progress on the llvm multi-module support."
This reverts commit 9d78faef6a45cb16c05fe7a96d9e2eb9fb2c1298.
2013-06-05 16:26:51 +02:00
Vassil Vassilev
b1d11c2987 Progress on the llvm multi-module support.
Now we build a llvm::Module per cling::Transaction and link them in on commit.
2013-06-05 16:26:51 +02:00
Philippe Canal
24ebb4d011 Remove debug sillyness 2013-05-06 14:11:28 -05:00
Philippe Canal
28d1af630f In cpp-land X<=value is true if X is undefined. This fixes the C++03 builds. 2013-05-06 13:00:44 -05:00
Axel Naumann
15ca40c1a2 Automatically and centrally detect C++11-mode based on how CIFactory.cpp is compiled; turn on cling's LangOpt.CPlusPlus11 accordingly.
No need to rely on ROOT's config flag anymore.
2013-05-06 17:22:16 +02:00
Axel Naumann
e66fc22305 No color if not a terminal; see clang/lib/Driver/Tools.cpp:3200
git-svn-id: http://root.cern.ch/svn/root/trunk@49329 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-24 19:49:12 +00:00
Axel Naumann
70695fe2be Update to clang/llvm r179269 (llvm vendor branch r49215):
Parser::Scope versus Sema::DeclContext are now checked for cross-vailidity.
Emit the TU-transaction explicitly instead of relying on a first transaction.
The typename extraction now takes a stream instead of a string to write to.
The llvm::Linker has much reduced functionality; use llvm::sys::Path instead to find dynamic libraries.


git-svn-id: http://root.cern.ch/svn/root/trunk@49325 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-24 16:28:08 +00:00
Vassil Vassilev
e380ed68ba Move the #include ctime along with the use of time().
git-svn-id: http://root.cern.ch/svn/root/trunk@49126 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-08 15:40:32 +00:00