Commit Graph

122940 Commits

Author SHA1 Message Date
Richard Smith 324df5564e Back out __decltype warning from r151377: we should either warn on all the GNU
__keywords or none of them.

llvm-svn: 151401
2012-02-24 22:30:04 +00:00
Benjamin Kramer 5f640e35e3 Make helper static.
llvm-svn: 151400
2012-02-24 22:19:42 +00:00
Richard Smith 6365c9138e When checking whether a reference to a variable is an ICE, look at the type of
the declaration, not at the type of the DeclRefExpr, since within a lambda the
DeclRefExpr can be more const than the declaration is.

llvm-svn: 151399
2012-02-24 22:12:32 +00:00
Benjamin Kramer 9fceb90175 Remove unused cl::opt, make another opt static.
llvm-svn: 151398
2012-02-24 22:09:25 +00:00
Greg Clayton c7f09cca6d Fixed a crasher that was happening after making ObjectFile objects have a
weak reference back to the Module. We were crashing when trying to make a
memory object file since it was trying to get the object in the Module 
constructor before the "Module *" had been put into a shared pointer, and the
module was trying to initialize a weak pointer back to it.

llvm-svn: 151397
2012-02-24 21:55:59 +00:00
Jakob Stoklund Olesen 7f99142804 Add missing static
llvm-svn: 151396
2012-02-24 21:52:44 +00:00
Fariborz Jahanian 0ed6cb75a7 Minor modern rewriter bug showed up during testing
against a large project.

llvm-svn: 151395
2012-02-24 21:42:38 +00:00
Douglas Gregor 232ee49c7b C++11 [class.ctor]p5 says that
A defaulted default constructor for a class X is defined as deleted if [...]
    -  X is a union and all of its variant members are of const-qualified type.

A pedantic reading therefore says that

 union X { };

has a deleted default constructor, which is both silly and almost
certainly unintended. Pretend as if this this read

    - X is a union with one or more variant members, and all of its
      variant members are of const-qualified type. 

llvm-svn: 151394
2012-02-24 21:25:53 +00:00
Johnny Chen 2120e2bd73 Newly created threads are to inherit from the global debug state of the process.
llvm-svn: 151393
2012-02-24 21:13:45 +00:00
Greg Clayton 38d1f05167 Fixed the launching code when using the new SBLaunchInfo.
llvm-svn: 151392
2012-02-24 20:59:25 +00:00
Kostya Serebryany 6ad2115575 [asan] don't compile gtest with asan when building asan tests
llvm-svn: 151391
2012-02-24 20:49:36 +00:00
Enrico Granata 9283444b8a Reworking the ObjC formatters test case not to test everything in one huge code block - better for maintenance and debugging
llvm-svn: 151390
2012-02-24 20:43:28 +00:00
Dmitri Gribenko 85e8764254 Fix comment: correct predicate name, reformat comment.
llvm-svn: 151389
2012-02-24 20:03:35 +00:00
Enrico Granata 21b2236303 Fixing an if condition which was causing issues in detecting the correct runtime version
llvm-svn: 151388
2012-02-24 19:46:04 +00:00
Argyrios Kyrtzidis e1bc99e1ff Change the text of a FIXME.
llvm-svn: 151387
2012-02-24 19:45:46 +00:00
Argyrios Kyrtzidis f0fc594be5 [libclang] Add a triple to the test.
llvm-svn: 151386
2012-02-24 19:45:42 +00:00
Ahmed Charles 0dca5d8f8c Fix undefined behavior.
llvm-svn: 151385
2012-02-24 19:06:15 +00:00
Jim Grosbach 09b602d85c Thumb2 asm aliases for wide bitwise w/ immediate instructions.
llvm-svn: 151384
2012-02-24 19:06:05 +00:00
Chris Lattner 01990f0e1c fix PR12075, a regression in a recent transform I added. In unreachable code, gep chains can be infinite. Just like "stripPointerCasts", use a set to keep track of visited instructions so we don't recurse infinitely.
llvm-svn: 151383
2012-02-24 19:01:58 +00:00
Michael J. Spencer 248d65e78b Add WIN_FTOL_* psudo-instructions to model the unique calling convention
used by the Win32 _ftol2 runtime function. Patch by Joe Groff!

llvm-svn: 151382
2012-02-24 19:01:22 +00:00
Richard Smith 18743deb21 cxx_status: Consistently refer to C++11 as "C++11", not as "C++'11" nor as
"C++0x". Use "C++98" to refer to C++98, not "C++". Add heading for C++98
support section.

llvm-svn: 151381
2012-02-24 18:42:08 +00:00
Richard Smith 4e8376279d cxx_status: extended sizeof has been essentially complete for some time. As
agreed on IRC, any remaining issues are best dealt with as bugs.

We have no __has_feature check for this; please shout if you'd like one. This
feature seems too small to be worth its own release notes bullet (again, please
shout if you disagree).

llvm-svn: 151380
2012-02-24 18:37:14 +00:00
Jakob Stoklund Olesen 0a0a9688c5 Add a -stress-regalloc=<N> option.
This will limit all register classes to N registers in order to stress
test register allocation.

llvm-svn: 151379
2012-02-24 18:34:20 +00:00
Fariborz Jahanian 7e75de84bd test for writing modern ivar of struct type.
llvm-svn: 151378
2012-02-24 18:17:50 +00:00
Richard Smith fd3da9358f __decltype is a GNU extension, not a C++11 extension.
llvm-svn: 151377
2012-02-24 18:10:23 +00:00
Fariborz Jahanian 5e6842bfea more objective-c modern translator ivar tests.
llvm-svn: 151376
2012-02-24 18:03:42 +00:00
Johnny Chen 45178a264d Makefiles for new mach-core directory.
Patch from dawn@burble.org!

llvm-svn: 151375
2012-02-24 18:02:59 +00:00
Hal Finkel a3e6ed2161 X11/X2 loads around indirect calls on ppc64 should not be deleted.
llvm-svn: 151374
2012-02-24 17:54:01 +00:00
Hal Finkel b9a3d61894 Don't crash when a glue node contains an internal CopyToReg
This is necessary to support the existing ppc lowering code for indirect calls.
Fixes PR12071.

llvm-svn: 151373
2012-02-24 17:53:59 +00:00
Douglas Gregor 3a08c1cd3b Two minor, related fixes for template instantiation with blocks:
- Make sure that the block expression is instantiation-dependent if the
    block is in a dependent context
  - Make sure that the C++ 'this' expression gets captured even if we
  don't rebuild the AST node during template instantiation. This would
  also have manifested as a bug for lambdas.

Fixes <rdar://problem/10832617>.

llvm-svn: 151372
2012-02-24 17:41:38 +00:00
Fariborz Jahanian dd5a59baed objc modern translator. Fixes writing of block pointer ivar access.
llvm-svn: 151371
2012-02-24 17:35:35 +00:00
Jim Ingham e8dd130762 Patch from Filipe Cabecinhas fixing a typo in the "lldb unwind" log output.
llvm-svn: 151370
2012-02-24 17:09:34 +00:00
Anna Zaks 18de54b1a6 [analyzer] Run remove dead bindings before each call.
This ensures that we report the bugs associated with symbols going
out of scope in the correct function context.

llvm-svn: 151369
2012-02-24 16:49:46 +00:00
Anna Zaks cdf24a9a5e [analyzer] We were silently stopping exploring the path after
visiting 'return;' statement!

This most likely caused us to skip a bunch of code when analyzing with
inlining.

llvm-svn: 151368
2012-02-24 16:49:41 +00:00
Rafael Espindola 1a16f49858 Use -no-integrated-as only on ARM. The X86 and X86-64 integrated as have been
the default for clang for some time now and can handle compiler-rt.

llvm-svn: 151367
2012-02-24 16:22:39 +00:00
Timur Iskhodzhanov 0f9c9a5332 [ASan] Intercept CreateThread on Windows
llvm-svn: 151366
2012-02-24 15:28:43 +00:00
Duncan Sands 926d101640 Teach GVN that x+y is the same as y+x and that x<y is the same as y>x.
llvm-svn: 151365
2012-02-24 15:16:31 +00:00
Benjamin Kramer 6fe3e3d335 SDAGBuilder: Remove register sets that were never read and prune dead code surrounding it.
llvm-svn: 151364
2012-02-24 14:01:17 +00:00
Kristof Beyls b59291a8e6 test commit. removing unnecessary whitespace.
llvm-svn: 151363
2012-02-24 13:52:45 +00:00
NAKAMURA Takumi b2ef38b999 test/CodeGen/X86/2012-02-23-mmx-inlineasm.ll: Fixup to add -march=x86.
-mcpu does not choose arch automatically, on non-x86 hosts.

llvm-svn: 151362
2012-02-24 13:29:50 +00:00
Richard Osborne de47462012 Remove dead code.
Patch by Ahmed Charles

llvm-svn: 151360
2012-02-24 11:49:08 +00:00
Nick Lewycky 4ed840421d Revert r151357. That unreachable is reachable...
llvm-svn: 151359
2012-02-24 09:07:53 +00:00
Duncan Sands 69d7a91334 Workaround a miscompilation by gcc-4.3 that showed up as a failure
of the StringRef.Split2 unittest on 32 bit machines.

llvm-svn: 151358
2012-02-24 09:01:34 +00:00
Nick Lewycky e51b944fd7 Silence gcc warnings pointing out that CharByteWidth could be used
uninitialized. While there, restyle this function! No functionality change.

llvm-svn: 151357
2012-02-24 08:58:14 +00:00
Matt Beaumont-Gay 47ff1221b1 Sink variable into assert
llvm-svn: 151356
2012-02-24 08:37:56 +00:00
Nick Lewycky e839e2895f ScheduleDAGInstrs.h:155: warning: suggest parentheses around `&&' within `||'.
llvm-svn: 151355
2012-02-24 07:59:05 +00:00
Douglas Gregor 093d4be550 Remove some trivial uses of hasTrivialCopyConstructor() and
hasTrivialMoveConstructor().

llvm-svn: 151354
2012-02-24 07:55:51 +00:00
Douglas Gregor f704aded6b Kill a spurious use of hasTrivialDefaultConstructor()
llvm-svn: 151353
2012-02-24 07:48:37 +00:00
Douglas Gregor 29c42f2a25 Implement a new type trait __is_trivially_constructible(T, Args...)
that provides the behavior of the C++11 library trait
std::is_trivially_constructible<T, Args...>, which can't be
implemented purely as a library.

Since __is_trivially_constructible can have zero or more arguments, I
needed to add Yet Another Type Trait Expression Class, this one
handling arbitrary arguments. The next step will be to migrate
UnaryTypeTrait and BinaryTypeTrait over to this new, more general
TypeTrait class.

Fixes the Clang side of <rdar://problem/10895483> / PR12038.

llvm-svn: 151352
2012-02-24 07:38:34 +00:00
Ted Kremenek 1bf3b04726 Make PathDiagnosticBuilder sensitive to varying LocationContexts, thus fixing a bug in the inlining diagnostics where the wrong location could be used.
llvm-svn: 151349
2012-02-24 07:12:52 +00:00