platform/upstream/llvm.git
12 years agoSet up code under _LIBCXX_DYNAMIC_FALLBACK which is off by default. For a full descr...
Howard Hinnant [Fri, 28 Sep 2012 22:43:50 +0000 (22:43 +0000)]
Set up code under _LIBCXX_DYNAMIC_FALLBACK which is off by default.  For a full description of _LIBCXX_DYNAMIC_FALLBACK, see src/private_typeinfo.cpp.

llvm-svn: 164863

12 years agoUse a custom DenseMapInfo for WeakObjectProfileTy.
Jordan Rose [Fri, 28 Sep 2012 22:42:04 +0000 (22:42 +0000)]
Use a custom DenseMapInfo for WeakObjectProfileTy.

We can't specialize the usual llvm::DenseMapInfo at the end of the file
because by that point the DenseMap in FunctionScopeInfo has already been
instantiated.

No functionality change.

llvm-svn: 164862

12 years ago[Doc parsing] Add availability information to generated Comment XML.
Fariborz Jahanian [Fri, 28 Sep 2012 22:35:49 +0000 (22:35 +0000)]
[Doc parsing] Add availability information to generated Comment XML.
(I still need to add a test once I figure it out).
Reviewed off-line by Doug. // rdar://12378879

llvm-svn: 164861

12 years agoDon't use bit-wise operations to query for inclusion/exclusion of attributes.
Bill Wendling [Fri, 28 Sep 2012 22:30:18 +0000 (22:30 +0000)]
Don't use bit-wise operations to query for inclusion/exclusion of attributes.

llvm-svn: 164860

12 years agoFix buildbots by not using a template from another namespace.
Jordan Rose [Fri, 28 Sep 2012 22:29:02 +0000 (22:29 +0000)]
Fix buildbots by not using a template from another namespace.

No need to specialize BeforeThanCompare for a comparator that's only
going to be used once.

llvm-svn: 164859

12 years agoCompatibility macro detection for the -Wimplicit-fallthrough diagnostic.
Alexander Kornienko [Fri, 28 Sep 2012 22:24:03 +0000 (22:24 +0000)]
Compatibility macro detection for the -Wimplicit-fallthrough diagnostic.

Summary:
When issuing a diagnostic message for the -Wimplicit-fallthrough diagnostics, always try to find the latest macro, defined at the point of fallthrough, which is immediately expanded to "[[clang::fallthrough]]", and use it's name instead of the actual sequence.

Known issues:
  * uses PP.getSpelling() to compare macro definition with a string (anyone can suggest a convenient way to fill a token array, or maybe lex it in runtime?);
  * this can be generalized and used in other similar cases, any ideas where it should reside then?

Reviewers: doug.gregor, rsmith

Reviewed By: rsmith

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D50

llvm-svn: 164858

12 years ago-Wreceiver-is-weak: rephrase warning text and add a suggestion Note.
Jordan Rose [Fri, 28 Sep 2012 22:21:42 +0000 (22:21 +0000)]
-Wreceiver-is-weak: rephrase warning text and add a suggestion Note.

New output:
  warning: weak property may be unpredictably set to nil
  note: property declared here
  note: assign the value to a strong variable to keep the object alive
        during use

<rdar://problem/12277204>

llvm-svn: 164857

12 years agoPull ScopeInfo implementation into its own file.
Jordan Rose [Fri, 28 Sep 2012 22:21:39 +0000 (22:21 +0000)]
Pull ScopeInfo implementation into its own file.

The infrastructure for -Warc-repeated-use-of-weak got a little too heavy
to leave sitting at the top of Sema.cpp.

No functionality change.

llvm-svn: 164856

12 years ago-Warc-repeated-use-of-weak: check ivars and variables as well.
Jordan Rose [Fri, 28 Sep 2012 22:21:35 +0000 (22:21 +0000)]
-Warc-repeated-use-of-weak: check ivars and variables as well.

Like properties, loading from a weak ivar twice in the same function can
give you inconsistent results if the object is deallocated between the
two loads. It is safer to assign to a strong local variable and use that.

Second half of <rdar://problem/12280249>.

llvm-svn: 164855

12 years agoAdd a warning (off by default) for repeated use of the same weak property.
Jordan Rose [Fri, 28 Sep 2012 22:21:30 +0000 (22:21 +0000)]
Add a warning (off by default) for repeated use of the same weak property.

The motivating example:

if (self.weakProp)
  use(self.weakProp);

As with any non-atomic test-then-use, it is possible a weak property to be
non-nil at the 'if', but be deallocated by the time it is used. The correct
way to write this example is as follows:

id tmp = self.weakProp;
if (tmp)
  use(tmp);

The warning is controlled by -Warc-repeated-use-of-receiver, and uses the
property name and base to determine if the same property on the same object
is being accessed multiple times. In cases where the base is more
complicated than just a single Decl (e.g. 'foo.bar.weakProp'), it picks a
Decl for some degree of uniquing and reports the problem under a subflag,
-Warc-maybe-repeated-use-of-receiver. This gives a way to tune the
aggressiveness of the warning for a particular project.

The warning is not on by default because it is not flow-sensitive and thus
may have a higher-than-acceptable rate of false positives, though it is
less noisy than -Wreceiver-is-weak. On the other hand, it will not warn
about some cases that may be legitimate issues that -Wreceiver-is-weak
will catch, and it does not attempt to reason about methods returning weak
values.

Even though this is not a real "analysis-based" check I've put the bug
emission code in AnalysisBasedWarnings for two reasons: (1) to run on
every kind of code body (function, method, block, or lambda), and (2) to
suggest that it may be enhanced by flow-sensitive analysis in the future.

The second (smaller) half of this work is to extend it to weak locals
and weak ivars. This should use most of the same infrastructure.

Part of <rdar://problem/12280249>

llvm-svn: 164854

12 years agoAdd basic support for adding !tbaa.struct metadata on llvm.memcpy calls for
Dan Gohman [Fri, 28 Sep 2012 21:58:29 +0000 (21:58 +0000)]
Add basic support for adding !tbaa.struct metadata on llvm.memcpy calls for
struct assignment.

llvm-svn: 164853

12 years ago<rdar://problem/12398225>
Greg Clayton [Fri, 28 Sep 2012 21:51:54 +0000 (21:51 +0000)]
<rdar://problem/12398225>

Improve performance of StringExtractor::GetHexS8().

llvm-svn: 164852

12 years agoWhen processing an InitListExpr and skipping the initialization of an invalid
Richard Smith [Fri, 28 Sep 2012 21:23:50 +0000 (21:23 +0000)]
When processing an InitListExpr and skipping the initialization of an invalid
record, skip at least one element from the InitListExpr to avoid an infinite
loop if we're initializing an array of unknown bound.

llvm-svn: 164851

12 years agoGlobalDCE should be run at -O2 / -Os to eliminate unused dtor, etc. rdar://9142819
Evan Cheng [Fri, 28 Sep 2012 21:23:26 +0000 (21:23 +0000)]
GlobalDCE should be run at -O2 / -Os to eliminate unused dtor, etc. rdar://9142819

llvm-svn: 164850

12 years agoMIPS DSP: add operands to make sure instruction strings are being matched.
Akira Hatanaka [Fri, 28 Sep 2012 21:23:16 +0000 (21:23 +0000)]
MIPS DSP: add operands to make sure instruction strings are being matched.

llvm-svn: 164849

12 years agoRemove unused methods.
Bill Wendling [Fri, 28 Sep 2012 21:22:24 +0000 (21:22 +0000)]
Remove unused methods.

llvm-svn: 164848

12 years agodocs: dedent list on index.rst
Sean Silva [Fri, 28 Sep 2012 21:18:37 +0000 (21:18 +0000)]
docs: dedent list on index.rst

In reStructuredText, indented blocks denote block quotes [1]. This list
is not a block quote.

[1]. http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#block-quotes

llvm-svn: 164847

12 years agoFix -Wcovered-switch-default warning.
Michael J. Spencer [Fri, 28 Sep 2012 21:07:58 +0000 (21:07 +0000)]
Fix -Wcovered-switch-default warning.

llvm-svn: 164846

12 years agoMIPS DSP: other miscellaneous instructions.
Akira Hatanaka [Fri, 28 Sep 2012 20:50:31 +0000 (20:50 +0000)]
MIPS DSP: other miscellaneous instructions.

llvm-svn: 164845

12 years agoFixed a bug where if something went wrong while
Sean Callanan [Fri, 28 Sep 2012 20:47:47 +0000 (20:47 +0000)]
Fixed a bug where if something went wrong while
constructing the ObjCInterfaceDecl for an ISA,
we'd continue and try to use that Decl anyway,
possibly causing a crash.

llvm-svn: 164844

12 years agoUpdate template type diffing to handle qualifiers. Differing qualifiers will
Richard Trieu [Fri, 28 Sep 2012 20:32:51 +0000 (20:32 +0000)]
Update template type diffing to handle qualifiers.  Differing qualifiers will
now be printed with highlighting.

llvm-svn: 164843

12 years agoTestcase for r164835
Manman Ren [Fri, 28 Sep 2012 20:26:33 +0000 (20:26 +0000)]
Testcase for r164835

llvm-svn: 164842

12 years agoAllow __builtin_bswap32/64 in constant expressions, like gcc does. Patch by Tijl...
Richard Smith [Fri, 28 Sep 2012 20:20:52 +0000 (20:20 +0000)]
Allow __builtin_bswap32/64 in constant expressions, like gcc does. Patch by Tijl Coosemans!

llvm-svn: 164841

12 years agoMIPS DSP: ADDUH.QB instruction sub-class.
Akira Hatanaka [Fri, 28 Sep 2012 20:16:04 +0000 (20:16 +0000)]
MIPS DSP: ADDUH.QB instruction sub-class.

llvm-svn: 164840

12 years agoClean up part of template type diffing. Moved repeated code to separate
Richard Trieu [Fri, 28 Sep 2012 19:51:57 +0000 (19:51 +0000)]
Clean up part of template type diffing.  Moved repeated code to separate
functions.  Reworked one of the conditionals.  No functional changes.

llvm-svn: 164839

12 years agoModern objcective-C translator. When doing rewriting, Do not
Fariborz Jahanian [Fri, 28 Sep 2012 19:05:17 +0000 (19:05 +0000)]
Modern objcective-C translator. When doing rewriting, Do not
use the integrated pre-processor, preprocess in objective-c++ mode.
// rdar://12189793.

llvm-svn: 164836

12 years agoX86: when replacing SUB with TEST in ISelDAGToDAG, only replace uses of the
Manman Ren [Fri, 28 Sep 2012 18:53:24 +0000 (18:53 +0000)]
X86: when replacing SUB with TEST in ISelDAGToDAG, only replace uses of the
second output of SUB with first output of TEST.

PR13966

llvm-svn: 164835

12 years agoImprove the diagnostic messages on dynamic_cast.
Howard Hinnant [Fri, 28 Sep 2012 17:58:48 +0000 (17:58 +0000)]
Improve the diagnostic messages on dynamic_cast.

llvm-svn: 164833

12 years agoDue to a mistake on my own part, I need to burn some version numbers. This does...
Howard Hinnant [Fri, 28 Sep 2012 17:42:25 +0000 (17:42 +0000)]
Due to a mistake on my own part, I need to burn some version numbers.  This does not impact any of the implementation of libc++, and does not impact the ABI in any way.

llvm-svn: 164832

12 years agoRemoving dependency on third party library for Intel JIT event support.
Andrew Kaylor [Fri, 28 Sep 2012 17:35:20 +0000 (17:35 +0000)]
Removing dependency on third party library for Intel JIT event support.
Patch committed on behalf of Kirill Uhanov

llvm-svn: 164831

12 years ago[analyzer] Handle inlined constructors for rvalue temporaries correctly.
Jordan Rose [Fri, 28 Sep 2012 17:15:25 +0000 (17:15 +0000)]
[analyzer] Handle inlined constructors for rvalue temporaries correctly.

Previously the analyzer treated all inlined constructors like lvalues,
setting the value of the CXXConstructExpr to the newly-constructed
region. However, some CXXConstructExprs behave like rvalues -- in
particular, the implicit copy constructor into a pass-by-value argument.
In this case, we want only the /contents/ of a temporary object to be
passed, so that we can use the same "copy each argument into the
parameter region" algorithm that we use for scalar arguments.

This may change when we start modeling destructors of temporaries,
but for now this is the last part of <rdar://problem/12137950>.

llvm-svn: 164830

12 years ago[analyzer] Create a temp region when a method is called on a struct rvalue.
Jordan Rose [Fri, 28 Sep 2012 17:15:21 +0000 (17:15 +0000)]
[analyzer] Create a temp region when a method is called on a struct rvalue.

An rvalue has no address, but calling a C++ member function requires a
'this' pointer. This commit makes the analyzer create a temporary region
in which to store the struct rvalue and use as a 'this' pointer whenever
a member function is called on an rvalue, which is essentially what
CodeGen does.

More of <rdar://problem/12137950>. The last part is tracking down the
C++ FIXME in array-struct-region.cpp.

llvm-svn: 164829

12 years ago[analyzer] Create a temporary region for rvalue structs when accessing fields
Jordan Rose [Fri, 28 Sep 2012 17:15:12 +0000 (17:15 +0000)]
[analyzer] Create a temporary region for rvalue structs when accessing fields

Struct rvalues are represented in the analyzer by CompoundVals,
LazyCompoundVals, or plain ConjuredSymbols -- none of which have associated
regions. If the entire structure is going to persist, this is not a
problem -- either the rvalue will be assigned to an existing region, or
a MaterializeTemporaryExpr will be present to create a temporary region.
However, if we just need a field from the struct, we need to create the
temporary region ourselves.

This is inspired by the way CodeGen handles calls to temporaries;
support for that in the analyzer is coming next.

Part of <rdar://problem/12137950>

llvm-svn: 164828

12 years agoAvoid malloc thrashing in the uninitialized value analysis.
Benjamin Kramer [Fri, 28 Sep 2012 16:44:29 +0000 (16:44 +0000)]
Avoid malloc thrashing in the uninitialized value analysis.

- The size of the packed vector is often small, save mallocs using SmallBitVector.
- Copying SmallBitVectors is also cheap, remove a level of indirection.

llvm-svn: 164827

12 years agoPackedVector: Make the BitVector implementation configurable.
Benjamin Kramer [Fri, 28 Sep 2012 16:40:29 +0000 (16:40 +0000)]
PackedVector: Make the BitVector implementation configurable.

llvm-svn: 164826

12 years agoFix a bug introduced in an earlier revision: actually return the StopReason, when...
Filipe Cabecinhas [Fri, 28 Sep 2012 15:55:43 +0000 (15:55 +0000)]
Fix a bug introduced in an earlier revision: actually return the StopReason, when we have a StopInfo object.

llvm-svn: 164825

12 years agoSet Diag.ErrorOccurred even if a DiagnosticConsumer does not want it in
Daniel Jasper [Fri, 28 Sep 2012 15:45:07 +0000 (15:45 +0000)]
Set Diag.ErrorOccurred even if a DiagnosticConsumer does not want it in
diagnostic count.

If a DiagnosticConsumer sub-class overwrites IncludeInDiagnosticCounts,
this should change diagnostic counts. However, it currently also
influences Diag.ErrorOccurred, which in turn influences the behavior of
parsing and semantic analysis (in a way that can make it crash).

llvm-svn: 164824

12 years agoProvide malloc-free sentinels for the SparseBitVector internals.
Benjamin Kramer [Fri, 28 Sep 2012 15:36:41 +0000 (15:36 +0000)]
Provide malloc-free sentinels for the SparseBitVector internals.

llvm-svn: 164823

12 years agoReplace the use of strncpy() and sprintf() with std::string and LLVM streams.
Dmitri Gribenko [Fri, 28 Sep 2012 14:15:28 +0000 (14:15 +0000)]
Replace the use of strncpy() and sprintf() with std::string and LLVM streams.

Patch by Martinez, Javier E.

llvm-svn: 164822

12 years ago[ASan] Fix unit test headers. Add an option to change substitute asan_test_config...
Alexey Samsonov [Fri, 28 Sep 2012 12:24:23 +0000 (12:24 +0000)]
[ASan] Fix unit test headers. Add an option to change substitute asan_test_config.h file

llvm-svn: 164821

12 years ago[ASan] use llvm-symbolizer (in offline mode) in ASan output tests on Linux
Alexey Samsonov [Fri, 28 Sep 2012 11:05:41 +0000 (11:05 +0000)]
[ASan] use llvm-symbolizer (in offline mode) in ASan output tests on Linux

llvm-svn: 164819

12 years agoCorrelatedPropagation: BasicBlock::removePredecessor can simplify PHI nodes. If the...
Benjamin Kramer [Fri, 28 Sep 2012 10:42:50 +0000 (10:42 +0000)]
CorrelatedPropagation: BasicBlock::removePredecessor can simplify PHI nodes. If the it's the condition of a SwitchInst, reload it.

Fixes PR13972.

llvm-svn: 164818

12 years agoMake backtraces work again with both the configure and cmake build.
Benjamin Kramer [Fri, 28 Sep 2012 10:10:46 +0000 (10:10 +0000)]
Make backtraces work again with both the configure and cmake build.

llvm-svn: 164817

12 years ago[asan] Change defaults for Android target.
Evgeniy Stepanov [Fri, 28 Sep 2012 10:07:53 +0000 (10:07 +0000)]
[asan] Change defaults for Android target.

This way building without -DASAN_* in CFLAGS produces working binaries.

llvm-svn: 164816

12 years agoGlobalOpt: non-constexpr bitcasts or GEPs can occur even if the global value is only...
Benjamin Kramer [Fri, 28 Sep 2012 10:01:27 +0000 (10:01 +0000)]
GlobalOpt: non-constexpr bitcasts or GEPs can occur even if the global value is only stored once.

Fixes PR13968.

llvm-svn: 164815

12 years agoSurprisingly, we missed a trivial case here. Fix that!
Nick Lewycky [Fri, 28 Sep 2012 09:33:53 +0000 (09:33 +0000)]
Surprisingly, we missed a trivial case here. Fix that!

llvm-svn: 164814

12 years agoRemove a LLVM_DELETED_FUNCTION from destructor to fix -std=c++11 build on gcc 4.7.
Craig Topper [Fri, 28 Sep 2012 07:17:01 +0000 (07:17 +0000)]
Remove a LLVM_DELETED_FUNCTION from destructor to fix -std=c++11 build on gcc 4.7.

llvm-svn: 164813

12 years agoRecognize the eax/ebp/eip etc version of x86 register
Jason Molenda [Fri, 28 Sep 2012 05:46:55 +0000 (05:46 +0000)]
Recognize the eax/ebp/eip etc version of x86 register
names in addition to the rax/rbp/rip register names when
deciding whether a register is volatile or not.

llvm-svn: 164812

12 years ago1. Add load/store words from the stack
Reed Kotler [Fri, 28 Sep 2012 02:26:24 +0000 (02:26 +0000)]
1. Add load/store words from the stack
2. As part of this, added assembly format FEXT_RI16_SP_explicit_ins and
moved other lines for FEXT_RI16 formats to be in the right place in the code.
3. Added mayLoad and mayStore assignements for the load/store instructions added and for ones already there that did not have this assignment.
4. Another patch will deal with the problem of load/store byte/halfword to the stack. This is a particular Mips16 problem.

llvm-svn: 164811

12 years agoFix the extra space char being emitted in this message when breakpoints resolve -
Jason Molenda [Fri, 28 Sep 2012 01:50:47 +0000 (01:50 +0000)]
Fix the extra space char being emitted in this message when breakpoints resolve -

1 location  added to breakpoint 2

llvm-svn: 164810

12 years agoTwo changes: 1) I still didn't have the ABI correct to match the gcc-4.2 std::strin...
Howard Hinnant [Fri, 28 Sep 2012 00:05:34 +0000 (00:05 +0000)]
Two changes:  1)  I still didn't have the ABI correct to match the gcc-4.2 std::string under the exception classes.  I think the changes to stdexcept.cpp have got that down now.  2) On Apple platforms I'm seeing visibility bugs in applications with respect to type_info's being hidden.  This is causing dynamic_cast to malfunction because there are multiple type_info's running around for one type within an application, making dynamic_cast believe that one type is actually multiple types.  As a stop gap measure I'm trying to detect this error, print out an error message, but continue with the most likely desired result.  This is all under __APPLE__.  This behavior can be expanded to other platforms if desired.

llvm-svn: 164809

12 years agoImproved the runtime reading to also get data
Sean Callanan [Thu, 27 Sep 2012 23:47:51 +0000 (23:47 +0000)]
Improved the runtime reading to also get data
out of the metaclass, so as to enumerate class
methods for an object.

llvm-svn: 164808

12 years agoRemove <def,read-undef> flags from partial redefinitions.
Jakob Stoklund Olesen [Thu, 27 Sep 2012 23:31:32 +0000 (23:31 +0000)]
Remove <def,read-undef> flags from partial redefinitions.

The new coalescer can turn a full virtual register definition into a
partial redef by merging another value into an unused vector lane.

Make sure to clear the <read-undef> flag on such defs.

llvm-svn: 164807

12 years agoWrapped up the work I am going to do for now for the "add-dsym" or "target symfile...
Greg Clayton [Thu, 27 Sep 2012 22:26:11 +0000 (22:26 +0000)]
Wrapped up the work I am going to do for now for the "add-dsym" or "target symfile add" command.

We can now do:

Specify a path to a debug symbols file:
(lldb) add-dsym <path-to-dsym>

Go and download the dSYM file for the "libunc.dylib" module in your target:
(lldb) add-dsym --shlib libunc.dylib

Go and download the dSYM given a UUID:
(lldb) add-dsym --uuid <UUID>

Go and download the dSYM file for the current frame:
(lldb) add-dsym --frame

llvm-svn: 164806

12 years agoFix more crlf issues.
Micah Villmow [Thu, 27 Sep 2012 22:14:10 +0000 (22:14 +0000)]
Fix more crlf issues.

llvm-svn: 164805

12 years agoFix a regression from r164656.
Eli Friedman [Thu, 27 Sep 2012 22:13:33 +0000 (22:13 +0000)]
Fix a regression from r164656.

llvm-svn: 164804

12 years ago[analyzer] Address Jordan's code review for r164790.
Anna Zaks [Thu, 27 Sep 2012 21:57:17 +0000 (21:57 +0000)]
[analyzer] Address Jordan's code review for r164790.

llvm-svn: 164803

12 years ago[analyzer] IvarInvalidation: track synthesized ivars and allow escape
Anna Zaks [Thu, 27 Sep 2012 21:57:14 +0000 (21:57 +0000)]
[analyzer] IvarInvalidation: track synthesized ivars and allow escape
through property getters.

llvm-svn: 164802

12 years agoPatch from Dan Malea to get the Bourne shells scripts to run cleanly on Ubuntu.
Jason Molenda [Thu, 27 Sep 2012 21:26:57 +0000 (21:26 +0000)]
Patch from Dan Malea to get the Bourne shells scripts to run cleanly on Ubuntu.

llvm-svn: 164801

12 years agoinstcombine: Add more test cases for __strncpy_chk simplification
Meador Inge [Thu, 27 Sep 2012 21:21:31 +0000 (21:21 +0000)]
instcombine: Add more test cases for __strncpy_chk simplification

llvm-svn: 164800

12 years agoinstcombine: Add more test cases for __strcpy_chk simplification
Meador Inge [Thu, 27 Sep 2012 21:21:28 +0000 (21:21 +0000)]
instcombine: Add more test cases for __strcpy_chk simplification

llvm-svn: 164799

12 years agoinstcombine: Add more test cases for __memmove_chk simplification
Meador Inge [Thu, 27 Sep 2012 21:21:25 +0000 (21:21 +0000)]
instcombine: Add more test cases for __memmove_chk simplification

llvm-svn: 164798

12 years agoinstcombine: Add more test cases for __memcpy_chk simplification
Meador Inge [Thu, 27 Sep 2012 21:21:21 +0000 (21:21 +0000)]
instcombine: Add more test cases for __memcpy_chk simplification

llvm-svn: 164797

12 years agoinstcombine: Add more test cases for __memset_chk simplification
Meador Inge [Thu, 27 Sep 2012 21:21:18 +0000 (21:21 +0000)]
instcombine: Add more test cases for __memset_chk simplification

llvm-svn: 164796

12 years agoEnable the new coalescer algorithm by default.
Jakob Stoklund Olesen [Thu, 27 Sep 2012 21:06:02 +0000 (21:06 +0000)]
Enable the new coalescer algorithm by default.

The new coalescer is better at merging values into unused vector lanes,
improving NEON code.

llvm-svn: 164794

12 years agoDon't dereference begin() on an empty vector.
Jakob Stoklund Olesen [Thu, 27 Sep 2012 21:05:59 +0000 (21:05 +0000)]
Don't dereference begin() on an empty vector.

The fix is obvious and the only test case I have is horrible, so I am
not including it. The problem shows up when self-hosting clang on i386
with -new-coalescer enabled.

llvm-svn: 164793

12 years agoFixed some bugs in the runtime reader code. Also
Sean Callanan [Thu, 27 Sep 2012 20:38:15 +0000 (20:38 +0000)]
Fixed some bugs in the runtime reader code.  Also
added a parser for method signatures in the
Objective-C @encode format.

llvm-svn: 164792

12 years agoUnbreak cmake build
Anna Zaks [Thu, 27 Sep 2012 20:32:46 +0000 (20:32 +0000)]
Unbreak cmake build
(fixup for r164790)

llvm-svn: 164791

12 years ago[analyzer] Add an experimental ObjC direct ivar assignment checker.
Anna Zaks [Thu, 27 Sep 2012 19:45:15 +0000 (19:45 +0000)]
[analyzer] Add an experimental ObjC direct ivar assignment checker.

llvm-svn: 164790

12 years agoMake getDefaultSynthIvarName() a member of ObjCPropertyDecl.
Anna Zaks [Thu, 27 Sep 2012 19:45:11 +0000 (19:45 +0000)]
Make getDefaultSynthIvarName() a member of ObjCPropertyDecl.

llvm-svn: 164789

12 years ago[analyzer] Address Jordan's code review comments for r164716.
Anna Zaks [Thu, 27 Sep 2012 19:45:08 +0000 (19:45 +0000)]
[analyzer] Address Jordan's code review comments for r164716.

llvm-svn: 164788

12 years agoMIPS DSP: ABSQ_S.PH instruction sub-class.
Akira Hatanaka [Thu, 27 Sep 2012 19:09:21 +0000 (19:09 +0000)]
MIPS DSP: ABSQ_S.PH instruction sub-class.

llvm-svn: 164787

12 years agoMIPS DSP: SHLL.QB instruction sub-class.
Akira Hatanaka [Thu, 27 Sep 2012 19:05:08 +0000 (19:05 +0000)]
MIPS DSP: SHLL.QB instruction sub-class.

llvm-svn: 164786

12 years agoFix a integer overflow in SimplifyCFG's look up table formation logic.
Benjamin Kramer [Thu, 27 Sep 2012 18:29:58 +0000 (18:29 +0000)]
Fix a integer overflow in SimplifyCFG's look up table formation logic.

If the width is very large it gets truncated from uint64_t to uint32_t when
passed to TD->fitsInLegalInteger. The truncated value can fit in a register.
This manifested in massive memory usage or crashes (PR13946).

llvm-svn: 164784

12 years agoFix CRLF issues.
Micah Villmow [Thu, 27 Sep 2012 17:51:02 +0000 (17:51 +0000)]
Fix CRLF issues.

llvm-svn: 164782

12 years agoPass PrintingPolicy by reference, copying it isn't cheap.
Benjamin Kramer [Thu, 27 Sep 2012 17:37:30 +0000 (17:37 +0000)]
Pass PrintingPolicy by reference, copying it isn't cheap.

llvm-svn: 164781

12 years agoAshok Thirumurthi patch to enable the latest and greatest DWARF forms from the DWARF...
Greg Clayton [Thu, 27 Sep 2012 16:48:25 +0000 (16:48 +0000)]
Ashok Thirumurthi patch to enable the latest and greatest DWARF forms from the DWARF 4 specification.

llvm-svn: 164779

12 years agoAvoid dereferencing a NULL pointer.
Jakob Stoklund Olesen [Thu, 27 Sep 2012 16:34:19 +0000 (16:34 +0000)]
Avoid dereferencing a NULL pointer.

Fixes PR13943.

llvm-svn: 164778

12 years agoFixed a typo.
Filipe Cabecinhas [Thu, 27 Sep 2012 15:31:38 +0000 (15:31 +0000)]
Fixed a typo.

llvm-svn: 164777

12 years agoPatch for HowToBuildOnARM documentation from Wei-Ren Chen.
Micah Villmow [Thu, 27 Sep 2012 15:05:49 +0000 (15:05 +0000)]
Patch for HowToBuildOnARM documentation from Wei-Ren Chen.

llvm-svn: 164776

12 years agoclang/test/CodeGen/ms-inline-asm.c: It requires x86 codegen. Reported by Joey Gouly.
NAKAMURA Takumi [Thu, 27 Sep 2012 14:55:08 +0000 (14:55 +0000)]
clang/test/CodeGen/ms-inline-asm.c: It requires x86 codegen. Reported by Joey Gouly.

llvm-svn: 164775

12 years agoFollowing up on r164620, cope with symlinking from an embedded
Douglas Gregor [Thu, 27 Sep 2012 14:50:15 +0000 (14:50 +0000)]
Following up on r164620, cope with symlinking from an embedded
framework location out to a top-level framework. Such frameworks are
not really embedded at all.

llvm-svn: 164774

12 years agoAdd a missing const qualifier.
Evgeniy Stepanov [Thu, 27 Sep 2012 13:21:08 +0000 (13:21 +0000)]
Add a missing const qualifier.

llvm-svn: 164773

12 years agoQuick fix data/bss detection in TSan.
Evgeniy Stepanov [Thu, 27 Sep 2012 13:20:40 +0000 (13:20 +0000)]
Quick fix data/bss detection in TSan.

The old way breaks when a module's bss is adjacent to the [heap] vm area.
Both ways are not very reliable, though.

llvm-svn: 164772

12 years agoShrink LinkageInfo from 96 bits to 8 bits.
Benjamin Kramer [Thu, 27 Sep 2012 12:52:55 +0000 (12:52 +0000)]
Shrink LinkageInfo from 96 bits to 8 bits.

llvm-svn: 164771

12 years agoRevert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See:...
Sylvestre Ledru [Thu, 27 Sep 2012 10:16:10 +0000 (10:16 +0000)]
Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: en.wikipedia.org/wiki/If_and_only_if Commit 164766

llvm-svn: 164769

12 years agoRevert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See:...
Sylvestre Ledru [Thu, 27 Sep 2012 10:14:43 +0000 (10:14 +0000)]
Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: en.wikipedia.org/wiki/If_and_only_if Commit 164767

llvm-svn: 164768

12 years agoFix a typo 'iff' => 'if'
Sylvestre Ledru [Thu, 27 Sep 2012 09:59:43 +0000 (09:59 +0000)]
Fix a typo 'iff' => 'if'

llvm-svn: 164767

12 years agoFix a typo 'iff' => 'if'
Sylvestre Ledru [Thu, 27 Sep 2012 09:57:10 +0000 (09:57 +0000)]
Fix a typo 'iff' => 'if'

llvm-svn: 164766

12 years ago[TSan] move replacement for new/delete back into tsan_interceptors
Alexey Samsonov [Thu, 27 Sep 2012 09:50:19 +0000 (09:50 +0000)]
[TSan] move replacement for new/delete back into tsan_interceptors

llvm-svn: 164764

12 years agoPrefer shuffles to selects. Backends love shuffles!
Nick Lewycky [Thu, 27 Sep 2012 08:33:56 +0000 (08:33 +0000)]
Prefer shuffles to selects. Backends love shuffles!

llvm-svn: 164763

12 years agoAdd constructors to the attribute builder.
Bill Wendling [Thu, 27 Sep 2012 07:22:30 +0000 (07:22 +0000)]
Add constructors to the attribute builder.

llvm-svn: 164762

12 years agoAdd missing function CreateFPCast to the TargetFolder. It's there in the other
Nick Lewycky [Thu, 27 Sep 2012 06:33:40 +0000 (06:33 +0000)]
Add missing function CreateFPCast to the TargetFolder. It's there in the other
folders and not having it here fails to compile if you actually try to use it.

Also, CreatePointerCast was failing to do the part where it does TD-aware
constant folding. Granted there is exactly one case where that it will ever
do anything, but there's no reason to skip it. For reference, that case is a
subtraction between two constant offsets on the same global variable, eg.,
"&A[123] - &A[4].f".

llvm-svn: 164760

12 years ago[arm-fast-isel] Add support for ELF PIC.
Jush Lu [Thu, 27 Sep 2012 05:21:41 +0000 (05:21 +0000)]
[arm-fast-isel] Add support for ELF PIC.

This is a preliminary step towards ELF support; currently ARMFastISel hasn't
been used for ELF object files yet.

llvm-svn: 164759

12 years agoTest case for r164755 and 164756.
Akira Hatanaka [Thu, 27 Sep 2012 04:12:30 +0000 (04:12 +0000)]
Test case for r164755 and 164756.

llvm-svn: 164757

12 years agoMIPS DSP: rddsp (instruction which reads DSPControl register fields to a GPR).
Akira Hatanaka [Thu, 27 Sep 2012 04:08:42 +0000 (04:08 +0000)]
MIPS DSP: rddsp (instruction which reads DSPControl register fields to a GPR).

llvm-svn: 164756

12 years agoMIPS DSP: CMPU.EQ.QB instruction sub-class.
Akira Hatanaka [Thu, 27 Sep 2012 03:58:34 +0000 (03:58 +0000)]
MIPS DSP: CMPU.EQ.QB instruction sub-class.

llvm-svn: 164755

12 years agoMIPS DSP: ADDU.QB instruction sub-class.
Akira Hatanaka [Thu, 27 Sep 2012 03:13:59 +0000 (03:13 +0000)]
MIPS DSP: ADDU.QB instruction sub-class.

llvm-svn: 164754

12 years agoAdded the ability to download a symboled executable and symbol file given a UUID.
Greg Clayton [Thu, 27 Sep 2012 03:13:55 +0000 (03:13 +0000)]
Added the ability to download a symboled executable and symbol file given a UUID.

llvm-svn: 164753

12 years agoChange the kdp-remote alias to require a hostname (instead of allowing a zero-length...
Jason Molenda [Thu, 27 Sep 2012 02:47:55 +0000 (02:47 +0000)]
Change the kdp-remote alias to require a hostname (instead of allowing a zero-length hostname to be specified).

llvm-svn: 164752