Commit Graph

173818 Commits

Author SHA1 Message Date
David Majnemer ceaaa8d09e CodeGen: Assign linkage to thread-wrappers correctly
We would sometimes incorrectly give a thread-wrapper external linkage
instead of internal linkage if we had only CodeGen'd it's declaration,
not it's definition.

This fixes PR19655.

llvm-svn: 207988
2014-05-05 18:54:23 +00:00
Alexander Kornienko 4aab579d07 Fix assertion in google-explicit-constructor check when the constructor is
defined in a macro.

Summary:
We shouldn't suggest replacements in macros anyway, as we can't see all
usages of the macro and ensure the replacement is safe for all of them.

Reviewers: klimek

Reviewed By: klimek

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D3611

llvm-svn: 207987
2014-05-05 18:49:31 +00:00
Manuel Klimek 75f34c1386 Fix handling of condition variables in the face of temp dtors.
The assignment needs to be before the destruction of the temporary.
This patch calls out to addStmt, which invokes VisitDeclStmt, which has
all the correct logic for handling temporaries.

llvm-svn: 207985
2014-05-05 18:21:06 +00:00
Michael Zolotukhin e37f33c466 Move test from r207969 to another folder and rename it.
llvm-svn: 207984
2014-05-05 18:10:15 +00:00
Yi Jiang a4821fc9fb Always set alignment of vectorized LD/ST in SLP-Vectorizer. <rdar://problem/16812145>
llvm-svn: 207983
2014-05-05 17:59:14 +00:00
Joerg Sonnenberger 302be7e891 Fix spelling.
llvm-svn: 207982
2014-05-05 17:58:46 +00:00
Rafael Espindola 1e312c7afe Be a bit more specific in the release notes.
llvm-svn: 207981
2014-05-05 17:53:29 +00:00
Duncan P. N. Exon Smith 1789fb6493 LTO: -internalize sets visibility to default
Visibility is meaningless when the linkage is local.  Change
`-internalize` to reset the visibility to `default`.

<rdar://problem/16141113>

llvm-svn: 207979
2014-05-05 17:40:44 +00:00
Duncan P. N. Exon Smith 48bc268290 CodeGen: Cleanup visibility in RTTIBuilder
No functionality change.

llvm-svn: 207978
2014-05-05 17:38:39 +00:00
Rafael Espindola 595f54205c Remove the -disable-cfi option.
This also add a release note about it. If this stays I will cleanup MC
next week.

llvm-svn: 207977
2014-05-05 17:33:26 +00:00
Adam Nemet 47c4e4e46d [Test] Remove substitution for clang
clang should not be used in the llvm tests.  The topic was discussed in this
thread:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140428/214905.html

llvm-svn: 207976
2014-05-05 17:17:27 +00:00
Ben Langmuir 1ecf750ec8 Add -Wmodule-build to make it easy to see when modules are (re)built
Warning is default ignore, and not in -Wall.

llvm-svn: 207975
2014-05-05 16:58:47 +00:00
Rafael Espindola 82ad91915e Modify test to not use -disable-cfi.
llvm-svn: 207974
2014-05-05 16:47:07 +00:00
Kaelyn Takata a39d2a0050 Select bdver2 instead of bdver1 if TBM support is present on models < 0x10.
Tested that the right -target-cpu is set in the clang -cc1 command line
when running "clang -march=native -E -v - </dev/null" on both an FX-8150
and an FX-8350. Both are family 15h; the FX-8150 (Bulldozer processor)
reports a model number of 1, and the FX-8350 (Piledriver processor)
reports a model number of 2.

llvm-svn: 207973
2014-05-05 16:32:10 +00:00
Rafael Espindola 665bd05095 Move test to the ARM64 directory.
llvm-svn: 207972
2014-05-05 16:14:37 +00:00
Rafael Espindola f463b63448 Convert a CodeGen test into a MC test.
llvm-svn: 207971
2014-05-05 15:34:13 +00:00
Alexander Kornienko 9ff5b6f3ca Add clang-tidy -header-filter option
Summary:
Add clang-tidy -header-filter option to specify from which headers we
want diagnostics to be printed. By default we don't print diagnostics from
headers. We always print diagnostics from the main file of each translation
unit.

Reviewers: djasper, klimek

Reviewed By: klimek

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D3590

llvm-svn: 207970
2014-05-05 14:54:47 +00:00
Michael Zolotukhin 4e030e8fb4 Fix test from r207966 and add a comment there.
llvm-svn: 207969
2014-05-05 14:46:53 +00:00
Timur Iskhodzhanov 9dbc206303 [ASan/Win] Fix issue 305 -- don't instrument .CRT initializer/terminator callbacks
See https://code.google.com/p/address-sanitizer/issues/detail?id=305
Reviewed at http://reviews.llvm.org/D3607

llvm-svn: 207968
2014-05-05 14:28:38 +00:00
Rafael Espindola 9475117f5d Trivial simplification. No functionality change.
llvm-svn: 207967
2014-05-05 14:18:16 +00:00
Michael Zolotukhin 0c380a30d8 Add regression test for r207692.
llvm-svn: 207966
2014-05-05 14:05:25 +00:00
Daniel Jasper f10a28d705 clang-format: Understand functions with decltype return type.
Before:
  decltype(long_name_forcing_break)
      f() {}

After:
  decltype(long_name_forcing_break)
  f() {}

llvm-svn: 207965
2014-05-05 13:48:09 +00:00
Dinesh Dwivedi 76f98f8047 Added some heuristics to identify c style casting
Before:
void f() { my_int a = (my_int) * b; }
void f() { return P ? (my_int) * P : (my_int)0; }

After:
void f() { my_int a = (my_int)*b; }
void f() { return P ? (my_int)*P : (my_int)0; }

Differential Revision: http://reviews.llvm.org/D3576

llvm-svn: 207964
2014-05-05 13:14:35 +00:00
Benjamin Kramer 6af073b636 Driver: Recognize CentOS 6 as RHEL 6.
Patch by Dimitry Andric!

llvm-svn: 207963
2014-05-05 12:39:32 +00:00
Alp Toker a030cd0558 StringRefize and take out an old FIXME
llvm-svn: 207962
2014-05-05 12:38:48 +00:00
Daniel Jasper 0e6c51c889 clang-format: Improve understanding of decltype.
Before:
  SomeFunction([](decltype(x), A * a) {});

After:
  SomeFunction([](decltype(x), A *a) {});

llvm-svn: 207961
2014-05-05 12:36:29 +00:00
Timur Iskhodzhanov 7721eb3f9d [ASan/Win] Add DLL thunks for the fake stack interface
llvm-svn: 207960
2014-05-05 12:26:04 +00:00
Patrik Hagglund 9be9d8725b Fix gcc -pedantic warning in lto.cpp.
llvm-svn: 207959
2014-05-05 12:24:08 +00:00
Dinesh Dwivedi afe6fb6f05 Fix bug in clang-format while merging short function
Before:
    #ifdef _DEBUG
    int foo( int i = 0 )
    #else
    int foo( int i = 5 )
    #endif { return i; }

After:
    #ifdef _DEBUG
    int foo( int i = 0 )
    #else
    int foo( int i = 5 )
    #endif
    {
    	return i;
    }

llvm-svn: 207958
2014-05-05 11:36:35 +00:00
Manuel Klimek 264f963114 Fix crash when resolving branch conditions for temporary destructor condition blocks.
Document and simplify ResolveCondition.

1. Introduce a temporary special case for temporary desctructors when resolving
the branch condition - in an upcoming patch, alexmc will change temporary
destructor conditions to not run through this logic, in which case we can remove
this (marked as FIXME); this currently fixes a crash.

2. Simplify ResolveCondition; while documenting the function, I noticed that it
always returns the last statement - either that statement is the condition
itself (in which case the condition was returned anyway), or the rightmost
leaf is returned; for correctness, the rightmost leaf must be evaluated anyway
(which the CFG does in the last statement), thus we can just return the last
statement in that case, too. Added an assert to verify the invariant.

llvm-svn: 207957
2014-05-05 09:58:03 +00:00
Christian Pirker 918d1097a1 Simplify getARMCPUForMArch() and make it more consistent
llvm-svn: 207956
2014-05-05 08:48:18 +00:00
Daniel Jasper 9509f18836 clang-format: Fix import statements with ColumnLimit: 0
These used to interact badly with AlwaysBreakBeforeMultilineStrings.

llvm-svn: 207955
2014-05-05 08:08:07 +00:00
Dmitry Vyukov 3089608172 tsan: disable debug output in normal mode
llvm-svn: 207954
2014-05-05 07:45:54 +00:00
Simon Atanasyan b9b9e36187 [ELF] Use a range based access to the ELFFile's sections collection.
No functional changes.

llvm-svn: 207953
2014-05-05 07:17:40 +00:00
Simon Atanasyan d2a822d3ca Add range access to ELFFile's sections collection.
llvm-svn: 207952
2014-05-05 06:48:34 +00:00
Alp Toker ee77934c17 Update lit.cfg to support the clang-interpreter test from r207950
Performs behind-the-scenes RUN line substitution similarly to what's done with
clang-check and clang-format to ensure the executable is found.

llvm-svn: 207951
2014-05-05 06:42:07 +00:00
Alp Toker 1d487617f2 Add speculative clang-interpreter test
Let's see how far this gets on the build servers. The application requires
native JIT and uses the C standard library, but hopefully we can get this
tested on at least some configurations.

Taking a lead from the clang-format tests, we'll just expect the executable to
get picked up from the build output path for now.

llvm-svn: 207950
2014-05-05 06:22:21 +00:00
Simon Atanasyan e22ca46681 [Mips] R_MIPS_GPREL32 relocation support.
llvm-svn: 207949
2014-05-05 05:56:06 +00:00
Ben Langmuir 527040e0c8 Make module self-import an error
Ideally, importing Foo.a from Foo.b would "do the right thing", but
until it does, this patch makes it an error rather than allow it to
silently be ignored.

llvm-svn: 207948
2014-05-05 05:31:33 +00:00
Alp Toker d29607871f cindex-dump.py: fix the --show-ids description string
It looks like this was botched back in r94936.

llvm-svn: 207947
2014-05-05 04:42:26 +00:00
Alp Toker 777fce64cc Fix cindex-dump.py --show-ids
This option flag was incorrectly expecting an argument:

$ cindex-dump.py --show-ids test.cpp
cindex-dump.py: error: invalid number arguments

With this change the feature correctly gets enabled by --show-ids.

No tests.

llvm-svn: 207946
2014-05-05 04:39:18 +00:00
Jim Ingham 8646d3c164 Rename eExecution*** to eExpression*** to be consistent with the result type.
llvm-svn: 207945
2014-05-05 02:47:44 +00:00
Jim Ingham 1624a2d3c8 Make the Expression Execution result enum available to the SB API layer.
Add a callback that will allow an expression to be cancelled between the
expression evaluation stages (for the ClangUserExpressions.)

<rdar://problem/16790467>, <rdar://problem/16573440>

llvm-svn: 207944
2014-05-05 02:26:40 +00:00
Saleem Abdulrasool e8a7afef86 CodeGen: correct memset emittance for WoA
Windows on ARM does not conform to AEABI.  However, memset would be emitted
using the AEABI signature, resulting in inverted parameters.  Handle this
special case appropriately.

llvm-svn: 207943
2014-05-04 23:13:21 +00:00
Saleem Abdulrasool 9c4716e4b6 CodeGen: strengthen WoA AEABI avoidance tests
Add additional test cases for WoA AEABI avoidance checking.

llvm-svn: 207942
2014-05-04 23:13:18 +00:00
Saleem Abdulrasool 729c7a08fb MC: support FK_SecRel_4 for Windows on ARM
Add handling for FK_SecRel_4 (4-byte section relative relocations).  These are
used by the generation of DWARF debug information (the abbrevations use section
relative relocations).  This will also be used in generation of CodeView line
tables.

llvm-svn: 207941
2014-05-04 23:13:15 +00:00
Benjamin Kramer 9130cb8547 LoopUnroll: If we're doing partial unrolling, use the PartialThreshold to limit unrolling.
Otherwise we use the same threshold as for complete unrolling, which is
way too high. This made us unroll any loop smaller than 150 instructions
by 8 times, but only if someone specified -march=core2 or better,
which happens to be the default on darwin.

llvm-svn: 207940
2014-05-04 19:12:38 +00:00
Arnold Schwaighofer cd566c423a SLPVectorizer: Bring back the insertelement patch (r205965) with fixes
When can't assume a vectorized tree is rooted in an instruction. The IRBuilder
could have constant folded it. When we rebuild the build_vector (the series of
InsertElement instructions) use the last original InsertElement instruction. The
vectorized tree root is guaranteed to be before it.

Also, we can't assume that the n-th InsertElement inserts the n-th element into
a vector.

This reverts r207746 which reverted the revert of the revert of r205018 or so.

Fixes the test case in PR19621.

llvm-svn: 207939
2014-05-04 17:10:15 +00:00
Joerg Sonnenberger c72473d87b Try harder to get the compiler to use float registers in different
places to increase the chance of messing up any preserved registers.

llvm-svn: 207938
2014-05-04 16:31:33 +00:00
Elena Demikhovsky e73333a50f AVX-512: minor change in rndscale intrinsic
llvm-svn: 207937
2014-05-04 13:35:37 +00:00