Commit Graph

121229 Commits

Author SHA1 Message Date
Kevin Enderby e1a12cf3ee Fixed a crash in llvm-mc for Mach-O when a symbol difference expression uses a
symbol from an assignment.  In this case the symbol did not have a fragment so
MCObjectWriter::IsSymbolRefDifferenceFullyResolved() should not have been
calling IsSymbolRefDifferenceFullyResolvedImpl() with a NULL fragment and should
just have returned false in that case.

llvm-svn: 149442
2012-01-31 23:02:57 +00:00
Eli Friedman 9ccdb1d01b Make sure we call MaybeCreateExprWithCleanups for the sub-expression of an indirect goto.
llvm-svn: 149441
2012-01-31 22:47:07 +00:00
Eli Friedman 87d3280985 A couple minor fixes to template instantiation for for-range loops.
llvm-svn: 149440
2012-01-31 22:45:40 +00:00
Bob Wilson a223401498 Use new Triple::getMacOSXVersion function.
llvm-svn: 149439
2012-01-31 22:43:59 +00:00
Bob Wilson aa30aff4f7 Add Triple::getMacOSXVersion to replace crufty code in the clang driver.
This new function provides a way to get the Mac OS X version number from
either generic "darwin" triples of macosx triples.

llvm-svn: 149438
2012-01-31 22:32:29 +00:00
Fariborz Jahanian a1c1b152f0 arc migrator: twik previous patch to exclude user provided
explicit type cast. // rdar://10521744

llvm-svn: 149437
2012-01-31 22:09:44 +00:00
Howard Hinnant eedecf51bb Some unwinding test cases
llvm-svn: 149436
2012-01-31 21:58:58 +00:00
Fariborz Jahanian eb00284f22 arc migrator: Do not attempt to migrate to bridge casts which
cancel out each other. Leave it alone so users can take a look
(unmigrated code forces error diagnostic). // rdar://10521744

llvm-svn: 149435
2012-01-31 21:58:23 +00:00
Douglas Gregor 232e3431e2 Split compiler builtin module into "stdlib" builtins and "intrinsic"
builds, and bring mm_alloc.h into the fold. Start playing some tricks
with these builtin modules to mirror the include_next tricks that the
headers already perform.

llvm-svn: 149434
2012-01-31 21:57:50 +00:00
Jakob Stoklund Olesen 2c1ef87e39 Don't assign a value to NUM_TARGET_NAMED_SUBREGS.
It was wrong and completely unused.

llvm-svn: 149433
2012-01-31 21:51:53 +00:00
Michael J. Spencer 7aba8957c1 Cleanup system_error extensions.
llvm-svn: 149432
2012-01-31 21:47:13 +00:00
Michael J. Spencer aa37613305 Don't delete the temp file until after we finish reading from it.
llvm-svn: 149431
2012-01-31 21:46:52 +00:00
Michael J. Spencer 8c36f458fa &vectorval[0] is UB when vectorval.size() == 0.
llvm-svn: 149430
2012-01-31 21:46:41 +00:00
Michael J. Spencer 4e45ebb92c Fix use after free.
llvm-svn: 149429
2012-01-31 21:46:29 +00:00
Michael J. Spencer 8526e64bef Add pretty stack tracing and llvm_shutdown.
llvm-svn: 149428
2012-01-31 21:46:17 +00:00
Michael J. Spencer 846fe662ba If cont.size() is 0, the expression &_contentPool[result] has undefined
behaivior because it indexes past the end of _contentPool.

llvm-svn: 149427
2012-01-31 21:46:05 +00:00
Michael J. Spencer b2bd733593 Flexible array members are not in C++03, and MSVC doesn't support them.
llvm-svn: 149426
2012-01-31 21:45:53 +00:00
Michael J. Spencer 73e3e3c7b9 NULL requires including cstddef. Just use 0.
llvm-svn: 149425
2012-01-31 21:45:26 +00:00
Chad Rosier 8109d5e95d Remove extraneous whitespace.
llvm-svn: 149424
2012-01-31 21:45:04 +00:00
Jakob Stoklund Olesen 9a44ad7029 Move the composite map into CodeGenSubRegIndex.
Each SubRegIndex keeps track of how it composes.

llvm-svn: 149423
2012-01-31 21:44:11 +00:00
Bob Wilson 9d3f7af8c3 Fix more fallout from the introduction of "macosx" and "ios" triples.
The Darwin toolchain constructor was assuming that all Darwin triples would
have an OS string starting with "darwin".  Triples starting with "macosx"
would misinterpret the version number, and "ios" triples would completely
miss the version number (or worse) because the OS name is not 6 characters
long.  We lose some sanity checking of triple strings here, since the
Triple.getOSVersion function doesn't do all the checking that the previous
code did, but this still seems like a step in the right direction.

llvm-svn: 149422
2012-01-31 21:30:03 +00:00
Enrico Granata 896e4bd7d5 Test case for std::map synthetic children provider (currently an expected failure)
llvm-svn: 149421
2012-01-31 21:30:00 +00:00
Enrico Granata 726fa56fcb Test case for std::list synthetic children provider (currently an expected failure)
llvm-svn: 149420
2012-01-31 21:27:09 +00:00
Enrico Granata d197e7b24f Test case for std::vector synthetic children provider
llvm-svn: 149419
2012-01-31 21:03:57 +00:00
Jakob Stoklund Olesen f1bb151917 Add a TableGen CodeGenSubRegIndex class.
This class is used to represent SubRegIndex instances instead of the raw
Record pointers that were used before.

No functional change intended.

llvm-svn: 149418
2012-01-31 20:57:55 +00:00
Jim Grosbach 44091c2f10 Refactor loop for better readability.
Excellent suggestion from Ben Kramer.

llvm-svn: 149417
2012-01-31 20:56:55 +00:00
Jim Grosbach b4d3a6af97 Add explanatory comment.
llvm-svn: 149416
2012-01-31 20:34:53 +00:00
Tobias Grosser f316b38e20 www: Add missing -mllvm to documentation
Found by Ryan Taylor

llvm-svn: 149415
2012-01-31 20:24:21 +00:00
Howard Hinnant 310fcc749d Back the optimization down from -O3 to -Os. I'm getting an unexplained crasher on -O3. I've looked for a libc++abi bug and can't find one. I'm suspecting clang optimizer bug. But I don't have a good test case at the moment. Deferring investigation on this for now as I will soon be developing more and smaller tests.
llvm-svn: 149414
2012-01-31 20:22:59 +00:00
Howard Hinnant 3d97931a86 Drop the stress a notch on dynamic_cast_stress.cpp. Otherwise it occasionally causes clang to crash. Put a noexcept(false) on a throwing destructor in test_vector1.cpp. The test now passes for both C++03 and C++11 modes. Add testit script. All tests are now PASSING :-)
llvm-svn: 149413
2012-01-31 20:10:33 +00:00
Howard Hinnant f8d292eb08 Correct test bug.
llvm-svn: 149412
2012-01-31 20:01:06 +00:00
Manuel Klimek 31becd7c88 RefCountedBaseVPTR needs the IntrusiveRefCntPtrInfo as friend,
now that this handles the release / retain calls.

Adds a regression test for that bug (which is a compile-time
regression) and for the last two changes to the IntrusiveRefCntPtr,
especially tests for the memory leak due to copy construction of the
ref-counted object and ensuring that the traits are used for release /
retain calls.

llvm-svn: 149411
2012-01-31 19:58:34 +00:00
Tobias Grosser 1f1daa9ac7 www: Spelling fixes
Reported by Sebastian Pop

llvm-svn: 149410
2012-01-31 19:54:50 +00:00
Howard Hinnant fe2052d635 Have the default unexpected/terminate handler output *demangled* names for the type of exception instead of the mangled name.
llvm-svn: 149409
2012-01-31 19:48:06 +00:00
Jim Grosbach 6addc79087 Tidy up. Trailing whitespace.
llvm-svn: 149408
2012-01-31 19:47:32 +00:00
Anna Zaks 87b6ff09f9 [analyzer] Add checks for common anti-patterns in strncat.
(Since this is syntax only, might be a good candidate for turning into a
compiler warning.)

llvm-svn: 149407
2012-01-31 19:33:39 +00:00
Anna Zaks ee5e8ae845 [analyzer] Change the warning to suggest 'strlcat/strlcpy' as
replacements for 'starcat/strcpy' instead of 'strncat/strncpy'.

llvm-svn: 149406
2012-01-31 19:33:31 +00:00
Chad Rosier ebaefe7527 Fix 80-column violation.
llvm-svn: 149405
2012-01-31 19:31:12 +00:00
Ted Kremenek 3814359657 Revert r149359. This was a hack to a problem with an easy workaround, and it doesn't feel like general solution.
llvm-svn: 149404
2012-01-31 19:19:25 +00:00
Howard Hinnant 43f5fecdb5 Fix type-o in the comment of the last commit
llvm-svn: 149403
2012-01-31 19:05:08 +00:00
Matt Beaumont-Gay ecc05b0dc3 Pacify gcc's -Wreturn-type.
A separate unreachable message will make it easier to debug if either of the
unreachables is reached.

llvm-svn: 149402
2012-01-31 18:59:25 +00:00
David Chisnall 92d436b49a Support @compatibility_alias at run time (GNUstep Runtime)
Patch by Niels Grewe!

llvm-svn: 149401
2012-01-31 18:59:20 +00:00
Howard Hinnant 6351792447 Found and fixed a bug in __cxa_call_unexpected. If the unexpected_handler rethrows the same exception then needed information gets overwritten in the original exception header. Therefore save it locally before executing the unexpected_handler.
llvm-svn: 149400
2012-01-31 18:57:20 +00:00
Andrew Trick 25c7b83a4b Obvious unnecessary loop removal. Follow through from previous checkin.
llvm-svn: 149398
2012-01-31 18:54:19 +00:00
Chris Lattner 21ae40e513 fix a crash on:
__has_builtin

in an empty file, as we were overwriting the EOF token.  Overwriting an arbitrary token
never seems like a good idea in the error case.  This fixes a bug reported on the GCC
list :)

llvm-svn: 149397
2012-01-31 18:53:44 +00:00
Devang Patel a173ee56fd Add assembler dialect attribute in asm parser which lets target specific asm parser change dialect on the fly.
llvm-svn: 149396
2012-01-31 18:14:05 +00:00
Kostya Serebryany 9160b5059b [asan] fix the wrong __WORDSIZE definition on Win x64, add ASAN_INTERFACE_FUNCTION_ATTRIBUTE. Patch by timurrrr@google.com
llvm-svn: 149395
2012-01-31 18:13:50 +00:00
Jean-Daniel Dupas cb197b0e42 FormatCheckers should emit all diagnostics using EmitFormatDiagnostic().
llvm-svn: 149394
2012-01-31 18:12:08 +00:00
Enrico Granata 56a27bb5fa Splitting test case for Python synthetic children: part 1 test is only testing the synthetic children feature itself. More test cases will be commited for individual STL containers
llvm-svn: 149393
2012-01-31 17:50:00 +00:00
Kostya Serebryany 7e7d0ca1a2 [asan] remove dead code
llvm-svn: 149392
2012-01-31 17:29:02 +00:00