platform/upstream/llvm.git
11 years agoExtracted pass ObjCARCExpand from ObjCARC.cpp => ObjCARCExpand.cpp.
Michael Gottesman [Mon, 28 Jan 2013 03:28:38 +0000 (03:28 +0000)]
Extracted pass ObjCARCExpand from ObjCARC.cpp => ObjCARCExpand.cpp.

I also added the local header ObjCARC.h for common functions used by the
various passes.

llvm-svn: 173651

11 years agoImproved svn repo searching for 'make update'
Edwin Vane [Mon, 28 Jan 2013 03:19:57 +0000 (03:19 +0000)]
Improved svn repo searching for 'make update'

Use a simple recursive bash function to search for svn repos for the 'make
update' target thus including projects like clang-tools-extra.

Reviewers: bkramer, echristo
llvm-svn: 173650

11 years agoMake some code a little simpler.
Reed Kotler [Mon, 28 Jan 2013 02:46:49 +0000 (02:46 +0000)]
Make some code a little simpler.

llvm-svn: 173649

11 years agoSince ObjCARC has been refactored into its own library with its own declaration heade...
Michael Gottesman [Mon, 28 Jan 2013 01:36:00 +0000 (01:36 +0000)]
Since ObjCARC has been refactored into its own library with its own declaration header, we need to include the declaration header alongside Scalar.h in BackendUtil.

llvm-svn: 173648

11 years agoExtracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for...
Michael Gottesman [Mon, 28 Jan 2013 01:35:51 +0000 (01:35 +0000)]
Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer.

llvm-svn: 173647

11 years agoUse proper type for the index.
Bill Wendling [Mon, 28 Jan 2013 01:30:29 +0000 (01:30 +0000)]
Use proper type for the index.

llvm-svn: 173646

11 years agoTests and a minor bugfix for [dcl.attr.depend]p1 (C++11 [[carries_dependency]]
Richard Smith [Mon, 28 Jan 2013 01:15:38 +0000 (01:15 +0000)]
Tests and a minor bugfix for [dcl.attr.depend]p1 (C++11 [[carries_dependency]]
attribute).

llvm-svn: 173645

11 years agoRemove another use of AttributeWithIndex, using the AttributeSetImpl accessors instead.
Bill Wendling [Mon, 28 Jan 2013 01:11:42 +0000 (01:11 +0000)]
Remove another use of AttributeWithIndex, using the AttributeSetImpl accessors instead.

llvm-svn: 173644

11 years agoAdd a -pedantic warning: an anonymous union within an anonymous union is not
Richard Smith [Mon, 28 Jan 2013 00:54:05 +0000 (00:54 +0000)]
Add a -pedantic warning: an anonymous union within an anonymous union is not
permitted in standard C++, despite being silently accepted by many (all?) major
C++ implementations.

llvm-svn: 173643

11 years agoRemove another use of AttributeWithIndex, using the AttributeSetImpl accessors instead.
Bill Wendling [Mon, 28 Jan 2013 00:46:02 +0000 (00:46 +0000)]
Remove another use of AttributeWithIndex, using the AttributeSetImpl accessors instead.

llvm-svn: 173642

11 years agoRemove a use of AttributeWithIndex.
Bill Wendling [Mon, 28 Jan 2013 00:21:34 +0000 (00:21 +0000)]
Remove a use of AttributeWithIndex.

We want to remove AttributeWithIndex because it provides a non-encapsulated view
of the AttributeSetImpl object. Instead, use accessor methods and iterators.

Eventually, this code can be simplified because the Attribute object will hold
only one attribute instead of multiple attributes.

llvm-svn: 173641

11 years agoImprove the debug output a bit.
Bill Wendling [Sun, 27 Jan 2013 23:53:56 +0000 (23:53 +0000)]
Improve the debug output a bit.

llvm-svn: 173640

11 years agoUse proper return type for attribute index.
Bill Wendling [Sun, 27 Jan 2013 23:50:44 +0000 (23:50 +0000)]
Use proper return type for attribute index.

llvm-svn: 173639

11 years agoUse proper return type for attribute index.
Bill Wendling [Sun, 27 Jan 2013 23:49:44 +0000 (23:49 +0000)]
Use proper return type for attribute index.

llvm-svn: 173638

11 years agoPush the calculation of the 'Raw' attribute mask down into the implementation. It...
Bill Wendling [Sun, 27 Jan 2013 23:41:29 +0000 (23:41 +0000)]
Push the calculation of the 'Raw' attribute mask down into the implementation. It in turn uses the correct list for calculating the 'Raw' value.

llvm-svn: 173637

11 years agoDon't erase these methods. They're used during testing.
Bill Wendling [Sun, 27 Jan 2013 22:46:17 +0000 (22:46 +0000)]
Don't erase these methods. They're used during testing.

llvm-svn: 173636

11 years agoAdd special 'get' methods to create an Attribute with an alignment. Also do some...
Bill Wendling [Sun, 27 Jan 2013 22:43:04 +0000 (22:43 +0000)]
Add special 'get' methods to create an Attribute with an alignment. Also do some random cleanup. No functionality change.

llvm-svn: 173635

11 years ago[XCore] Add missing l2rus instructions.
Richard Osborne [Sun, 27 Jan 2013 22:28:30 +0000 (22:28 +0000)]
[XCore] Add missing l2rus instructions.

These instructions are not targeted by the compiler but they are
needed for the MC layer.

llvm-svn: 173634

11 years agoComment parsing: fix test in r173626 for -fms-extensions -fms-compatibility
Dmitri Gribenko [Sun, 27 Jan 2013 22:11:38 +0000 (22:11 +0000)]
Comment parsing: fix test in r173626 for -fms-extensions -fms-compatibility

llvm-svn: 173633

11 years agoPrivitize some the copy c'tor and assignment operator of uniquified objects.
Bill Wendling [Sun, 27 Jan 2013 21:38:03 +0000 (21:38 +0000)]
Privitize some the copy c'tor and assignment operator of uniquified objects.

llvm-svn: 173632

11 years agoAdd some helpful comments.
Bill Wendling [Sun, 27 Jan 2013 21:32:11 +0000 (21:32 +0000)]
Add some helpful comments.

llvm-svn: 173631

11 years agoDecl printer: fix CXXConstructExpr with implicit default argument
Dmitri Gribenko [Sun, 27 Jan 2013 21:28:24 +0000 (21:28 +0000)]
Decl printer: fix CXXConstructExpr with implicit default argument

Patch by Will Wilson.

llvm-svn: 173630

11 years ago[XCore] Add missing l2r instructions.
Richard Osborne [Sun, 27 Jan 2013 21:26:02 +0000 (21:26 +0000)]
[XCore] Add missing l2r instructions.

These instructions are not targeted by the compiler but they are
needed for the MC layer.

llvm-svn: 173629

11 years agos/AttrList/pImpl/g in AttributeSet. No functionality change.
Bill Wendling [Sun, 27 Jan 2013 21:23:46 +0000 (21:23 +0000)]
s/AttrList/pImpl/g in AttributeSet. No functionality change.

llvm-svn: 173628

11 years agoStart using more of the AttrNode in the AttributeSetImpl class.
Bill Wendling [Sun, 27 Jan 2013 21:20:06 +0000 (21:20 +0000)]
Start using more of the AttrNode in the AttributeSetImpl class.

Also add some asserts.

llvm-svn: 173627

11 years agoComment parsing: attach any tag type's documentation to its typedef if latter
Dmitri Gribenko [Sun, 27 Jan 2013 21:18:39 +0000 (21:18 +0000)]
Comment parsing: attach any tag type's documentation to its typedef if latter
does not have one of its own. // rdar://13067629

Original patch (r173586 and r173587) by Fariborz Jahanian, modified by me.

llvm-svn: 173626

11 years agoLegalizer: Reword comment again, per Duncan's suggestion.
Benjamin Kramer [Sun, 27 Jan 2013 21:02:52 +0000 (21:02 +0000)]
Legalizer: Reword comment again, per Duncan's suggestion.

llvm-svn: 173625

11 years ago[XCore] Add missing 1r instructions.
Richard Osborne [Sun, 27 Jan 2013 20:46:21 +0000 (20:46 +0000)]
[XCore] Add missing 1r instructions.

These instructions are not targeted by the compiler but they are
needed for the MC layer.

llvm-svn: 173624

11 years ago[XCore] Add missing 0r instructions.
Richard Osborne [Sun, 27 Jan 2013 20:42:57 +0000 (20:42 +0000)]
[XCore] Add missing 0r instructions.

These instructions are not targeted by the compiler but they are
needed for the MC layer.

llvm-svn: 173623

11 years agoPR15067: Don't assert when a UCN appears in a C90 file.
Jordan Rose [Sun, 27 Jan 2013 20:12:04 +0000 (20:12 +0000)]
PR15067: Don't assert when a UCN appears in a C90 file.

Unfortunately, we can't accept the UCN as an extension because we're
required to treat it as two tokens for preprocessing purposes.

llvm-svn: 173622

11 years agoBBVectorize: Better use of TTI->getShuffleCost
Hal Finkel [Sun, 27 Jan 2013 20:07:01 +0000 (20:07 +0000)]
BBVectorize: Better use of TTI->getShuffleCost

When flipping the pair of subvectors that form a vector, if the
vector length is 2, we can use the SK_Reverse shuffle kind to get
more-accurate cost information. Also we can use the SK_ExtractSubvector
shuffle kind to get accurate subvector extraction costs.

The current cost model implementations don't yet seem complex enough
for this to make a difference (thus, there are no test cases with this
commit), but it should help in future.

Depending on how the various targets optimize and combine shuffles in
practice, we might be able to get more-accurate costs by combining the
costs of multiple shuffle kinds. For example, the cost of flipping the
subvector pairs could be modeled as two extractions and two subvector
insertions. These changes, however, should probably be motivated
by specific test cases.

llvm-svn: 173621

11 years agoLegalizer: Add an assert and tweak a comment to clarify the assumptions this code...
Benjamin Kramer [Sun, 27 Jan 2013 15:04:43 +0000 (15:04 +0000)]
Legalizer: Add an assert and tweak a comment to clarify the assumptions this code makes.

llvm-svn: 173620

11 years agoAddCompilerRT.cmake: Try to unbreak since r173617.
NAKAMURA Takumi [Sun, 27 Jan 2013 14:12:25 +0000 (14:12 +0000)]
AddCompilerRT.cmake: Try to unbreak since r173617.

llvm-svn: 173619

11 years agoIn the AttributeSetImpl c'tor, fill in the AttrNodes data structure with the attribut...
Bill Wendling [Sun, 27 Jan 2013 12:50:02 +0000 (12:50 +0000)]
In the AttributeSetImpl c'tor, fill in the AttrNodes data structure with the attributes being passed in.

llvm-svn: 173618

11 years ago[CMake][Lit][unittests] Cleanup in AddLLVM.cmake.
NAKAMURA Takumi [Sun, 27 Jan 2013 12:46:53 +0000 (12:46 +0000)]
[CMake][Lit][unittests] Cleanup in AddLLVM.cmake.

llvm-svn: 173617

11 years ago[CMake][Lit][unittests] Deprecate CMAKE_BUILD_TYPE in each build directory for unittests.
NAKAMURA Takumi [Sun, 27 Jan 2013 12:20:50 +0000 (12:20 +0000)]
[CMake][Lit][unittests] Deprecate CMAKE_BUILD_TYPE in each build directory for unittests.

For example,
cur) unittests/ADT/Release/ADTTests
new) unittests/ADT/ADTTests

RUNTIME_BUILD_MODE can be substituted to CMAKE_CFG_INTDIR.

With Make and Ninja, the tree is not built with multiple configurations.
Then, including the build type in target directory doesn't make sense.
See also "How can I build multiple modes without switching?"
http://www.cmake.org/Wiki/CMake_FAQ
CMAKE_CFG_INTDIR is set to "."

With multiple-configuration-aware build system, like Visual Studio, each unittest is built on appropriate directory, for example,
unittests/ADT/Release/ADTTests.exe
CMAKE_CFG_INTDIR is set to build system's variable, like "$(Configuration)" or "$(OutDir)".

Thus, "--param build_config" is also deprecated.

llvm-svn: 173616

11 years agoWhen the legalizer is splitting vector shifts, the result may not have the right...
Benjamin Kramer [Sun, 27 Jan 2013 11:19:11 +0000 (11:19 +0000)]
When the legalizer is splitting vector shifts, the result may not have the right shift amount type.

Fix that by adding a cast to the shift expander. This came up with vector shifts
on sse-less X86 CPUs.

   <2 x i64>       = shl <2 x i64> <2 x i64>
-> i64,i64         = shl i64 i64; shl i64 i64
-> i32,i32,i32,i32 = shl_parts i32 i32 i64; shl_parts i32 i32 i64

Now we cast the last two i64s to the right type. Fixes the crash in PR14668.

llvm-svn: 173615

11 years agoRevert r173586 (and r173587) , "Attach any tag type's documentation to its typedef if"
NAKAMURA Takumi [Sun, 27 Jan 2013 11:09:41 +0000 (11:09 +0000)]
Revert r173586 (and r173587) , "Attach any tag type's documentation to its typedef if"

It caused unexpected warnings with @tparam.

llvm-svn: 173614

11 years agoFix miscompile. Add back the use of the ArrayRef version of the ::get method.
Bill Wendling [Sun, 27 Jan 2013 10:28:39 +0000 (10:28 +0000)]
Fix miscompile. Add back the use of the ArrayRef version of the ::get method.

llvm-svn: 173613

11 years agoRearrange some deckchairs. Moving the class before it's use.
Bill Wendling [Sun, 27 Jan 2013 10:00:13 +0000 (10:00 +0000)]
Rearrange some deckchairs. Moving the class before it's use.

llvm-svn: 173612

11 years agoRemove dead methods.
Bill Wendling [Sun, 27 Jan 2013 09:55:44 +0000 (09:55 +0000)]
Remove dead methods.

llvm-svn: 173611

11 years agoRe-revert r173342, without losing the compile time improvements, flat
Chandler Carruth [Sun, 27 Jan 2013 06:42:03 +0000 (06:42 +0000)]
Re-revert r173342, without losing the compile time improvements, flat
out bug fixes, or functionality preserving refactorings.

llvm-svn: 173610

11 years agoRenamed function IsPotentialUse to IsPotentialRetainableObjPtr.
Michael Gottesman [Sun, 27 Jan 2013 06:19:48 +0000 (06:19 +0000)]
Renamed function IsPotentialUse to IsPotentialRetainableObjPtr.

This name change does the following:

1. Causes the function name to use proper ARC terminology.
2. Makes it clear what the function truly does.

llvm-svn: 173609

11 years agoFix test to not use the AttributeSet's AttributeWithIndex creation method.
Bill Wendling [Sun, 27 Jan 2013 03:39:10 +0000 (03:39 +0000)]
Fix test to not use the AttributeSet's AttributeWithIndex creation method.

llvm-svn: 173608

11 years agoHide the method that creates an AttributeSet with AttributeWithIndexes.
Bill Wendling [Sun, 27 Jan 2013 03:35:32 +0000 (03:35 +0000)]
Hide the method that creates an AttributeSet with AttributeWithIndexes.

This method will go away once AttributeWithIndex goes away. In the meantime,
hide it from general use.

llvm-svn: 173607

11 years agoUse the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 03:25:05 +0000 (03:25 +0000)]
Use the AttributeSet instead of AttributeWithIndex.

In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the
internals of the AttributeSet to outside users, which isn't goodness.

llvm-svn: 173606

11 years agoUse the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 02:46:53 +0000 (02:46 +0000)]
Use the AttributeSet instead of AttributeWithIndex.

In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the
internals of the AttributeSet to outside users, which isn't goodness.

llvm-svn: 173605

11 years agoUse the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 02:24:02 +0000 (02:24 +0000)]
Use the AttributeSet instead of AttributeWithIndex.

In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the
internals of the AttributeSet to outside users, which isn't goodness.

llvm-svn: 173603

11 years agoUse the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 02:08:22 +0000 (02:08 +0000)]
Use the AttributeSet instead of AttributeWithIndex.

In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the
internals of the AttributeSet to outside users, which isn't goodness.

llvm-svn: 173602

11 years agoUse the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 01:57:28 +0000 (01:57 +0000)]
Use the AttributeSet instead of AttributeWithIndex.

In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the
internals of the AttributeSet to outside users, which isn't goodness.

llvm-svn: 173601

11 years agoUse the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 01:44:34 +0000 (01:44 +0000)]
Use the AttributeSet instead of AttributeWithIndex.

In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the
internals of the AttributeSet to outside users, which isn't goodness.

llvm-svn: 173600

11 years agoConvert the CPP backend to use the AttributeSet instead of AttributeWithIndex.
Bill Wendling [Sun, 27 Jan 2013 01:22:51 +0000 (01:22 +0000)]
Convert the CPP backend to use the AttributeSet instead of AttributeWithIndex.

Further removal of the introspective AttributeWithIndex thing. Also fix the #includes.

llvm-svn: 173599

11 years agoUse the AttributeSet instead of AttributeWithIndex object.
Bill Wendling [Sun, 27 Jan 2013 00:36:48 +0000 (00:36 +0000)]
Use the AttributeSet instead of AttributeWithIndex object.

llvm-svn: 173598

11 years agoAdd the missing line return to align parameters of printPretty.
Michael Han [Sun, 27 Jan 2013 00:06:24 +0000 (00:06 +0000)]
Add the missing line return to align parameters of printPretty.

llvm-svn: 173597

11 years agoMake sure that multi-line expressions don't create a default target. We recently...
Greg Clayton [Sat, 26 Jan 2013 23:54:29 +0000 (23:54 +0000)]
Make sure that multi-line expressions don't create a default target. We recently switched to using a built-in m_exe_ctx when running commands in the DoExecute() so that we can have common code where commands can required having a valid target/process/thread/frame by specifying flags, this caused multi-line expression to always create a new dummy target because m_exe_ctx gets cleared when DoExecute exits. A new input reader has been pushed to handle the input for the expression, which will get popped off and then it was checking the target in m_exe_ctx (which was cleared).

llvm-svn: 173596

11 years agolibclang: refactor CXStringPool: make it a class
Dmitri Gribenko [Sat, 26 Jan 2013 22:44:19 +0000 (22:44 +0000)]
libclang: refactor CXStringPool: make it a class

We are not exposing the pool or string buffers to libclang users, so no need to
maintain a procedural interface.

llvm-svn: 173595

11 years agoPR14566: Debug Info: avoid top level lexical blocks in functions
David Blaikie [Sat, 26 Jan 2013 22:16:26 +0000 (22:16 +0000)]
PR14566: Debug Info: avoid top level lexical blocks in functions

One of the gotchas (see changes to CodeGenFunction) was due to the fix in
r139416 (for PR10829). This only worked previously because the top level
lexical block would set the location to the end of the function, the debug
location would be updated (as per r139416), the location would be set to
the end of the function again (but that would no-op, since it was the same
as the previous location), then the return instruction would be emitted using
the debug location.

Once the top level lexical block was no longer emitted, the end-of-function
location change was causing the debug loc to be updated, regressing that bug.

llvm-svn: 173593

11 years agoPR14566: Debug Info: Removing top level lexical blocks
David Blaikie [Sat, 26 Jan 2013 21:55:23 +0000 (21:55 +0000)]
PR14566: Debug Info: Removing top level lexical blocks

This adds support for LLVM to accept metadata that doesn't include a top level
lexical block in a function. Specifically LLVM couldn't handle this when there
were file changes relating to these blocks. I've updated a few test cases to
ensure other functionality (such as inlining) isn't affected by this change, but
haven't pervasively updated all the test cases.

llvm-svn: 173592

11 years agoIRBuilder: Remove redundant check around SetInstDebugLocation call.
David Blaikie [Sat, 26 Jan 2013 21:55:19 +0000 (21:55 +0000)]
IRBuilder: Remove redundant check around SetInstDebugLocation call.

llvm-svn: 173591

11 years agolibclang: type safety for CXTranslationUnitImpl::CIdx
Dmitri Gribenko [Sat, 26 Jan 2013 21:49:50 +0000 (21:49 +0000)]
libclang: type safety for CXTranslationUnitImpl::CIdx

llvm-svn: 173590

11 years agolibclang: type safety for CXTranslationUnitImpl::FormatContext
Dmitri Gribenko [Sat, 26 Jan 2013 21:39:50 +0000 (21:39 +0000)]
libclang: type safety for CXTranslationUnitImpl::FormatContext

llvm-svn: 173589

11 years agolibclang: some type safety for CXTranslationUnitImpl's internals
Dmitri Gribenko [Sat, 26 Jan 2013 21:32:42 +0000 (21:32 +0000)]
libclang: some type safety for CXTranslationUnitImpl's internals

There is no reason to store pointers as 'void*' in CXTranslationUnitImpl, since
it does not affect libclang ABI.

llvm-svn: 173588

11 years agoFix comment.
Fariborz Jahanian [Sat, 26 Jan 2013 20:50:23 +0000 (20:50 +0000)]
Fix comment.

llvm-svn: 173587

11 years agoAttach any tag type's documentation to its typedef if
Fariborz Jahanian [Sat, 26 Jan 2013 20:49:30 +0000 (20:49 +0000)]
Attach any tag type's documentation to its typedef if
latter does not have one of its own. // rdar://13067629

llvm-svn: 173586

11 years agolibclang: factor out the frequent pattern static_cast<ASTUnit *>(TU->TUData)
Dmitri Gribenko [Sat, 26 Jan 2013 18:53:38 +0000 (18:53 +0000)]
libclang: factor out the frequent pattern static_cast<ASTUnit *>(TU->TUData)
into a getter cxtu::getASTUnit(TU)

llvm-svn: 173585

11 years agolibclang: make getCursorParentDecl() return 'const Decl *'
Dmitri Gribenko [Sat, 26 Jan 2013 18:12:08 +0000 (18:12 +0000)]
libclang: make getCursorParentDecl() return 'const Decl *'

llvm-svn: 173584

11 years agolibclang: change getCursorAttr() to return 'const Attr *'
Dmitri Gribenko [Sat, 26 Jan 2013 18:08:08 +0000 (18:08 +0000)]
libclang: change getCursorAttr() to return 'const Attr *'

llvm-svn: 173583

11 years agoMigrate tests to -verify
Dmitri Gribenko [Sat, 26 Jan 2013 17:11:39 +0000 (17:11 +0000)]
Migrate tests to -verify

llvm-svn: 173582

11 years agoAdded ASTContext methods getIntPtrType and getUIntPtrType.
Enea Zaffanella [Sat, 26 Jan 2013 17:08:37 +0000 (17:08 +0000)]
Added ASTContext methods getIntPtrType and getUIntPtrType.

llvm-svn: 173581

11 years agoBBVectorize: Add a additional comment about the cost computation
Hal Finkel [Sat, 26 Jan 2013 16:49:04 +0000 (16:49 +0000)]
BBVectorize: Add a additional comment about the cost computation

llvm-svn: 173580

11 years agoBBVectorize: Fix anomalous capital letter in comment
Hal Finkel [Sat, 26 Jan 2013 16:49:03 +0000 (16:49 +0000)]
BBVectorize: Fix anomalous capital letter in comment

llvm-svn: 173579

11 years ago<limits.h> includes <linux/limits.h> on Linux, no need to special-case it
Dmitri Gribenko [Sat, 26 Jan 2013 16:29:36 +0000 (16:29 +0000)]
<limits.h> includes <linux/limits.h> on Linux, no need to special-case it

llvm-svn: 173578

11 years agolibclang: make getCursorStmt() and getCursorExpr() return const pointers
Dmitri Gribenko [Sat, 26 Jan 2013 15:29:08 +0000 (15:29 +0000)]
libclang: make getCursorStmt() and getCursorExpr() return const pointers

Also change EnqueueVisitor to use ConstStmtVisitor as a consequence.

llvm-svn: 173577

11 years agoSpecify non-GNU-ARM triples for key-function test.
Tim Northover [Sat, 26 Jan 2013 15:27:54 +0000 (15:27 +0000)]
Specify non-GNU-ARM triples for key-function test.

Since ARM has diverging ABIs on this detail, it's probably worth
testing both it and a "normal" Itanium system.

llvm-svn: 173576

11 years agoConstify getOptionalExplicitTemplateArgs()
Dmitri Gribenko [Sat, 26 Jan 2013 15:24:56 +0000 (15:24 +0000)]
Constify getOptionalExplicitTemplateArgs()

llvm-svn: 173575

11 years agoConstify some getters of DesignatedInitExpr
Dmitri Gribenko [Sat, 26 Jan 2013 15:15:52 +0000 (15:15 +0000)]
Constify some getters of DesignatedInitExpr

llvm-svn: 173574

11 years agolldX86_64ELFTarget depends on lldCore.
Benjamin Kramer [Sat, 26 Jan 2013 13:49:19 +0000 (13:49 +0000)]
lldX86_64ELFTarget depends on lldCore.

llvm-svn: 173573

11 years agoX86: Decode PALIGN operands so I don't have to do it in my head.
Benjamin Kramer [Sat, 26 Jan 2013 13:31:37 +0000 (13:31 +0000)]
X86: Decode PALIGN operands so I don't have to do it in my head.

llvm-svn: 173572

11 years agoDocumentation: fix syntax error
Dmitri Gribenko [Sat, 26 Jan 2013 13:30:13 +0000 (13:30 +0000)]
Documentation: fix syntax error

Patch by David Waggoner

llvm-svn: 173571

11 years agoUse proper delete.
Michael J. Spencer [Sat, 26 Jan 2013 12:26:56 +0000 (12:26 +0000)]
Use proper delete.

llvm-svn: 173570

11 years agoX86: Do splat promotion later, so the optimizer can chew on it first.
Benjamin Kramer [Sat, 26 Jan 2013 11:44:21 +0000 (11:44 +0000)]
X86: Do splat promotion later, so the optimizer can chew on it first.

This catches many cases where we can emit a more efficient shuffle for a
specific mask or when the mask contains undefs. Once the splat is lowered to
unpacks we can't do that anymore.

There is a possibility of moving the promotion after pshufb matching, but I'm
not sure if pshufb with a mask loaded from memory is faster than 3 shuffles, so
I avoided that for now.

llvm-svn: 173569

11 years agoFileCheckize and merge some tests.
Benjamin Kramer [Sat, 26 Jan 2013 11:14:32 +0000 (11:14 +0000)]
FileCheckize and merge some tests.

llvm-svn: 173568

11 years agoObject/RelocVisitor: Add minimal support, R_MIPS_32, for mips.
NAKAMURA Takumi [Sat, 26 Jan 2013 08:27:36 +0000 (08:27 +0000)]
Object/RelocVisitor: Add minimal support, R_MIPS_32, for mips.

It fixes llvm-dwarfdump for mips and mipsel.

llvm-svn: 173567

11 years agoObject/RelocVisitor: Add minimal support, R_PPC64_ADDR32, for ppc64.
NAKAMURA Takumi [Sat, 26 Jan 2013 08:27:29 +0000 (08:27 +0000)]
Object/RelocVisitor: Add minimal support, R_PPC64_ADDR32, for ppc64.

It fixes llvm-dwarfdump for ppc64-elf.

llvm-svn: 173566

11 years agoRelocVisitor::visit(): Set hasError in the default path.
NAKAMURA Takumi [Sat, 26 Jan 2013 08:27:23 +0000 (08:27 +0000)]
RelocVisitor::visit(): Set hasError in the default path.

llvm-svn: 173565

11 years agoOne more change of a uint32_t variable to offset_t
Jason Molenda [Sat, 26 Jan 2013 07:06:09 +0000 (07:06 +0000)]
One more change of a uint32_t variable to offset_t
to match Greg's dataextractor patch, this one in some
#if defined arm code.

llvm-svn: 173564

11 years agofix use of std::std. it's ordered set.
Reed Kotler [Sat, 26 Jan 2013 06:58:35 +0000 (06:58 +0000)]
fix use of std::std. it's ordered set.

llvm-svn: 173563

11 years agotest/remove-cstr-calls/basic.cpp: Disable again on mingw. It behaves unstable.
NAKAMURA Takumi [Sat, 26 Jan 2013 06:39:48 +0000 (06:39 +0000)]
test/remove-cstr-calls/basic.cpp: Disable again on mingw. It behaves unstable.

llvm-svn: 173562

11 years agoclang/test/Misc/diag-template-diffing-color.cpp: Symbolize color sequences in FileCheck.
NAKAMURA Takumi [Sat, 26 Jan 2013 06:13:05 +0000 (06:13 +0000)]
clang/test/Misc/diag-template-diffing-color.cpp: Symbolize color sequences in FileCheck.

llvm-svn: 173561

11 years agoAdd comments showing the symbolic names for the exc_code types we
Jason Molenda [Sat, 26 Jan 2013 05:30:38 +0000 (05:30 +0000)]
Add comments showing the symbolic names for the exc_code types we
receive with an EXC_BREAKPOINT mach exception on arm.

llvm-svn: 173560

11 years ago[libclang] Introduce clang_getFileUniqueID which returns a struct
Argyrios Kyrtzidis [Sat, 26 Jan 2013 04:52:52 +0000 (04:52 +0000)]
[libclang] Introduce clang_getFileUniqueID which returns a struct
for a CXFile containing device/inode/modification time.

Intended to be useful as a key associated with a unique file across
an indexing session.

rdar://13091837

llvm-svn: 173559

11 years agoclang/test/Misc/ast-dump-color.cpp: Symbolize color sequences in FileCheck.
NAKAMURA Takumi [Sat, 26 Jan 2013 03:48:55 +0000 (03:48 +0000)]
clang/test/Misc/ast-dump-color.cpp: Symbolize color sequences in FileCheck.

FIXME: If FileCheck had expressions something predefined well-known...
llvm-svn: 173558

11 years ago[analyzer] C++ initializers may require cleanups; look through these.
Jordan Rose [Sat, 26 Jan 2013 03:16:31 +0000 (03:16 +0000)]
[analyzer] C++ initializers may require cleanups; look through these.

When the analyzer sees an initializer, it checks if the initializer
contains a CXXConstructExpr. If so, it trusts that the CXXConstructExpr
does the necessary work to initialize the object, and performs no further
initialization.

This patch looks through any implicit wrapping expressions like
ExprWithCleanups to find the CXXConstructExpr inside.

Fixes PR15070.

llvm-svn: 173557

11 years agoGive a more informative error message when the dot or arrow operator is used
Richard Trieu [Sat, 26 Jan 2013 02:31:38 +0000 (02:31 +0000)]
Give a more informative error message when the dot or arrow operator is used
on a type.  Currently, it gives a generic "expected unqualified-id" error.
The new error message is "cannot use (dot|arrow) operator on a type".

llvm-svn: 173556

11 years agoAdd "target.process.stop-on-shared-library-events" setting, and make it work.
Jim Ingham [Sat, 26 Jan 2013 02:19:28 +0000 (02:19 +0000)]
Add "target.process.stop-on-shared-library-events" setting, and make it work.
Add the ability to give breakpoints a "kind" string, and have the StopInfoBreakpoint
print that in the brief description if set.  Also print the kind - if set - in the breakpoint
listing.
Give kinds to a bunch of the internal breakpoints.
We were deleting the Mac OS X dynamic loader breakpoint as though the id we had stored away was
a breakpoint site ID, but in fact it was a breakpoint id, so we never actually deleted it.  Fixed that.

llvm-svn: 173555

11 years agoFix mismatch between pointer and pointee type when diagnosing an incorrect
Richard Smith [Sat, 26 Jan 2013 02:07:32 +0000 (02:07 +0000)]
Fix mismatch between pointer and pointee type when diagnosing an incorrect
object argument type for a member call.

llvm-svn: 173554

11 years agoFix test case by being more lenient on what to accept as a path name.
Richard Trieu [Sat, 26 Jan 2013 01:54:31 +0000 (01:54 +0000)]
Fix test case by being more lenient on what to accept as a path name.

llvm-svn: 173553

11 years agoDWARFDebugLine.cpp: Fix true path. Did you forget "return true" here?
NAKAMURA Takumi [Sat, 26 Jan 2013 01:45:06 +0000 (01:45 +0000)]
DWARFDebugLine.cpp: Fix true path. Did you forget "return true" here?

llvm-svn: 173552

11 years agoRemove function that is newly dead as of r173538.
Nick Lewycky [Sat, 26 Jan 2013 01:36:54 +0000 (01:36 +0000)]
Remove function that is newly dead as of r173538.

llvm-svn: 173550

11 years agoHopefuly unbreak buldbot.
Fariborz Jahanian [Sat, 26 Jan 2013 01:35:28 +0000 (01:35 +0000)]
Hopefuly unbreak buldbot.

llvm-svn: 173549