1442 Commits

Author SHA1 Message Date
Vassil Vassilev
ca5db8bcce Use a bit better (more descriptive) name. 2014-02-18 17:22:59 +01:00
Vassil Vassilev
4a62769b38 Return early in case of empty wrappers for example. 2014-02-18 17:22:59 +01:00
Vassil Vassilev
9749af417c The test should be run on 32 bit finally. 2014-02-18 17:22:59 +01:00
Vassil Vassilev
460b8b43b1 We have more accurate results so adjust the test. 2014-02-18 17:22:59 +01:00
Vassil Vassilev
03a0159cc4 Assign if not RS. 2014-02-18 17:22:59 +01:00
Vassil Vassilev
980a1813cf typo. 2014-02-18 17:22:59 +01:00
Vassil Vassilev
d65a3ff810 Typo. 2014-02-18 17:22:59 +01:00
Vassil Vassilev
36618c9b94 Remove redundant fwd declaration. 2014-02-18 17:22:58 +01:00
Vassil Vassilev
1f85d7b725 Handle returns, temporary results, independent on JIT's runFunction.
Here we don't want to depend on the JIT runFunction, because of its limitations,
when it comes to return value handling. There it is not clear who provides the
storage and who cleans it up in a  platform independent way.

Depending on the type we need to synthesize a call to cling:
  0) void : do nothing;
  1) enum, integral, float, double, referece, pointer types :
       call to cling::internal::setValueNoAlloc(...);
  2) object type (alloc on the stack) :
       cling::internal::setValueWithAlloc
     2.1) constant arrays:
         call to cling::runtime::internal::copyArray(...)

We need to synthesize later (see RuntimeUniverse.h)
 Wrapper has signature: void w(cling::StoredValueRef SVR)
case 1):
  setValueNoAlloc(gCling, &SVR, lastExprTy, lastExpr())
case 2):
  new (setValueWithAlloc(gCling, &SVR, lastExprTy)) (lastExpr)
  case 2.1):
    copyArray(src, placement, N)
2014-02-18 17:22:58 +01:00
Vassil Vassilev
c963d9f520 Add var returns test case. 2014-02-18 17:22:58 +01:00
Vassil Vassilev
ac4c77fe0a Add const to the void* so that the const overloads falls into this case too. 2014-02-18 17:22:58 +01:00
Vassil Vassilev
ad7054000c Improve implementation, shorter argument names, less overloads. 2014-02-18 17:22:58 +01:00
Axel Naumann
81c8c454b6 Keep constness of &; no need for const T* (folds into T*). 2014-02-18 17:22:58 +01:00
CristinaCristescu
9eb0ffbfcd Lay the foundations of return value alloc/noalloc. The JIT's runFunction is unreliable on 32 bit. Thus we provide a similar functionality in cling to deal with the cases where runFunction cannot.
The underlying issue is that the caller need to provide argument setup
and cleanup, which for 32bit is different than in 64, for example.
The approach we propose should be independent on the concrete platform
implementation, because we pass in the storage and depending on the
return result, we let cling runtime to deside whether and how to alloc
storage.
2014-02-18 17:22:58 +01:00
CristinaCristescu
0b3a2d5ef0 Correct comment. 2014-02-18 17:08:57 +01:00
CristinaCristescu
7605c85f5c Fix Cling Regression test. 2014-02-18 17:08:57 +01:00
Axel Naumann
363e6162ca Do not strip symbols; we need them for the JIT. 2014-02-18 17:08:57 +01:00
Axel Naumann
f3c71160a4 Add more runtime llvm headers. 2014-02-18 11:27:59 +01:00
Axel Naumann
60dc035207 Also copy Allocator.h into etc/cling. 2014-02-18 11:01:04 +01:00
Axel Naumann
fae0d4037f Follow changes in llvm/clang. 2014-02-18 08:29:38 +01:00
Axel Naumann
92fbe9671d Delay eval of CLINGCXXFLAGS: llvm-config is not yet built. 2014-02-14 18:06:52 +01:00
Axel Naumann
36bca89a5f Failure in template instantiation is a lookup failure (ROOT-6070).
(cherry picked from commit 4c32242c51a35c6e2f616457083927a68822a699)
(cherry picked from commit a0222efc70bd60a8c3bceb5e357630c81f5df3c8)
2014-02-14 12:12:55 +01:00
Axel Naumann
d599d45802 Must emit static variables from template instantiations (ROOT-6015).
This correpsonds to the call to CodeGen::HandleCXXStaticMemberVarInstantiation().
2014-02-14 10:25:08 +01:00
Bertrand Bellenot
0b5fb60b1e Add exception handling compiler flag on Windows 2014-02-13 10:49:56 +01:00
Vassil Vassilev
4dd2815f41 Fix warnings 2014-02-12 19:32:55 +01:00
Vassil Vassilev
bf57dc0424 Move isOnScopeChains to a common ground. Erase the decl from the resolver chain only if it existed there. 2014-02-12 15:30:59 +01:00
Vassil Vassilev
d2b6937161 Handle cases of var definition-function declaration ambiguities. 2014-02-12 15:30:59 +01:00
Vassil Vassilev
1be59d2ef5 Spaces instead of tabs 2014-02-12 15:30:59 +01:00
Bertrand Bellenot
d5784fd721 Fix command line warning D9002: ignoring unknown option '-fexceptions' on Windows 2014-02-12 11:29:55 +01:00
Vassil Vassilev
e44e08844e This check is ambiguous remove it.
When there are class specializations, and a concrete specialization is deleted
find will give back the less concrete one and the check will fail, signaling
a wrong behavior, which is incorrect.
2014-02-12 11:01:00 +01:00
Vassil Vassilev
388f13c597 IPO.h is used only when we need to create a llvm IPO pass. 2014-02-12 11:01:00 +01:00
Vassil Vassilev
e947694c9b When we have no module don't try to dump it. 2014-02-12 11:01:00 +01:00
Vassil Vassilev
ba6bda8f7a Apply this (even now commented) when not in fsyntax-only mode. 2014-02-12 11:01:00 +01:00
Vassil Vassilev
d4d8b3b169 Commit a module pass (commented out) that might be useful in future. Please note that we need to link against libLLVMipo 2014-02-12 11:01:00 +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
9d826b12c5 Handle static local vars in the llvm::Module. 2014-02-12 11:00:59 +01:00
Axel Naumann
4aee4502bc From Pere: implement (build time-) -I hiding also for CMake. 2014-02-10 17:42:56 +01:00
Axel Naumann
9c1fa1f2c3 $(LLVMCONFIG) is only created later; evaluate lazily. Fixes full build. 2014-02-10 15:30:08 +01:00
Vassil Vassilev
6924828aec Handle ClassTemplateSpecializations. 2014-02-10 11:20:58 +01:00
Vassil Vassilev
f201444ef8 Handle the specializations before anything else. 'Typo' &= instead =. 2014-02-10 11:20:58 +01:00
Vassil Vassilev
203c679933 Handle the specializations before anything else. 2014-02-10 11:20:58 +01:00
Vassil Vassilev
b571a01462 Clarification. 2014-02-10 11:20:58 +01:00
Vassil Vassilev
409b06ae0b It appears that injected class names can be before or after the definition in the chain.
Handle both cases.
2014-02-10 11:20:58 +01:00
Vassil Vassilev
0aa6faa4aa Tags are redeclarables. 2014-02-10 11:20:57 +01:00
Vassil Vassilev
6d792cfb00 Docs. 2014-02-10 11:20:57 +01:00
Vassil Vassilev
fa9fe845cd RecordDecls are special. They have implicitly injected class names.
struct C {
   // C is implicitly declared here as a synonym for the class name.
};

C::C c; // same as "C c;"

In this example clang will inject another declaration to provide the name C
within the record decl. For unknown reason it is added to the redecl chain.
When we revert a class decl we must make sure that the implicitly injected name
in the chain is gone.
2014-02-10 11:20:57 +01:00
Vassil Vassilev
8b4b340f6e Add support for typedefs, because they are redeclarables. 2014-02-10 11:20:57 +01:00
Vassil Vassilev
aca1966b77 Assert immediately after failure. 2014-02-10 11:20:57 +01:00