Commit Graph

126127 Commits

Author SHA1 Message Date
Fariborz Jahanian fce89c609d objective-c arc: Issue warning under -Wreceiver-is-weak
if receiver is a 'weak' property, by type or by attribute.
// rdar://10225276

llvm-svn: 155159
2012-04-19 21:44:57 +00:00
Johnny Chen c9cb71a0b3 LLDB test suite should also output the config info string along with the stack trace.
rdar://problem/11283401

Example:

Collected 1 test

1: test_with_dwarf (TestCallStdStringFunction.ExprCommandCallFunctionTestCase)
   Test calling std::String member function. ... FAIL

======================================================================
FAIL: test_with_dwarf (TestCallStdStringFunction.ExprCommandCallFunctionTestCase)
   Test calling std::String member function.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Volumes/data/lldb/svn/ToT/test/lldbtest.py", line 427, in wrapper
    return func(self, *args, **kwargs)
  File "/Volumes/data/lldb/svn/ToT/test/expression_command/call-function/TestCallStdStringFunction.py", line 34, in test_with_dwarf
    self.call_function()
  File "/Volumes/data/lldb/svn/ToT/test/expression_command/call-function/TestCallStdStringFunction.py", line 48, in call_function
    substrs = ['Hello world'])
  File "/Volumes/data/lldb/svn/ToT/test/lldbtest.py", line 1235, in expect
    msg if msg else EXP_MSG(str, exe))
AssertionError: False is not True : 'Hello world' returns expected result
Config=i386-clang
----------------------------------------------------------------------
Ran 1 test in 1.148s

FAILED (failures=1)

llvm-svn: 155157
2012-04-19 21:33:55 +00:00
Joel Jones a7691f18a6 Test for the the problem with xors being changed into ands
when the set bits aren't the same for both args of the xor.
This transformation is in the function TargetLowering::SimplifyDemandedBits
in the file lib/CodeGen/SelectionDAG/TargetLowering.cpp.

I have tested this test using a previous version of llc which the defect and 
the a version of llc which does not. I got the expected fail and pass, 
respectively.

This test goes with rdar://11195364 and the check in with the fix: svn r154955

llvm-svn: 155156
2012-04-19 20:54:44 +00:00
Patrick Beard 81a256a909 Added equivalent method calls in examples.
llvm-svn: 155155
2012-04-19 20:48:09 +00:00
Daniel Dunbar 46d611a227 [docs] Update HTML pages to refer to CSS in a way that works locally and with Sphinx.
llvm-svn: 155153
2012-04-19 20:20:34 +00:00
Johnny Chen 39b8c3567a Simplify the progress bar display when neither "-v" nor "-t" is passed to the test driver.
llvm-svn: 155152
2012-04-19 20:09:44 +00:00
Daniel Dunbar f1cfef17e3 [docs] Remove index.html, I am flipping the switch on llvm.org.
llvm-svn: 155151
2012-04-19 20:06:39 +00:00
Sean Callanan 82b6f48331 Updated LLVM to take a variety of ARM
disassembler fixes.  The ARM disassembler is
now crash-free on all opcodes.

llvm-svn: 155149
2012-04-19 20:00:54 +00:00
Johnny Chen 92f162a798 The session file name should be tagged with (architecture, compiler) in addition
to the already existing (test result, test id) to avoid collision and to
facilitate postmortem analysis.

llvm-svn: 155148
2012-04-19 19:39:11 +00:00
Michael J. Spencer 9125493efe Remove llvm-ld and llvm-stub (which is only used by llvm-ld).
llvm-ld is no longer useful and causes confusion and so it is being removed.

* Does not work very well on Windows because it must call a gcc like driver to
  assemble and link.
* Has lots of hard coded paths which are wrong on many systems.
* Does not understand most of ld's options.
* Can be partially replaced by llvm-link | opt | {llc | as, llc -filetype=obj} |
  ld, or fully replaced by Clang.

I know of no production use of llvm-ld, and hacking use should be
replaced by Clang's driver.

llvm-svn: 155147
2012-04-19 19:27:54 +00:00
Johnny Chen 4fdc339db5 Not a test failure for i386; instead, the test case should be modified to not over-expect type fields for the synthetic childs.
rdar://problem/11277013

llvm-svn: 155144
2012-04-19 18:36:11 +00:00
Jim Grosbach a37e2295d4 Use a SmallVector instead of std::vector for ResOperands.
There's almost always a small number of instruction operands, so
use a SmallVector and save on heap allocations.

llvm-svn: 155143
2012-04-19 17:52:34 +00:00
Jim Grosbach 8c2beaac8b Update some internal naming conventions to modern style.
llvm-svn: 155142
2012-04-19 17:52:32 +00:00
Richard Smith 500ae098bb Formatting fix.
llvm-svn: 155141
2012-04-19 17:46:52 +00:00
David Blaikie 2e3380308e Add SmallVectorImpl Visual Studio visualizer. Patch by Nikola Smiljanic.
llvm-svn: 155140
2012-04-19 17:26:49 +00:00
David Blaikie c5caf7291c Fix a broken link. Patch by Nikola Smiljanic.
llvm-svn: 155139
2012-04-19 17:21:46 +00:00
Jim Ingham c1c19a6f02 In debug mode, assert when we fail to get the sequence mutex. We need to remove as many places where this can happen as possible.
llvm-svn: 155138
2012-04-19 16:57:50 +00:00
DeLesley Hutchins 8c9d9579c4 Refactor the thread safety analysis so that it is easier to do
path-sensitive analysis like handling of trylock expressions.

llvm-svn: 155137
2012-04-19 16:48:43 +00:00
Jakob Stoklund Olesen 6b6c81e6b2 Defer some shl transforms to DAGCombine.
The shl instruction is used to represent multiplication by a constant
power of two as well as bitwise left shifts. Some InstCombine
transformations would turn an shl instruction into a bit mask operation,
making it difficult for later analysis passes to recognize the
constsnt multiplication.

Disable those shl transformations, deferring them to DAGCombine time.
An 'shl X, C' instruction is now treated mostly the same was as 'mul X, C'.

These transformations are deferred:

  (X >>? C) << C   --> X & (-1 << C)  (When X >> C has multiple uses)
  (X >>? C1) << C2 --> X << (C2-C1) & (-1 << C2)   (When C2 > C1)
  (X >>? C1) << C2 --> X >>? (C1-C2) & (-1 << C2)  (When C1 > C2)

The corresponding exact transformations are preserved, just like
div-exact + mul:

  (X >>?,exact C) << C   --> X
  (X >>?,exact C1) << C2 --> X << (C2-C1)
  (X >>?,exact C1) << C2 --> X >>?,exact (C1-C2)

The disabled transformations could also prevent the instruction selector
from recognizing rotate patterns in hash functions and cryptographic
primitives. I have a test case for that, but it is too fragile.

llvm-svn: 155136
2012-04-19 16:46:26 +00:00
Tobias Grosser 902c9b243d Dependences: Rework parallelism check
After working and explaining this function to someone, I realized it could be
simplified and better documented.

llvm-svn: 155135
2012-04-19 16:38:16 +00:00
Daniel Dunbar 6dafd09680 [docs] Add back old index.html until I get llvm.org work done to support Sphinx docs.
llvm-svn: 155134
2012-04-19 16:37:30 +00:00
Daniel Dunbar fbb8041194 [docs] Convert docs index page into Sphinx.
- Work in progress, this is mostly important because it lets us incrementally migrate the remaining documentation.
 - Lots of styling, editing, and integration work yet to come…
 - PR12589

llvm-svn: 155133
2012-04-19 16:31:37 +00:00
Daniel Dunbar 09b8c0f115 [docs] Stub out structure for Sphinx-based docs.
- Work in progress, this is just the basic structure.

llvm-svn: 155132
2012-04-19 16:31:19 +00:00
Daniel Dunbar 58cfaf8684 llvm-lit: Inject the lit module path at the beginning of sys.path, just in case
the user has another lit somewhere.

llvm-svn: 155131
2012-04-19 16:31:08 +00:00
Fariborz Jahanian df0577de11 objective-c modern translator: Further improving the last
patch fixing writing a spurious 'static' into
the wrong place. // rdar://11275241

llvm-svn: 155130
2012-04-19 16:30:28 +00:00
DeLesley Hutchins 8d11c797b2 Thread safety analysis: split warnings into two groups: attribute warnings
which are checked in the parser, and analysis warnings that require the
full analysis.  This allows attribute syntax to be checked independently
of the full thread safety analysis.  Also introduces a new warning for the
case where a string is used as a lock expression; this allows the analysis
to gracefully handle expressions that would otherwise cause a parse error.

llvm-svn: 155129
2012-04-19 16:10:44 +00:00
Gabor Greif 180c4445cf zap tabs
llvm-svn: 155128
2012-04-19 15:16:31 +00:00
Kostya Serebryany d45a71c2bc [asan] test for issue #66
llvm-svn: 155127
2012-04-19 14:53:51 +00:00
Patrick Beard 2a4cfae1b3 Clarified encoding of boxed C strings, balanced all <p> with </p>.
llvm-svn: 155126
2012-04-19 14:33:55 +00:00
Manuel Klimek 770691b153 Adds a unit test for the RecursiveASTVisitor.
llvm-svn: 155108
2012-04-19 08:48:53 +00:00
Francois Pichet 52d3898a11 Fix a comment.
llvm-svn: 155107
2012-04-19 07:48:57 +00:00
Richard Smith 2b349aee5b Add missing -Wc++98-compat warnings for initializer list initializations which
initialize references, create std::initializer_list objects, or call constructors.

llvm-svn: 155105
2012-04-19 06:58:00 +00:00
Craig Topper eb63a4df26 Make fast isel use &XXXRegClass instead of XXXRegisterClass. Not a functional change since XXXRegisterClass is just a constant alias of &XXXRegClass, but should probably go away.
llvm-svn: 155104
2012-04-19 06:52:06 +00:00
Rafael Espindola 53cf219367 In mergeVisibility, if we already have an explicit visibility, keep it.
This fixes the included testcase and lets us simplify the code a bit. It
does require using mergeWithMin when merging class information to its
members. Expand the comments to explain why that works.

llvm-svn: 155103
2012-04-19 05:50:08 +00:00
Rafael Espindola 1280fe6245 In mergeVisibilityWithMin, let an implicit hidden symbol take precedence over
an explicit default one. This means that with -fvisibility hidden we
now produce a hidden symbol for

template <typename T>
class DEFAULT foo {
  void bar() {}
};
class zed {};
template class foo<zed>;

This matches the behaviour of gcc 4.7.

llvm-svn: 155102
2012-04-19 05:34:51 +00:00
Rafael Espindola 1f073336b7 Now that we check visibility attributes in an appropriate order,
there is no need for mergeVisibily to ever increase the visibility. Not
doing so lets us replace an incorrect use of mergeVisibilityWithMin. The
testcase

struct HIDDEN RECT {
  int top;
};
DEFAULT RECT foo = {0};

shows that we should give preference to one of the attributes instead of
keeping the minimum. We still get this testcase wrong because mergeVisibily
handles two explicit visibilities incorrectly, but this is a step in the
right direction.

llvm-svn: 155101
2012-04-19 05:24:05 +00:00
Rafael Espindola b660efd57a Check ConsiderGlobalVisibility before using -fvisibility.
llvm-svn: 155100
2012-04-19 04:37:16 +00:00
Rafael Espindola 3d3d339357 The explicit bit in LV already tracks exactly the same information as
DHasExplicitVisibility. Simplify the code a bit.

llvm-svn: 155099
2012-04-19 04:27:47 +00:00
Rafael Espindola af690f509a Move the point in the code where we handle -fvisibility=hidden. With
the current implementation this should be a nop as explicit visibility
takes precedence in mergeVisibility.

The location chosen is such that attributes checked above it can force
a symbol to be default. For example, an attribute is the variable or function.
Attributes checked after this point, can only make the visibility more
restrictive. An attribute in a type for example.

llvm-svn: 155098
2012-04-19 02:55:01 +00:00
Rafael Espindola 7a5543dbff Make setVisibility private and change users to mergeVisibility. This is
currently a nop as those users are the first merge or are a merge
of a hidden explicit visibility, which always wins in the current
implementation.

llvm-svn: 155095
2012-04-19 02:22:07 +00:00
Jason Molenda 7c3e6f3134 bump version to lldb-142.
llvm-svn: 155093
2012-04-19 02:02:12 +00:00
Jim Ingham 3b8285d90d Switch to setting the write side of the run lock when we call Resume. Then make a PrivateResume that doesn't switch the run-lock state, and use that where we are resuming without changing the public resume state.
llvm-svn: 155092
2012-04-19 01:40:33 +00:00
Richard Smith 11ffde3d7e libc++: only #include <cxxabi.h> if it exists. This allows libc++ to build
out of the box on Linux systems. If you're building against libc++abi, you
still need to make sure it can find <cxxabi.h> so it knows not to export
symbols which libc++abi provides.

llvm-svn: 155091
2012-04-19 01:36:12 +00:00
Andrew Trick a11810ad60 Allow targets to select the default scheduler by name.
llvm-svn: 155090
2012-04-19 01:34:10 +00:00
Andrew Trick 1af4a84740 whitespace
llvm-svn: 155089
2012-04-19 01:34:06 +00:00
Patrick Beard 5890bc548b Changed title.
llvm-svn: 155088
2012-04-19 01:30:47 +00:00
Johnny Chen 61f305cdb8 Add expected failure decorators for test cases which are failing for i386 architecture.
Plus fix some test cases to skip/succeed for i386.

llvm-svn: 155087
2012-04-19 01:07:54 +00:00
Patrick Beard cbcacc6aa3 Changed wording of availability.
llvm-svn: 155086
2012-04-19 01:02:16 +00:00
Richard Smith 99f15d6eb7 libc++: Add some missing #includes to atomics tests. libc++ doesn't need these
at the moment, but they allow these tests to be used to test clang against
libstdc++. Add myself to the credits file, as suggested by Howard.

llvm-svn: 155085
2012-04-19 00:50:47 +00:00
Fariborz Jahanian ca357d9831 modern objective-c translator: Fix writing a spurious 'static'
into the wrong place when rewriting a static function
which declares block literals. // rdar://11275241

llvm-svn: 155084
2012-04-19 00:50:01 +00:00