platform/upstream/llvm.git
11 years agoAdd forgotten testcase.
Eric Christopher [Mon, 25 Feb 2013 18:19:32 +0000 (18:19 +0000)]
Add forgotten testcase.

llvm-svn: 176032

11 years ago'Hexadecimal' has two 'a's and only one 'i'.
Matt Beaumont-Gay [Mon, 25 Feb 2013 18:11:18 +0000 (18:11 +0000)]
'Hexadecimal' has two 'a's and only one 'i'.

llvm-svn: 176031

11 years agoFix missing relocation for TLS addressing peephole optimization.
Bill Schmidt [Mon, 25 Feb 2013 16:44:35 +0000 (16:44 +0000)]
Fix missing relocation for TLS addressing peephole optimization.

Report and fix due to Kai Nacke.  Testcase update by me.

llvm-svn: 176029

11 years agoRe-add hack that caused regression.
Daniel Jasper [Mon, 25 Feb 2013 15:59:54 +0000 (15:59 +0000)]
Re-add hack that caused regression.

This fixes llvm.org/PR15350.

Before:
Constructor(int Parameter = 0)
    : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaa),
                aaaaaaaaaaaa(aaaaaaaaaaaaaaaaa) {}

After:
Constructor(int Parameter = 0)
    : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaa),
      aaaaaaaaaaaa(aaaaaaaaaaaaaaaaa) {}

I think the correct solution is to put the VariablePos into
ParenState, not LineState. Added FIXME.

llvm-svn: 176027

11 years agoAlexey Samsonov: #ifdefs out undefined function in static build of libc++ w/o RTTI.
Howard Hinnant [Mon, 25 Feb 2013 15:50:36 +0000 (15:50 +0000)]
Alexey Samsonov: #ifdefs out undefined function in static build of libc++ w/o RTTI.

llvm-svn: 176026

11 years agoAdding hasDeclaration overload for TemplateSpecializationType
Edwin Vane [Mon, 25 Feb 2013 14:49:29 +0000 (14:49 +0000)]
Adding hasDeclaration overload for TemplateSpecializationType

TemplateSpecializationType doesn't quite have getDecl(). Need to go
through TemplateName to get a TemplateDecl.

Added test cases for the hasDeclaration() overload for
TemplateSpecializationType. Also introduced the type matcher
templateSpecializationType() used by the new hasDeclaration() test case.

Updated LibASTMatchersReference.

Reviewers: klimek
llvm-svn: 176025

11 years agoSupport in hasDeclaration for types with getDecl()
Edwin Vane [Mon, 25 Feb 2013 14:32:42 +0000 (14:32 +0000)]
Support in hasDeclaration for types with getDecl()

Re-introducing r175532. The has_getDecl metafunction didn't compile with
Visual Studio. This revision uses approaches has_getDecl from a
different angle that isn't a problem for Visual Studio.

Added dedicated tests for the metafunction.

Reviewers: klimek
llvm-svn: 176024

11 years agoFix spelling noticed by Duncan.
Chandler Carruth [Mon, 25 Feb 2013 14:29:38 +0000 (14:29 +0000)]
Fix spelling noticed by Duncan.

llvm-svn: 176023

11 years agoFix the root cause of PR15348 by correctly handling alignment 0 on
Chandler Carruth [Mon, 25 Feb 2013 14:20:21 +0000 (14:20 +0000)]
Fix the root cause of PR15348 by correctly handling alignment 0 on
memory intrinsics in the SDAG builder.

When alignment is zero, the lang ref says that *no* alignment
assumptions can be made. This is the exact opposite of the internal API
contracts of the DAG where alignment 0 indicates that the alignment can
be made to be anything desired.

There is another, more explicit alignment that is better suited for the
role of "no alignment at all": an alignment of 1. Map the intrinsic
alignment to this early so that we don't end up generating aligned DAGs.

It is really terrifying that we've never seen this before, but we
suddenly started generating a large number of alignment 0 memcpys due to
the new code to do memcpy-based copying of POD class members. That patch
contains a bug that rounds bitfield alignments down when they are the
first field. This can in turn produce zero alignments.

This fixes weird crashes I've seen in library users of LLVM on 32-bit
hosts, etc.

llvm-svn: 176022

11 years agoReverting r176019. Corrupt patch.
Edwin Vane [Mon, 25 Feb 2013 14:09:28 +0000 (14:09 +0000)]
Reverting r176019. Corrupt patch.

llvm-svn: 176021

11 years ago[Sanitizer] one more fix for signed/unsigned mismatch in comparison
Alexey Samsonov [Mon, 25 Feb 2013 14:06:38 +0000 (14:06 +0000)]
[Sanitizer] one more fix for signed/unsigned mismatch in comparison

llvm-svn: 176020

11 years agoSupport in hasDeclaration for types with getDecl()
Edwin Vane [Mon, 25 Feb 2013 13:59:06 +0000 (13:59 +0000)]
Support in hasDeclaration for types with getDecl()

Re-introducing r175532. The has_getDecl metafunction didn't compile with Visual
Studio. This revision approaches has_getDecl from a different angle that isn't
a problem for Visual Studio.

Added dedicated tests for the metafunction.

Reviewers: klimek
llvm-svn: 176019

11 years agoUpdate generated documentation after recent matcher addition.
Daniel Jasper [Mon, 25 Feb 2013 12:39:41 +0000 (12:39 +0000)]
Update generated documentation after recent matcher addition.

llvm-svn: 176018

11 years agoAdd matcher for AccessSpecDecls.
Daniel Jasper [Mon, 25 Feb 2013 12:02:08 +0000 (12:02 +0000)]
Add matcher for AccessSpecDecls.

Also, add matchers isPrivate(), isProtected() and isPublic(), that
restrict the matching of such AccessSpecDecls and all other Decls.

llvm-svn: 176017

11 years ago[Sanitizer] fix signed/unsigned compare warnings in sanitizer_stacktrace_test. Build...
Alexey Samsonov [Mon, 25 Feb 2013 09:00:03 +0000 (09:00 +0000)]
[Sanitizer] fix signed/unsigned compare warnings in sanitizer_stacktrace_test. Build sanitizer_common tests with -Werror as we use predictable just-built Clang for building them

llvm-svn: 176014

11 years ago[TSan] Add interceptor for malloc_usable_size()
Alexey Samsonov [Mon, 25 Feb 2013 08:43:10 +0000 (08:43 +0000)]
[TSan] Add interceptor for malloc_usable_size()

llvm-svn: 176013

11 years ago[TSan] remove temporary build directory in 'make clean' command
Alexey Samsonov [Mon, 25 Feb 2013 08:32:02 +0000 (08:32 +0000)]
[TSan] remove temporary build directory in 'make clean' command

llvm-svn: 176012

11 years ago[analyzer] Relax assumption in FindLastStoreBRVisitor that the thing we are looking...
Ted Kremenek [Mon, 25 Feb 2013 07:37:18 +0000 (07:37 +0000)]
[analyzer] Relax assumption in FindLastStoreBRVisitor that the thing we are looking for is always a VarRegion.

This was triggering assertion failures when analyzing the LLVM codebase.  This
is fallout from r175988.

I've got delta chewing away on a test case, but I wanted the fix to go
in now.

llvm-svn: 176011

11 years ago[analyzer] add the notion of an "interesting" lvalue expression for ExplodedNode...
Ted Kremenek [Mon, 25 Feb 2013 07:37:13 +0000 (07:37 +0000)]
[analyzer] add the notion of an "interesting" lvalue expression for ExplodedNode pruning.

r175988 modified the ExplodedGraph trimming algorithm to retain all
nodes for "lvalue" expressions.  This patch refines that notion to
only "interesting" expressions that would be used for diagnostics.

llvm-svn: 176010

11 years agoAdd more attributes from the command line to functions.
Bill Wendling [Mon, 25 Feb 2013 07:15:16 +0000 (07:15 +0000)]
Add more attributes from the command line to functions.

This is an ongoing process. Any command line option which a back-end cares about
should be added here.

llvm-svn: 176009

11 years ago<rdar://problem/13282582>
Han Ming Ong [Mon, 25 Feb 2013 05:41:42 +0000 (05:41 +0000)]
<rdar://problem/13282582>

Need available CPU on target device to support CPU reporting.

llvm-svn: 176008

11 years agoMake pseudos FEXT_CCRX16_ins and FEXT_CCRXI16_ins into custom emitters.
Reed Kotler [Mon, 25 Feb 2013 02:25:47 +0000 (02:25 +0000)]
Make pseudos FEXT_CCRX16_ins and FEXT_CCRXI16_ins into custom emitters.

llvm-svn: 176007

11 years agoDocumentation: add an idea for a (weird) clang tool
Dmitri Gribenko [Mon, 25 Feb 2013 01:14:45 +0000 (01:14 +0000)]
Documentation: add an idea for a (weird) clang tool

llvm-svn: 176005

11 years agoDIBuilder: support structs with vtable pointers in the same way as classes
David Blaikie [Mon, 25 Feb 2013 01:07:18 +0000 (01:07 +0000)]
DIBuilder: support structs with vtable pointers in the same way as classes

llvm-svn: 176004

11 years agoUpdate Clang for a minor DIBuilder breaking change.
David Blaikie [Mon, 25 Feb 2013 01:07:08 +0000 (01:07 +0000)]
Update Clang for a minor DIBuilder breaking change.

llvm-svn: 176003

11 years ago Make psuedo FEXT_T8I816_ins into a custom emitter.
Reed Kotler [Sun, 24 Feb 2013 23:17:51 +0000 (23:17 +0000)]
 Make psuedo FEXT_T8I816_ins into a custom emitter.

llvm-svn: 176002

11 years agoMoving initialization into the initializer list and correcting capitalization, as...
Aaron Ballman [Sun, 24 Feb 2013 19:08:10 +0000 (19:08 +0000)]
Moving initialization into the initializer list and correcting capitalization, as suggested by Chandler.

llvm-svn: 176001

11 years agoDocumentation: add an idea for an automatic refactoring
Dmitri Gribenko [Sun, 24 Feb 2013 19:04:36 +0000 (19:04 +0000)]
Documentation: add an idea for an automatic refactoring

llvm-svn: 176000

11 years agoAllow breaking between a type and name in variable declarations.
Daniel Jasper [Sun, 24 Feb 2013 18:54:32 +0000 (18:54 +0000)]
Allow breaking between a type and name in variable declarations.

This fixes llvm.org/PR14967 and is generall necessary to avoid
situations where the column limit is exceeded. The challenge is
restricting such lines splits, otherwise clang-format suddenly starts
breaking at bad places.

Before:
ReallyLongReturnType<TemplateParam1, TemplateParam2>
ReallyReallyLongFunctionName(
    const std::string &SomeParameter,
    const SomeType<string,
                   SomeOtherTemplateParameter> &ReallyReallyLongParameterName,
    const SomeType<string,
                   SomeOtherTemplateParameter> &AnotherLongParameterName) {}

After:
ReallyLongReturnType<TemplateParam1, TemplateParam2>
ReallyReallyLongFunctionName(
    const std::string &SomeParameter,
    const SomeType<string, SomeOtherTemplateParameter> &
        ReallyReallyLongParameterName,
    const SomeType<string, SomeOtherTemplateParameter> &
        AnotherLongParameterName) {}

llvm-svn: 175999

11 years agoFix PR14364.
Bill Schmidt [Sun, 24 Feb 2013 17:34:50 +0000 (17:34 +0000)]
Fix PR14364.

This removes a const_cast hack from PPCRegisterInfo::hasReservedSpillSlot().
The proper place to save the frame index for the CR spill slot is in the
PPCFunctionInfo object, not the PPCRegisterInfo object.

No new test cases, as this just reimplements existing function.  Existing
tests such as test/CodeGen/PowerPC/crsave.ll are sufficient.

llvm-svn: 175998

11 years ago[ELF][Hexagon] add _SDA_BASE_(absolute symbol pointing to start of quickdata)
Shankar Easwaran [Sun, 24 Feb 2013 16:02:24 +0000 (16:02 +0000)]
[ELF][Hexagon] add _SDA_BASE_(absolute symbol pointing to start of quickdata)

llvm-svn: 175997

11 years agoAdd the testcase from PR13573, this used to crash.
Benjamin Kramer [Sun, 24 Feb 2013 15:51:32 +0000 (15:51 +0000)]
Add the testcase from PR13573, this used to crash.

The error is a bit strange tbh, but better than crashing.

llvm-svn: 175996

11 years agoCVP: If we have a PHI with an incoming select, try to skip the select.
Benjamin Kramer [Sun, 24 Feb 2013 15:34:43 +0000 (15:34 +0000)]
CVP: If we have a PHI with an incoming select, try to skip the select.

This is a common pattern with dyn_cast and similar constructs, when the
PHI no longer depends on the select it can often be turned into a simpler
construct or even get hoisted out of the loop.

PR15340.

llvm-svn: 175995

11 years agoFix invalid IR in test, missing incoming value for PHI node.
Benjamin Kramer [Sun, 24 Feb 2013 15:34:29 +0000 (15:34 +0000)]
Fix invalid IR in test, missing incoming value for PHI node.

llvm-svn: 175994

11 years ago[ELF] Change functions to virtual, in ExecutableAtoms
Shankar Easwaran [Sun, 24 Feb 2013 15:11:55 +0000 (15:11 +0000)]
[ELF] Change functions to virtual, in ExecutableAtoms

llvm-svn: 175993

11 years ago[ELF]Change name of runtime files, so that targets can change runtime files that...
Shankar Easwaran [Sun, 24 Feb 2013 14:54:02 +0000 (14:54 +0000)]
[ELF]Change name of runtime files, so that targets can change runtime files that they own

llvm-svn: 175992

11 years agoTypo
Francois Pichet [Sun, 24 Feb 2013 12:34:13 +0000 (12:34 +0000)]
Typo

llvm-svn: 175991

11 years ago[analyzer] tracking stores/constraints now works for ObjC ivars or struct fields.
Ted Kremenek [Sun, 24 Feb 2013 07:21:01 +0000 (07:21 +0000)]
[analyzer] tracking stores/constraints now works for ObjC ivars or struct fields.

This required more changes than I originally expected:

- ObjCIvarRegion implements "canPrintPretty" et al
- DereferenceChecker indicates the null pointer source is an ivar
- bugreporter::trackNullOrUndefValue() uses an alternate algorithm
  to compute the location region to track by scouring the ExplodedGraph.
  This allows us to get the actual MemRegion for variables, ivars,
  fields, etc.  We only hand construct a VarRegion for C++ references.
- ExplodedGraph no longer drops nodes for expressions that are marked
  'lvalue'.  This is to facilitate the logic in the previous bullet.
  This may lead to a slight increase in size in the ExplodedGraph,
  which I have not measured, but it is likely not to be a big deal.

I have validated each of the changed plist output.

Fixes <rdar://problem/12114812>

llvm-svn: 175988

11 years agoAdd "KnownSVal" to represent SVals that cannot be UnknownSVal.
Ted Kremenek [Sun, 24 Feb 2013 07:20:53 +0000 (07:20 +0000)]
Add "KnownSVal" to represent SVals that cannot be UnknownSVal.

This provides a few sundry cleanups, and allows us to provide
a compile-time check for a case that was a runtime assertion.

llvm-svn: 175987

11 years agoAdd regression test for serialized diagnostics for notes without locations.
Ted Kremenek [Sun, 24 Feb 2013 07:20:47 +0000 (07:20 +0000)]
Add regression test for serialized diagnostics for notes without locations.

This meant to be included in r175802.

llvm-svn: 175986

11 years agoRevert r169638 because it broke Mesa llvmpipe tests.
Nadav Rotem [Sun, 24 Feb 2013 07:09:35 +0000 (07:09 +0000)]
Revert r169638 because it broke Mesa llvmpipe  tests.

Fix PR15239.

llvm-svn: 175985

11 years agoMake psuedo FEXT_T8I816_ins a custom inserter. It should be expanded
Reed Kotler [Sun, 24 Feb 2013 06:16:39 +0000 (06:16 +0000)]
Make psuedo FEXT_T8I816_ins a custom inserter. It should be expanded
as early as possible; which means during instruction selection.

llvm-svn: 175984

11 years ago[ELF][Hexagon]add typeZeroFillFast
Shankar Easwaran [Sun, 24 Feb 2013 03:09:10 +0000 (03:09 +0000)]
[ELF][Hexagon]add typeZeroFillFast

llvm-svn: 175983

11 years agoPR15338: Don't assert if -fsanitize=bounds sees array indexing on an incomplete
Richard Smith [Sun, 24 Feb 2013 01:56:24 +0000 (01:56 +0000)]
PR15338: Don't assert if -fsanitize=bounds sees array indexing on an incomplete
array type.

llvm-svn: 175982

11 years agoAdd a use of an otherwise unused variable to remove a warning in non-Asserts
Cameron Zwarich [Sun, 24 Feb 2013 01:26:05 +0000 (01:26 +0000)]
Add a use of an otherwise unused variable to remove a warning in non-Asserts
builds.

llvm-svn: 175981

11 years agoTwoAddressInstructionPass::tryInstructionTransform() only potentially returns
Cameron Zwarich [Sun, 24 Feb 2013 00:27:29 +0000 (00:27 +0000)]
TwoAddressInstructionPass::tryInstructionTransform() only potentially returns
true when shouldOnlyCommute is false, so we can remove code that checks
otherwise.

llvm-svn: 175980

11 years agoTwoAddrInstructionPass::tryInstructionTransform() has a case where it calls
Cameron Zwarich [Sun, 24 Feb 2013 00:27:26 +0000 (00:27 +0000)]
TwoAddrInstructionPass::tryInstructionTransform() has a case where it calls
itself recursively with a new instruction that has not been finalized, in order
to determine whether to keep the instruction. On 'make check' and test-suite the
only cases where the recursive invocation made any transformations were simple
instruction commutations, so I am restricting the recursive invocation to do
only this.

The other cases wouldn't work correctly when updating LiveIntervals, since the
new instructions don't have slot indices and LiveIntervals hasn't yet been
updated. If the other transformations were actually triggering in any test case
it would be possible to support it with a lot of effort, but since they don't
it's not worth it.

llvm-svn: 175979

11 years ago[preprocessor] Use MacroDirective in the preprocessor callbacks to make available the
Argyrios Kyrtzidis [Sun, 24 Feb 2013 00:05:14 +0000 (00:05 +0000)]
[preprocessor] Use MacroDirective in the preprocessor callbacks to make available the
full information about the macro (e.g if it was imported and where).

llvm-svn: 175978

11 years agoAdd comments for the MacroDirective & MacroInfo classes.
Argyrios Kyrtzidis [Sun, 24 Feb 2013 00:05:05 +0000 (00:05 +0000)]
Add comments for the MacroDirective & MacroInfo classes.

llvm-svn: 175977

11 years agoIn Sema::InstantiateStaticDataMemberDefinition, pass the var decl to the consumer
Argyrios Kyrtzidis [Sun, 24 Feb 2013 00:05:01 +0000 (00:05 +0000)]
In Sema::InstantiateStaticDataMemberDefinition, pass the var decl to the consumer
just using ASTConsumer::HandleCXXStaticMemberVarInstantiation(), don't pass it with
ASTConsumer::HandleTopLevelDecl.

ASTConsumer::HandleTopLevelDecl is intended for user-written top-level decls;
a consumer can treat an instantiated static data member however it wants of course.

llvm-svn: 175976

11 years agoAdd new base instruction def for cmpi, cmp, slt and sltu so that def/uses
Reed Kotler [Sat, 23 Feb 2013 23:37:03 +0000 (23:37 +0000)]
Add new base instruction def for cmpi, cmp, slt and sltu so that def/uses
proper. Fixed this already a few days ago for slti.

llvm-svn: 175975

11 years agoTargetInstrInfo::commuteInstruction() doesn't actually return a new instruction
Cameron Zwarich [Sat, 23 Feb 2013 23:13:28 +0000 (23:13 +0000)]
TargetInstrInfo::commuteInstruction() doesn't actually return a new instruction
unless it was requested to with an optional parameter that defaults to false, so
we don't need to handle that case in TwoAddressInstructionPass.

llvm-svn: 175974

11 years agoBetter formatting of conditional expressions.
Daniel Jasper [Sat, 23 Feb 2013 21:01:55 +0000 (21:01 +0000)]
Better formatting of conditional expressions.

In conditional expressions, if the condition is split over multiple
lines, also break before both operands.

This prevents formattings like:

  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ==
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? b : c;

Which are bad, because they suggestion incorrect operator precedence:

  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ==
      (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ? b : c);

This lead to the discovery that the expression parser incorrectly
handled conditional operators and that it could also handle semicolons
(which in turn reduced the amount of special casing for for-loops). As a
side-effect, we can now apply the bin-packing configuration to the
sections of for-loops.

llvm-svn: 175973

11 years ago[ELF][Writer] Add hash table.
Michael J. Spencer [Sat, 23 Feb 2013 19:46:18 +0000 (19:46 +0000)]
[ELF][Writer] Add hash table.

llvm-svn: 175972

11 years agoReference the canonical commit (r175462) in the value casting release note.
David Blaikie [Sat, 23 Feb 2013 19:30:31 +0000 (19:30 +0000)]
Reference the canonical commit (r175462) in the value casting release note.

llvm-svn: 175971

11 years agoDocument the value casting API changes.
David Blaikie [Sat, 23 Feb 2013 19:27:10 +0000 (19:27 +0000)]
Document the value casting API changes.

After changing the way several value inheritance hierarchies (TypeLoc,
CFGelement, ProgramPoint and SVal) handle casting, this documentation describes
how 3rd party code may need to be updated to compile with the new APIs.

As suggested by Sean Silva on cfe-dev.

llvm-svn: 175970

11 years agoPrefer 'and' over '&' in comments.
David Blaikie [Sat, 23 Feb 2013 19:20:56 +0000 (19:20 +0000)]
Prefer 'and' over '&' in comments.

Post commit code review feedback from Matt Beaumont-Gay on r174248.

llvm-svn: 175969

11 years agoShrink SmallPtrSet. It gets swapped a lot which copies the whole small part.
Benjamin Kramer [Sat, 23 Feb 2013 16:56:22 +0000 (16:56 +0000)]
Shrink SmallPtrSet. It gets swapped a lot which copies the whole small part.

Testing shows that it's empty in >99% of the cases and I couldn't find a case
where it contained more than 2 elements.

llvm-svn: 175967

11 years agoAdd streamed versions of getQualifiedNameAsString.
Benjamin Kramer [Sat, 23 Feb 2013 13:53:57 +0000 (13:53 +0000)]
Add streamed versions of getQualifiedNameAsString.

Move the cold virtual method getNameForDiagnostic out of line.

llvm-svn: 175966

11 years agoAdd global structure vectorization to docs
Renato Golin [Sat, 23 Feb 2013 13:25:41 +0000 (13:25 +0000)]
Add global structure vectorization to docs

llvm-svn: 175965

11 years agoSome more tests for the global structure vectorizer
Renato Golin [Sat, 23 Feb 2013 12:48:30 +0000 (12:48 +0000)]
Some more tests for the global structure vectorizer

llvm-svn: 175964

11 years agoRemove data member MSAsmStmt::AsmLoc, wrongly hiding AsmStmt::AsmLoc.
Enea Zaffanella [Sat, 23 Feb 2013 12:27:19 +0000 (12:27 +0000)]
Remove data member MSAsmStmt::AsmLoc, wrongly hiding AsmStmt::AsmLoc.

llvm-svn: 175963

11 years agoX86: Disable cmov-memory patterns on subtargets without cmov.
Benjamin Kramer [Sat, 23 Feb 2013 10:40:58 +0000 (10:40 +0000)]
X86: Disable cmov-memory patterns on subtargets without cmov.

Fixes PR15115.

llvm-svn: 175962

11 years agoMake some fixes for LiveInterval repair with debug info. Debug value
Cameron Zwarich [Sat, 23 Feb 2013 10:25:25 +0000 (10:25 +0000)]
Make some fixes for LiveInterval repair with debug info. Debug value
MachineInstrs don't have a slot index.

llvm-svn: 175961

11 years agoDon't recognize unnamed pointer parameters as casts.
Daniel Jasper [Sat, 23 Feb 2013 08:07:18 +0000 (08:07 +0000)]
Don't recognize unnamed pointer parameters as casts.

This fixes llvm.org/PR15061.

Before: virtual void f(int *)const;
After:  virtual void f(int *) const;
llvm-svn: 175960

11 years agoAllow splitting between string literals and identifiers.
Daniel Jasper [Sat, 23 Feb 2013 07:46:38 +0000 (07:46 +0000)]
Allow splitting between string literals and identifiers.

Also don't break in long include directives as that is not desired.

We can now format:

  #include "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  #define LL_FORMAT "ll"
  printf("aaaaa: %d, bbbbbbbbb: %" LL_FORMAT "d, cccccccc: %" LL_FORMAT
         "d, ddddddddd: %" LL_FORMAT "d\n");

Before, this led to weird results.

llvm-svn: 175959

11 years agoFix a bug with the LiveIntervals updating in the two-address pass found by
Cameron Zwarich [Sat, 23 Feb 2013 04:49:22 +0000 (04:49 +0000)]
Fix a bug with the LiveIntervals updating in the two-address pass found by
running ASCI_Purple/SMG2000 in the test-suite.

llvm-svn: 175957

11 years agoMake TwoAddressInstructionPass::sink3AddrInstruction() LiveIntervals-aware.
Cameron Zwarich [Sat, 23 Feb 2013 04:49:20 +0000 (04:49 +0000)]
Make TwoAddressInstructionPass::sink3AddrInstruction() LiveIntervals-aware.

llvm-svn: 175956

11 years agoMake rescheduleMIBelowKill() and rescheduleKillAboveMI() LiveIntervals-aware in
Cameron Zwarich [Sat, 23 Feb 2013 04:49:13 +0000 (04:49 +0000)]
Make rescheduleMIBelowKill() and rescheduleKillAboveMI() LiveIntervals-aware in
TwoAddressInstructionPass. The code in rescheduleMIBelowKill() is a bit tricky,
since multiple instructions need to be moved down, one-at-a-time, in reverse
order.

llvm-svn: 175955

11 years agoImplement __builtin_eh_return_data_regno() for ARM and MIPS.
Logan Chien [Sat, 23 Feb 2013 04:24:36 +0000 (04:24 +0000)]
Implement __builtin_eh_return_data_regno() for ARM and MIPS.

llvm-svn: 175954

11 years ago<rdar://problem/13265297>
Greg Clayton [Sat, 23 Feb 2013 04:12:47 +0000 (04:12 +0000)]
<rdar://problem/13265297>

StackFrame assumes m_sc is additive, but m_sc can lose its target. So now the SymbolContext::Clear() method takes a bool that indicates if the target should be cleared. Modified all existing code to properly set the bool argument.

llvm-svn: 175953

11 years agoclang/AST/Decl.h: Add "raw_ostream.h" to appease msvc.
NAKAMURA Takumi [Sat, 23 Feb 2013 03:59:16 +0000 (03:59 +0000)]
clang/AST/Decl.h: Add "raw_ostream.h" to appease msvc.

llvm-svn: 175952

11 years ago[ELF][Writer] Add a PHDR program table entry for dynamic files.
Michael J. Spencer [Sat, 23 Feb 2013 03:58:06 +0000 (03:58 +0000)]
[ELF][Writer] Add a PHDR program table entry for dynamic files.

llvm-svn: 175951

11 years agoExpand pseudos/macros for Selt. This is the last of the complex
Reed Kotler [Sat, 23 Feb 2013 03:09:56 +0000 (03:09 +0000)]
Expand pseudos/macros for Selt. This is the last of the complex
macros.The rest is some small misc. stuff.

llvm-svn: 175950

11 years agoubsan: Emit bounds checks for array indexing, vector indexing, and (in really simple...
Richard Smith [Sat, 23 Feb 2013 02:53:19 +0000 (02:53 +0000)]
ubsan: Emit bounds checks for array indexing, vector indexing, and (in really simple cases) pointer arithmetic. This augments the existing bounds checking with language-level array bounds information.

llvm-svn: 175949

11 years agoubsan: Runtime handlers for array indexing checks.
Richard Smith [Sat, 23 Feb 2013 02:40:07 +0000 (02:40 +0000)]
ubsan: Runtime handlers for array indexing checks.

llvm-svn: 175948

11 years agoFix a handful of remaining assumptions that thread IDs were 32-bits
Jason Molenda [Sat, 23 Feb 2013 02:04:45 +0000 (02:04 +0000)]
Fix a handful of remaining assumptions that thread IDs were 32-bits
in the gdb-remote Process plugin files.

llvm-svn: 175947

11 years agoThis should get clang/gcc decorators working
Enrico Granata [Sat, 23 Feb 2013 01:35:21 +0000 (01:35 +0000)]
This should get clang/gcc decorators working

llvm-svn: 175946

11 years agoFixing issues in previous checkin - still figuring out how to make expectedFailureCla...
Enrico Granata [Sat, 23 Feb 2013 01:28:30 +0000 (01:28 +0000)]
Fixing issues in previous checkin - still figuring out how to make expectedFailureClang take the bugnumber

llvm-svn: 175945

11 years agoRemove no-op code (since r175842)
Dmitri Gribenko [Sat, 23 Feb 2013 01:20:07 +0000 (01:20 +0000)]
Remove no-op code (since r175842)

llvm-svn: 175944

11 years agoTest that attribute(availability) doesn't override private_extern.
John McCall [Sat, 23 Feb 2013 01:15:17 +0000 (01:15 +0000)]
Test that attribute(availability) doesn't override private_extern.

rdar://12399248

llvm-svn: 175943

11 years ago<rdar://problem/12362092>
Enrico Granata [Sat, 23 Feb 2013 01:05:23 +0000 (01:05 +0000)]
<rdar://problem/12362092>

The decorators @expectedFailure (plain and special-case like i386, clang, ...) are modified to optionally take a bugnumber argument
If such an argument is specified, the failure report (or unexpected success report) will include the information passed in as part of the message
This is mostly useful for associating failures to issue IDs in issue management systems (e.g. the LLVM bugzilla)

llvm-svn: 175942

11 years ago[ELF][Writer] Add dynamic string and symbol table.
Michael J. Spencer [Sat, 23 Feb 2013 01:02:31 +0000 (01:02 +0000)]
[ELF][Writer] Add dynamic string and symbol table.

llvm-svn: 175941

11 years agoARM: Convenience aliases for 'srs*' instructions.
Jim Grosbach [Sat, 23 Feb 2013 00:52:09 +0000 (00:52 +0000)]
ARM: Convenience aliases for 'srs*' instructions.

Handle an implied 'sp' operand.

rdar://11466783

llvm-svn: 175940

11 years agoFixed a careless mistake.
Michael Gottesman [Sat, 23 Feb 2013 00:31:32 +0000 (00:31 +0000)]
Fixed a careless mistake.

rdar://13273675.

llvm-svn: 175939

11 years agoRemove the CFGElement "Invalid" state.
David Blaikie [Sat, 23 Feb 2013 00:29:34 +0000 (00:29 +0000)]
Remove the CFGElement "Invalid" state.

Use Optional<CFG*> where invalid states were needed previously. In the one case
where that's not possible (beginAutomaticObjDtorsInsert) just use a dummy
CFGAutomaticObjDtor.

Thanks for the help from Jordan Rose & discussion/feedback from Ted Kremenek
and Doug Gregor.

Post commit code review feedback on r175796 by Ted Kremenek.

llvm-svn: 175938

11 years agoRemove the hack that avoided mangling static functions in extern C contexts.
Rafael Espindola [Sat, 23 Feb 2013 00:26:28 +0000 (00:26 +0000)]
Remove the hack that avoided mangling static functions in extern C contexts.

Weather we should give C language linkage to functions and variables with
internal linkage probably depends on how much code assumes it. The standard
says they should have no language linkage, but gcc and msvc assign them
C language linkage.

This commit removes the hack that was preventing the mangling on static
functions declare in extern C contexts. It is an experiment to see if we
can implement the rules in the standard.

If it turns out that many users depend on these functions and variables
having C language linkage, we should change isExternC instead and try
to convince the CWG to change the standard.

llvm-svn: 175937

11 years agoRevert r175912, "Add support for coldcc to clang" at John's request.
Peter Collingbourne [Sat, 23 Feb 2013 00:06:18 +0000 (00:06 +0000)]
Revert r175912, "Add support for coldcc to clang" at John's request.

llvm-svn: 175936

11 years agoPropagate the split dwarf file information through into the backend
Eric Christopher [Fri, 22 Feb 2013 23:50:16 +0000 (23:50 +0000)]
Propagate the split dwarf file information through into the backend
and through to the debug info in the module. In order to make the
testcase a bit more efficient allow the filename to go through
compilation for compile and not assemble jobs and turn off the
extract for cases where we don't create an object.

llvm-svn: 175935

11 years agoUse getSplitDebugFilename when constructing the skeleton cu and
Eric Christopher [Fri, 22 Feb 2013 23:50:08 +0000 (23:50 +0000)]
Use getSplitDebugFilename when constructing the skeleton cu and
update testcase accordingly to give the correct name to the cu.

llvm-svn: 175934

11 years agoAdd a field to the compile unit of where we plan on splitting out
Eric Christopher [Fri, 22 Feb 2013 23:50:04 +0000 (23:50 +0000)]
Add a field to the compile unit of where we plan on splitting out
the debug info for -gsplit-dwarf so we can encode that location
in the skeleton cu.

llvm-svn: 175933

11 years agoAdd a TODO and explain when we can get rid of the isMain field.
Eric Christopher [Fri, 22 Feb 2013 23:50:01 +0000 (23:50 +0000)]
Add a TODO and explain when we can get rid of the isMain field.

llvm-svn: 175932

11 years agoFormatting.
Eric Christopher [Fri, 22 Feb 2013 23:49:58 +0000 (23:49 +0000)]
Formatting.

llvm-svn: 175931

11 years ago[docs] Rename Makefile.
Daniel Dunbar [Fri, 22 Feb 2013 23:44:49 +0000 (23:44 +0000)]
[docs] Rename Makefile.

llvm-svn: 175930

11 years agoSelectionDAG compile time improvement.
Nadav Rotem [Fri, 22 Feb 2013 23:33:30 +0000 (23:33 +0000)]
SelectionDAG compile time improvement.

One of the phases of SelectionDAG is LegalizeVectors. We don't need to sort the DAG and copy nodes around if there are no vector ops.

Speeds up the compilation time of SelectionDAG on a big scalar workload by ~8%.

llvm-svn: 175929

11 years ago<rdar://problem/13277100>
Han Ming Ong [Fri, 22 Feb 2013 23:26:59 +0000 (23:26 +0000)]
<rdar://problem/13277100>

Need host_statistics on profile data to get host's user/system/idle clicks

llvm-svn: 175928

11 years agoCorrect the logic in DumpCommandHistory when the end index is UINT32_MAX.
Jim Ingham [Fri, 22 Feb 2013 23:23:42 +0000 (23:23 +0000)]
Correct the logic in DumpCommandHistory when the end index is UINT32_MAX.

<rdar://problem/13270229>

llvm-svn: 175927

11 years agoCall el_resize when the window size changes.
Jim Ingham [Fri, 22 Feb 2013 22:56:55 +0000 (22:56 +0000)]
Call el_resize when the window size changes.

<rdar://problem/13270100>

llvm-svn: 175926

11 years ago[libclang] Fix assertion hit when code-completing inside a function macro with more
Argyrios Kyrtzidis [Fri, 22 Feb 2013 22:28:58 +0000 (22:28 +0000)]
[libclang] Fix assertion hit when code-completing inside a function macro with more
arguments than it should accept.

llvm-svn: 175925

11 years ago<rdar://problem/13190981>
Greg Clayton [Fri, 22 Feb 2013 22:23:55 +0000 (22:23 +0000)]
<rdar://problem/13190981>

Fixed an issue where if we got a 'A' async packet back from debugserver, we would resend the last continue command. We now correctly identify the packet as async (just like the 'O' stdout async packet) and we don't resend the continue command.

llvm-svn: 175924