Commit Graph

142273 Commits

Author SHA1 Message Date
Evgeniy Stepanov c9db3b8b39 [sanitizer] Copy sanitizer headers to the build tree.
llvm-svn: 173794
2013-01-29 11:46:06 +00:00
Daniel Jasper bbc8415fda Fix a comment and reformat clang-format with clang-format
Not all changes might be ideal, but IMO all are acceptable.

llvm-svn: 173793
2013-01-29 11:27:30 +00:00
Daniel Jasper 38c11ce93d Initial support for multiple variable declarations.
Before:
  SomeType aaaaaaaaaaaaaaaaa = aaaaaa->aaaaaaaaaaaaaaaaa(),
      aaaaaaaaaaa = aaaaaa->aaaaaaaaaaa();
After:
  SomeType aaaaaaaaaaaaaaaaa = aaaaaa->aaaaaaaaaaaaaaaaa(),
           aaaaaaaaaaa = aaaaaa->aaaaaaaaaaa();

llvm-svn: 173792
2013-01-29 11:21:01 +00:00
Joey Gouly 39989dadd3 Add a diagnostic for an OpenCL kernel with a pointer pointer argument.
Also refactor the surrounding code a little.

llvm-svn: 173791
2013-01-29 10:54:06 +00:00
Richard Smith 064697ca06 Test update missed in r173789.
llvm-svn: 173790
2013-01-29 10:18:33 +00:00
Richard Smith 7dd5fe5ce6 Produce a diagnostic if alignas is applied to an expression. Neither C11 nor
C++11 allows that.

llvm-svn: 173789
2013-01-29 10:18:18 +00:00
Richard Smith 810ad3eb44 Downgrade 'attribute ignored when parsing type' from error to warning, to match
the diagnostic's warn_ name. Switch some places (notably C++11 attributes)
which really wanted an error over to a different diagnostic. Finally, suppress
the diagnostic entirely for __ptr32, __ptr64 and __w64, to avoid producing
diagnostics in important system headers.

llvm-svn: 173788
2013-01-29 10:02:16 +00:00
Daniel Jasper 6a217e1815 Reverting changes from r173785 (removing empty lines before "}").
This needs some more thinking, e.g. for namespaces, chains of if-else
if, ...

llvm-svn: 173787
2013-01-29 10:00:16 +00:00
Dmitry Vyukov 73b12d7132 asan: fix the test
llvm-svn: 173786
2013-01-29 09:59:53 +00:00
Daniel Jasper aa94a90a79 Remove empty lines before "}".
Those empty lines waste vertical whitespace and almost never
increase readability.

Before:
void f() {
  DoSomething();

}

After:
void f() {
  DoSomething();
}

llvm-svn: 173785
2013-01-29 09:42:11 +00:00
Dmitry Vyukov 0632dd410c tsan: fix the message (tsan is not asan)
llvm-svn: 173784
2013-01-29 09:39:58 +00:00
Dmitry Vyukov 7943b69002 tsan: add IsSymbolizerAvailable() function for querying for presence of internal/external symbolizer
llvm-svn: 173783
2013-01-29 09:35:14 +00:00
Dmitry Vyukov b130fc3c0d tsan: add interceptor stubs for stat family of functions
llvm-svn: 173782
2013-01-29 09:23:09 +00:00
Timur Iskhodzhanov 5d7ff00456 Hopefully fix the Windows build failure introduced in r173769
llvm-svn: 173781
2013-01-29 09:09:27 +00:00
Tim Northover a0edd3ee66 Fix 64-bit atomic operations in Thumb mode.
The ARM and Thumb variants of LDREXD and STREXD have different constraints and
take different operands. Previously the code expanding atomic operations didn't
take this into account and asserted in Thumb mode.

llvm-svn: 173780
2013-01-29 09:06:13 +00:00
Richard Smith 1dba27cd49 Implement C++11 [dcl.align]p1 and C11 6.7.5/2 rules for alignas and _Alignas.
llvm-svn: 173779
2013-01-29 09:02:09 +00:00
Alexey Samsonov 9aa2e4f5c4 [ASan] fix deallocation hook in allocator2: according to specification, dealloc hook should be called before deallocating memory
llvm-svn: 173778
2013-01-29 08:19:11 +00:00
Craig Topper c048154b9b Merge SSE and AVX shuffle instructions in the comment printer.
llvm-svn: 173777
2013-01-29 07:54:31 +00:00
Alexey Samsonov 615b86cf0a [ASan] Do allocate memory even for zero-size allocation requests. Explain why we have to do this in comments.
llvm-svn: 173776
2013-01-29 07:51:34 +00:00
Andrew Trick 399c9bfcc0 MIsched: cleanup code. Use isBoundaryNode().
llvm-svn: 173775
2013-01-29 06:26:35 +00:00
Michael Gottesman 1e29ca1501 Fixed 2 more header comments...
llvm-svn: 173774
2013-01-29 05:07:18 +00:00
Michael Gottesman 5a8f9e7c54 Fixed header comment.
llvm-svn: 173773
2013-01-29 05:05:17 +00:00
Michael Gottesman 23a1ee5f5b Fixed some whitespace/80+ violations. Also added a space after a namespace declaration.
llvm-svn: 173772
2013-01-29 04:58:30 +00:00
Richard Smith bc4fc77aac C++11 status:
* Mark 'sequence points' as done now we have a warning for unsequenced operations
 * Mark 'memory model' as done now we correctly model bitfield operations

llvm-svn: 173771
2013-01-29 04:55:18 +00:00
Michael Gottesman 7bf48af498 Added missing dashes from header declaration comment.
llvm-svn: 173770
2013-01-29 04:53:55 +00:00
Michael Gottesman 13a5f1a8b7 Juggled Debug.h from ObjCARC.h to only the including cpp files that
actually have DEBUG statements. Also changed raw_ostream in said header
to be a forward declaration (removing an include).

llvm-svn: 173769
2013-01-29 04:51:59 +00:00
Richard Smith a5aaca9295 Propagate the spelling list index for an attribute across template instantiation.
llvm-svn: 173768
2013-01-29 04:21:28 +00:00
Michael Gottesman 278266faa8 Sorted includes using utils/sort_includes.
llvm-svn: 173767
2013-01-29 04:20:52 +00:00
Richard Smith 52c5b87cc9 PR15017: A '>' can appear after a type-specifier in a template-argument-list.
It turns out that there's no correctness bug here (because we can't have a type
definition in this location), but there was a diagnostic bug.

llvm-svn: 173766
2013-01-29 04:13:32 +00:00
Michael Han ff37d94e6f Add a test case for attribute print.
llvm-svn: 173765
2013-01-29 04:13:20 +00:00
Michael Gottesman f823dd2ef7 Added two missing headers from ObjCARCAliasAnalysis.h.
This was missed since whenever I was including ObjCARCAliasAnalysis.h, I
was including ObjCARC.h before it which included these includes
(resulting in no compilation breakage).

llvm-svn: 173764
2013-01-29 04:09:24 +00:00
Michael Gottesman 7f387ae6e3 Removed InstCombine/Targets as library dependencies for libObjCARCOpts since they are unnecessary.
llvm-svn: 173763
2013-01-29 04:05:17 +00:00
Bill Wendling 9806806f39 Modify the tests for the (sorted) order that the attributes come out as now.
llvm-svn: 173762
2013-01-29 03:21:00 +00:00
Bill Wendling f2955aa3f2 Convert getAttributes() to return an AttributeSetNode.
The AttributeSetNode contains all of the attributes. This removes one (hopefully
last) use of the Attribute class as a container of multiple attributes.

llvm-svn: 173761
2013-01-29 03:20:31 +00:00
Michael Gottesman 778138e960 Extracted ObjCARCContract from ObjCARCOpts into its own file.
This also required adding 2x headers Dependency Analysis.h/Provenance Analysis.h
and a .cpp file DependencyAnalysis.cpp to unentangle the dependencies inbetween
ObjCARCContract and ObjCARCOpts.

llvm-svn: 173760
2013-01-29 03:03:03 +00:00
Michael Gottesman 50a622f120 Removed some cruft from ObjCARCAliasAnalysis.cpp.
llvm-svn: 173759
2013-01-29 03:02:59 +00:00
Richard Smith 685cef6499 PR15100: look through type sugar when determining whether we have one of the
forms of 'main' which we accept as an extension.

llvm-svn: 173758
2013-01-29 02:49:47 +00:00
Enrico Granata 59de94bd4e Since an address (0x12346) is an expression, be brief.
llvm-svn: 173757
2013-01-29 02:46:04 +00:00
Richard Smith e1564ea65b Fold tests for C++ 'main' into a single file.
llvm-svn: 173756
2013-01-29 02:42:09 +00:00
Evan Cheng 0e88c7d897 Teach SDISel to combine fsin / fcos into a fsincos node if the following
conditions are met:
1. They share the same operand and are in the same BB.
2. Both outputs are used.
3. The target has a native instruction that maps to ISD::FSINCOS node or
   the target provides a sincos library call.

Implemented the generic optimization in sdisel and enabled it for
Mac OSX. Also added an additional optimization for x86_64 Mac OSX by
using an alternative entry point __sincos_stret which returns the two
results in xmm0 / xmm1.

rdar://13087969
PR13204

llvm-svn: 173755
2013-01-29 02:32:37 +00:00
Richard Smith 210b67d221 Test that we print MS keyword attributes without a __declspec(...) adornment.
llvm-svn: 173754
2013-01-29 02:31:57 +00:00
Enrico Granata b84a9dbf6b <rdar://problem/12552374>
Replacing the address argument type with address-expression in cases where StringToAddress() is used, and hence an expression can be passed where previously only a numeric address was allowed
This makes the documentation more clear and helps users discover that they can truly pass in an expression in these situations.

llvm-svn: 173753
2013-01-29 01:48:30 +00:00
Richard Smith d11c7a1628 Treat alignas and _Alignas as keyword attributes. This allows us to
pretty-print them properly (modulo the more general badness in alignment
attribute printing).

llvm-svn: 173752
2013-01-29 01:48:07 +00:00
Bill Wendling 60011b8e27 Use an AttrBuilder to generate the correct AttributeSet.
We no longer accept an encoded integer as representing all of the
attributes. Convert this via the AttrBuilder class into an AttributeSet with the
correct representation (an AttributeSetImpl that holds a list of Attribute
objects).

llvm-svn: 173750
2013-01-29 01:43:29 +00:00
Richard Smith 9a629abf3d Actually remove the hack which was blocking the Borland-style attributes from
working, and add the missing attribute spellings. This brings _pascal,
_fastcall, _stdcall and _cdecl to life in -fborland-extensions mode.

llvm-svn: 173749
2013-01-29 01:38:41 +00:00
Enrico Granata 9a31ccbad8 <rdar://problem/12890171>
Providing a compact display mode for "po" to use where the convenience variable name and the pointer value are both hidden.
This is for convenience when dealing with ObjC instances where the description often gets it right and the debugger-provided information is not useful to most people.
If you need either of these, "expr" will still show them.

llvm-svn: 173748
2013-01-29 01:35:01 +00:00
Douglas Gregor 0b7bc7f996 Don't crash while printing APValues that are lvalues casted to a
decidedly non-reference, non-pointer type. Fixes <rdar://problem/13090123>.

llvm-svn: 173747
2013-01-29 01:26:43 +00:00
Richard Smith 0cdcc98200 Replace AS_MSTypespec with AS_Keyword, for representing any attribute spelled
as a keyword. Rationalize existing attributes to use it as appropriate, and to
not lie about some __declspec attributes being GNU attributes. In passing,
remove a gross hack which was discarding attributes which we could handle. This
results in us actually respecting the __pascal keyword again.

llvm-svn: 173746
2013-01-29 01:24:26 +00:00
Greg Clayton 3c94737fb7 <rdar://problem/12524607>
Flush the process when symbols are loaded/unloaded manually. This was going on in:
- "target modules load" command
- SBTarget::SetSectionLoadAddress(...)
- SBTarget::ClearSectionLoadAddress(...)
- SBTarget::SetModuleLoadAddress(...)
- SBTarget::ClearModuleLoadAddress(...)

llvm-svn: 173745
2013-01-29 01:17:09 +00:00
John McCall 5c1f1d09c8 Abstract the behavior of when to use base-class tail padding.
For fun, I added a comedy "actually obey the C++11 POD rules" option
which nobody is allowed to use.

llvm-svn: 173744
2013-01-29 01:14:22 +00:00