206 Commits

Author SHA1 Message Date
Frederich Munch
b4e11b5b79 Prefer local LangOptions variable rather than CI->getLangOpts(). 2017-07-05 11:29:06 +02:00
Frederich Munch
76a43cc209 Don’t change the C++ version from underneath clang, tell it what is desired. 2017-07-05 11:29:06 +02:00
Frederich Munch
1abc6539a9 Windows: Don’t enable GNU keywords by default. 2017-07-05 11:29:06 +02:00
Frederich Munch
66ba7a896c Formatting. 2017-07-05 11:29:06 +02:00
Bertrand Bellenot
071bf231b7 Fromm Frederich Munch: Fix CxxStdCompiledWith for Visual Studio, which requires C++14 2017-07-04 17:00:34 +02:00
Frederich Munch
22d5d1c1d2 Windows: Visual Studio 2017 is still returning 199711L for __cplusplus! 2017-07-04 15:29:09 +02:00
Axel Naumann
4259fa5c74 Missing newline (breaking echo.C?) 2017-07-03 22:29:13 +02:00
Axel Naumann
609b88eabd Mark intentional fall-throughs (Coverity). 2017-07-03 14:47:57 +02:00
Raphael Isemann
777650d799 Allow setting a custom ASTConsumer in CIFactory (NFC).
So far we create our DeclCollector in the CIFactory and then tried to
get this variable back in the IncrementalParser by casting the
ASTConsumer of our compiler instance to a DeclCollector. This strategy
fails as soon as we want to have multiple collectors and start using
the clang multiplexer as this call will now fail (e.g. in this case to
have another ASTConsumer that looks in the C++ modules case for what
libraries we need to link - and the best way to add this is via
the multiplexed ASTConsumer that clang provides).

This patch moves the responsibility for the DeclCollector to the
caller that relies on getting a DeclCollector back, which is in this
case the constructor of IncrementalParser.
2017-06-30 10:30:35 +02:00
Axel Naumann
2b2f6f27db 80 cols [NFC]. 2017-06-28 17:14:08 +02:00
Axel Naumann
7aff792c8e #warning is compile-time :-) 2017-06-28 17:14:08 +02:00
Frederich Munch
c4a1d433bb Set __CLING__CXX14 for consitancy. 2017-06-28 16:15:10 +02:00
Frederich Munch
ac8fb31f82 Remove outdated comments. 2017-06-28 16:15:10 +02:00
Frederich Munch
e90cfd8b4f Make sure to setup the language defaults normally when outputting a PCH. 2017-06-28 16:15:10 +02:00
Frederich Munch
4739761b89 Don’t clear GNUMode when user has specifically asked for it. There are uses that are valid even if the host compiled with _GLIBCXX_USE_FLOAT128. 2017-06-28 16:15:10 +02:00
Axel Naumann
8fae026045 Missing "}"! 2017-06-26 22:15:16 +02:00
Axel Naumann
6ec06c0bd6 Use proper interface. 2017-06-26 22:00:28 +02:00
Axel Naumann
8e0dc09857 Turn gnu++ off if __float128 is unsupported in clang:
// clang currently supports native __float128 only on few targets, and
      // this target does not have it. The most visible consequence of this is a
      // specialization
      //    __is_floating_point_helper<__float128>
      // in include/c++/6.3.0/type_traits:344 that clang then rejects. The
      // specialization is protected by !if _GLIBCXX_USE_FLOAT128 (which is
      // unconditionally set in c++config.h) and #if !__STRICT_ANSI__. Tweak the
      // latter by disabling GNUMode.
2017-06-26 20:59:35 +02:00
Axel Naumann
c904524faa Back out __float128 change until we know why it's happening.
Travis should be able to reproduce this, which should allow us to report it upstream.
2017-06-23 17:14:12 +02:00
Frederich Munch
a48a2803be Add CxxStdCompiledWith function that will error if C++ standard is unknown. Fix __float128 error for gcc with -std=c++1z. 2017-06-23 17:14:12 +02:00
Axel Naumann
640eb1d81d Debug Travis GCC builds on MacOS - do they really pass -std=gnu++17?! 2017-06-23 16:44:06 +02:00
Frederich Munch
f1071b4f86 Only set -std=c++11 on Apple/GCC if language has not been explicitly set. 2017-06-22 16:39:14 +02:00
Frederich Munch
e8e203bc98 Add __CLING__GNUC_MINOR__ macro. 2017-06-21 08:29:10 +02:00
Vassil Vassilev
a1bd767b6b Adapt to interface changes due to upgrade to r302975. 2017-06-08 10:29:13 +02:00
Axel Naumann
8a439022aa Use __STRICT_ANSI__ and __FAST_MATH__ as set during compilation of cling. 2017-05-18 08:59:50 +02:00
Axel Naumann
57e0eaee35 Remove duplicate setting. 2017-05-18 08:59:50 +02:00
Axel Naumann
875a597aff Move target init early. 2017-05-10 08:29:53 +02:00
Axel Naumann
053223229e Enable all available targets, for instance for the cuda backend. 2017-05-08 14:59:05 +02:00
Sebastian Uhl
6296dd2bc4 Re-enable C++14 for GCC 4.9 in Interpretator
GCC 4.9 only defines '__cplusplus' to the value 201300L and not to
201402L as expected for C++14. This makes the check for the available
C++ standards in the interpreter fail to enable C++14 (which in turn
means that ROOT cannot be compiled with GCC 4.9 if C++14 was enabled in
Cmake). Similarly, for C++17 apart from the proper value 201703L other
values seems to be floating around (e.g. 201406L as defined by the
version of LLVM included with ROOT). The requirement for '__cplusplus_'
to enable certain C++ standards in the interpreter is made less strict
and just needs to be larger than the previous final value.

This basically reinstates commit
0a62e34aa86b812651cfcf9526ba03b975adaa5c which was undone by commit
702298d9ad83866d0be62f0422c03ac8ea6687f1.
2017-05-04 15:59:08 +02:00
David Abdurachmanov
68d860707b Enable C++17 (C++1z) in Interpreter
This is a must if everything else is compiled in C++17 mode. Not having
C++17 enabled within Interpreter caused errors in CMSSW.

Signed-off-by: David Abdurachmanov <davidlt@cern.ch>
2017-05-03 18:59:45 +02:00
Axel Naumann
728c296cb0 Style. 2017-03-28 13:59:30 +02:00
Axel Naumann
3a0bd332e8 Turn optimizations on! (Except for full inlining...) 2017-03-28 13:59:30 +02:00
Frederich Munch
3ea7fef180 Consolidate duplicate if statements. 2017-03-24 13:44:12 +01:00
Frederich Munch
29325e2987 Windows: Exception handling. 2017-03-08 17:29:08 +01:00
Frederich Munch
dee36dbaf8 Windows: Enable RTTI when cling was compiled with it on. 2017-03-08 17:29:08 +01:00
Bertrand Bellenot
ba0e49d295 Set ELF format for the clang driver on Windows
COFF format currently needs a few changes in LLVM to function properly
2017-03-01 17:29:11 +01:00
Frederich Munch
74ba44505a Windows: Allow Windows.h to be included without warnings. 2017-02-17 15:14:06 +01:00
Frederich Munch
92f39fc75c Windows: Don’t add INCLUDE paths clang will handle that as necessary. 2017-02-17 15:14:06 +01:00
Frederich Munch
9f62199d73 Add ability to control cling output streams colorization. Default to colorize when running in a terminal. 2017-02-09 16:59:38 +01:00
Frederich Munch
630abbf855 Windows: Fix preprocessor output test. 2017-02-09 16:45:10 +01:00
Bertrand Bellenot
0c8be25ebe Disable exceptions on Windows for the time being.
Enabling exceptions here makes 42 more tests failing. For example, CodeGeneration\RecursiveInit.C raises a unhandled exception in WinEHPrepare.cpp, at:
      if (UserI->isEHPad())
        report_fatal_error("Cleanup funclets for the MSVC++ personality cannot "
                           "contain exceptional actions");
2017-02-07 14:59:08 +01:00
Frederich Munch
e14c39ace8 Don’t let an invalid PCH file stop an interactive session from running. 2017-02-01 13:14:11 +01:00
Frederich Munch
e245220dff Cleanup main and add InvocationOptions::IsInteractive method. 2017-02-01 13:14:11 +01:00
Frederich Munch
706b92f235 Setup Diagnostics earlier in initialization. 2017-02-01 13:14:11 +01:00
Frederich Munch
14437862ef Handle -E flag to dump preprocessor definitions. 2017-02-01 13:14:11 +01:00
Frederich Munch
592e61ba1e Feature to generate precompiled headers. 2017-02-01 13:14:11 +01:00
Frederich Munch
c1f6db6f3c Use llvm::sys::getProcessTriple, instead of getDefaultTargetTriple.
llvm/clang could be configured to output a default target not the same as the running
process.
2017-02-01 13:14:10 +01:00
Frederich Munch
f793f3ea1e Diagnose startup issues a bit better and reorder unused argument. 2017-02-01 13:14:10 +01:00
Frederich Munch
e10447fe92 Support inclusion of precompiled header from header search paths. 2017-02-01 13:14:10 +01:00
Frederich Munch
a757a424a3 Fix return values from PCHListener, they were returning true indicating failure. 2017-02-01 13:14:10 +01:00