Commit Graph

144481 Commits

Author SHA1 Message Date
Michael J. Spencer 2bb7db9d01 [TableGen] Fix ICE on MSVC 2012 Release builds.
llvm-svn: 176125
2013-02-26 21:29:47 +00:00
Bill Schmidt 8ea7af8e44 Fix PR15332 (patch by Florian Zeitz).
There's no need to generate a stack frame for PPC32 SVR4 when there are
no local variables assigned to the stack, i.e., when no red zone is needed.
(PPC64 supports a red zone, but PPC32 does not.)

llvm-svn: 176124
2013-02-26 21:28:57 +00:00
Matt Arsenault bceea5dfea Fix auto_ptr is deprecated warnings
llvm-svn: 176123
2013-02-26 21:20:35 +00:00
Matt Arsenault 376f72092c Fix assertion failure when a field is given an address space.
llvm-svn: 176122
2013-02-26 21:16:00 +00:00
Matt Arsenault 7d36c01747 Fix initializer for variables with attribute address_space set.
This would error in C++ mode unless the variable also had a cv
qualifier.

e.g.

__attribute__((address_space(2))) float foo = 1.0f; would error but
__attribute__((address_space(2))) const float foo = 1.0f; would not.

llvm-svn: 176121
2013-02-26 21:15:54 +00:00
Manman Ren 5222195831 Debug Info: for static member variables, move AT_MIPS_linkage_name from
TAG_member inside a class to the specification DIE.

Having AT_MIPS_linkage_name on TAG_member caused old gdb (GNU 6.3.50) to
error out. Also gcc 4.7 has AT_MIPS_linkage_name on the specification DIE.

rdar://problem/13291234

llvm-svn: 176120
2013-02-26 20:48:29 +00:00
Chad Rosier 31a9bbcd4a Add a test case for r176066.
llvm-svn: 176119
2013-02-26 20:22:30 +00:00
Jim Grosbach 94a2260a7f AsmParser: More generic support for integer type suffices.
For integer constants, allow 'L', 'UL' as well as 'ULL' and 'LL'. This provides
better support for shared headers between .s and .c files that define bunches
of constant values.

rdar://9321056

llvm-svn: 176118
2013-02-26 20:17:10 +00:00
Matt Arsenault 2d17bbee48 Fix typo
llvm-svn: 176117
2013-02-26 20:13:09 +00:00
Adrian Prantl 71510db7bc Ensure that DIType is regenerated after we visited an implementation that adds ivars to an interface. Fixes rdar://13175234
llvm-svn: 176116
2013-02-26 20:01:46 +00:00
Ted Kremenek 37c777ecc0 [analyzer] Use 'MemRegion::printPretty()' instead of assuming the region is a VarRegion.
Fixes PR15358 and <rdar://problem/13295437>.

Along the way, shorten path diagnostics that say "Variable 'x'" to just
be "'x'".  By the context, it is obvious that we have a variable,
and so this just consumes text space.

llvm-svn: 176115
2013-02-26 19:44:38 +00:00
Matt Beaumont-Gay 1c417da558 Warn on dropping the return value from a warn_unused_result function, even in
macros.

llvm-svn: 176114
2013-02-26 19:34:08 +00:00
Matt Arsenault c0550990c5 Another test commit. Remove trailing whitespace.
llvm-svn: 176113
2013-02-26 19:33:48 +00:00
Rafael Espindola 3a52c44865 Use the most recent decl in getExplicitVisibility.
Now that implicitly hidden template arguments can make an instantiation hidden,
it is important to look at more than just the canonical decl of the argument
in order to see if an attribute is available in a more recent decl.

This has the disadvantage of exposing when getExplicitVisibility is called,
but lets us handle cases like

template <typename T>
struct __attribute__((visibility("default"))) barT {
  static void zed() {}
};
class foo;
class __attribute__((visibility("default"))) foo;
template struct barT<foo>;

llvm-svn: 176112
2013-02-26 19:33:14 +00:00
Matt Arsenault 58f546cd15 Test commit. Remove trailing whitespace.
llvm-svn: 176111
2013-02-26 19:18:06 +00:00
Rafael Espindola db77c4ae13 Be more careful in applying pragma weak. Fixes pr14974.
GCC applies a pragma weak to a decl if it matches the mangled name. We used
to apply if it matched the plain name.

This patch is a compromise: we apply the pragma only if it matches the name
and the decl has C language linkage.

llvm-svn: 176110
2013-02-26 19:13:56 +00:00
Chad Rosier d2686ffa56 Remove a few unused arguments.
llvm-svn: 176109
2013-02-26 18:39:31 +00:00
Sean Silva cf6848f112 [docs] Use reST link instead of direct HTML link.
llvm-svn: 176108
2013-02-26 18:22:18 +00:00
Eli Bendersky 4e7f548efb Slight cosmetic fixes
llvm-svn: 176107
2013-02-26 18:05:31 +00:00
Greg Clayton 5e3e1499c0 Backed out a hacky fix that is no longer needed.
llvm-svn: 176106
2013-02-26 17:59:39 +00:00
Christian Konig e500e445c5 R600/SI: Add promotion of e32 to e64 in operand folding
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176105
2013-02-26 17:52:47 +00:00
Christian Konig f741fbfb1b R600/SI: add VOP mapping functions
Make it possible to map between e32 and e64 encoding opcodes.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176104
2013-02-26 17:52:42 +00:00
Christian Konig 6612ac39c9 R600/SI: swap operands if it helps folding
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176103
2013-02-26 17:52:36 +00:00
Christian Konig 76edd4f2bc R600/SI: add some more instruction flags
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176102
2013-02-26 17:52:29 +00:00
Christian Konig f82901af2a R600/SI: add post ISel folding for SI v2
Include immediate folding and SGPR limit handling for VOP3 instructions.

v2: remove leftover hasExtraSrcRegAllocReq

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176101
2013-02-26 17:52:23 +00:00
Christian Konig d910b7d534 R600/SI: add folding helper
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176100
2013-02-26 17:52:16 +00:00
Christian Konig d303996918 R600/SI: fix VOP3b encoding v2
v2: document why we hardcode VCC for now.

This is a candidate for the mesa-stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176099
2013-02-26 17:52:09 +00:00
Christian Konig 0f0a8fe2dd R600/SI: fix and cleanup SI register definition v2
Prevent producing real strange tablegen code by using
proper register sizes, alignments and hierarchy.

Also cleanup the unused definitions and add some comments.

v2: add SGPR 512 bit registers, stop registers from wrapping around,
    fix SGPR alignment

This is a candidate for the mesa-stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176098
2013-02-26 17:52:03 +00:00
Christian Konig d76ed54b60 R600/SI: fix stupid typo
This is a candidate for the mesa-stable branch.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 176097
2013-02-26 17:51:57 +00:00
Renato Golin 276ec45704 Adding ARM as supported architecture
llvm-svn: 176096
2013-02-26 17:23:13 +00:00
Renato Golin e7693537d8 Proper XFAILs for ARMv7 / v5
llvm-svn: 176095
2013-02-26 17:16:27 +00:00
Bill Schmidt 441907dc09 Fix PR15359.
The PowerPC TLS relocation types were not previously added to the
necessary list in MCELFStreamer::fixSymbolsInTLSFixups().  Now they are!

llvm-svn: 176094
2013-02-26 16:41:03 +00:00
Howard Hinnant 5b22e99e77 Michael van der Westhuizen: correction to the libcxx build instructions when built with libcxxrt on Linux.
llvm-svn: 176093
2013-02-26 16:27:55 +00:00
Daniel Jasper 70bc87420a Fix bad line break decision.
Before:
if (Intervals[i].getRange().getFirst() < Intervals[i - 1]
                                             .getRange().getLast()) {}

After:
if (Intervals[i].getRange().getFirst() <
    Intervals[i - 1].getRange().getLast()) {}

llvm-svn: 176092
2013-02-26 13:59:14 +00:00
Alexey Samsonov 086b940b1e [Sanitizer] Don't die if external symbolizer is used on Mac, where it's not implemented yet
llvm-svn: 176091
2013-02-26 13:40:51 +00:00
Renato Golin 2c2fce0e00 GCC 4.6.3 O3 miscompiles on ARM
llvm-svn: 176090
2013-02-26 13:32:40 +00:00
Kostya Serebryany a8cfb900dd [sanitizer] A low-level vector implementation to be used in leak checking code. Patch by Sergey Matveev
llvm-svn: 176089
2013-02-26 13:30:27 +00:00
Evgeniy Stepanov 216bf50f2f Allow dash before "ld" in android driver test.
Sometimes android linker is "arm-linux-androideabi-ld", and not just "ld".

llvm-svn: 176088
2013-02-26 13:20:29 +00:00
Daniel Jasper 16b3562f00 In range-based for-loops, prefer splitting after ":".
Before:
for (const aaaaaaaaaaaaaaaaaaaaa &
         aaaaaaaaa : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) {}

After:
for (const aaaaaaaaaaaaaaaaaaaaa &aaaaaaaaa :
     aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) {}

llvm-svn: 176087
2013-02-26 13:18:08 +00:00
Daniel Jasper fb5e241183 Only keep empty lines in unwrapped lines if they preceed a line comment.
Empty lines followed by line comments are often used to highlight the
comment. Empty lines somewhere else are usually left over from manual or
automatic formatting and should probably be removed.

Before (clang-format would keep):
S s = {
  a,

  b
};

After:
S s = { a, b };

llvm-svn: 176086
2013-02-26 13:10:34 +00:00
Kostya Serebryany 459df6f167 [asan] a bit stricter lint for CHECK vs CHECK_XX (these CHECK_XX really help debugging!)
llvm-svn: 176085
2013-02-26 12:59:06 +00:00
Daniel Jasper 5497fce41c Only break string literals as a last resort.
We might want to move towards doing this if the formatting can be
significantly improved, but we need to carefully evaluate the different
situations first.

Before (the string literal was split by clang-format here):
aaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaa, aaaaaa("aaa aaaaa aaa aaa aaaaa aaa "
                                                  "aaaaa aaa aaa aaaaaa"));

After:
aaaaaaaaaaaaaaaaaaaa(
    aaaaaaaaaaaaaaaaaaaa,
    aaaaaa("aaa aaaaa aaa aaa aaaaa aaa aaaaa aaa aaa aaaaaa"));

llvm-svn: 176084
2013-02-26 12:52:34 +00:00
Alexey Samsonov 46c0bc233b Define CMake option CLANG_INCLUDE_TESTS *before* traversing into tests/ subdirectory. Otherwise, while configuring the build tree for the first time, Clang unit tests could avoid being added to 'check-clang' command, and thus avoid being built and executed.
llvm-svn: 176080
2013-02-26 09:43:27 +00:00
Kostya Serebryany 01a32bdef1 [tsan] enable tsan-vs-gvn test since it is now fixed
llvm-svn: 176079
2013-02-26 08:18:27 +00:00
Kostya Serebryany 8caf654731 [asan] fix the output for range accesses (memset, etc); improve the tests; more strict checking in memcmp
llvm-svn: 176078
2013-02-26 07:25:18 +00:00
Kostya Serebryany c8ac15a66b [asan] use the new attribute syntax (no_address_safety_analysis => no_sanitize_address)
llvm-svn: 176077
2013-02-26 07:01:06 +00:00
Kostya Serebryany 4c0fc9931e Unify clang/llvm attributes for asan/tsan/msan (Clang part)
These are two related changes (one in llvm, one in clang).
LLVM: 
- rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode)
- rename thread_safety => sanitize_thread
- rename no_uninitialized_checks -> sanitize_memory

CLANG: 
- add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis))
- add __attribute__((no_sanitize_thread))
- add __attribute__((no_sanitize_memory))

for S in address thread memory
If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not
set llvm attribute sanitize_S

llvm-svn: 176076
2013-02-26 06:58:27 +00:00
Kostya Serebryany cf880b9443 Unify clang/llvm attributes for asan/tsan/msan (LLVM part)
These are two related changes (one in llvm, one in clang).
LLVM: 
- rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode)
- rename thread_safety => sanitize_thread
- rename no_uninitialized_checks -> sanitize_memory

CLANG: 
- add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis))
- add __attribute__((no_sanitize_thread))
- add __attribute__((no_sanitize_memory))

for S in address thread memory
If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not
set llvm attribute sanitize_S

llvm-svn: 176075
2013-02-26 06:58:09 +00:00
Michael Han d9450f778e Update tests to do a full match against printed C++11 attributes.
llvm-svn: 176074
2013-02-26 02:00:13 +00:00
Michael J. Spencer 7f09a3d54e [Pass][Layout] Fix bug and add debug printing.
Fix a bug where if two atoms had the same index in the override map,
the compare would return false. It now goes to the next check when
they are equal.

No test because it currently can't be tested. An upcomming patch will test it.

llvm-svn: 176073
2013-02-26 01:35:30 +00:00