2093 Commits

Author SHA1 Message Date
Philippe Canal
f5c7037763 Fix ROOT-8739: Lookup of symbol inside of namespace shadowed by function (in another 'used' namespace).
This was happening when a namespace had the same as the function in a namespace that was 'used'.  Namely,
in the issue report it was the 'next' namespace and the function std::next.

This required the quick search function in LookupHelper.cxx to properly handle the return value of utils::Lookup::Named.
2017-04-07 21:14:06 +02:00
Philippe Canal
3a1db539f6 Revert "Fix ROOT-8739: Lookup of symbol inside of namespace shadowed by function (in another 'used' namespace)."
This reverts commit 0728f30ead6c1cca74bf31b93dc9a1cb616a3e35.
2017-04-07 20:44:04 +02:00
Philippe Canal
68283cac47 Fix ROOT-8739: Lookup of symbol inside of namespace shadowed by function (in another 'used' namespace).
This was happening when a namespace had the same as the function in a namespace that was 'used'.  Namely,
in the issue report it was the 'next' namespace and the function std::next.

This required the quick search function in LookupHelper.cxx to properly handle the return value of utils::Lookup::Named.
2017-04-07 20:29:17 +02:00
Axel Naumann
a52133126d Also handle GlobalVariables. Fixes Recursion/RecursiveClingInstances.C. 2017-04-03 15:44:38 +02:00
Frederich Munch
fa6d32fe73 Pass mangled name to CodeGenerator::forgetDecl. From Roman Zulak and me.
Ignore mangling errors on Windows; fixes -Xclang -verify on Windows.
2017-03-31 16:14:27 +02:00
Axel Naumann
c85f9a2c57 Do not mark decls used, just to prevent unloading!
This has the side effect that many symbols will need to be emitted.
It's much cheaper to not DeclUnload these decls instead.
2017-03-31 10:29:22 +02:00
Axel Naumann
7dc6a1be42 Definitions of static functions must be visible across Transactions.
Otherwise, subsequent calls cannot use them: they cannot resolve the symbol.
This is a side-effect of our never-ending translation unit versus intermediary
end-of-translation unit actions.
2017-03-31 10:29:22 +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
Axel Naumann
145e269e5b Use default inliner but keep inlining to a minimum.
We cannot turn on inlining completely due to a clang /GCC ABI mismatch that
is visible with -O2, see https://bugs.llvm.org//show_bug.cgi?id=19668.
2017-03-28 13:59:30 +02:00
Frederich Munch
3aea7df3c0 Remove useless comparison. 2017-03-24 13:44:12 +01:00
Frederich Munch
3ea7fef180 Consolidate duplicate if statements. 2017-03-24 13:44:12 +01:00
Frederich Munch
f28c04c1a2 Add Interpreter::getMacroValue method. 2017-03-23 15:59:04 +01:00
Frederich Munch
9b3084f955 Add Interpreter::getMacro method. 2017-03-23 15:59:04 +01:00
Frederich Munch
5229194db4 Fix writing to freed memory if Interpreter::executeTransaction fails. 2017-03-23 15:14:04 +01:00
Frederich Munch
120ca522b0 Fix possible crash on CodeGen failure. 2017-03-23 15:14:04 +01:00
Frederich Munch
3eb05a2c20 Use #ifdefs for MANGLE_PREFIX. 2017-03-23 14:44:06 +01:00
Axel Naumann
c901b585a1 Do not load libraries in syntax-only mode (e.g. rootcling). 2017-03-22 11:20:50 +01:00
Raphael Isemann
449c26d5f4 Fixed that we corrupt CLING_CXX_PATH
This will fix the issue that cling will try to invoke "OFF " to find headers.

Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2017-03-10 16:14:04 +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
Frederich Munch
bd98283b8c Don't make a path absolute, just check if it is. 2017-03-08 17:29:08 +01:00
Frederich Munch
eb32d6eae4 Add Interpreter::loadLibrary and Interpreter::loadHeader.
Refactor Interpreter::loadFile to call into these methods.
2017-03-08 17:29:08 +01:00
Frederich Munch
4b4fe0ec9e Formatting. 2017-03-08 17:29:08 +01:00
Raphael Isemann
5f6bbb88e1 Fix ROOT nighly builds failing to configure with CMake
Signed-off-by: Vassil Vassilev <vvasilev@cern.ch>
2017-03-06 16:44:48 +01:00
Bertrand Bellenot
09369c4fd6 Remove the Windows ELF formatting from IncrementalExecutor, since it is now in CIFactory 2017-03-02 11:59:59 +01:00
Philippe Canal
92f970b519 Remove unnecessary overallocation in Azog::reserveAllocationSpace
Thanks to Roman mentioning: "My reading of the code that computes size and calls reserveAllocationSpace has already factored in the worst case scenarios due to alignment."
2017-03-01 22:33:09 +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
df47b1259a Formatting. 2017-02-21 16:34:19 +01:00
Frederich Munch
097a4e3fbd Only check DiagnosticsEngine::hasErrorOccurred, hasFatalErrorOccurred cannot be true without it. 2017-02-17 20:45:04 +01:00
Frederich Munch
de62978dad Fix error from ParseTopLevelDecl not always being propagated to the current Transaction. Fix LangOpts.AccessControl not begin set in AccessCtrlRAII_t, a regression this exposed. 2017-02-17 20:45:03 +01:00
Frederich Munch
74ba44505a Windows: Allow Windows.h to be included without warnings. 2017-02-17 15:14:06 +01:00
Frederich Munch
311a557be1 Windows: Interpret -nostdinc++ as -nostdinc which clang does not use on Windows backend. Fixes ABI and NoStdInc tests. 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
5c66b41851 Fix EscapeSequence::encode returning a StringRef pointing to stack memory. 2017-02-17 15:14:06 +01:00
Axel Naumann
40bc805952 Revert "Fix unloading of friend declarations."
This reverts commit 1cf955ae4504d8cdb6d87c70d4331806c9861255.
2017-02-10 08:44:05 +01:00
Axel Naumann
5bb7bcd372 Revert "Unlink FriendDecl from linked list in CXXRecordDecl."
This reverts commit a3f7f117f917e901701d48f03157ff580b67b779.
2017-02-10 08:44:05 +01:00
Axel Naumann
7bcbdf120b Revert "Call VisitRedeclarable before VisitDeclContext to avoid any recursion that might occur."
This reverts commit 1d1d8fd511a4ec621a92628462142cb8d9356b70.
2017-02-10 08:44:05 +01:00
Axel Naumann
71187acfba Revert "Fix unloading of using namespace declarations. Add test/CodeUnloading/UsingShadows.C"
This reverts commit f5287603e6502c07f76a7f5a599aa6faae005327.
2017-02-10 08:44:05 +01:00
Axel Naumann
86de616002 Revert "Fix unloading of types in a namespace declared as using. This fixes triggering an assert in clang caused by trying to remove a declaration too many times."
This reverts commit c1574e399ae2e46fd0400d49c45eb48875995775.
2017-02-10 08:44:05 +01:00
Axel Naumann
9f5820a693 Revert "Fix unloading declarations in std namespace that were declared in an inline namespace, but referenced in the std namespace itself. Cling would crash or complain about forward declarations not being the same later."
This reverts commit 200ac7c6e64923f42023cc7324cab6ea7ebd3616.
2017-02-10 08:44:05 +01:00
Axel Naumann
3addec52ea Revert "Fix unloading from inline namespaces other than std."
This reverts commit 1e9984a65312b07f39760f6aec88b0b246fe3d94.
2017-02-10 08:44:05 +01:00
Frederich Munch
185b905525 Fix unloading from inline namespaces other than std. 2017-02-09 17:14:20 +01:00
Frederich Munch
87c97bab0d Fix unloading declarations in std namespace that were declared in an inline namespace, but referenced in the std namespace itself. Cling would crash or complain about forward declarations not being the same later. 2017-02-09 17:14:20 +01:00
Frederich Munch
1cc55d32ea Fix unloading of types in a namespace declared as using. This fixes triggering an assert in clang caused by trying to remove a declaration too many times. 2017-02-09 17:14:19 +01:00
Frederich Munch
14aaa3995e Fix unloading of using namespace declarations. Add test/CodeUnloading/UsingShadows.C 2017-02-09 17:14:19 +01:00
Frederich Munch
8957d2b84e Call VisitRedeclarable before VisitDeclContext to avoid any recursion that might occur.
This should have been included in the prior commit, but as it affects [ordering in] other DeclUnloader functions;
the ability to back it out separately is better.

Also exposes a bug/change necessary in clang when building in Debug mode to avoid an infinite loop.
2017-02-09 17:14:19 +01:00
Frederich Munch
7161f8660b Unlink FriendDecl from linked list in CXXRecordDecl. 2017-02-09 17:14:19 +01:00
Frederich Munch
f87922659d Fix unloading of friend declarations. 2017-02-09 17:14:19 +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