49 Commits

Author SHA1 Message Date
Axel Naumann
f9a8254617 Work around ROOT-8240. 2016-06-27 09:59:08 +02:00
Axel Naumann
1514d41841 Missing decl of printf. 2016-06-27 08:44:24 +02:00
Axel Naumann
fcb6aafd9e Fix file name. 2016-06-27 00:14:05 +02:00
Axel Naumann
7e1ee6da3a Add test for ROOT-7858. 2016-06-26 20:29:05 +02:00
Axel Naumann
1091b41295 Port test/CodeUnloading to CMake. Less failures than before! 2016-06-15 14:14:34 +02:00
Axel Naumann
21588e64c2 This test is a no-op in CMake - we need to fix that. 2016-02-05 16:14:04 +01:00
Boris Perovic
f268b40976 Dtors.c cling test changed in order to avoid infinite loop when unloading "RuntimePrintValue.h". Should be looked into in the future. 2015-08-20 17:06:02 +02:00
Axel Naumann
4b08f20793 Fix runtime / PCH incompatibility. 2015-06-26 14:44:19 +02:00
Axel Naumann
71fc16baf4 Give cling the LangOpts clang has. 2014-10-21 20:09:02 +02:00
Axel Naumann
fd9f5defab Mention current failure rate of Sema unloading tests. 2014-10-02 16:20:03 +02:00
Axel Naumann
0a73f180e6 Determing cling location from script location. 2014-10-02 16:20:03 +02:00
Vassil Vassilev
a4d09be9e2 Move the pch input file in Inputs folder. 2014-10-01 14:24:12 +02:00
Vassil Vassilev
a8ccf3468c Add a test exposing an issue with the unloading of inlined functions coming from a pch/pcm. 2014-10-01 14:24:12 +02:00
Vassil Vassilev
f3e4d96ffc Remove the pch. It is generated by the test. 2014-10-01 14:24:11 +02:00
Vassil Vassilev
766030c1e0 Add test for unloading of vtables coming from a pch/pcm. 2014-09-30 17:34:12 +02:00
Vassil Vassilev
f65296420e Put back the XFAIL. 2014-08-14 14:56:35 +02:00
Vassil Vassilev
d8f6659dcc Improve support for enum redeclaration. 2014-08-14 14:56:35 +02:00
Philippe Canal
576ca3ca96 Remove trailing spaces 2014-08-13 16:08:36 +02:00
Vassil Vassilev
ab58d03cba Add known failures section. 2014-03-31 16:53:55 +02:00
Vassil Vassilev
8b485436fb Preprocess the file before looking for expected-error substrings. This helps in tests which have multiple RUN lines and define a macro in them. 2014-03-31 16:53:55 +02:00
Vassil Vassilev
666437108e Replace .U with .undo 2014-03-31 14:03:09 +02:00
Vassil Vassilev
40195aa864 Cosmetics. 2014-03-31 14:03:06 +02:00
Vassil Vassilev
d7d4674f4e Increase verbosity of the output 2014-03-31 14:03:05 +02:00
Vassil Vassilev
2f9ba97a53 We need internal isystem. 2014-03-31 14:03:05 +02:00
Vassil Vassilev
0210c101f4 Escape -x flags passed in as invocation. 2014-03-31 14:03:03 +02:00
Axel Naumann
73a285d69a Add tests for ROOT-6137. 2014-03-14 17:31:02 +01:00
Vassil Vassilev
b9a4d063d1 Reduce the noise in compareState. 2014-03-14 10:52:29 +01:00
Vassil Vassilev
f6f4c707d4 Add a dead code removal pass. The test is expected to succeed now.
Removing a GlobalValue from the module might make other values (referenced only
by the one being removed) available for removal. Those should go as well. The
initial implementation is a bit greedy - it removes more: i.e dtors because they
are not referenced (because IncrementalExecutor takes care of them in an custom
way)
2014-03-14 10:52:29 +01:00
Vassil Vassilev
c66118f2e2 Make the test xfailing because we don't handle .str removal and deferred decls removal. 2014-02-27 12:49:13 +01:00
Vassil Vassilev
150231c357 Run only dtors of the unloaded entities. 2014-02-27 12:49:11 +01:00
Vassil Vassilev
f34076fffc Send the output of grep to /dev/null 2014-02-12 11:00:59 +01:00
Vassil Vassilev
da37422d23 Ignore -o -, this is by default what we do in cling 2014-02-12 11:00:59 +01:00
Vassil Vassilev
04304014ca Run clang with -print-file-name=include, seems that is needed by clang's testsuite. 2014-02-12 11:00:59 +01:00
Vassil Vassilev
5933b67862 Improve debugging look and feel. 2014-02-10 11:20:55 +01:00
Vassil Vassilev
2c2ada407e XFAIL clang's testsuite for now. 2014-02-06 14:57:52 +01:00
Vassil Vassilev
0055f5b14e Adjust to the test with the correct vars. 2014-02-06 14:50:58 +01:00
Vassil Vassilev
0fec137d95 Add a test that loads every clang test and unloads it 2014-02-06 14:50:58 +01:00
Axel Naumann
d240bd5de8 Refer to license in test and demo files. 2014-01-07 12:02:58 +01:00
Axel Naumann
44481ace1e Fix license; remove $Id$ version. 2014-01-07 11:14:04 +01:00
Vassil Vassilev
b41a282ae6 Add error recovery and unloading tests. 2013-12-06 12:03:33 +01:00
Vassil Vassilev
a08152d576 Enhance the support for removing global values from the module with JIT lock.
When the machine code was generated the JIT retains a lock to the global values
so they don't go out of sync. In the cases of circular references like:
int g();
int f() {g();}
int g() {f();}
we cannot count on the removal order to get rid of the uses. We need to use the
replaceAllUsesWith. This is however tricky because the JIT already generated the
code for f and g and it doesn't make sense to replace anything with anything else.

Thus in order to support that we need to hack one of the JIT callbacks which
prevents the replace of values of already emitted code.
2013-10-29 20:19:24 +01:00
Vassil Vassilev
bf03ba5040 Fail the test because of the dead constant leftover. 2013-10-29 20:19:24 +01:00
Vassil Vassilev
5765fb83f5 Add test for unloading classes. 2013-10-29 20:19:23 +01:00
Vassil Vassilev
9b352aa828 Use store/compare state for detailed verification. 2013-10-29 20:19:17 +01:00
Vassil Vassilev
846aac852c Assert that the reference came from the static initializers and upgrade the test.
The compiled code is unloaded by iterating the AST out of which the compiled code
came. The problem is that C++ supports static initialization. For example:
int a = 5; on the global scope means set the value of a to 5 before the program
starts. To support that clang implicitly generates functions that enforce the
expected initialization order. That can become easily very complex. Let's see
a more "real-life" example:

int f() { printf("I am f()"); return 0; }
int a = f();

Besides the code for a and f clang will emit:
define internal void @__cxx_global_var_init() section "__TEXT,__StaticInit,regular,pure_instructions" {
entry:
  %0 = call i32 @__cxa_atexit(void (i8*)* bitcast (void (%"struct.cling::runtime::internal::__trigger__cxa_atexit"*)* @_ZN5cling7runtime8internal21__trigger__cxa_atexitD1Ev to void (i8*)*), i8* getelementptr inbounds (%"struct.cling::runtime::internal::__trigger__cxa_atexit"* @_ZN5cling7runtime8internal1SE, i32 0, i32 0), i8* @__dso_handle) #1
  ret void
}
define internal void @_GLOBAL__I_a() section "__TEXT,__StaticInit,regular,pure_instructions" {
entry:
  call void @__cxx_global_var_init()
  ret void
}

and more importantly:

define internal void @__cxx_global_var_init1() section "__TEXT,__StaticInit,regular,pure_instructions" {
entry:
  %call = call i32 @_Z1fv() ; THAT IS A REFERENCE TO f()
  store i32 %call, i32* undef, align 4
  ret void
}

So when iterating the AST and trying to remove f(), we cannot because it is still
referenced by __cxx_global_var_init1. However we know this is not an issue,
because that __cxx_global_var_init1 was meant to be executed only once and that
already happened. So in first approximation we could drop the references of f
in __cxx_global_var_init1 and remove the rest.
2013-10-29 20:19:12 +01:00
Vassil Vassilev
2ce823fbef We don't need -verify. 2013-10-14 09:11:39 +02:00
Vassil Vassilev
069a9d76c1 Remove unnecessary files that used to 'steer' the testsuite. 2013-09-27 14:33:05 +02:00
Vassil Vassilev
38a05dd1df We don't need to add header search path for that particular test.
git-svn-id: http://root.cern.ch/svn/root/trunk@47779 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-02 19:25:49 +00:00
Axel Naumann
05ba8a3a07 Move cling from cint/ to interpreter/ (Will add a "we have moved" readme to cint/cling.)
git-svn-id: http://root.cern.ch/svn/root/trunk@45844 27541ba8-7e3a-0410-8455-c3a389f83636
2012-09-05 09:37:39 +00:00