Граф коммитов

36316 Коммитов

Автор SHA1 Сообщение Дата
Evgeniy Stepanov 99f8f17c2a Make asan-ld test windows-safe.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155543 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 09:28:10 +00:00
Manuel Klimek 3e8479d97f Fixes the header search logic for tools:
The driver needs to get the correct path to the executable to deduce
the header search path.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155542 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 09:25:41 +00:00
Evgeniy Stepanov a6ddc02921 Clang driver support for linking on Android.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155541 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 08:59:22 +00:00
Evgeniy Stepanov 4add84f83f Fix default cpu for -march=armv5e.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155540 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 08:35:56 +00:00
Chris Lattner 4ddcf3b08d OpenBSD: Remove incorrect -pthread preprocessor define _POSIX_THREADS and replace
with _REENTRANT. Also remove undef _POSIX_THREADS in phread.h.

Patch by Brad Smith!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155535 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 06:12:24 +00:00
Chris Lattner 92f4e6e8f9 don't use soname on OpenBSD, it doesn't support it. Patch by
Brad Smith!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155534 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-25 06:09:30 +00:00
Nico Weber 3030066ef0 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155507 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 23:43:40 +00:00
Chad Rosier e7255c1b2c Add acos, asin, ceil, fabs, floor, fmax, fmin, round, and tan to the builtin
math library functions.
rdar://11251464


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155502 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 23:06:26 +00:00
Chad Rosier 454393e3e6 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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155498 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 22:40:01 +00:00
Chad Rosier fae0f48cde Alphabetize the builtin math library functions. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155492 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 21:45:50 +00:00
Nico Weber 08e46f97ec Let NULL and MSVC headers coexist better.
Fixes the two issues mentioned in PR12146.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155490 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 21:27:01 +00:00
Richard Smith 5482dc3a88 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!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155487 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 20:39:49 +00:00
Fariborz Jahanian 4fe261cb0a modern objc translator: Allow writing of multiple
declaration of __block variables on same lines
with initializers. // rdsr://7547630


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155473 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 19:38:45 +00:00
Fariborz Jahanian e6e96de44f objc modern rewriter: allow translation of
multiple declaration of block variables
(with no initializer) on the same line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155462 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 18:16:20 +00:00
Fariborz Jahanian 8247c4ed71 objc modern rewriter: minor refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155449 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 16:45:27 +00:00
Gabor Greif e47398abd3 Add a FIXME for uncomplete comment
fix a typo
add punctuation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155443 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 15:42:03 +00:00
Aaron Ballman e70372d822 Adding information about what intrinsics still need to be implemented for MSVC compatibility.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155441 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 12:30:37 +00:00
Bill Wendling 0982251be9 Add a flag to the image info section indicating that the program is compiled for
a simulator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155436 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 11:04:57 +00:00
Evgeniy Stepanov eca187e9f2 Only pass -mcpu, -march, -mfpu to linux-as on ARM.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155431 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 09:05:31 +00:00
Kostya Serebryany c9fe6056e4 enable TBAA when -fthread-sanitizer is given, even with -O0 or -relaxed-aliasing
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155430 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 06:57:01 +00:00
Chandler Carruth 8ac95f19e6 Fix a typo spotted by Matt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155427 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 05:59:48 +00:00
Richard Smith 2b2a0876c9 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155426 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 05:48:42 +00:00
Chandler Carruth 5775351564 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155425 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 05:23:54 +00:00
Richard Smith 8c614e4f2b PR12629: Cope with parenthesized function types when attaching a delayed
exception specification to a function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155424 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 05:06:35 +00:00
NAKAMURA Takumi 88442c935d clang/test/Rewriter/objc-modern-boxing.mm: Mark as XFAIL:mingw for now, due to predefined __declspec similar to r155278.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155417 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-24 01:19:04 +00:00
DeLesley Hutchins 64b111e81d Thread safety analysis: refactor test cases so that the style is
consistent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155388 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 20:41:57 +00:00
Fariborz Jahanian d672436751 with -Wdeprecated, include a note to its deprecated declaration
location. // rdar://10893232


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155385 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 20:30:52 +00:00
Eric Christopher 87380aaf42 Forward declarations should take a context. This helps the debugger
find forward declarations in the context that the actual definition
will occur.

rdar://11291658

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155381 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 19:00:24 +00:00
DeLesley Hutchins aed9ea398a Thread safety analysis: support the use of pt_guarded_by attributes
on smart pointers.  Also adds test case for previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155379 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 18:39:55 +00:00
Chandler Carruth 6603ff85d4 Revert r155363, due to the underlying patches in LLVM causing regression
test suite failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155371 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 18:25:40 +00:00
Rafael Espindola 923b0c9337 Fix visibility when we have two types with explicit visibility in a template
argument list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155368 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 17:51:55 +00:00
Sirish Pande ac28eca18a Hexagon V5 (floating point) support in cfe.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155363 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 17:48:57 +00:00
DeLesley Hutchins 79747e00e9 Thread-safety analysis: support new "pointer to member" syntax for
existentially quantified lock expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155357 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 16:45:01 +00:00
Douglas Gregor e656b8397f Teach RequireCompleteType about multi-dimensional arrays. Fixes
<rdar://problem/11284902>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155356 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 16:42:52 +00:00
Manuel Klimek 9f99d06e0d Fix PR12608. Patch contributed by Yang Chen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155355 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 16:40:40 +00:00
Bob Wilson d8f0276472 Add a test for svn r155263.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155353 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 16:22:22 +00:00
Rafael Espindola 38c4767439 Inline helper function into only caller.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155352 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 14:27:47 +00:00
Rafael Espindola 546ee6dbca Add another testcase that was not being covered.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155351 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 14:02:53 +00:00
Kostya Serebryany 219cd6cb5f [asan] fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155345 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 10:15:18 +00:00
Kostya Serebryany cef57e55fb [asan] update docs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155343 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 09:05:50 +00:00
Anton Korobeynikov a8063c33d8 Do not use stdint.h, driver might provide invalid location for it. Instead, provide the types directly.
This should fix PR12628


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155342 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 09:02:13 +00:00
Manuel Klimek 295413422d Fixes comment referencing old name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155340 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-23 08:43:08 +00:00
Rafael Espindola a5416bd3ca Add a testcase that we already get right but was not being tested. Found
by a chrome build on OS X. Thanks to Nico Weber for testing a patch and
providing the .ii file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155326 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-22 22:31:25 +00:00
Benjamin Kramer 471131a05d Sema: Initialize NSString method cache members.
Found by valgrind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155324 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-22 20:43:35 +00:00
Benjamin Kramer 0eb7526cd2 Remove unnecessary StringRef->char*->StringRef conversion, which read uninitialized memory if the input wasn't 0-terminated.
Found by valgrind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155323 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-22 20:43:30 +00:00
Rafael Espindola 71776efce5 Cleanup testcase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155317 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-22 16:03:00 +00:00
Rafael Espindola f6a8b9cba4 An attribute in a explicit template installation should take precedence over
the tempale arguments in deciding the visibility.

This agrees with gcc 4.7.

Found by trying to build chrome with component=shared_library with 155314
reverted.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155316 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-22 15:31:59 +00:00
Rafael Espindola 51183374a5 Revert 155102 but add a fixme while I debug what is wrong with chrome's
components build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155314 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-22 12:37:27 +00:00
Benjamin Kramer dd26998c1f Better C++11 support is no longer an advantage of GCC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155312 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-22 11:34:43 +00:00
Richard Smith 1664d540d1 PR12571: Objects of type clang::ConstantArrayType aren't always emitted with
type llvm::ArrayType -- sometimes we emit them as packed structs. Don't assert
if such a global array has an element type with a non-trivial destructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155305 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-22 05:51:36 +00:00