platform/upstream/llvm.git
12 years agoRename lold to lld :(.
Michael J. Spencer [Sat, 17 Dec 2011 12:27:19 +0000 (12:27 +0000)]
Rename lold to lld :(.

llvm-svn: 146828

12 years agoAs Doug pointed out (and I really should know), it is perfectly easy to
Chandler Carruth [Sat, 17 Dec 2011 10:20:15 +0000 (10:20 +0000)]
As Doug pointed out (and I really should know), it is perfectly easy to
make VariadicFunction actually be trivial. Do so, and also make it look
more like your standard trivial functor by making it a struct with no
access specifiers. The unit test is updated to initialize its functors
properly.

llvm-svn: 146827

12 years ago[PCH] Remove extraneous line in the test that was mistakenly copied.
Argyrios Kyrtzidis [Sat, 17 Dec 2011 08:11:28 +0000 (08:11 +0000)]
[PCH] Remove extraneous line in the test that was mistakenly copied.

No functionality change.

llvm-svn: 146825

12 years ago[PCH] Don't deserialize bodies of interesting decls while iterating
Argyrios Kyrtzidis [Sat, 17 Dec 2011 08:11:25 +0000 (08:11 +0000)]
[PCH] Don't deserialize bodies of interesting decls while iterating
over them because more interesting decls can be added during body
deserialization.

Should fix msvc build tests.

llvm-svn: 146824

12 years agoSimplifyCFG now predicts some conditional branches to true or false depending on...
Pete Cooper [Sat, 17 Dec 2011 06:32:38 +0000 (06:32 +0000)]
SimplifyCFG now predicts some conditional branches to true or false depending on previous branch on same comparison operands.

For example,

if (a == b) {
    if (a > b) // this is false

Fixes some of the issues on <rdar://problem/10554090>

llvm-svn: 146822

12 years agoDeleting the json-bench-test until I understand why it is flaky.
Manuel Klimek [Sat, 17 Dec 2011 06:29:32 +0000 (06:29 +0000)]
Deleting the json-bench-test until I understand why it is flaky.

llvm-svn: 146821

12 years agoRefactor SerializeDiagnosticsPrinter to using DiagnosticRenderer. This gives us...
Ted Kremenek [Sat, 17 Dec 2011 05:26:11 +0000 (05:26 +0000)]
Refactor SerializeDiagnosticsPrinter to using DiagnosticRenderer.  This gives us comparative diagnostics
to TextDiagnosticPrinter.

This certainly can be cleaned up a bit.

llvm-svn: 146820

12 years agoRefactor 'TextDiagnostic' to have a parent class 'DiagnosticRenderer' which handles
Ted Kremenek [Sat, 17 Dec 2011 05:26:04 +0000 (05:26 +0000)]
Refactor 'TextDiagnostic' to have a parent class 'DiagnosticRenderer' which handles
the policy of how diagnostics are lowered/rendered, while TextDiagnostic handles
the actual pretty-printing.

This is a first part of reworking SerializedDiagnosticPrinter to use the same
inclusion-stack/macro-expansion logic as TextDiagnostic.

llvm-svn: 146819

12 years ago[PCH] Fix bug where we failed to update an identifier for a single token
Argyrios Kyrtzidis [Sat, 17 Dec 2011 04:13:31 +0000 (04:13 +0000)]
[PCH] Fix bug where we failed to update an identifier for a single token
macro expansion.

rdar://10588825

llvm-svn: 146818

12 years ago[PCH] In ASTReader::FinishedDeserializing fully load the interesting decls,
Argyrios Kyrtzidis [Sat, 17 Dec 2011 04:13:28 +0000 (04:13 +0000)]
[PCH] In ASTReader::FinishedDeserializing fully load the interesting decls,
including deserializing their bodies, so that any other declarations that
get referenced in the body will be fully deserialized by the time we pass them to the consumer.

Could not reduce to a test case unfortunately. rdar://10587158.

llvm-svn: 146817

12 years agoAdd a sanity check in the Redeclarable::redecl_iterator to avoid infinite loop
Argyrios Kyrtzidis [Sat, 17 Dec 2011 04:13:25 +0000 (04:13 +0000)]
Add a sanity check in the Redeclarable::redecl_iterator to avoid infinite loop
when we formed an invalid redeclaration chain due to a bug.

Thanks to Doug for the hint!

llvm-svn: 146816

12 years agoIn Parser::SkipUntil do not stop at '@' unconditionally.
Argyrios Kyrtzidis [Sat, 17 Dec 2011 04:13:22 +0000 (04:13 +0000)]
In Parser::SkipUntil do not stop at '@' unconditionally.

Stopping at '@' was originally intended to avoid skipping an '@' at the @interface context
when doing parser recovery, but we should not stop at all '@' tokens because they may be part
of expressions (e.g. in @"string", @selector(), etc.), so in most cases we will want to skip them.

This commit caused 'test/Parser/method-def-in-class.m' to fail for the cases where we tried to
recover from unmatched angle bracket but IMO it is not a big deal to not have good recovery
from such broken code and the way we did recovery would not always work anyway (e.g. if there was '@'
in an expression).

The case that rdar://7029784 is about still passes.

llvm-svn: 146815

12 years agoAfter late parsing an objc method, make sure there are no leftover cached tokens,
Argyrios Kyrtzidis [Sat, 17 Dec 2011 04:13:18 +0000 (04:13 +0000)]
After late parsing an objc method, make sure there are no leftover cached tokens,
because the memory associated with them is going to get released.
We also don't want them to affect later parsing.
(We do the same for C++ inline methods.)

The underlying cause for the leftover tokens is going to be addressed in the
next commit.

Couldn't get a test case for the crash though. rdar://10583033.

llvm-svn: 146814

12 years agoAdd a missing check before trying to evaluate a temporary. PR11595.
Eli Friedman [Sat, 17 Dec 2011 02:24:21 +0000 (02:24 +0000)]
Add a missing check before trying to evaluate a temporary.  PR11595.

llvm-svn: 146813

12 years agoFixed code rot pointed out by Jim.
Johnny Chen [Sat, 17 Dec 2011 02:07:52 +0000 (02:07 +0000)]
Fixed code rot pointed out by Jim.
SBThread::GetStopReasonDataCount/GetStopReasonDataAtIndex() need to handle eStopReasonWatchpoint.

llvm-svn: 146812

12 years agoAdded a version of the LLVM/Clang checkout and
Sean Callanan [Sat, 17 Dec 2011 02:00:57 +0000 (02:00 +0000)]
Added a version of the LLVM/Clang checkout and
build script that applies any local patches to
LLVM/Clang.

llvm-svn: 146811

12 years agoFix _mm_permute_ps and _mm256_permute_ps AVX intrinsics to use "I" (ICE)
Chad Rosier [Sat, 17 Dec 2011 01:51:05 +0000 (01:51 +0000)]
Fix _mm_permute_ps and _mm256_permute_ps AVX intrinsics to use "I" (ICE)
markings.  Fix avxintrin.h to take them into account.
Part of rdar://10595450

llvm-svn: 146810

12 years agoUpdating Xcode project version numbers for LLDB-96
Sean Callanan [Sat, 17 Dec 2011 01:43:50 +0000 (01:43 +0000)]
Updating Xcode project version numbers for LLDB-96
and debugserver-156.

llvm-svn: 146808

12 years agoRevert r146797, which was a partial revert of r146791; It was correct in the
Chad Rosier [Sat, 17 Dec 2011 01:39:56 +0000 (01:39 +0000)]
Revert r146797, which was a partial revert of r146791; It was correct in the
first place.  The permutevar_* (note the *var*) intrinsics use ymm/mem.

llvm-svn: 146807

12 years agoAdd the ability to capture the return value in a thread's stop info, and print it
Jim Ingham [Sat, 17 Dec 2011 01:35:57 +0000 (01:35 +0000)]
Add the ability to capture the return value in a thread's stop info, and print it
as part of the thread format output.
Currently this is only done for the ThreadPlanStepOut.
Add a convenience API ABI::GetReturnValueObject.
Change the ValueObject::EvaluationPoint to BE an ExecutionContextScope, rather than
trying to hand out one of its subsidiary object's pointers.  That way this will always
be good.

llvm-svn: 146806

12 years agoFix a CPSR liveness tracking bug introduced when I converted IT block to bundle.
Evan Cheng [Sat, 17 Dec 2011 01:25:34 +0000 (01:25 +0000)]
Fix a CPSR liveness tracking bug introduced when I converted IT block to bundle.

llvm-svn: 146805

12 years agoFix _mm256_extractf128_* AVX intrinsics to use "I" (ICE) markings. Fix
Chad Rosier [Sat, 17 Dec 2011 01:22:27 +0000 (01:22 +0000)]
Fix _mm256_extractf128_* AVX intrinsics to use "I" (ICE) markings.  Fix
avxintrin.h to take them into account.
Part of rdar://10595450

llvm-svn: 146804

12 years agoRefactor code used in InstCombine::FoldAndOfICmps to new file.
Pete Cooper [Sat, 17 Dec 2011 01:20:32 +0000 (01:20 +0000)]
Refactor code used in InstCombine::FoldAndOfICmps to new file.

This will be used by SimplifyCfg in a later commit.

llvm-svn: 146803

12 years agoModified LLDB to be able to handle our updated __apple_types accelerator tables
Greg Clayton [Sat, 17 Dec 2011 01:16:39 +0000 (01:16 +0000)]
Modified LLDB to be able to handle our updated __apple_types accelerator tables
which have the dwarf DIE tag (DW_TAG_XXX enum) and TypeFlags for each type.

llvm-svn: 146802

12 years agoAdd back the MC bits of 126425. Original patch by Nathan Jeffords. I added the
Rafael Espindola [Sat, 17 Dec 2011 01:14:52 +0000 (01:14 +0000)]
Add back the MC bits of 126425. Original patch by Nathan Jeffords. I added the
asm parsing and testcase.

llvm-svn: 146801

12 years agoMake sure that the lower bits on the VSELECT condition are properly set.
Lang Hames [Sat, 17 Dec 2011 01:08:46 +0000 (01:08 +0000)]
Make sure that the lower bits on the VSELECT condition are properly set.

llvm-svn: 146800

12 years agoI have added a new patch to LLVM that makes the
Sean Callanan [Sat, 17 Dec 2011 00:59:49 +0000 (00:59 +0000)]
I have added a new patch to LLVM that makes the
enhanced disassembler classify disassemblers by
target triple (as a string) rather than just by
the architecture component of the triple.  This
fixes a problem where different variants of the
Thumb instruction set were lumped into the same
hash bucket.

llvm-svn: 146799

12 years agoRemove an unnecessary #include.
Jim Ingham [Sat, 17 Dec 2011 00:58:46 +0000 (00:58 +0000)]
Remove an unnecessary #include.

llvm-svn: 146798

12 years agoPartial revert of r146791; vpermilps/vpermilpd instructions accepts ymm/mem/imm8.
Chad Rosier [Sat, 17 Dec 2011 00:50:42 +0000 (00:50 +0000)]
Partial revert of r146791; vpermilps/vpermilpd instructions accepts ymm/mem/imm8.

llvm-svn: 146797

12 years agoRemove a non-gcc-compatible extension that would apply attributes on declarations...
Eli Friedman [Sat, 17 Dec 2011 00:36:09 +0000 (00:36 +0000)]
Remove a non-gcc-compatible extension that would apply attributes on declarations without a declarator to structs.  Add a warning for ignored attributes.  Patch by Michael Han.

llvm-svn: 146796

12 years agoAdd a triple to this test to hopefully get it passing on i386-freebsd.
Eric Christopher [Sat, 17 Dec 2011 00:35:01 +0000 (00:35 +0000)]
Add a triple to this test to hopefully get it passing on i386-freebsd.

llvm-svn: 146795

12 years ago[analyzer] Fixup for r146793. Add tests for atol and atoll.
Anna Zaks [Sat, 17 Dec 2011 00:30:16 +0000 (00:30 +0000)]
[analyzer] Fixup for r146793. Add tests for atol and atoll.

llvm-svn: 146794

12 years ago[analyzer] Add support for taint flowing through a function (atoi).
Anna Zaks [Sat, 17 Dec 2011 00:26:34 +0000 (00:26 +0000)]
[analyzer] Add support for taint flowing through a function (atoi).

Check if the input parameters are tainted (or point to tainted data) on
a checkPreStmt<CallExpr>. If the output should be tainted, record it in
the state. On post visit (checkPostStmt<CallExpr>), use the state to
make decisions (in addition to the existing logic). Use this logic for
atoi and fscanf.

llvm-svn: 146793

12 years ago[analyzer] Minor: Simplify & assert.
Anna Zaks [Sat, 17 Dec 2011 00:26:29 +0000 (00:26 +0000)]
[analyzer] Minor: Simplify & assert.

llvm-svn: 146792

12 years agoFix _mm256_round_pd, _mm256_round_ps, _mm_permute_pd and _mm256_permute_pd AVX
Chad Rosier [Sat, 17 Dec 2011 00:15:26 +0000 (00:15 +0000)]
Fix _mm256_round_pd, _mm256_round_ps, _mm_permute_pd and _mm256_permute_pd AVX
intrinsics to use "I" (ICE) markings.  Fix avxintrin.h to take them into
account.
Part of rdar://10595450

llvm-svn: 146791

12 years agoPreserve more memory operands in ARMExpandPseudo.
Jakob Stoklund Olesen [Sat, 17 Dec 2011 00:07:02 +0000 (00:07 +0000)]
Preserve more memory operands in ARMExpandPseudo.

I don't think this affects anything but verbose assembly.

llvm-svn: 146787

12 years agoThe powers that be have decided that LLVM IR should now support 16-bit
Dan Gohman [Sat, 17 Dec 2011 00:04:22 +0000 (00:04 +0000)]
The powers that be have decided that LLVM IR should now support 16-bit
"half precision" floating-point with a first-class type.

This patch adds basic IR support (but not codegen support).

llvm-svn: 146786

12 years agoWhen recursing for the original size of a type, stop if we are at a
Eric Christopher [Fri, 16 Dec 2011 23:42:45 +0000 (23:42 +0000)]
When recursing for the original size of a type, stop if we are at a
pointer or a reference type - we actually just want the size of the
pointer then for that.

Fixes rdar://10335756

llvm-svn: 146785

12 years agoResolve part of a fixme and add a new one.
Eric Christopher [Fri, 16 Dec 2011 23:42:42 +0000 (23:42 +0000)]
Resolve part of a fixme and add a new one.

llvm-svn: 146784

12 years agoAdd a fixme here.
Eric Christopher [Fri, 16 Dec 2011 23:42:38 +0000 (23:42 +0000)]
Add a fixme here.

llvm-svn: 146783

12 years agoFix spacing.
Eric Christopher [Fri, 16 Dec 2011 23:42:35 +0000 (23:42 +0000)]
Fix spacing.

llvm-svn: 146782

12 years agoUpdate documentation.
Eric Christopher [Fri, 16 Dec 2011 23:42:33 +0000 (23:42 +0000)]
Update documentation.

llvm-svn: 146781

12 years agoExtraneous whitespace and 80-col.
Eric Christopher [Fri, 16 Dec 2011 23:42:31 +0000 (23:42 +0000)]
Extraneous whitespace and 80-col.

llvm-svn: 146780

12 years agoWhen in a limited debug information situation if we can find the original
Eric Christopher [Fri, 16 Dec 2011 23:40:18 +0000 (23:40 +0000)]
When in a limited debug information situation if we can find the original
declaration for the type then go ahead and use that, it's still smaller
than creating an all new derived type.

Part of rdar://10335756 and others.

llvm-svn: 146779

12 years agoStart down the path of getting clang to internally agree on structs versus
Eric Christopher [Fri, 16 Dec 2011 23:40:14 +0000 (23:40 +0000)]
Start down the path of getting clang to internally agree on structs versus
classes.

Part of rdar://10520586 and a couple others.

llvm-svn: 146778

12 years agoMake the objc-dynamic-value test a little trickier (still passes) and test the GetDyn...
Jim Ingham [Fri, 16 Dec 2011 23:24:58 +0000 (23:24 +0000)]
Make the objc-dynamic-value test a little trickier (still passes) and test the GetDynamicValue API.

llvm-svn: 146777

12 years agohttp://llvm.org/bugs/show_bug.cgi?id=11588
Johnny Chen [Fri, 16 Dec 2011 23:04:52 +0000 (23:04 +0000)]
http://llvm.org/bugs/show_bug.cgi?id=11588
valobj.AddressOf() returns None when an address is expected in a SyntheticChildrenProvider

Patch from Enrico Granata:

The problem was that the frozen object created by the expression parser was a copy of the contents of the StgClosure, rather than a pointer to it. Thus, the expression parser was correctly computing the result of the arithmetic&cast operation along with its address, but only saving it in the live object. This meant that the frozen copy acted as an address-less variable, hence the problem.

The fix attached to this email lets the expression parser store the "live address" in the frozen copy of the address when the object is built without a valid address of its own.
Doing so, along with delegating ValueObjectConstResult to calculate its own address when necessary, solves the issue. I have also added a new test case to check for regressions in this area, and checked that existing test cases pass correctly.

llvm-svn: 146768

12 years agoFix off-by-one error in bucket sort.
Jakob Stoklund Olesen [Fri, 16 Dec 2011 23:00:05 +0000 (23:00 +0000)]
Fix off-by-one error in bucket sort.

The bad sorting caused a misaligned basic block when building 176.vpr in
ARM mode.

<rdar://problem/10594653>

llvm-svn: 146767

12 years agoFix an inconsistency in the syntactic form of InitListExpr in case of initialization...
Nicola Gigante [Fri, 16 Dec 2011 22:57:37 +0000 (22:57 +0000)]
Fix an inconsistency in the syntactic form of InitListExpr in case of initialization that involves a ConstructorConversion

llvm-svn: 146766

12 years agoDon't allow #include (and its friends #import, #include_next and
Richard Smith [Fri, 16 Dec 2011 22:50:01 +0000 (22:50 +0000)]
Don't allow #include (and its friends #import, #include_next and
#__include_macros) in the arguments of a function-style macro. Directives in the
arguments of such macros have undefined behaviour, and GCC does not correctly
support these cases. In some situations, this can lead to better diagnostics.

llvm-svn: 146765

12 years agoAdd missing header change
Douglas Gregor [Fri, 16 Dec 2011 22:40:58 +0000 (22:40 +0000)]
Add missing header change

llvm-svn: 146764

12 years agoMake sure we're always setting the previous declaration of an ObjCInterfaceDecl
Douglas Gregor [Fri, 16 Dec 2011 22:37:11 +0000 (22:37 +0000)]
Make sure we're always setting the previous declaration of an ObjCInterfaceDecl

llvm-svn: 146763

12 years agoAdd the value of "suitably aligned" from the C++11 standard to Basic/TargetInfo.
Nick Lewycky [Fri, 16 Dec 2011 22:34:14 +0000 (22:34 +0000)]
Add the value of "suitably aligned" from the C++11 standard to Basic/TargetInfo.
This is equal to alignof(std::max_align_t) on the platform and equal to the
alignment provided by malloc. (Platform owners please double-check your
platform's value.)

llvm-svn: 146762

12 years agoFix 80-column violation and whitespace. No functionality change.
Nick Lewycky [Fri, 16 Dec 2011 22:32:39 +0000 (22:32 +0000)]
Fix 80-column violation and whitespace. No functionality change.

llvm-svn: 146761

12 years agoAdd missing flush call. This is an attempt to fix a broken Windows buildbot.
Eli Friedman [Fri, 16 Dec 2011 22:12:23 +0000 (22:12 +0000)]
Add missing flush call.  This is an attempt to fix a broken Windows buildbot.

llvm-svn: 146760

12 years agoReduce recursion limit on this test further to try to make the msys bot green.
Richard Smith [Fri, 16 Dec 2011 21:59:02 +0000 (21:59 +0000)]
Reduce recursion limit on this test further to try to make the msys bot green.

llvm-svn: 146759

12 years agoFix vinsertf128_* AVX intrinsics to use "I" (ICE) markings. Fix avxintrin.h to
Chad Rosier [Fri, 16 Dec 2011 21:40:31 +0000 (21:40 +0000)]
Fix vinsertf128_* AVX intrinsics to use "I" (ICE) markings.  Fix avxintrin.h to
take them into account.
rdar://10590282

llvm-svn: 146758

12 years agoFix vperm2f128_* AVX intrinsics to use "I" (ICE) markings. Fix avxintrin.h to
Chad Rosier [Fri, 16 Dec 2011 21:07:34 +0000 (21:07 +0000)]
Fix vperm2f128_* AVX intrinsics to use "I" (ICE) markings.  Fix avxintrin.h to
take them into account.
rdar://10576962

llvm-svn: 146757

12 years agoUpdated Clang to take an enhancement to the way
Sean Callanan [Fri, 16 Dec 2011 21:06:35 +0000 (21:06 +0000)]
Updated Clang to take an enhancement to the way
we handle Objective-C method calls.  Currently,
LLDB treats the result of an Objective-C method
as unknown if the type information doesn't have
the method's signature.  Now Clang can cast the
result to id if it isn't explicitly cast.

I also added a test case for this, as well as a
fix for a type import problem that this feature
exposed.

llvm-svn: 146756

12 years agoAdd a warning flag for ext_embedded_directive. gcc considers this undefined
Richard Smith [Fri, 16 Dec 2011 20:58:01 +0000 (20:58 +0000)]
Add a warning flag for ext_embedded_directive. gcc considers this undefined
behaviour to be an error, so it's useful to be able to make it an error in clang
too.

llvm-svn: 146755

12 years agoAPInt: update asserts for base-36
Dylan Noblesmith [Fri, 16 Dec 2011 20:36:31 +0000 (20:36 +0000)]
APInt: update asserts for base-36

Hexatridecimal was added in r139695.

And fix the unittest that now triggers the assert.

llvm-svn: 146754

12 years agoPR11594: Don't blindly build a UnaryOperator UO_Minus on an expression which
Richard Smith [Fri, 16 Dec 2011 19:31:14 +0000 (19:31 +0000)]
PR11594: Don't blindly build a UnaryOperator UO_Minus on an expression which
might not be an rvalue when checking array accesses. Instead, pass through a
flag indicating the array index is negated.

llvm-svn: 146753

12 years agoRecently the GCD tests started failing because of the invalid size of
Kostya Serebryany [Fri, 16 Dec 2011 19:13:35 +0000 (19:13 +0000)]
Recently the GCD tests started failing because of the invalid size of
FakeStack on the worker threads.
This patch moves the AsanThread initialization into a separate
procedure that's called when AsanThread objects are called for worker
threads.
Patch by glider@google.com

llvm-svn: 146752

12 years agoDon't adjust for alignment padding in OffsetIsInRange.
Jakob Stoklund Olesen [Fri, 16 Dec 2011 19:10:00 +0000 (19:10 +0000)]
Don't adjust for alignment padding in OffsetIsInRange.

This adjustment is already included in the block offsets computed by
BasicBlockInfo, and adjusting again here can cause the pass to loop.

When CreateNewWater splits a basic block, OffsetIsInRange would reject
the new CPE on the next pass because of the too conservative alignment
adjustment. This caused the block to be split again, and so on.

llvm-svn: 146751

12 years agoHexagon: Fix a nasty order-of-initialization bug.
Benjamin Kramer [Fri, 16 Dec 2011 19:08:59 +0000 (19:08 +0000)]
Hexagon: Fix a nasty order-of-initialization bug.

Reenable the tests.

llvm-svn: 146750

12 years agoC++11 constexpr: Add note stacks containing backtraces if constant evaluation
Richard Smith [Fri, 16 Dec 2011 19:06:07 +0000 (19:06 +0000)]
C++11 constexpr: Add note stacks containing backtraces if constant evaluation
fails within a call to a constexpr function. Add -fconstexpr-backtrace-limit
argument to driver and frontend, to control the maximum number of notes so
produced (default 10). Fix APValue printing to be able to pretty-print all
APValue types, and move the testing for this functionality from a unittest to
a -verify test now that it's visible in clang's output.

llvm-svn: 146749

12 years ago[analyzer] Better stdin support.
Anna Zaks [Fri, 16 Dec 2011 18:28:50 +0000 (18:28 +0000)]
[analyzer] Better stdin support.

llvm-svn: 146748

12 years agoFixup to the relaxed diagnostic verification option r146633.
Anna Zaks [Fri, 16 Dec 2011 18:28:45 +0000 (18:28 +0000)]
Fixup to the relaxed diagnostic verification option r146633.

We should exit when matching the '+' even if nothing was found to
prevent searching for all UNIT_MAX items.

llvm-svn: 146747

12 years agoHandle all of the "thumb" target triple architecture variants that llvm
Greg Clayton [Fri, 16 Dec 2011 18:15:52 +0000 (18:15 +0000)]
Handle all of the "thumb" target triple architecture variants that llvm
handles.

llvm-svn: 146746

12 years agoUpdate tests to match r146744.
Devang Patel [Fri, 16 Dec 2011 17:56:38 +0000 (17:56 +0000)]
Update tests to match r146744.

llvm-svn: 146745

12 years agoIn DICompositeType, referenced to derived type is either metadata or null.
Devang Patel [Fri, 16 Dec 2011 17:51:31 +0000 (17:51 +0000)]
In DICompositeType, referenced to derived type is either metadata or null.

llvm-svn: 146744

12 years agoClarify and fix subprogram description.
Devang Patel [Fri, 16 Dec 2011 17:50:04 +0000 (17:50 +0000)]
Clarify and fix subprogram description.

llvm-svn: 146743

12 years agoIf there is a definition of an ObjCInterfaceDecl, make it the Decl returned from...
Douglas Gregor [Fri, 16 Dec 2011 16:34:57 +0000 (16:34 +0000)]
If there is a definition of an ObjCInterfaceDecl, make it the Decl returned from the corresponding ObjCInterfaceType

llvm-svn: 146740

12 years agoNote ARM constant island alignment in the release notes.
Jakob Stoklund Olesen [Fri, 16 Dec 2011 16:07:41 +0000 (16:07 +0000)]
Note ARM constant island alignment in the release notes.

The command line option should be removed, but not until the feature has
gotten a lot of testing. The ARMConstantIslandPass tends to have subtle
bugs that only show up after a while.

llvm-svn: 146739

12 years agoSupport decltype in pseudo destructors and dependent destructor calls.
David Blaikie [Fri, 16 Dec 2011 16:03:09 +0000 (16:03 +0000)]
Support decltype in pseudo destructors and dependent destructor calls.

Reviewed by Eli Friedman.

llvm-svn: 146738

12 years agoobjc: after issuing the warning on direct use of __attribute__((NSObject))
Fariborz Jahanian [Fri, 16 Dec 2011 15:54:29 +0000 (15:54 +0000)]
objc: after issuing the warning on direct use of __attribute__((NSObject))
on properties, prevent consequential error  diagnostics. // rdar://10591336

llvm-svn: 146737

12 years agoAllow unique_ptr<T const []> to be constructed with a T* (in addition to a const T*)
Howard Hinnant [Fri, 16 Dec 2011 15:37:23 +0000 (15:37 +0000)]
Allow unique_ptr<T const []> to be constructed with a T* (in addition to a const T*)

llvm-svn: 146736

12 years agoAdds a JSON parser and a benchmark (json-bench) to catch performance regressions.
Manuel Klimek [Fri, 16 Dec 2011 13:09:10 +0000 (13:09 +0000)]
Adds a JSON parser and a benchmark (json-bench) to catch performance regressions.

llvm-svn: 146735

12 years agoPut the '*' in the right place in the unit test. Forgot to fix up this
Chandler Carruth [Fri, 16 Dec 2011 09:37:55 +0000 (09:37 +0000)]
Put the '*' in the right place in the unit test. Forgot to fix up this
bit of style, sorry.

llvm-svn: 146733

12 years agoMake GCC happy by using makeAraryRef instead of the implicit conversion.
Chandler Carruth [Fri, 16 Dec 2011 09:36:16 +0000 (09:36 +0000)]
Make GCC happy by using makeAraryRef instead of the implicit conversion.
I have no idea why GCC can't cope with the implicit conversion and Clang
can, or whose bug it is. Grr.

llvm-svn: 146732

12 years agoAdd a generic collection of class templates to ADT for building
Chandler Carruth [Fri, 16 Dec 2011 08:58:59 +0000 (08:58 +0000)]
Add a generic collection of class templates to ADT for building
variadic-like functions in C++98. See the comments in the header file
for a more detailed description of how these work. We plan to use these
extensively in the AST matching library. This code and idea were
originally authored by Zhanyong Wan. I've condensed it using macros
to reduce repeatition and adjusted it to fit better with LLVM's ADT.

Thanks to both David Blaikie and Doug Gregor for the review!

llvm-svn: 146729

12 years agoBy popular demand, link up types by name if they are isomorphic and one is an
Chris Lattner [Fri, 16 Dec 2011 08:36:07 +0000 (08:36 +0000)]
By popular demand, link up types by name if they are isomorphic and one is an
autorenamed version of the other.   This makes the IR easier to read, because
we don't end up with random renamed versions of the types after LTO'ing a large app.

llvm-svn: 146728

12 years agoAdapt to move of isSafeToSpeculativelyExecute into another header.
Tobias Grosser [Fri, 16 Dec 2011 08:27:42 +0000 (08:27 +0000)]
Adapt to move of isSafeToSpeculativelyExecute into another header.

llvm-svn: 146727

12 years agoDon't try to match 'unpackl/h v, v' for 32xi8 and 16xi16 when only AVX1 is supported...
Craig Topper [Fri, 16 Dec 2011 08:06:31 +0000 (08:06 +0000)]
Don't try to match 'unpackl/h v, v' for 32xi8 and 16xi16 when only AVX1 is supported. Fix 'unpackh v, v' for 256-bit types to understand 128-bit lanes.

llvm-svn: 146726

12 years agoTweak CMake build on Cygwin.
NAKAMURA Takumi [Fri, 16 Dec 2011 06:21:08 +0000 (06:21 +0000)]
Tweak CMake build on Cygwin.

llvm-svn: 146725

12 years agoTarget/Hexagon: Fix CMake build.
NAKAMURA Takumi [Fri, 16 Dec 2011 06:21:02 +0000 (06:21 +0000)]
Target/Hexagon: Fix CMake build.

llvm-svn: 146724

12 years agoWhen we're unwinding out of frame 0 and we end up with a bogus frame
Jason Molenda [Fri, 16 Dec 2011 04:30:31 +0000 (04:30 +0000)]
When we're unwinding out of frame 0 and we end up with a bogus frame
1 -- an address pointing off into non-executable memory -- don't
abort the unwind.  We'll use the ABI's default UnwindPlan to try
to get out of frame 1 and on many platforms with a standard frame
chain stack layout we can get back on track and get a valid frame
2.  This preserves the lldb behavior to-date; the change last week
to require the memory region to be executable broke it.

I'd like to mark this frame specially when displayed to the user;
I tried to override the places where the frame's pc value is returned
to change it to a sentinel value (e.g. LLDB_INVALID_ADDRESS) but
couldn't get that to work cleanly so I backed that part out for
now.  When this happens we'll often miss one of the user's actual
frames, the one that's of most interest to the user, so I'd like
to make this visually distinctive.

Note that a frame in non-executable memory region is only allowed
for frame 1.  After that we should be solid on the unwind and any
pc address in non-executable memory indicates a failure and we
should stop unwinding.

llvm-svn: 146723

12 years agoFix chaining of ObjCInterfaceDecl redeclarations
Douglas Gregor [Fri, 16 Dec 2011 03:12:41 +0000 (03:12 +0000)]
Fix chaining of ObjCInterfaceDecl redeclarations

llvm-svn: 146722

12 years agoAvoid a confusing assert for silly options: -unroll-runtime -unroll-count=1.
Andrew Trick [Fri, 16 Dec 2011 02:03:48 +0000 (02:03 +0000)]
Avoid a confusing assert for silly options: -unroll-runtime -unroll-count=1.

No need for an explicit test case for an unsupported combination of options.

llvm-svn: 146721

12 years agoSimplify the setup leading to the testing of ReadMemory(), ReadCStringFromMemory...
Johnny Chen [Fri, 16 Dec 2011 01:56:27 +0000 (01:56 +0000)]
Simplify the setup leading to the testing of ReadMemory(), ReadCStringFromMemory(), and ReadUnsignedFromMemory().
Instead of getting the location of the variable and converting the hex string to an int, just use
val.AddressOf().GetValueAsUnsigned() to compute the address of the memory region to read from.

llvm-svn: 146719

12 years ago[asan] add a test for instrumenting globals
Kostya Serebryany [Fri, 16 Dec 2011 01:28:19 +0000 (01:28 +0000)]
[asan] add a test for instrumenting globals

llvm-svn: 146718

12 years agoRemove unnecessary #include.
Jim Ingham [Fri, 16 Dec 2011 00:46:12 +0000 (00:46 +0000)]
Remove unnecessary #include.

llvm-svn: 146717

12 years agoAdd a test sequence of SBProcess.ReadCStringFromMemory() with (char *)my_char_ptr...
Johnny Chen [Fri, 16 Dec 2011 00:25:30 +0000 (00:25 +0000)]
Add a test sequence of SBProcess.ReadCStringFromMemory() with (char *)my_char_ptr as the address to read from.

    char *my_char_ptr = (char *)"Does it work?";

llvm-svn: 146716

12 years agoSema::RequireCompleteType currently attempts to
Sean Callanan [Fri, 16 Dec 2011 00:20:31 +0000 (00:20 +0000)]
Sema::RequireCompleteType currently attempts to
instantiate a class from its template pattern
before it consults the ExternalASTSource.  LLDB
in particular will sometimes provide patterns
that need to be completed first.

To make this possible, I have moved the
completion before the code that does the
instantiation, allowing the ExternalASTSource
to provide the required information.

llvm-svn: 146715

12 years agoARM NEON aliases for vmovq.f*
Jim Grosbach [Fri, 16 Dec 2011 00:12:22 +0000 (00:12 +0000)]
ARM NEON aliases for vmovq.f*

llvm-svn: 146714

12 years agoExtract a method. No functional change.
Jakob Stoklund Olesen [Fri, 16 Dec 2011 00:12:05 +0000 (00:12 +0000)]
Extract a method.  No functional change.

llvm-svn: 146713

12 years agoFix a bug where when debugging with .o files, we end up with two symbols for each...
Jim Ingham [Fri, 16 Dec 2011 00:05:58 +0000 (00:05 +0000)]
Fix a bug where when debugging with .o files, we end up with two symbols for each real OBJC_CLASS_$_whatever, one of which is correctly classified as an ObjCClass symbol, and the other is just a data symbol.  This was messing up the ObjC dynamic type detection.
<rdar://problem/10589527>

llvm-svn: 146712

12 years agollvm-config: Fix --targets-built, I changed this to use the registry but wasn't
Daniel Dunbar [Fri, 16 Dec 2011 00:04:43 +0000 (00:04 +0000)]
llvm-config: Fix --targets-built, I changed this to use the registry but wasn't
properly initializing the target infos. I decided it wasn't worth linking them
in for this, so just switched back to using the Makefile variable for now. We
can reconsider later if we ever get pluggable targets.

llvm-svn: 146711

12 years agoThumb2 ADR assembly parsing w/o the .w suffix.
Jim Grosbach [Thu, 15 Dec 2011 23:52:17 +0000 (23:52 +0000)]
Thumb2 ADR assembly parsing w/o the .w suffix.

llvm-svn: 146710

12 years agoMake sure we correctly note the existence of an i8 immediate for vblendvps and friend...
Eli Friedman [Thu, 15 Dec 2011 23:46:18 +0000 (23:46 +0000)]
Make sure we correctly note the existence of an i8 immediate for vblendvps and friends, so we compute fixups correctly.  PR11586.

llvm-svn: 146709