Commit Graph

1660 Commits

Author SHA1 Message Date
Vassil Vassilev
76c4024d1d Polish the implementation. Each pragma equivalent must use different source location. 2014-04-02 15:29:58 +02:00
Axel Naumann
26d409e472 Work around pointer/function cast warning. 2014-04-02 15:29:58 +02:00
Axel Naumann
d80be78891 No vector for time-critical i'faces; use SmallVectorImpl in libCling i'faces.
The use of vector forces an allocation for each call, something we don't need to
impose.

SmallVectorImpl doesn't expose the static alloc size; and our interfaces don't
care. Only the actual storage definition needs to define the size, no subsequent
reference.
2014-04-01 18:31:59 +02:00
Axel Naumann
fd71458a5f Implement cheap move ctor/op=. Member-init order. 2014-04-01 18:31:58 +02:00
Axel Naumann
d00d9e8d54 Simplify; adapt to new Value. 2014-04-01 18:31:58 +02:00
Axel Naumann
93970e8c35 Replace StoredValueRef by Value. 2014-04-01 18:31:58 +02:00
Axel Naumann
de2b4ed039 A "usually" allocation-free cling::Value (ROOT-6075). 2014-04-01 18:31:57 +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
f9f6c937d3 Remove from the last to the first from the DeclContext 2014-04-01 17:09:58 +02:00
Vassil Vassilev
ab9dad6917 Soft reset the diagnostics in the LH, too. 2014-04-01 10:57:58 +02:00
Vassil Vassilev
1b6c52abf0 Implement removal of ClassTemplatePartialSpecializationDecls. Disable an assert, which doesn't seem to exist in clang.git. 2014-04-01 10:57:58 +02:00
Vassil Vassilev
b303728d76 Add to cmake. 2014-03-31 16:53:55 +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
Axel Naumann
bbf4a3588f Update to XCode 5.1; e.g. ignore type of std::string::c_str(). 2014-03-31 15:15:57 +02:00
Axel Naumann
700a647a2a Support new name of std::string in libc++. 2014-03-31 15:15:57 +02:00
Vassil Vassilev
68221520fc Silence a warning. 2014-03-31 14:03:09 +02:00
Vassil Vassilev
14dc0c1c99 Silence a warning. 2014-03-31 14:03:09 +02:00
Vassil Vassilev
666437108e Replace .U with .undo 2014-03-31 14:03:09 +02:00
Vassil Vassilev
96319aa30f Implement .U FileName. 2014-03-31 14:03:08 +02:00
Vassil Vassilev
33676c14a9 Implement dump of MacroDirectiveInfo. 2014-03-31 14:03:08 +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
4b0b984d63 Use the proper arguments to remove items. 2014-03-31 14:03:06 +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
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
4d53e0fd33 Access sema internals and revert the list of unused decls. 2014-03-31 14:03:05 +02:00
Vassil Vassilev
33ece80d2b Move renaming. 2014-03-31 14:03:04 +02:00
Vassil Vassilev
230638b648 Rename the class to smth more meaningful. 2014-03-31 14:03:04 +02:00
Vassil Vassilev
0210c101f4 Escape -x flags passed in as invocation. 2014-03-31 14:03:03 +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
1f25fe3a00 CXX consistency. 2014-03-31 14:03:03 +02:00
Vassil Vassilev
73113c2c4b Reduce includes. 2014-03-31 14:03:02 +02:00
Vassil Vassilev
d86e86086f Use better, more accurate include. 2014-03-31 14:03:02 +02:00
Vassil Vassilev
0250ffe457 Fwd declare the clang::DiagnosticsEngine. 2014-03-31 14:03:01 +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
Vassil Vassilev
d1a8efcd55 Implement soft reset of the diagnostics engine. 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
a73b5c98c1 Add new file. 2014-03-28 16:52:56 +01:00
Axel Naumann
b3f0aa4120 Add new llvm lib dependencies. 2014-03-28 16:52:55 +01:00
Axel Naumann
ac4aaa3c76 Fix warning; be explicit about overriding the overload. 2014-03-28 16:13:00 +01:00
Axel Naumann
358764f8c0 Implement custom inliner to skip doFinalization. 2014-03-28 15:51:03 +01:00
Axel Naumann
d7b99d80fc Disable module validation: it takes ages. 2014-03-28 15:51:03 +01:00
Axel Naumann
f2da5f7cb7 Add backend passes (inlining etc) to cling.
They are usually provided by clang's BackendUtil - which we don't use and which
has no support for incremental ("streaming") compilation but runs the passes on
the whole module the whole time, and does end-of-TU cleanup (e.g. "dead" code
removal) that we cannot use because subsequent transactions might create new
uses - think force_inline functions that must stay.

Instead BackendPass wraps what's in clang's BackendUtil into a
TransactionTransformer. It gets added to the IR transformers. In the future this
should only transform the delta of one Transaction instead of the whole Module.

This fixes the libc++ issue we worked around by
templates' symbols are not exported anymore and cause missing symbols with
XCode 5.1.

We include ObjC passes even though this blows up the list of linked libraries to
make it easier to port cling to ObjC(++).
2014-03-28 15:51:03 +01:00
Axel Naumann
e85e30e290 Fix MacOS missing symbol __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEi.
This is triggered by emitting operator<< 'class std::__1::basic_ostream<char,
struct std::__1::char_traits<char> > &(int)' even though its marked as exported
in general. Now that clang and libc++ agree on the handling of exported
templates we can remove our work-around.
2014-03-28 15:51:03 +01:00