Re-commit of r189691 and r189689 now with a proper autoconf fix.
Massive simplification of how replacements and file overrides are
handled by the migrator:
* Sources and headers are all treated the same.
* All replacements for a given translation unit are stored in the same
TranslationUnitReplacements structure.
* Change tracking is updated only from main file; no need for
propagating "is tracking" flag around.
* Transform base class no longer responsible for applying replacements.
They are simply stored and main() looks after deduplication and
application.
* Renamed -yaml-only to -serialize-replacements. Same restrictions apply:
Can only request one transform. New restriction: formatting cannot also
be turned on since it's basically a transform.
* If -serialize-replacements is requested, changes to files will not be
applied on disk.
* Changed behaviour of function generating names for serialized
replacements: Only the main source file goes into the name of the file
since a file may contain changes for multiple different files.
* Updated HeaderReplacements LIT test for new serialization behaviour.
* Replaced old test that ensures replacements are not serialized if
-serialize-replacements is not provided. New version ensures changes
are made directly to all files in the translation unit.
* Updated unit tests.
* Due to major simplification of structures in FileOverrides.h, the
FileOverridesTest is quite a bit simpler now.
llvm-svn: 189798
libpthread is weird:
/lib/x86_64-linux-gnu/libpthread.so.0:000000000000b9b0 T pthread_cond_init@@GLIBC_2.3.2
/lib/x86_64-linux-gnu/libpthread.so.0:000000000000c720 T pthread_cond_init@GLIBC_2.2.5
let's do it with @@ for now
we can always introduce more macros parameters later
llvm-svn: 189788
Select condition shadow was being ignored resulting in false negatives.
This change OR-s sign-extended condition shadow into the result shadow.
llvm-svn: 189785
This changes the SelectionDAG nodes from ISD::INTRINSIC_W_CHAIN to
ISD::INTRINSIC_WO_CHAIN which enables easy lowering to equivalent SelectionDAG
nodes (e.g. __builtin_msa_sub_w -> ISD::SUB) in future patches since nodes
such as ISD::SUB do not have a chain.
It also corrects an obvious mistake, namely that the subtract intrinsics were
marked as being commutative.
As per a similar change in r189106
(http://llvm.org/viewvc/llvm-project?rev=189106&view=rev) there isn’t a new
testcase in this patch since the existing tests should test the intrinsics to
the same standard and the best I can do for a testcase would be a fragile
pass/maybe test of whether memory operations can (and do) cross the intrinsic.
llvm-svn: 189784
This changes the SelectionDAG nodes from ISD::INTRINSIC_W_CHAIN to
ISD::INTRINSIC_WO_CHAIN which enables easy lowering to equivalent SelectionDAG
nodes (e.g. __builtin_msa_fadd_w -> ISD::FADD) in future patches since nodes
such as ISD::FADD do not have a chain.
As per a similar change in r189106
(http://llvm.org/viewvc/llvm-project?rev=189106&view=rev) there isn’t a new
testcase in this patch since the existing tests should test the intrinsics to
the same standard and the best I can do for a testcase would be a fragile
pass/maybe test of whether memory operations can (and do) cross the intrinsic.
llvm-svn: 189782
been an oversight, as it definitely works. Every test which changed had
the const written on the LHS of the auto already.
Notably, this also makes things like cpp11-migrate's formation of 'const
auto &' variables much more familiar.
Yes, many people feel that 'const' and other qualifiers belong on the
RHS of the type. I'm not going to argue about that because Clang already
*overwhelming* places the qualifiers on the LHS when it can and on the
RHS when it must. We shouldn't diverge for auto. We should add a tool to
clang-tidy that fixes this in either direction, and then wire up
clang-tidy to tools like cpp11-migrate to fix their placement after
transforms.
llvm-svn: 189769
What we really want is to enable Swift by default for *v7s triples (and there already seems to be some logic which attempts to do that). In that case the iOS version doesn't matter.
llvm-svn: 189763
Summary:
Store first and last newline position in the token text for string literals and
comments to avoid doing .find('\n') for each possible solution.
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D1556
llvm-svn: 189758
Add a wrapper for the clone syscall for use in StopTheWorld. We
implement it only for x86_64, so stop building StopTheWorld for other platforms
(no one uses it outside x86_64 anyway).
See https://code.google.com/p/address-sanitizer/issues/detail?id=214 for why we
can't use the glibc clone() wrapper.
llvm-svn: 189753