Commit Graph

127435 Commits

Author SHA1 Message Date
David Majnemer a9330fe553 Teach SimplifyLibCalls about stpcpy.
llvm-svn: 156815
2012-05-15 11:46:21 +00:00
Manuel Klimek fdbe4f9dc2 Fixes crasher bug in JSONCompilationDatabase for invalid input.
llvm-svn: 156814
2012-05-15 11:46:07 +00:00
Gabor Greif 9304763dfc add embedded linux variants that occur in the field
llvm-svn: 156813
2012-05-15 11:21:03 +00:00
Bill Wendling b3133645ab Remove warning about testing unsigned int with int.
llvm-svn: 156812
2012-05-15 09:59:13 +00:00
Stepan Dyatkovskiy 395c893d33 Fixed one small stupid, but critical bug.
llvm-svn: 156810
2012-05-15 09:21:39 +00:00
Manuel Klimek 4fa6b60ced This patch fixes the cmake build to create libclang.so/libclang.a on linux
instead of liblibclang.so/liblibclang.a.

Patch by Arnaud de Grandmaison.

llvm-svn: 156809
2012-05-15 08:58:48 +00:00
Stepan Dyatkovskiy e01e9863c5 Rejected r156804 due to buildbots failures.
llvm-svn: 156808
2012-05-15 06:50:18 +00:00
Richard Smith d72da1513a Further improvement to wording of overload resolution diagnostics, and including
the sole parameter name in the diagnostic in more cases. Patch by Terry Long!

llvm-svn: 156807
2012-05-15 06:21:54 +00:00
Richard Smith 8e4a3868fe PR12798: Don't drop part of the nested name specifier when instantiating a
pseudo-destructor expression. This can affect whether virtual dispatch for
the destructor call is bypassed.

llvm-svn: 156806
2012-05-15 06:15:11 +00:00
Richard Smith 5db7f6cb1e Test file I forgot to 'svn add' in r156802.
llvm-svn: 156805
2012-05-15 05:39:53 +00:00
Stepan Dyatkovskiy d450d3fa12 SelectionDAGBuilder::Clusterify : main functinality was replaced with CRSBuilder::optimize, so big part of Clusterify's code was reduced.
llvm-svn: 156804
2012-05-15 05:09:41 +00:00
Richard Smith 9dd6e8f3ac PR12826: Converting an lvalue to an xvalue is a no-op conversion, not an lvalue-to-rvalue conversion.
llvm-svn: 156803
2012-05-15 05:04:02 +00:00
Richard Smith b9e90b13cf Fold the six functions checking explicitly-defaulted special member functions
into one. These were all performing almost identical checks, with different bugs
in each of them.

This fixes PR12806 (we weren't setting the exception specification for an
explicitly-defaulted, non-user-provided default constructor) and enforces
8.4.2/2's rule that an in-class defaulted member must exactly match the implicit
parameter type.

llvm-svn: 156802
2012-05-15 04:39:51 +00:00
Akira Hatanaka cf434ee4c1 Temporarily disable anti-dependence breaking for Mips until bug 12829 is
resolved.

llvm-svn: 156801
2012-05-15 03:14:52 +00:00
Greg Clayton fb72fde837 Fixed a typo: "aync" => "async"
llvm-svn: 156797
2012-05-15 02:50:49 +00:00
Greg Clayton 8910c90cdc <rdar://problem/11451919>
Fixed the test suite not working on i386 due to recent default arch detection changes.

llvm-svn: 156796
2012-05-15 02:44:13 +00:00
Greg Clayton 4116e93dc5 <rdar://problem/11240464>
Correctly unique a class' methods when we detect that a class has been uniqued to another.

llvm-svn: 156795
2012-05-15 02:33:01 +00:00
John McCall 8b3f5ffb0a Change the mangling of a ref-qualifier on a function type so that
it is placed in a position which is never ambiguous with a
reference-to-function type.  This follows some recent discussion
and ensuing proposal on cxx-abi-dev.  It is not necessary to
change the mangling of CV-qualifiers because you cannot
apply CV-qualification in the normal sense to a function type.
It is not necessary to change the mangling of ref-qualifiers on
method declarations because they appear in an unambiguous
location.

In addition, mangle CV-qualifiers and ref-qualifiers on function
types when they occur in positions other than member pointers
(that is, when they appear as template arguments).

This is a minor ABI break with previous releases of clang.  It
is not considered critical because (1) ref-qualifiers are
relatively rare, since AFAIK we're the only implementing compiler,
and (2) they're particularly likely to come up in contexts that
do not rely on the ODR for correctness.  We apologize for any
inconvenience;  this is the right thing to do.

llvm-svn: 156794
2012-05-15 02:01:59 +00:00
Enrico Granata bd5a7a9f03 Fixing a bug where the summary for certain NSStrings was being returned as empty in spite of the string actually having a content
llvm-svn: 156793
2012-05-15 01:22:45 +00:00
Jakob Stoklund Olesen 095f22af7f Create a struct representing register units in TableGen.
Besides the weight, we also want to store up to two root registers per
unit. Most units will have a single root, the leaf register they
represent. Units created for ad hoc aliasing get two roots: The two
aliasing registers.

The root registers can be used to compute the set of overlapping
registers.

llvm-svn: 156792
2012-05-15 00:50:23 +00:00
Bill Wendling 8b5c0e4af2 Remove extraneous ';'.
llvm-svn: 156791
2012-05-15 00:41:56 +00:00
Akira Hatanaka 4773e67e0b Add a command line option to skip the delay slot filler pass entirely for Mips.
The purpose of this option is to silence error messages issued by machine
verifier passes and enable them to run to the end. If this option is not
provided, -verify-machineinstrs complains when it discovers there is a
non-terminator instruction (an instruction that is in a delay slot) after the
first terminator in a basic block.

llvm-svn: 156790
2012-05-14 23:59:17 +00:00
Argyrios Kyrtzidis 0bbe94f737 [objcmt] When rewriting to subscripting syntax, make sure we put
the receiver in parentheses when necessary.

Part of rdar://11438360

llvm-svn: 156789
2012-05-14 23:33:49 +00:00
Fariborz Jahanian 16d71bb834 objc: allow typedef'ing an id to a pointer to a c-struct only.
// rdar://11356439

llvm-svn: 156788
2012-05-14 22:48:56 +00:00
Michael J. Spencer c10948d02b [Support/YAMLParser] Use rtrim on plain scalars.
llvm-svn: 156787
2012-05-14 22:43:34 +00:00
Richard Smith b71e73243b Recover properly from a redundant 'typename' before a non-nested name. This is
permitted as a Microsoft extension. Patch by William Wilson! (Plus some minor
tweaking by me.)

llvm-svn: 156786
2012-05-14 22:43:34 +00:00
Michael J. Spencer e27086b0e8 [Support/COFF] Make the order of members in symbol match the standard.
llvm-svn: 156785
2012-05-14 22:43:21 +00:00
Anna Zaks b4e71e8f58 [analyzer] Fix a crash in templated code which uses blocks.
We should investigate why signature info is not set in this case.

llvm-svn: 156784
2012-05-14 22:38:24 +00:00
Richard Smith 48d5418df8 Slightly generalize FileCheck patterns to unbreak -Asserts builds.
llvm-svn: 156783
2012-05-14 22:06:02 +00:00
Argyrios Kyrtzidis c1dfed6572 [objcmt] When rewriting to array/dictionary literals, add an explicit
cast to 'id' for any argument that requires it.

Part of rdar://11438360.

llvm-svn: 156782
2012-05-14 22:01:53 +00:00
Richard Smith bb653bd5f9 Implement IRGen for C++11's "T{1, 2, 3}", where T is an aggregate and the
expression is treated as an lvalue.

llvm-svn: 156781
2012-05-14 21:57:21 +00:00
David Blaikie 81a84bd841 Fix use of uninitialized variable.
Found by GCC's maybe-uninitialized.

llvm-svn: 156780
2012-05-14 21:48:19 +00:00
Enrico Granata e89f3fe3f3 Fixing a typo in the lldb-gdb webpage
llvm-svn: 156779
2012-05-14 21:39:38 +00:00
Jakob Stoklund Olesen a13fd12872 Don't access MO reference after invalidating operand list.
This should unbreak llvm-x86_64-linux.

llvm-svn: 156778
2012-05-14 21:30:58 +00:00
Jakob Stoklund Olesen dc2e0cd44a Fix PR12821.
RAFast must add an <imp-def> operand when it is rewriting a sub-register
def that isn't a read-modify-write.

llvm-svn: 156777
2012-05-14 21:10:25 +00:00
Chad Rosier a968caf8e0 Move the capture analysis from MemoryDependencyAnalysis to a more general place
so that it can be reused in MemCpyOptimizer.  This analysis is needed to remove
an unnecessary memcpy when returning a struct into a local variable.
rdar://11341081
PR12686

llvm-svn: 156776
2012-05-14 20:35:04 +00:00
Brendon Cahoon f6b687e5d1 Revert 156634 upon request until code improvement changes are made.
llvm-svn: 156775
2012-05-14 19:35:42 +00:00
Dan Gohman 164fe18cfe Rename @llvm.debugger to @llvm.debugtrap.
llvm-svn: 156774
2012-05-14 18:58:10 +00:00
Johnny Chen 2fa9de1080 Fix missing NEON registers for the 'register read' command with the lldb debugserver which supports the 'qRegisterInfo' packet
that dynamically discovers remote register context information.

o GDBRemoteRegisterContext.h:

Change the prototype of HardcodeARMRegisters() to take a boolean flag, which now becomes

    void
    HardcodeARMRegisters(bool from_scratch);

o GDBRemoteRegisterContext.cpp:

HardcodeARMRegisters() now checks the from_scratch flag and decides whether to add composite registers to the already
existing primordial registers based on a table called g_composites which describes the composite registers.

o ProcessGDBRemote.cpp:

Modify the logic of ProcessGDBRemote::BuildDynamicRegisterInfo() to call m_register_info.HardcodeARMRegisters()
with the newly introduced 'bool from_scrach' flag.

rdar://problem/10652076

llvm-svn: 156773
2012-05-14 18:44:23 +00:00
Akira Hatanaka 67c09afab1 Release notes for MIPS backend.
llvm-svn: 156772
2012-05-14 18:40:07 +00:00
Chandler Carruth 94a3201179 Teach the driver on Linux to respect -nodefaultlibs.
Patch from Andrew C. Morrow.

llvm-svn: 156771
2012-05-14 18:31:18 +00:00
Andrew Trick 31ee64d9dc Remove a stale forward declaration.
llvm-svn: 156770
2012-05-14 18:03:19 +00:00
Jordy Rose 459d5f62c2 [analyzer] strncpy: Special-case a length of 0 to avoid an incorrect warning.
We check the address of the last element accessed, but with 0 calculating that
address results in element -1. This patch bails out early (and avoids a bunch
of other work at that).

Fixes PR12807.

llvm-svn: 156769
2012-05-14 17:58:35 +00:00
Jakob Stoklund Olesen 77e7b8ede2 Remove the expensive BitVector::operator~().
Returning a temporary BitVector is very expensive. If you must, create
the temporary explicitly: Use BitVector(A).flip() instead of ~A.

llvm-svn: 156768
2012-05-14 15:46:27 +00:00
Jakob Stoklund Olesen 76680e9b4e Remove BitVector binops.
These operators were crazy slow, calling malloc to return a temporary
result. At the same time, they look very innocent when used in code.

If you need temporary BitVectors to compute your thing, create them
explicitly, and use the inplace logical operators. This makes the high
cost explicit in the code.

llvm-svn: 156767
2012-05-14 15:37:25 +00:00
Dmitry Vyukov 572c5b2a44 tsan: add more atomics to public interface (fetch_or/and/xor + 1-,2-byte versions)
llvm-svn: 156766
2012-05-14 15:33:00 +00:00
Dmitry Vyukov 665ce2a2f4 tsan: enabled report suppression for signal-unsafe reports
llvm-svn: 156765
2012-05-14 15:28:03 +00:00
Dmitry Vyukov d004b99cc6 tsan: fix output_tests script to actually verify tests results
llvm-svn: 156764
2012-05-14 15:25:35 +00:00
Jakob Stoklund Olesen 066fba1a82 Consider ad hoc aliasing when building RegUnits.
Register units can be used to compute if two registers overlap:

  A overlaps B iff units(A) intersects units(B).

With this change, the above holds true even on targets that use ad hoc
aliasing (currently only ARM). This means that register units can be
used to implement regsOverlap() more efficiently, and the register
allocator can use the concept to model interference.

When there is no ad hoc aliasing, the register units correspond to the
maximal cliques in the register overlap graph. This is optimal, no other
register unit assignment can have fewer units.

With ad hoc aliasing, weird things are possible, and we don't try too
hard to compute the maximal cliques. The current approach is always
correct, and it works very well (probably optimally) as long as the ad
hoc aliasing doesn't have cliques larger than pairs. It seems unlikely
that any target would need more.

llvm-svn: 156763
2012-05-14 15:20:39 +00:00
Jakob Stoklund Olesen 534848b1c7 Record the ad hoc aliasing graph in CodeGenRegister.
The ad hoc aliasing specified in the 'Aliases' list in .td files is
currently only used by computeOverlaps(). It will soon be needed to
build accurate register units as well, so build the undirected graph in
CodeGenRegister::buildObjectGraph() instead.

Aliasing is a symmetric relationship with only one direction specified
in the .td files. Make sure both directions are represented in
getExplicitAliases().

llvm-svn: 156762
2012-05-14 15:12:37 +00:00