Commit Graph

37459 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis 6fe744cc38 When resolving default template arguments, it should be done in the declaration context
of the template what we are going to instantiate.

Fixes various crashes of rdar://11242625 & http://llvm.org/PR11421.

llvm-svn: 155576
2012-04-25 18:39:17 +00:00
Richard Smith 1ad04d95bc PR12625: Cope with classes which have incomplete base or member types:
Don't try to query whether an incomplete type has a trivial copy constructor
when determining whether a move constructor should be declared.

llvm-svn: 155575
2012-04-25 18:28:49 +00:00
Benjamin Kramer 2823f58038 Use a SmallMap for StoredDeclsMap, it's usually sparsely populated so we can avoid initializing memory for 64 buckets.
llvm-svn: 155571
2012-04-25 18:21:27 +00:00
Benjamin Kramer 4f947ff10b Convert a std::map that usually has between 0 and 10 elements to SmallMap.
llvm-svn: 155570
2012-04-25 18:21:21 +00:00
Fariborz Jahanian 78731c7098 improve a modern objc translator test.
llvm-svn: 155569
2012-04-25 18:11:57 +00:00
Fariborz Jahanian e49a42cae9 modern objc rewriter: fixes a bug writing
a const qualified static c-function. 
// rdar://11314329

llvm-svn: 155564
2012-04-25 17:56:48 +00:00
Manuel Klimek 85e60b5dc9 Adds documentation for how to use the tooling library.
llvm-svn: 155550
2012-04-25 14:20:13 +00:00
Manuel Klimek 06b0a7369f Adds a document describing the various tooling approaches and their pros and
cons.

llvm-svn: 155549
2012-04-25 13:57:00 +00:00
Evgeniy Stepanov 0a0655affa Make asan-ld test windows-safe.
llvm-svn: 155543
2012-04-25 09:28:10 +00:00
Manuel Klimek 3778a435d1 Fixes the header search logic for tools:
The driver needs to get the correct path to the executable to deduce
the header search path.

llvm-svn: 155542
2012-04-25 09:25:41 +00:00
Evgeniy Stepanov 7786671b5a Clang driver support for linking on Android.
llvm-svn: 155541
2012-04-25 08:59:22 +00:00
Evgeniy Stepanov 78eaa2cd1b Fix default cpu for -march=armv5e.
llvm-svn: 155540
2012-04-25 08:35:56 +00:00
Chris Lattner 024e12df52 OpenBSD: Remove incorrect -pthread preprocessor define _POSIX_THREADS and replace
with _REENTRANT. Also remove undef _POSIX_THREADS in phread.h.

Patch by Brad Smith!

llvm-svn: 155535
2012-04-25 06:12:24 +00:00
Chris Lattner 7073c47dc4 don't use soname on OpenBSD, it doesn't support it. Patch by
Brad Smith!

llvm-svn: 155534
2012-04-25 06:09:30 +00:00
Nico Weber cb93142e1f Expand #include_next in float.h from mingw to _msc_ver.
A test for this is checking if this compiles:

    #include <float.h>

    inline bool IsFinite(const double& number) {
     return _finite(number) != 0;
    }

That depends however on either mingw or msvc being installed, and
chapuni tells me there might be issues with float.h on mingw, so
no automated test is added.

llvm-svn: 155507
2012-04-24 23:43:40 +00:00
Chad Rosier 47c6c9de50 Add acos, asin, ceil, fabs, floor, fmax, fmin, round, and tan to the builtin
math library functions.
rdar://11251464

llvm-svn: 155502
2012-04-24 23:06:26 +00:00
Chad Rosier 155005c071 Add atan, atan2, exp, and log to the builtin math library functions.
With -fno-math-errno (the default for Darwin) or -ffast-math these library 
function can be marked readnone enabling more opportunities for CSE and other
optimizations.
rdar://11251464

llvm-svn: 155498
2012-04-24 22:40:01 +00:00
Chad Rosier e35cc3bff8 Alphabetize the builtin math library functions. No functional change intended.
llvm-svn: 155492
2012-04-24 21:45:50 +00:00
Nico Weber 1d725ecf93 Let NULL and MSVC headers coexist better.
Fixes the two issues mentioned in PR12146.

llvm-svn: 155490
2012-04-24 21:27:01 +00:00
Richard Smith 7af41ccdc4 RecursiveASTVisitor: Visit instantiations of member templates of class
templates. In an implicit instantiation of a member class, any member
templates don't get instantiated, so the existing check which only visited
the instantiations of a defined template skipped these templates'
instantiations.

Since there is only a single declaration of a member template of a class
template specialization, just use that to determine whether to visit the
instantiations. This introduces a slight inconsistency in that we will
visit the instantiations of such templates whether or not they are
defined, but we never visit a declared-but-not-defined instantiation, so
this turns out to not matter.

Patch by Daniel Jasper!

llvm-svn: 155487
2012-04-24 20:39:49 +00:00
Fariborz Jahanian 847713a998 modern objc translator: Allow writing of multiple
declaration of __block variables on same lines
with initializers. // rdsr://7547630

llvm-svn: 155473
2012-04-24 19:38:45 +00:00
Fariborz Jahanian 32af25ea05 objc modern rewriter: allow translation of
multiple declaration of block variables
(with no initializer) on the same line.

llvm-svn: 155462
2012-04-24 18:16:20 +00:00
Fariborz Jahanian 3fd9bbd41e objc modern rewriter: minor refactoring.
llvm-svn: 155449
2012-04-24 16:45:27 +00:00
Gabor Greif ec1f7e872c Add a FIXME for uncomplete comment
fix a typo
add punctuation

llvm-svn: 155443
2012-04-24 15:42:03 +00:00
Aaron Ballman 0ae8c946a4 Adding information about what intrinsics still need to be implemented for MSVC compatibility.
llvm-svn: 155441
2012-04-24 12:30:37 +00:00
Bill Wendling 1e60a2c287 Add a flag to the image info section indicating that the program is compiled for
a simulator.

llvm-svn: 155436
2012-04-24 11:04:57 +00:00
Evgeniy Stepanov 582911a089 Only pass -mcpu, -march, -mfpu to linux-as on ARM.
llvm-svn: 155431
2012-04-24 09:05:31 +00:00
Kostya Serebryany 5dd2cfc81e enable TBAA when -fthread-sanitizer is given, even with -O0 or -relaxed-aliasing
llvm-svn: 155430
2012-04-24 06:57:01 +00:00
Chandler Carruth ff90611253 Fix a typo spotted by Matt.
llvm-svn: 155427
2012-04-24 05:59:48 +00:00
Richard Smith 2cc2b46683 Don't try to delay parsing the exception specification for a data member of a
class; we would never actually parse it and attach it to the type.

llvm-svn: 155426
2012-04-24 05:48:42 +00:00
Chandler Carruth 3dfb6d84c6 Introduce an initial sketch of a MSVC compatible 'intrin.h' builtin
header, along with a stub test to make sure it compiles in the
appropriate modes.

Thanks to Aaron Ballman for working with me to figure out the initial
strategy here, and to Nico for reviewing and pestering me to actually
commit it.

llvm-svn: 155425
2012-04-24 05:23:54 +00:00
Richard Smith 4e42bc8365 PR12629: Cope with parenthesized function types when attaching a delayed
exception specification to a function.

llvm-svn: 155424
2012-04-24 05:06:35 +00:00
NAKAMURA Takumi 8701d38c93 clang/test/Rewriter/objc-modern-boxing.mm: Mark as XFAIL:mingw for now, due to predefined __declspec similar to r155278.
llvm-svn: 155417
2012-04-24 01:19:04 +00:00
DeLesley Hutchins 8e9fc0592b Thread safety analysis: refactor test cases so that the style is
consistent.

llvm-svn: 155388
2012-04-23 20:41:57 +00:00
Fariborz Jahanian 08a1eb77c5 with -Wdeprecated, include a note to its deprecated declaration
location. // rdar://10893232

llvm-svn: 155385
2012-04-23 20:30:52 +00:00
Eric Christopher 3cc207bbcc Forward declarations should take a context. This helps the debugger
find forward declarations in the context that the actual definition
will occur.

rdar://11291658

llvm-svn: 155381
2012-04-23 19:00:24 +00:00
DeLesley Hutchins e09be231fa Thread safety analysis: support the use of pt_guarded_by attributes
on smart pointers.  Also adds test case for previous commit.

llvm-svn: 155379
2012-04-23 18:39:55 +00:00
Chandler Carruth 70ac923ebc Revert r155363, due to the underlying patches in LLVM causing regression
test suite failures.

llvm-svn: 155371
2012-04-23 18:25:40 +00:00
Rafael Espindola b522a5f246 Fix visibility when we have two types with explicit visibility in a template
argument list.

llvm-svn: 155368
2012-04-23 17:51:55 +00:00
Sirish Pande 7039d0eaee Hexagon V5 (floating point) support in cfe.
llvm-svn: 155363
2012-04-23 17:48:57 +00:00
DeLesley Hutchins 70b5e8eefc Thread-safety analysis: support new "pointer to member" syntax for
existentially quantified lock expressions.

llvm-svn: 155357
2012-04-23 16:45:01 +00:00
Douglas Gregor 39f39ff4b7 Teach RequireCompleteType about multi-dimensional arrays. Fixes
<rdar://problem/11284902>.

llvm-svn: 155356
2012-04-23 16:42:52 +00:00
Manuel Klimek 969186fa4b Fix PR12608. Patch contributed by Yang Chen.
llvm-svn: 155355
2012-04-23 16:40:40 +00:00
Bob Wilson 16c4a4f471 Add a test for svn r155263.
llvm-svn: 155353
2012-04-23 16:22:22 +00:00
Rafael Espindola d88f37b8be Inline helper function into only caller.
llvm-svn: 155352
2012-04-23 14:27:47 +00:00
Rafael Espindola 23fd21d4ee Add another testcase that was not being covered.
llvm-svn: 155351
2012-04-23 14:02:53 +00:00
Kostya Serebryany b90fe5c6ee [asan] fix typo
llvm-svn: 155345
2012-04-23 10:15:18 +00:00
Kostya Serebryany f43ce26688 [asan] update docs
llvm-svn: 155343
2012-04-23 09:05:50 +00:00
Anton Korobeynikov df32b6f2de Do not use stdint.h, driver might provide invalid location for it. Instead, provide the types directly.
This should fix PR12628

llvm-svn: 155342
2012-04-23 09:02:13 +00:00
Manuel Klimek 9aa539513c Fixes comment referencing old name.
llvm-svn: 155340
2012-04-23 08:43:08 +00:00