platform/upstream/llvm.git
12 years agoRemove getARMRegisterNumbering and replace with calls into
Eric Christopher [Thu, 9 Aug 2012 22:10:21 +0000 (22:10 +0000)]
Remove getARMRegisterNumbering and replace with calls into
the register info for getEncodingValue. This builds on the
small patch of yesterday to set HWEncoding in the register
file.

One (deprecated) use was turned into a hard number to avoid
needing register info in the old JIT.

llvm-svn: 161628

12 years agoFix a future TwoAddressInstructionPass crash.
Jakob Stoklund Olesen [Thu, 9 Aug 2012 22:08:26 +0000 (22:08 +0000)]
Fix a future TwoAddressInstructionPass crash.

No test case, the crash only happens when the default use list order is
changed.

llvm-svn: 161627

12 years agoDon't modify MO while use_iterator is still pointing to it.
Jakob Stoklund Olesen [Thu, 9 Aug 2012 22:08:24 +0000 (22:08 +0000)]
Don't modify MO while use_iterator is still pointing to it.

llvm-svn: 161626

12 years agoAdded back member initialization for m_batch_command_mode, which was most likely...
Johnny Chen [Thu, 9 Aug 2012 22:06:10 +0000 (22:06 +0000)]
Added back member initialization for m_batch_command_mode, which was most likely removed accidentally a while back.
The consequence occurred recently probably due to our swicth to build with c++11.
This fixed 3 test failures.

llvm-svn: 161625

12 years ago[ms-inline asm] Extend the MC AsmParser API to match MCInsts (but not emit).
Chad Rosier [Thu, 9 Aug 2012 22:04:55 +0000 (22:04 +0000)]
[ms-inline asm] Extend the MC AsmParser API to match MCInsts (but not emit).
This new API will be used by clang to parse ms-style inline asms.

One goal of this project is to use this style of inline asm for targets other
then x86.  Therefore, this API needs to be implemented for non-x86 targets at
some point in the future.

llvm-svn: 161624

12 years ago<rdar://problem/11578397> Adding a new --summary-string option for the frame variable...
Enrico Granata [Thu, 9 Aug 2012 22:02:51 +0000 (22:02 +0000)]
<rdar://problem/11578397> Adding a new --summary-string option for the frame variable command which allows the user to provide a summary string with which he wants to display the variables without having to make a named summary first

llvm-svn: 161623

12 years ago[ms-inline asm] Fix comment.
Chad Rosier [Thu, 9 Aug 2012 21:28:05 +0000 (21:28 +0000)]
[ms-inline asm] Fix comment.

llvm-svn: 161622

12 years ago[analyzer] A CXXBaseObjectRegion should correspond to a DIRECT base.
Jordan Rose [Thu, 9 Aug 2012 21:24:02 +0000 (21:24 +0000)]
[analyzer] A CXXBaseObjectRegion should correspond to a DIRECT base.

An ASTContext's RecordLayoutInfo can only be used to look up offsets of
direct base classes, and we need the offset to make non-symbolic bindings
in RegionStore. This change makes sure that we have one layer of
CXXBaseObjectRegion for each base we are casting through.

This was causing crashes on an internal buildbot.

llvm-svn: 161621

12 years agoobjective-C: refactoring of objc's delayed parsing.
Fariborz Jahanian [Thu, 9 Aug 2012 21:12:39 +0000 (21:12 +0000)]
objective-C: refactoring of objc's delayed parsing.

llvm-svn: 161620

12 years ago[ms-inline asm] Use StringRef here, per Jordan's suggestion.
Chad Rosier [Thu, 9 Aug 2012 21:06:32 +0000 (21:06 +0000)]
[ms-inline asm] Use StringRef here, per Jordan's suggestion.

llvm-svn: 161619

12 years agoTemporarily revert r161612 while we figure out just what the semantics
Chandler Carruth [Thu, 9 Aug 2012 21:02:52 +0000 (21:02 +0000)]
Temporarily revert r161612 while we figure out just what the semantics
of PARALLEL_DIRS are. They apparantly aren't what either Nick, Eric, or
I thought. ;] Should let the bots make forward progress.

llvm-svn: 161618

12 years ago[analyzer] Rename the function to better reflect what it actually does.
Anna Zaks [Thu, 9 Aug 2012 21:02:45 +0000 (21:02 +0000)]
[analyzer] Rename the function to better reflect what it actually does.

llvm-svn: 161617

12 years ago[analyzer] Clarify the values in Dyn. Dispatch Bifurcation map.
Anna Zaks [Thu, 9 Aug 2012 21:02:41 +0000 (21:02 +0000)]
[analyzer] Clarify the values in Dyn. Dispatch Bifurcation map.

llvm-svn: 161616

12 years ago[ms-inline asm] Simplify logic for empty asm statements.
Chad Rosier [Thu, 9 Aug 2012 20:52:43 +0000 (20:52 +0000)]
[ms-inline asm] Simplify logic for empty asm statements.

llvm-svn: 161615

12 years ago[ms-inline asm] Instantiate the various parts to the AsmParser.
Chad Rosier [Thu, 9 Aug 2012 20:47:38 +0000 (20:47 +0000)]
[ms-inline asm] Instantiate the various parts to the AsmParser.

llvm-svn: 161614

12 years agoUse parallel dirs here, there shouldn't be cross-tool dependencies
Chandler Carruth [Thu, 9 Aug 2012 20:47:32 +0000 (20:47 +0000)]
Use parallel dirs here, there shouldn't be cross-tool dependencies
anyways. Also place it after the config makefile inclusion which seems
the more canonical location.

llvm-svn: 161613

12 years agoMake all of the tools build in parallel. Missing this caused incremental
Chandler Carruth [Thu, 9 Aug 2012 20:40:24 +0000 (20:40 +0000)]
Make all of the tools build in parallel. Missing this caused incremental
rebuilds to serially link each tool, which is really really slow.

We still have to build libclang serially first because c-index-test
depends on it.

llvm-svn: 161612

12 years agoTurn on function args by default in thread & frame formats.
Jim Ingham [Thu, 9 Aug 2012 20:29:34 +0000 (20:29 +0000)]
Turn on function args by default in thread & frame formats.
<rdar://problem/11703715>

llvm-svn: 161611

12 years agoTeach the LLVM test makefile to run the extra Clang tools' test suites
Chandler Carruth [Thu, 9 Aug 2012 20:26:41 +0000 (20:26 +0000)]
Teach the LLVM test makefile to run the extra Clang tools' test suites
as part of check-all.

llvm-svn: 161610

12 years agoRecurse into the extra tools repo the correct way from the Makefile
Chandler Carruth [Thu, 9 Aug 2012 20:21:38 +0000 (20:21 +0000)]
Recurse into the extra tools repo the correct way from the Makefile
build system. Thanks to Nick for pointing at the actual construct which
should be used here.

llvm-svn: 161609

12 years agoAnother 32 to 64 bit sign extension bug.
Jack Carter [Thu, 9 Aug 2012 19:43:18 +0000 (19:43 +0000)]
Another 32 to 64 bit sign extension bug.

The fields in the td definition were switched.

llvm-svn: 161607

12 years ago<rdar://problem/10449092> Adding a new uppercase hex format specifier. This commit...
Enrico Granata [Thu, 9 Aug 2012 19:33:34 +0000 (19:33 +0000)]
<rdar://problem/10449092> Adding a new uppercase hex format specifier. This commit also changes the short names for formats so that uppercase hex can be 'X', which was previously assigned to hex float. hex float now has no short name.

llvm-svn: 161606

12 years agoIn 'delete []', the '[]' never starts a lambda. Update a FIXME with a standard refere...
Richard Smith [Thu, 9 Aug 2012 19:01:51 +0000 (19:01 +0000)]
In 'delete []', the '[]' never starts a lambda. Update a FIXME with a standard reference and add a test.

llvm-svn: 161604

12 years ago[analyzer] Improve readability of the dyn. dispatch bifurcation patch
Anna Zaks [Thu, 9 Aug 2012 18:43:00 +0000 (18:43 +0000)]
[analyzer] Improve readability of the dyn. dispatch bifurcation patch
r161552.

As per Jordan's feedback.

llvm-svn: 161603

12 years agoRemove absolute file path in test.
Dmitri Gribenko [Thu, 9 Aug 2012 18:35:49 +0000 (18:35 +0000)]
Remove absolute file path in test.

llvm-svn: 161602

12 years agoComment to HTML and XML conversion: ignore commands that contain a declaration
Dmitri Gribenko [Thu, 9 Aug 2012 18:20:29 +0000 (18:20 +0000)]
Comment to HTML and XML conversion: ignore commands that contain a declaration
as their argument.  For example, \fn, \function, \typedef, \method, \class etc.

llvm-svn: 161601

12 years agoLLDB no longer prints <no result> by default if
Sean Callanan [Thu, 9 Aug 2012 18:18:47 +0000 (18:18 +0000)]
LLDB no longer prints <no result> by default if
the expression returns nothing.  There is now a
setting, "notify-void."  When the user enables
that setting, lldb prints (void) if an expression's
result is void.  Otherwise, lldb is silent.

<rdar://problem/11225150>

llvm-svn: 161600

12 years agoFix the test case. Now it does not depend on the method used to pass vector arguments...
Simon Atanasyan [Thu, 9 Aug 2012 17:49:22 +0000 (17:49 +0000)]
Fix the test case. Now it does not depend on the method used to pass vector arguments to the function.
Reviewed by Anton Lokhmotov.

llvm-svn: 161597

12 years agoComment to HTML and XML conversion: use CommandTraits to classify commands.
Dmitri Gribenko [Thu, 9 Aug 2012 17:33:20 +0000 (17:33 +0000)]
Comment to HTML and XML conversion: use CommandTraits to classify commands.

This also fixes a bug in comment to XML conversion: \result was just an
ordinary paragraph, not an alias for \returns.

llvm-svn: 161596

12 years ago[ms-inline asm] Initialize targets and assembly printers/parsers.
Chad Rosier [Thu, 9 Aug 2012 17:33:11 +0000 (17:33 +0000)]
[ms-inline asm] Initialize targets and assembly printers/parsers.

llvm-svn: 161595

12 years ago[ms-inline asm] Add various MC components to clang build to support MS-style inline...
Chad Rosier [Thu, 9 Aug 2012 17:17:01 +0000 (17:17 +0000)]
[ms-inline asm] Add various MC components to clang build to support MS-style inline assembly.

llvm-svn: 161594

12 years agoobjective-C: minor refactoring in method
Fariborz Jahanian [Thu, 9 Aug 2012 17:15:00 +0000 (17:15 +0000)]
objective-C: minor refactoring in method
definition parsing logic.

llvm-svn: 161593

12 years ago<rdar://problem/11505459> Stripping off the object's type from the output of the...
Enrico Granata [Thu, 9 Aug 2012 16:51:25 +0000 (16:51 +0000)]
<rdar://problem/11505459> Stripping off the object's type from the output of the 'po' command

llvm-svn: 161592

12 years agoAdd a test checking that all the "__asan_" interface functions are present in a binar...
Alexander Potapenko [Thu, 9 Aug 2012 16:05:17 +0000 (16:05 +0000)]
Add a test checking that all the "__asan_" interface functions are present in a binary built with -dead_strip.
Fix force_interface_symbols() so that none of the interface symbols is stripped.

llvm-svn: 161582

12 years agoPatch to implement UMLAL/SMLAL instructions for the ARM architecture
Arnold Schwaighofer [Thu, 9 Aug 2012 15:25:52 +0000 (15:25 +0000)]
Patch to implement UMLAL/SMLAL instructions for the ARM architecture

This patch corrects the definition of umlal/smlal instructions and adds support
for matching them to the ARM dag combiner.

Bug 12213

Patch by Yin Ma!

llvm-svn: 161581

12 years agoMake the non-interface mach_override functions static to avoid name clashes with...
Alexander Potapenko [Thu, 9 Aug 2012 13:33:02 +0000 (13:33 +0000)]
Make the non-interface mach_override functions static to avoid name clashes with user code that may contain its own mach_override.

llvm-svn: 161577

12 years ago[ASan] Move mac-specific error reports to asan_report.cc as well
Alexey Samsonov [Thu, 9 Aug 2012 12:15:40 +0000 (12:15 +0000)]
[ASan] Move mac-specific error reports to asan_report.cc as well

llvm-svn: 161576

12 years ago[ASan] Small fix to please tests on Windows, where stack unwinding using provided...
Alexey Samsonov [Thu, 9 Aug 2012 11:29:13 +0000 (11:29 +0000)]
[ASan] Small fix to please tests on Windows, where stack unwinding using provided pc/bp works too bad

llvm-svn: 161575

12 years ago[ASan] Move __asan_report_error implementation to asan_report.cc
Alexey Samsonov [Thu, 9 Aug 2012 10:56:57 +0000 (10:56 +0000)]
[ASan] Move __asan_report_error implementation to asan_report.cc

llvm-svn: 161574

12 years agoUse a switch instead of a simple condition in force_interface_symbols().
Alexander Potapenko [Thu, 9 Aug 2012 09:46:12 +0000 (09:46 +0000)]
Use a switch instead of a simple condition in force_interface_symbols().
Otherwise Clang eliminates everything after the first interface symbol that is marked noreturn.

llvm-svn: 161573

12 years ago[ASan] move code that describes globals to asan_report.cc
Alexey Samsonov [Thu, 9 Aug 2012 09:27:24 +0000 (09:27 +0000)]
[ASan] move code that describes globals to asan_report.cc

llvm-svn: 161572

12 years ago[ASan] move some functions that describe addresses to asan_report.cc
Alexey Samsonov [Thu, 9 Aug 2012 09:06:52 +0000 (09:06 +0000)]
[ASan] move some functions that describe addresses to asan_report.cc

llvm-svn: 161571

12 years ago[ASan] Move error reporting code away from file with interceptors
Alexey Samsonov [Thu, 9 Aug 2012 08:32:33 +0000 (08:32 +0000)]
[ASan] Move error reporting code away from file with interceptors

llvm-svn: 161570

12 years ago[ASan] Move error reports away from ASan allocator. Add new source file to CMakeLists...
Alexey Samsonov [Thu, 9 Aug 2012 08:15:46 +0000 (08:15 +0000)]
[ASan] Move error reports away from ASan allocator. Add new source file to CMakeLists as well

llvm-svn: 161569

12 years ago[ASan] Create new files asan_report.{h,cc} as a preparation for refactoring of ASan...
Alexey Samsonov [Thu, 9 Aug 2012 07:40:58 +0000 (07:40 +0000)]
[ASan] Create new files asan_report.{h,cc} as a preparation for refactoring of ASan error reporting code.
Currently ASan reports many kinds of errors, and the code that actually prints error messages can
be found inside allocator, OS-specific files, interceptors code etc.

An example of maintenance troubles this situation causes:
There is currently an ASan interface function that registers
callback which should take the char buffer with error report printed by ASan.
This function is now broken, as one has to insert callback calls to all the places in
ASan code where the error reports are printed, surprisingly it is not only
"__asan_report_error" function...

llvm-svn: 161568

12 years agoUnbreak the build.
Anna Zaks [Thu, 9 Aug 2012 02:57:02 +0000 (02:57 +0000)]
Unbreak the build.

Declaring "const Decl *Decl" is not a good idea.

llvm-svn: 161567

12 years agoFix the legalization of ExtLoad on ARM. ExpandUnalignedLoad did not properly
Nadav Rotem [Thu, 9 Aug 2012 01:56:44 +0000 (01:56 +0000)]
Fix the legalization of ExtLoad on ARM.  ExpandUnalignedLoad did not properly
handle the cases where the memory value type was illegal.
PR 13111.

llvm-svn: 161565

12 years agoThis field isn't used anymore, use it with HWEncoding instead.
Eric Christopher [Thu, 9 Aug 2012 01:39:32 +0000 (01:39 +0000)]
This field isn't used anymore, use it with HWEncoding instead.

llvm-svn: 161564

12 years agollvm.zip rebuilt with libc++ for Mac OS X.
Sean Callanan [Thu, 9 Aug 2012 01:33:24 +0000 (01:33 +0000)]
llvm.zip rebuilt with libc++ for Mac OS X.

<rdar://problem/11930775>

llvm-svn: 161563

12 years agoOn Mac OS X, lldb will now build c++11 and use
Sean Callanan [Thu, 9 Aug 2012 01:32:13 +0000 (01:32 +0000)]
On Mac OS X, lldb will now build c++11 and use
libc++.  We also no longer use the GNU extensions
to C++ and C (we didn't use them anyway).

This also means that the LLVM we use must be
built with the new libc++.

I will commit llvm.zip next.

<rdar://problem/11930775>

llvm-svn: 161562

12 years agoSupport for experimental targets
Victor Oliveira [Thu, 9 Aug 2012 01:13:59 +0000 (01:13 +0000)]
Support for experimental targets

Added LLVM_EXPERIMENTAL_TARGETS_TO_BUILD in CMake and --enable-experimental-targets in configure.

llvm-svn: 161561

12 years agoMade lldb.swig include <string>, which it requires.
Sean Callanan [Thu, 9 Aug 2012 00:53:54 +0000 (00:53 +0000)]
Made lldb.swig include <string>, which it requires.

llvm-svn: 161560

12 years agoRemoved explicit NULL checks for shared pointers
Sean Callanan [Thu, 9 Aug 2012 00:50:26 +0000 (00:50 +0000)]
Removed explicit NULL checks for shared pointers
and instead made us use implicit casts to bool.
This generated a warning in C++11.

<rdar://problem/11930775>

llvm-svn: 161559

12 years agoWhen compiling with C++11, switch from
Sean Callanan [Thu, 9 Aug 2012 00:46:55 +0000 (00:46 +0000)]
When compiling with C++11, switch from
hash_multimap to unordered_multimap.

<rdar://problem/11930775>

llvm-svn: 161558

12 years ago[analyzer] Cleanup of malloc checker.
Anna Zaks [Thu, 9 Aug 2012 00:42:24 +0000 (00:42 +0000)]
[analyzer] Cleanup of malloc checker.

Remove Escaped state, which is not really necessary. We can just stop
tracking the symbol instead of keeping it around and marking escaped.

llvm-svn: 161557

12 years agoNow that the testcase is fixed, it is no longer
Sean Callanan [Thu, 9 Aug 2012 00:40:16 +0000 (00:40 +0000)]
Now that the testcase is fixed, it is no longer
an expected failure.

llvm-svn: 161556

12 years ago<rdar://problem/12061386> Fixing data-formatter-cpp test case - previous version...
Enrico Granata [Thu, 9 Aug 2012 00:35:41 +0000 (00:35 +0000)]
<rdar://problem/12061386> Fixing data-formatter-cpp test case - previous version had an unfortunate dependency on the value of uninitialized memory

llvm-svn: 161555

12 years agoFix AAPCS ABI. I can't actually test this, but it restores the behavior from before...
Eli Friedman [Thu, 9 Aug 2012 00:31:40 +0000 (00:31 +0000)]
Fix AAPCS ABI.  I can't actually test this, but it restores the behavior from before r159168.  PR13562.

llvm-svn: 161554

12 years agoMachineRegisterInfo was already a friend of MachineOperand, and GCC complains
Matt Beaumont-Gay [Thu, 9 Aug 2012 00:30:39 +0000 (00:30 +0000)]
MachineRegisterInfo was already a friend of MachineOperand, and GCC complains
about repeated friending.

llvm-svn: 161553

12 years ago[analyzer] Bifurcate the path with dynamic dispatch.
Anna Zaks [Thu, 9 Aug 2012 00:21:33 +0000 (00:21 +0000)]
[analyzer] Bifurcate the path with dynamic dispatch.

This is an initial (unoptimized) version. We split the path when
inlining ObjC instance methods. On one branch we always assume that the
type information for the given memory region is precise. On the other we
assume that we don't have the exact type info. It is important to check
since the class could be subclassed and the method can be overridden. If
we always inline we can loose coverage.

Had to refactor some of the call eval functions.

llvm-svn: 161552

12 years agoAdd new file CommentCommandTraits.cpp to CMakeLists.txt.
Dmitri Gribenko [Thu, 9 Aug 2012 00:16:26 +0000 (00:16 +0000)]
Add new file CommentCommandTraits.cpp to CMakeLists.txt.

llvm-svn: 161551

12 years agoFix the order of the link arguments for this tool. I think there is
Chandler Carruth [Thu, 9 Aug 2012 00:12:21 +0000 (00:12 +0000)]
Fix the order of the link arguments for this tool. I think there is
something fishy with the rest of the order too, but this at least lets
it build for me.

llvm-svn: 161550

12 years agoAllow the Makefile build system to find the extra repo if it is checked
Chandler Carruth [Thu, 9 Aug 2012 00:05:27 +0000 (00:05 +0000)]
Allow the Makefile build system to find the extra repo if it is checked
out.

Unfortunately, the existing makefiles for the extra repo don't specify
the correct library dependencies. Fixing that next. If you're following
along, you'll get linker errors.

llvm-svn: 161549

12 years agoComment parsing: extract TableGen'able pieces into new CommandTraits class.
Dmitri Gribenko [Thu, 9 Aug 2012 00:03:17 +0000 (00:03 +0000)]
Comment parsing: extract TableGen'able pieces into new CommandTraits class.

llvm-svn: 161548

12 years agoThe C++ data formatter tests are flaky. Marking
Sean Callanan [Thu, 9 Aug 2012 00:01:48 +0000 (00:01 +0000)]
The C++ data formatter tests are flaky.  Marking
them as expected failures until they are fixed.

llvm-svn: 161547

12 years agoclang support for Bitrig (an OpenBSD fork); patch by David Hill.
Eli Friedman [Wed, 8 Aug 2012 23:57:20 +0000 (23:57 +0000)]
clang support for Bitrig (an OpenBSD fork); patch by David Hill.

llvm-svn: 161546

12 years agoMove [SU]LEB128 encoding to a utility header.
Jim Grosbach [Wed, 8 Aug 2012 23:56:06 +0000 (23:56 +0000)]
Move [SU]LEB128 encoding to a utility header.

These functions are very generic. There's no reason for them to
be tied to MCObjectWriter.

llvm-svn: 161545

12 years agoMinor simplification for r161534.
Eli Friedman [Wed, 8 Aug 2012 23:53:27 +0000 (23:53 +0000)]
Minor simplification for r161534.

llvm-svn: 161544

12 years agoMove getNextOperandForReg() into MachineRegisterInfo.
Jakob Stoklund Olesen [Wed, 8 Aug 2012 23:44:07 +0000 (23:44 +0000)]
Move getNextOperandForReg() into MachineRegisterInfo.

MRI provides iterators for traversing the use-def chains. They should
not be accessible from anywhere else.

llvm-svn: 161543

12 years agoDon't use getNextOperandForReg().
Jakob Stoklund Olesen [Wed, 8 Aug 2012 23:44:04 +0000 (23:44 +0000)]
Don't use getNextOperandForReg().

This way of using getNextOperandForReg() was unlikely to work as
intended. We don't give any guarantees about the order of operands in
the use-def chains, so looking only at operands following a given
operand in the chain doesn't make sense.

llvm-svn: 161542

12 years agoDon't use getNextOperandForReg() in RAFast.
Jakob Stoklund Olesen [Wed, 8 Aug 2012 23:44:01 +0000 (23:44 +0000)]
Don't use getNextOperandForReg() in RAFast.

That particular optimization was probably premature anyway.

llvm-svn: 161541

12 years agoobjective-C: refactor/simplify parsing of delayed
Fariborz Jahanian [Wed, 8 Aug 2012 23:41:08 +0000 (23:41 +0000)]
objective-C: refactor/simplify parsing of delayed
method/c-funcs defined in objc class implementation.
No intended functionality change.

llvm-svn: 161540

12 years agoFix r161534 so it actually builds.
Eli Friedman [Wed, 8 Aug 2012 23:35:12 +0000 (23:35 +0000)]
Fix r161534 so it actually builds.

llvm-svn: 161539

12 years agoFix up the makefiles in the tools repo, and add a top-level makefile
Chandler Carruth [Wed, 8 Aug 2012 23:34:47 +0000 (23:34 +0000)]
Fix up the makefiles in the tools repo, and add a top-level makefile
suitable for building as part of the LLVM/Clang build.

llvm-svn: 161538

12 years agoPR13558: Fix typo 'compatiblity'. Thinking of the children. Apparently.
Richard Smith [Wed, 8 Aug 2012 23:32:13 +0000 (23:32 +0000)]
PR13558: Fix typo 'compatiblity'. Thinking of the children. Apparently.

llvm-svn: 161537

12 years agoAllow legalization of target-specific SDNodes, provided that the target itself provid...
Owen Anderson [Wed, 8 Aug 2012 23:31:14 +0000 (23:31 +0000)]
Allow legalization of target-specific SDNodes, provided that the target itself provide a legalization hook for them.

llvm-svn: 161536

12 years agoHandle deprecation diagnostics correctly for C struct fields and Objective-C properti...
Eli Friedman [Wed, 8 Aug 2012 23:04:35 +0000 (23:04 +0000)]
Handle deprecation diagnostics correctly for C struct fields and Objective-C properties/ivars. <rdar://problem/6642337>.

llvm-svn: 161534

12 years agoFixed the delay that was happening when quitting lldb from the command line. We weren...
Greg Clayton [Wed, 8 Aug 2012 22:27:52 +0000 (22:27 +0000)]
Fixed the delay that was happening when quitting lldb from the command line. We weren't initializing the command pipes when constructing a ConnectionFileDescriptor with a file descriptor.

llvm-svn: 161533

12 years agoDeal with irreducible control flow when building traces.
Jakob Stoklund Olesen [Wed, 8 Aug 2012 22:12:01 +0000 (22:12 +0000)]
Deal with irreducible control flow when building traces.

We filter out MachineLoop back-edges during the trace-building PO
traversals, but it is possible to have CFG cycles that aren't natural
loops, and MachineLoopInfo doesn't include such cycles.

Use a standard visited set to detect such CFG cycles, and completely
ignore them when picking traces.

llvm-svn: 161532

12 years agoComment XML: use xml:space="preserve" in Verbatim tags, so that XML tidy does
Dmitri Gribenko [Wed, 8 Aug 2012 22:10:24 +0000 (22:10 +0000)]
Comment XML: use xml:space="preserve" in Verbatim tags, so that XML tidy does
not compress spaces in verbatim content.

llvm-svn: 161531

12 years agoRemove some coding violations. No functionality change.
Bill Wendling [Wed, 8 Aug 2012 22:03:50 +0000 (22:03 +0000)]
Remove some coding violations. No functionality change.

llvm-svn: 161530

12 years agoCache a commonly used reference.
Bill Wendling [Wed, 8 Aug 2012 22:01:55 +0000 (22:01 +0000)]
Cache a commonly used reference.

llvm-svn: 161529

12 years agoUnify the codepaths for emitting deprecation warnings. The test changes are just...
Eli Friedman [Wed, 8 Aug 2012 21:52:41 +0000 (21:52 +0000)]
Unify the codepaths for emitting deprecation warnings.  The test changes are just to account for us emitting notes more consistently.

llvm-svn: 161528

12 years agoAddress code review comments for Wstrncat-size warning (r161440).
Anna Zaks [Wed, 8 Aug 2012 21:42:23 +0000 (21:42 +0000)]
Address code review comments for Wstrncat-size warning (r161440).

llvm-svn: 161527

12 years ago[ms-inline asm] Use more idiomatic logic. Thanks, Bill.
Chad Rosier [Wed, 8 Aug 2012 21:42:11 +0000 (21:42 +0000)]
[ms-inline asm] Use more idiomatic logic.  Thanks, Bill.

llvm-svn: 161526

12 years agoImplicitly annotate __CFStringMakeConstantString with format_arg(1).
Jordan Rose [Wed, 8 Aug 2012 21:17:31 +0000 (21:17 +0000)]
Implicitly annotate __CFStringMakeConstantString with format_arg(1).

We handled the builtin version of this function in r157968, but the builtin
isn't used when compiling as -fno-constant-cfstrings.

This should complete <rdar://problem/6157200>.

llvm-svn: 161525

12 years ago[ms-inline asm] Add basic codegen support for simple asm stmts. Currently,
Chad Rosier [Wed, 8 Aug 2012 21:15:52 +0000 (21:15 +0000)]
[ms-inline asm] Add basic codegen support for simple asm stmts.  Currently,
only machine specific clobbers are modeled.

llvm-svn: 161524

12 years agoDon't add attributes for "#pragma pack" and friends to tag declarations which
Eli Friedman [Wed, 8 Aug 2012 21:08:34 +0000 (21:08 +0000)]
Don't add attributes for "#pragma pack" and friends to tag declarations which
are not definitions. This follows the behavior of both gcc and earlier
versions of clang. Regression from r156531.  <rdar://problem/12048621>.

llvm-svn: 161523

12 years ago[ms-inline asm] Make sure IsSimple is correctly handled.
Chad Rosier [Wed, 8 Aug 2012 21:08:20 +0000 (21:08 +0000)]
[ms-inline asm] Make sure IsSimple is correctly handled.

llvm-svn: 161522

12 years agoRemove extraneous comment.
Chad Rosier [Wed, 8 Aug 2012 20:38:22 +0000 (20:38 +0000)]
Remove extraneous comment.

llvm-svn: 161521

12 years ago[ms-inline asm] Add a very simple test case. Basically, we're only testing for
Chad Rosier [Wed, 8 Aug 2012 20:37:31 +0000 (20:37 +0000)]
[ms-inline asm] Add a very simple test case.  Basically, we're only testing for
crashers at the moment (and coincidentally this case was causing a crash).

llvm-svn: 161520

12 years agoAdd test triples to fix win32 failures. Revert workaround from r161292.
Bob Wilson [Wed, 8 Aug 2012 20:31:37 +0000 (20:31 +0000)]
Add test triples to fix win32 failures.  Revert workaround from r161292.

I don't have a win32 system to test, so hopefully I got them all fixed here.

llvm-svn: 161519

12 years ago[ms-inline asm] Refactor the logic to generate the AsmString into Sema. No
Chad Rosier [Wed, 8 Aug 2012 19:48:07 +0000 (19:48 +0000)]
[ms-inline asm] Refactor the logic to generate the AsmString into Sema.  No
functional change intended.

llvm-svn: 161518

12 years agoWhitespace.
Chad Rosier [Wed, 8 Aug 2012 18:51:50 +0000 (18:51 +0000)]
Whitespace.

llvm-svn: 161517

12 years agoWhitespace.
Chad Rosier [Wed, 8 Aug 2012 18:46:20 +0000 (18:46 +0000)]
Whitespace.

llvm-svn: 161516

12 years agoRemove OpenBSD defines:
Bill Wendling [Wed, 8 Aug 2012 18:37:39 +0000 (18:37 +0000)]
Remove OpenBSD defines:

- The defines are in stddint.h, which is #include'd already.
- The block wasn't used anyway, since it was _OpenBSD_, and not __OpenBSD__

Patch by David Hill!

llvm-svn: 161515

12 years agoAdd a copy of the LLVM license here so that even a stand-alone checkout
Chandler Carruth [Wed, 8 Aug 2012 18:30:15 +0000 (18:30 +0000)]
Add a copy of the LLVM license here so that even a stand-alone checkout
includes the proper license text.

llvm-svn: 161514

12 years agoHeed -stress-early-ifcvt.
Jakob Stoklund Olesen [Wed, 8 Aug 2012 18:24:23 +0000 (18:24 +0000)]
Heed -stress-early-ifcvt.

llvm-svn: 161513

12 years ago[analyzer] Clean up the printing of FieldRegions for leaks.
Jordan Rose [Wed, 8 Aug 2012 18:23:36 +0000 (18:23 +0000)]
[analyzer] Clean up the printing of FieldRegions for leaks.

Unfortunately, generalized region printing is very difficult:
- ElementRegions are used both for casting and as actual elements.
- Accessing values through a pointer means going through an intermediate
  SymbolRegionValue; symbolic regions are untyped.
- Referring to implicitly-defined variables like 'this' and 'self' could be
  very confusing if they come from another stack frame.

We fall back to simply not printing the region name if we can't be sure it
will print well. This will allow us to improve in the future.

llvm-svn: 161512

12 years ago[analyzer] Track malloc'd regions stored in structs.
Jordan Rose [Wed, 8 Aug 2012 18:23:31 +0000 (18:23 +0000)]
[analyzer] Track malloc'd regions stored in structs.

The main blocker on this (besides the previous commit) was that
ScanReachableSymbols was not looking through LazyCompoundVals.
Once that was fixed, it's easy enough to clear out malloc data on return,
just like we do when we bind to a global region.

<rdar://problem/10872635>

llvm-svn: 161511