platform/upstream/llvm.git
11 years agoRevert "Properly consider the range of enum for range comparisons in C mode"
David Majnemer [Fri, 7 Jun 2013 22:07:20 +0000 (22:07 +0000)]
Revert "Properly consider the range of enum for range comparisons in C mode"

The approach r183084 took was wrong, back it out.

llvm-svn: 183575

11 years agoExplicit triple in warn stack size test cases to not depend on OS.
Quentin Colombet [Fri, 7 Jun 2013 21:09:42 +0000 (21:09 +0000)]
Explicit triple in warn stack size test cases to not depend on OS.

llvm-svn: 183574

11 years agoFix handling of files without a symbol table.
Rafael Espindola [Fri, 7 Jun 2013 21:08:19 +0000 (21:08 +0000)]
Fix handling of files without a symbol table.

This fixes a recent regression (r183338). Stripped elf files (like installed
crtn.o for example), are not required to have a symbol table. Handle that
correctly.

llvm-svn: 183573

11 years agoDon't cache the instruction and register info from the TargetMachine, because
Bill Wendling [Fri, 7 Jun 2013 21:04:35 +0000 (21:04 +0000)]
Don't cache the instruction and register info from the TargetMachine, because
the internals of TargetMachine could change.

No functionality change intended.

llvm-svn: 183572

11 years agoDon't cache the instruction and register info from the TargetMachine, because
Bill Wendling [Fri, 7 Jun 2013 21:00:34 +0000 (21:00 +0000)]
Don't cache the instruction and register info from the TargetMachine, because
the internals of TargetMachine could change.

No functionality change intended.

llvm-svn: 183571

11 years agoRemove unused c'tor.
Bill Wendling [Fri, 7 Jun 2013 20:59:31 +0000 (20:59 +0000)]
Remove unused c'tor.

llvm-svn: 183570

11 years agoRevert r183281, adds a comment about how to reproduce the hang.
Ashok Thirumurthi [Fri, 7 Jun 2013 20:58:47 +0000 (20:58 +0000)]
Revert r183281, adds a comment about how to reproduce the hang.

llvm-svn: 183569

11 years agoR600: Fix calculation of stack offset in AMDGPUFrameLowering
Tom Stellard [Fri, 7 Jun 2013 20:52:05 +0000 (20:52 +0000)]
R600: Fix calculation of stack offset in AMDGPUFrameLowering

We weren't computing structure size correctly and we were relying on
the original alloca instruction to compute the offset, which isn't
always reliable.

Reviewed-by: Vincent Lejeune <vljn@ovi.com>
llvm-svn: 183568

11 years agoDon't cache the instruction and register info from the TargetMachine, because
Bill Wendling [Fri, 7 Jun 2013 20:42:15 +0000 (20:42 +0000)]
Don't cache the instruction and register info from the TargetMachine, because
the internals of TargetMachine could change.

No functionality change intended.

llvm-svn: 183567

11 years agoR600: Rework subtarget info and remove AMDILDevice classes
Tom Stellard [Fri, 7 Jun 2013 20:37:48 +0000 (20:37 +0000)]
R600: Rework subtarget info and remove AMDILDevice classes

This should simplify the subtarget definitions and make it easier to
add new ones.

Reviewed-by: Vincent Lejeune <vljn@ovi.com>
llvm-svn: 183566

11 years agoDon't cache the instruction and register info from the TargetMachine, because
Bill Wendling [Fri, 7 Jun 2013 20:35:25 +0000 (20:35 +0000)]
Don't cache the instruction and register info from the TargetMachine, because
the internals of TargetMachine could change.

No functionality change intended.

llvm-svn: 183565

11 years agoAdd missing file from r183563 (the recommit of 183466).
Eli Friedman [Fri, 7 Jun 2013 20:33:10 +0000 (20:33 +0000)]
Add missing file from r183563 (the recommit of 183466).

llvm-svn: 183564

11 years agoRe-commit r183466 with a fix to make the TypeLoc casting machinery work
Eli Friedman [Fri, 7 Jun 2013 20:31:48 +0000 (20:31 +0000)]
Re-commit r183466 with a fix to make the TypeLoc casting machinery work
correctly in the presence of qualified types.

(I had to change the unittest because it was trying to cast a
QualifiedTypeLoc to TemplateSpecializationTypeLoc.)

llvm-svn: 183563

11 years ago[docs] Add link to Microsoft PE/COFF Spec.
Rui Ueyama [Fri, 7 Jun 2013 20:30:27 +0000 (20:30 +0000)]
[docs] Add link to Microsoft PE/COFF Spec.

llvm-svn: 183562

11 years agoDon't cache the instruction and register info from the TargetMachine, because
Bill Wendling [Fri, 7 Jun 2013 20:28:55 +0000 (20:28 +0000)]
Don't cache the instruction and register info from the TargetMachine, because
the internals of TargetMachine could change.

No functionality change intended.

llvm-svn: 183561

11 years agoR600: Fix the fetch limits for R600 generation GPUs
Tom Stellard [Fri, 7 Jun 2013 20:28:55 +0000 (20:28 +0000)]
R600: Fix the fetch limits for R600 generation GPUs

Reviewed-by: Vincent Lejeune <vljn@ovi.com>
https://bugs.freedesktop.org/show_bug.cgi?id=64257

llvm-svn: 183560

11 years agoR600: Move Subtarget feature definitions into AMDGPU.td
Tom Stellard [Fri, 7 Jun 2013 20:28:49 +0000 (20:28 +0000)]
R600: Move Subtarget feature definitions into AMDGPU.td

This is the convention used by the other targets.

Reviewed-by: Vincent Lejeune <vljn@ovi.com>
llvm-svn: 183559

11 years agoR600: Remove unnecessary include
Tom Stellard [Fri, 7 Jun 2013 20:28:43 +0000 (20:28 +0000)]
R600: Remove unnecessary include

Reviewed-by: Vincent Lejeune <vljn@ovi.com>
llvm-svn: 183558

11 years agoReverting r183529:
Bill Wendling [Fri, 7 Jun 2013 20:28:29 +0000 (20:28 +0000)]
Reverting r183529:

This is causing the following error on Darwin:

/Volumes/Sandbox/llvm-clean.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:282:1: error: 'assertion_failed__282' declared as an array with a negative size
CHECK_TYPE_SIZE(ifconf);
^~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Sandbox/llvm-clean.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:223:3: note: expanded from macro 'CHECK_TYPE_SIZE'
  COMPILER_CHECK(sizeof(__sanitizer_##TYPE) == sizeof(TYPE))
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Sandbox/llvm-clean.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:239:30: note: expanded from macro 'COMPILER_CHECK'
#define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Sandbox/llvm-clean.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:245:57: note: expanded from macro 'IMPL_COMPILER_ASSERT'
    typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
                                                        ^~~~~~~~~~~~~~~
/Volumes/Sandbox/llvm-clean.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:284:1: error: 'assertion_failed__284' declared as an array with a negative size
CHECK_SIZE_AND_OFFSET(ifconf, ifc_ifcu);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Sandbox/llvm-clean.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:228:3: note: expanded from macro 'CHECK_SIZE_AND_OFFSET'
  COMPILER_CHECK(offsetof(__sanitizer_##CLASS, MEMBER) ==          \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Sandbox/llvm-clean.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:239:30: note: expanded from macro 'COMPILER_CHECK'
#define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Volumes/Sandbox/llvm-clean.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h:245:57: note: expanded from macro 'IMPL_COMPILER_ASSERT'
    typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
                                                        ^~~~~~~~~~~~~~~

llvm-svn: 183557

11 years agoObjective-C: Another case of issuing warning about misusing
Fariborz Jahanian [Fri, 7 Jun 2013 20:26:51 +0000 (20:26 +0000)]
Objective-C: Another case of issuing warning about misusing
property auto-synthesis before knowingit it is to be
auto-synthesized. // rdar://14094682

llvm-svn: 183556

11 years agoAdd more explicit link targets to headers in LangRef.rst
Eli Bendersky [Fri, 7 Jun 2013 20:24:43 +0000 (20:24 +0000)]
Add more explicit link targets to headers in LangRef.rst

llvm-svn: 183555

11 years ago[LayoutPass] Add a method to check the followon graph structure.
Rui Ueyama [Fri, 7 Jun 2013 20:18:39 +0000 (20:18 +0000)]
[LayoutPass] Add a method to check the followon graph structure.

Found that having a method to check the strucutre of the followon graph makes
it easy to debug file readers. The method checks if there's no wrong edge in
followOnNexts and followOnRoots. It is called only when debuggging is enabled
for LayoutPass.

Reviewers: shankarke

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

llvm-svn: 183553

11 years agoAdd a backend option to warn on a given stack size limit.
Quentin Colombet [Fri, 7 Jun 2013 20:18:12 +0000 (20:18 +0000)]
Add a backend option to warn on a given stack size limit.
Option: -mllvm -warn-stack-size=<limit>
Output (if limit is exceeded):
warning: Stack size limit exceeded (<actual size>) in <functionName>.

The longer term plan is to hook that to a clang warning.
PR:4072
<rdar://problem/13987214>

llvm-svn: 183552

11 years agoARM FastISel integer sext/zext improvements
JF Bastien [Fri, 7 Jun 2013 20:10:37 +0000 (20:10 +0000)]
ARM FastISel integer sext/zext improvements

My recent ARM FastISel patch exposed this bug:
  http://llvm.org/bugs/show_bug.cgi?id=16178
The root cause is that it can't select integer sext/zext pre-ARMv6 and
asserts out.

The current integer sext/zext code doesn't handle other cases gracefully
either, so this patch makes it handle all sext and zext from i1/i8/i16
to i8/i16/i32, with and without ARMv6, both in Thumb and ARM mode. This
should fix the bug as well as make FastISel faster because it bails to
SelectionDAG less often. See fastisel-ext.patch for this.

fastisel-ext-tests.patch changes current tests to always use reg-imm AND
for 8-bit zext instead of UXTB. This simplifies code since it is
supported on ARMv4t and later, and at least on A15 both should perform
exactly the same (both have exec 1 uop 1, type I).

2013-05-31-char-shift-crash.ll is a bitcode version of the above bug
16178 repro.

fast-isel-ext.ll tests all sext/zext combinations that ARM FastISel
should now handle.

Note that my ARM FastISel enabling patch was reverted due to a separate
failure when dealing with MCJIT, I'll fix this second failure and then
turn FastISel on again for non-iOS ARM targets.

I've tested "make check-all" on my x86 box, and "lnt test-suite" on A15
hardware.

llvm-svn: 183551

11 years agoPR16273: Weaken a bogus assertion.
Richard Smith [Fri, 7 Jun 2013 20:03:01 +0000 (20:03 +0000)]
PR16273: Weaken a bogus assertion.

llvm-svn: 183550

11 years agoR600: Don't compare iterators of different maps.
Benjamin Kramer [Fri, 7 Jun 2013 19:59:34 +0000 (19:59 +0000)]
R600: Don't compare iterators of different maps.

Found be libstdc's debug mode.

llvm-svn: 183549

11 years agoAdd explicit link targets to some headers in LangRef.rst
Eli Bendersky [Fri, 7 Jun 2013 19:40:08 +0000 (19:40 +0000)]
Add explicit link targets to some headers in LangRef.rst

llvm-svn: 183548

11 years agoUpdated the LLDB status page to reflect the recent addition of multi-threaded support.
Ashok Thirumurthi [Fri, 7 Jun 2013 19:21:45 +0000 (19:21 +0000)]
Updated the LLDB status page to reflect the recent addition of multi-threaded support.

Reworked the download information on lldb.llvm.org:
- svn copy of download.html to source.html with information on source-code access
- new download.html with links to download nightly builds and Debian releases
- updated the sidebar to reflect these changes

llvm-svn: 183547

11 years agoNo functionality change.
Manman Ren [Fri, 7 Jun 2013 18:53:29 +0000 (18:53 +0000)]
No functionality change.

Constify a few member functions.

llvm-svn: 183546

11 years agoDefine id to the correct type.
Rafael Espindola [Fri, 7 Jun 2013 18:41:01 +0000 (18:41 +0000)]
Define id to the correct type.

Found this while working on pr16247. The fix for that bug will cause clang to
reject this.

llvm-svn: 183545

11 years agoTeach AsmPrinter how to print odd constants.
Quentin Colombet [Fri, 7 Jun 2013 18:36:03 +0000 (18:36 +0000)]
Teach AsmPrinter how to print odd constants.

Fix an assertion when the compiler encounters big constants whose bit width is
not a multiple of 64-bits.
Although clang would never generate something like this, the backend should be
able to handle any legal IR.

<rdar://problem/13363576>

llvm-svn: 183544

11 years agoDIBuilder: No functionality change.
Manman Ren [Fri, 7 Jun 2013 18:35:53 +0000 (18:35 +0000)]
DIBuilder: No functionality change.

Use the correct DIType when creating types in DIBuilder.

llvm-svn: 183543

11 years agoObjective-C: Removes a bogus warning about auto-synthesis
Fariborz Jahanian [Fri, 7 Jun 2013 18:32:55 +0000 (18:32 +0000)]
Objective-C: Removes a bogus warning about auto-synthesis
of properties. Fixes // rdar://14085456

llvm-svn: 183542

11 years agoVincent says the element is at most once in the vector, so we don't need a full std...
Benjamin Kramer [Fri, 7 Jun 2013 18:18:12 +0000 (18:18 +0000)]
Vincent says the element is at most once in the vector, so we don't need a full std::remove.

llvm-svn: 183541

11 years agoUse isxdigit.
Rafael Espindola [Fri, 7 Jun 2013 18:05:03 +0000 (18:05 +0000)]
Use isxdigit.

Thanks to Benjamin Kramer for the suggestion.

llvm-svn: 183540

11 years agoMake operator== non-member for greater symmetry.
Rafael Espindola [Fri, 7 Jun 2013 18:00:04 +0000 (18:00 +0000)]
Make operator== non-member for greater symmetry.

Thanks to David Blaikie for the suggestion.

llvm-svn: 183539

11 years agoThread the 'Invalid' out parameter through SourceManager::getSLocEntry() and callees...
Argyrios Kyrtzidis [Fri, 7 Jun 2013 17:57:59 +0000 (17:57 +0000)]
Thread the 'Invalid' out parameter through SourceManager::getSLocEntry() and callees of SourceManager::getSLocEntryByID().

Also add an 'Invalid' check in SourceManager::computeMacroArgsCache().

llvm-svn: 183538

11 years agoFix a typo in asm string of BP* family of instructions. With this fix
Roman Divacky [Fri, 7 Jun 2013 17:46:57 +0000 (17:46 +0000)]
Fix a typo in asm string of BP* family of instructions. With this fix
I am able to compile/assemble/link/run /bin/echo from FreeBSD.

llvm-svn: 183537

11 years agoImproved handling of escaped newlines at the token start.
Alexander Kornienko [Fri, 7 Jun 2013 17:45:07 +0000 (17:45 +0000)]
Improved handling of escaped newlines at the token start.

Summary: Remove them from the TokenText as well.

Reviewers: klimek

Reviewed By: klimek

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

llvm-svn: 183536

11 years agoHandle Unicode characters in fix-it replacement strings.
Jordan Rose [Fri, 7 Jun 2013 17:16:01 +0000 (17:16 +0000)]
Handle Unicode characters in fix-it replacement strings.

Patch by Sukolsak Sakshuwong!

llvm-svn: 183535

11 years ago[Object/COFF] BaseOfData field should be absent in PE32+.
Rui Ueyama [Fri, 7 Jun 2013 16:58:30 +0000 (16:58 +0000)]
[Object/COFF] BaseOfData field should be absent in PE32+.

llvm-svn: 183534

11 years agoSupport OpenBSD's native frame protection conventions.
Rafael Espindola [Fri, 7 Jun 2013 16:35:57 +0000 (16:35 +0000)]
Support OpenBSD's native frame protection conventions.

OpenBSD's stack smashing protection differs slightly from other
platforms:

  1. The smash handler function is "__stack_smash_handler(const char
     *funcname)" instead of "__stack_chk_fail(void)".

  2. There's a hidden "long __guard_local" object that gets linked
     into each executable and DSO.

Patch by Matthew Dempsky.

llvm-svn: 183533

11 years agoR600: Fix a potential iterator invalidation issue.
Benjamin Kramer [Fri, 7 Jun 2013 16:13:49 +0000 (16:13 +0000)]
R600: Fix a potential iterator invalidation issue.

As a bonus this reduces the loop from O(n^2) to O(n).

llvm-svn: 183532

11 years agofix up recogtion of block pointer type in my last patch.
Fariborz Jahanian [Fri, 7 Jun 2013 16:07:38 +0000 (16:07 +0000)]
fix up recogtion of block pointer type in my last patch.
// rdar://14085217.
e-This line, and those below, will be ignored--

M    lib/Sema/SemaExpr.cpp

llvm-svn: 183531

11 years agoFixed calculation of penalty when breaking tokens.
Alexander Kornienko [Fri, 7 Jun 2013 16:02:52 +0000 (16:02 +0000)]
Fixed calculation of penalty when breaking tokens.

Summary:
Introduced two new style parameters: PenaltyBreakComment and
PenaltyBreakString. Add penalty for each character of a breakable token beyond
the column limit (this relates mainly to comments, as they are broken only on
whitespace). Tuned PenaltyBreakComment to prefer comment breaking over breaking
inside most binary expressions.
Fixed a bug that prevented *, & and && from being considered TT_BinaryOperator
in the presense of adjacent comments.

Reviewers: klimek, djasper

Reviewed By: klimek

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

llvm-svn: 183530

11 years ago[sanitizer] Handle SIOCGIFCONF ioctl.
Evgeniy Stepanov [Fri, 7 Jun 2013 15:49:38 +0000 (15:49 +0000)]
[sanitizer] Handle SIOCGIFCONF ioctl.

llvm-svn: 183529

11 years agoR600: Remove an extra break in R600OptimizeVectorRegisters.cpp
Vincent Lejeune [Fri, 7 Jun 2013 15:44:53 +0000 (15:44 +0000)]
R600: Remove an extra break in R600OptimizeVectorRegisters.cpp

llvm-svn: 183528

11 years ago[ASan] fix test case to use absolute paths
Alexey Samsonov [Fri, 7 Jun 2013 15:44:21 +0000 (15:44 +0000)]
[ASan] fix test case to use absolute paths

llvm-svn: 183527

11 years ago[llvm-symbolizer] rewrite r183213 in a more clear way
Alexey Samsonov [Fri, 7 Jun 2013 15:25:27 +0000 (15:25 +0000)]
[llvm-symbolizer] rewrite r183213 in a more clear way

llvm-svn: 183526

11 years agoBitVector: Do the right thing in all() when Size is a multiple of BITWORD_SIZE.
Benjamin Kramer [Fri, 7 Jun 2013 15:14:31 +0000 (15:14 +0000)]
BitVector: Do the right thing in all() when Size is a multiple of BITWORD_SIZE.

llvm-svn: 183525

11 years ago[ASan] An early return from InitializeAsanInterceptors() on Mac has been considered...
Alexander Potapenko [Fri, 7 Jun 2013 15:10:02 +0000 (15:10 +0000)]
[ASan] An early return from InitializeAsanInterceptors() on Mac has been considered unobvious.
Remove it and replace ASAN_INTERCEPT_FUNC with a no-op if SANITIZER_MAC==1.

llvm-svn: 183524

11 years ago[sanitizer] Fix Android build.
Evgeniy Stepanov [Fri, 7 Jun 2013 14:56:54 +0000 (14:56 +0000)]
[sanitizer] Fix Android build.

llvm-svn: 183523

11 years agoTest case for r183481.
Howard Hinnant [Fri, 7 Jun 2013 14:24:18 +0000 (14:24 +0000)]
Test case for r183481.

llvm-svn: 183522

11 years agoOptimize BitVector::all().
Benjamin Kramer [Fri, 7 Jun 2013 14:14:38 +0000 (14:14 +0000)]
Optimize BitVector::all().

llvm-svn: 183521

11 years ago[sanitizer] Fix windows build.
Evgeniy Stepanov [Fri, 7 Jun 2013 13:19:33 +0000 (13:19 +0000)]
[sanitizer] Fix windows build.

llvm-svn: 183518

11 years ago[sanitizer] ioctl interceptor.
Evgeniy Stepanov [Fri, 7 Jun 2013 13:00:47 +0000 (13:00 +0000)]
[sanitizer] ioctl interceptor.

ASan: disabled by default
MSan: enabled by default
TSan: disabled
llvm-svn: 183517

11 years agoAdds a test that verifies angle bracket locations.
Manuel Klimek [Fri, 7 Jun 2013 11:27:57 +0000 (11:27 +0000)]
Adds a test that verifies angle bracket locations.

Regression test to make sure TemplateSpecializationTypeLocs have the
correct locations for angle brackets.

llvm-svn: 183514

11 years agoReverts r183466: "Perform dynamic alignment computations..."
Manuel Klimek [Fri, 7 Jun 2013 11:27:53 +0000 (11:27 +0000)]
Reverts r183466: "Perform dynamic alignment computations..."

This introduces bugs in TemplateSpecializationTypeLoc's angle bracket
locations.

Regression test follows in a subsequent commit.

llvm-svn: 183513

11 years agoFold variable that's only used in assert into the assert.
Benjamin Kramer [Fri, 7 Jun 2013 11:23:35 +0000 (11:23 +0000)]
Fold variable that's only used in assert into the assert.

Avoids unused variable warnings in Release builds.

llvm-svn: 183512

11 years agoAdd a script to help us create source tar balls for the release.
Bill Wendling [Fri, 7 Jun 2013 11:15:30 +0000 (11:15 +0000)]
Add a script to help us create source tar balls for the release.

llvm-svn: 183509

11 years agoUse proper exit code.
Bill Wendling [Fri, 7 Jun 2013 11:14:37 +0000 (11:14 +0000)]
Use proper exit code.

llvm-svn: 183508

11 years agoDrop support for 32-bit PowerPC in sanitizer tools.
Alexey Samsonov [Fri, 7 Jun 2013 09:44:43 +0000 (09:44 +0000)]
Drop support for 32-bit PowerPC in sanitizer tools.

llvm-svn: 183499

11 years ago[ASan] create separate configs for running ASan lit tests in both 32- and 64-bit...
Alexey Samsonov [Fri, 7 Jun 2013 09:38:55 +0000 (09:38 +0000)]
[ASan] create separate configs for running ASan lit tests in both 32- and 64-bit mode. Clean up RUN-lines in tests.

llvm-svn: 183498

11 years agoCorrect wrong register in this example, pointed out by Baoshan Pang.
Duncan Sands [Fri, 7 Jun 2013 08:30:55 +0000 (08:30 +0000)]
Correct wrong register in this example, pointed out by Baoshan Pang.

llvm-svn: 183495

11 years agoDon't cache the instruction and register info from the TargetMachine, because
Bill Wendling [Fri, 7 Jun 2013 07:55:53 +0000 (07:55 +0000)]
Don't cache the instruction and register info from the TargetMachine, because
the internals of TargetMachine could change.

No functionality change intended.

llvm-svn: 183494

11 years agoDon't cache the instruction and register info from the TargetMachine, because
Bill Wendling [Fri, 7 Jun 2013 07:04:14 +0000 (07:04 +0000)]
Don't cache the instruction and register info from the TargetMachine, because
the internals of TargetMachine could change.

llvm-svn: 183493

11 years agoDon't cache the instruction and register info from the TargetMachine, because
Bill Wendling [Fri, 7 Jun 2013 06:30:15 +0000 (06:30 +0000)]
Don't cache the instruction and register info from the TargetMachine, because
the internals of TargetMachine could change.

llvm-svn: 183492

11 years agoDon't cache the instruction and register info from the TargetMachine, because
Bill Wendling [Fri, 7 Jun 2013 06:26:43 +0000 (06:26 +0000)]
Don't cache the instruction and register info from the TargetMachine, because
the internals of TargetMachine could change.

llvm-svn: 183491

11 years agoDon't cache the instruction and register info from the TargetMachine, because
Bill Wendling [Fri, 7 Jun 2013 06:19:56 +0000 (06:19 +0000)]
Don't cache the instruction and register info from the TargetMachine, because
the internals of TargetMachine could change.

llvm-svn: 183490

11 years ago[objc-arc] Ensure that the cfg path count does not overflow when we multiply TopDownP...
Michael Gottesman [Fri, 7 Jun 2013 06:16:49 +0000 (06:16 +0000)]
[objc-arc] Ensure that the cfg path count does not overflow when we multiply TopDownPathCount/BottomUpPathCount.

rdar://12480535

llvm-svn: 183489

11 years agoDon't cache the instruction and register info from the TargetMachine, because
Bill Wendling [Fri, 7 Jun 2013 05:54:19 +0000 (05:54 +0000)]
Don't cache the instruction and register info from the TargetMachine, because
the internals of TargetMachine could change.

llvm-svn: 183488

11 years agoReverting test commit
Faisal Vali [Fri, 7 Jun 2013 05:33:21 +0000 (05:33 +0000)]
Reverting test commit

llvm-svn: 183487

11 years agotest commit
Faisal Vali [Fri, 7 Jun 2013 05:19:33 +0000 (05:19 +0000)]
test commit

llvm-svn: 183486

11 years agoDon't cache the instruction info and register info objects.
Bill Wendling [Fri, 7 Jun 2013 05:00:11 +0000 (05:00 +0000)]
Don't cache the instruction info and register info objects.

These objects are internal to the TargetMachine object and may change.

llvm-svn: 183485

11 years agoDIBuilder: No functionality change.
Manman Ren [Fri, 7 Jun 2013 03:13:46 +0000 (03:13 +0000)]
DIBuilder: No functionality change.

Use the correct DIType when creating vector types.

llvm-svn: 183484

11 years agoPR16243: Use CXXThisOverride during template instantiation, and fix up the
Richard Smith [Fri, 7 Jun 2013 02:33:37 +0000 (02:33 +0000)]
PR16243: Use CXXThisOverride during template instantiation, and fix up the
places which weren't setting it up properly. This allows us to get the right
cv-qualifiers for 'this' when it appears outside a method body in a class
template.

llvm-svn: 183483

11 years agoTweaking Daniel Malea's fixes to Makefile.rules to ensure that we correctly pass...
Enrico Granata [Fri, 7 Jun 2013 01:58:52 +0000 (01:58 +0000)]
Tweaking Daniel Malea's fixes to Makefile.rules to ensure that we correctly pass -stdlib=libstdc++ to clang when compiling as well as when linking
Not doing this was causing link errors as clang was looking for libc++ symbols while linking against libstdc++

llvm-svn: 183482

11 years agoMinor bug fix for allowing an extension of const-qualified types in containers.
Howard Hinnant [Fri, 7 Jun 2013 01:56:37 +0000 (01:56 +0000)]
Minor bug fix for allowing an extension of const-qualified types in containers.

llvm-svn: 183481

11 years agoTweaks to the std::list (libstdc++ test case)
Enrico Granata [Fri, 7 Jun 2013 01:53:59 +0000 (01:53 +0000)]
Tweaks to the std::list (libstdc++ test case)

llvm-svn: 183480

11 years agoWhen we're synthesizing copy/move-assignment, we can't form a reference to an
Eli Friedman [Fri, 7 Jun 2013 01:48:56 +0000 (01:48 +0000)]
When we're synthesizing copy/move-assignment, we can't form a reference to an
invalid field; make sure we don't try.  Fixes <rdar://problem/14084171>.

llvm-svn: 183479

11 years ago[PECOFF][Writer] Implement the writer that can emit text section.
Rui Ueyama [Fri, 7 Jun 2013 01:31:51 +0000 (01:31 +0000)]
[PECOFF][Writer] Implement the writer that can emit text section.

lld can now output a valid Windows executable with a text section that does nothing
but just returns immediately. It's not able to handle relocations, symbol tables,
data sections, etc, so it still can't do anything practical, though.

Reviewers: Bigcheese

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

llvm-svn: 183478

11 years agoARM sched model: Use the right resources for DIV
Arnold Schwaighofer [Fri, 7 Jun 2013 01:16:15 +0000 (01:16 +0000)]
ARM sched model: Use the right resources for DIV

llvm-svn: 183477

11 years agoMake the "SearchFilterByModuleListAndCU" work correctly for searches at the CompUnit
Jim Ingham [Fri, 7 Jun 2013 01:13:00 +0000 (01:13 +0000)]
Make the "SearchFilterByModuleListAndCU" work correctly for searches at the CompUnit
level.  Fixes a bug in "break set --source-pattern-regexp" when a shared library is
specified.

Also cleaned up the help text for --source-pattern-regexp so it is a little clearer.

<rdar://problem/14084261>

llvm-svn: 183476

11 years agodocumentation: remove confusing reference to properties.
Adrian Prantl [Fri, 7 Jun 2013 01:10:48 +0000 (01:10 +0000)]
documentation: remove confusing reference to properties.

llvm-svn: 183475

11 years agoObjC Debug Info: Emit the names of accessors whenever they diverge from
Adrian Prantl [Fri, 7 Jun 2013 01:10:45 +0000 (01:10 +0000)]
ObjC Debug Info: Emit the names of accessors whenever they diverge from
the default names, not just when the isImplicit flag is set.

rdar://problem/14035789

llvm-svn: 183474

11 years agoImprove documentation.
Adrian Prantl [Fri, 7 Jun 2013 01:10:41 +0000 (01:10 +0000)]
Improve documentation.

llvm-svn: 183473

11 years agoARM sched model: Add VFP div instruction on Swift
Arnold Schwaighofer [Fri, 7 Jun 2013 01:10:36 +0000 (01:10 +0000)]
ARM sched model: Add VFP div instruction on Swift

Reapply 183271.

llvm-svn: 183472

11 years agoblocks: fixes an ast bug when block pointer variable
Fariborz Jahanian [Fri, 7 Jun 2013 00:48:14 +0000 (00:48 +0000)]
blocks: fixes an ast bug when block pointer variable
is evaluated in a condition expression and then
dereferenced to envoke the block. This is
pr15663 and I applied a slight variation of the
patch with a test case. (patch is from
Arthur O'Dwyer). Also // rdar://14085217

llvm-svn: 183471

11 years ago<rdar://problem/14086944>
Greg Clayton [Fri, 7 Jun 2013 00:35:40 +0000 (00:35 +0000)]
<rdar://problem/14086944>

lldb doesn't autocomplete objective C class methods. The regular expression was looking for strings that started with the completion string that was passed in. For objective C class methods, this string starts with "+" which wasn't being escaped. Added many other escapes that were missing just in case.

llvm-svn: 183470

11 years agoDocument the extended detach packet.
Jim Ingham [Fri, 7 Jun 2013 00:22:49 +0000 (00:22 +0000)]
Document the extended detach packet.

llvm-svn: 183469

11 years agoDiagnose malformed x86 inline asm using 'y' constraint.
Tim Northover [Fri, 7 Jun 2013 00:04:50 +0000 (00:04 +0000)]
Diagnose malformed x86 inline asm using 'y' constraint.

X86's 'y' inline assembly constraint represents an MMX register, this change
prevents Clang from hitting an assertion when passed an incompatible type to
deal with.

llvm-svn: 183467

11 years agoPerform dynamic alignment computations so that the data in TypeLocs is
Eli Friedman [Fri, 7 Jun 2013 00:04:31 +0000 (00:04 +0000)]
Perform dynamic alignment computations so that the data in TypeLocs is
correctly aligned.  Not performing such computations led to misaligned loads,
which crash on some platforms and are generally bad on other platforms.

The implementation of TypeLocBuilder::pushImpl is rather messy; code using
TypeLocBuilder accidentally assumes that partial TypeLocs are
laid out like a complete TypeLoc.  As a followup, I intend to work on
fixing the TypeLocBuilder API to avoid exposing partial TypeLocs; this should
substantially simplify the implemementation.

Fixes PR16144.

llvm-svn: 183466

11 years agoCodeGenSchedule: Use resize instead of copying a vector
Arnold Schwaighofer [Fri, 7 Jun 2013 00:04:30 +0000 (00:04 +0000)]
CodeGenSchedule: Use resize instead of copying a vector

llvm-svn: 183465

11 years agoARM sched model: Add SIMD/VFP load/store instructions on Swift
Arnold Schwaighofer [Fri, 7 Jun 2013 00:04:28 +0000 (00:04 +0000)]
ARM sched model: Add SIMD/VFP load/store instructions on Swift

Reapply 183270 again (because three is a magic number).

This should now no longer seg fault after r183459.

llvm-svn: 183464

11 years ago[Sparc]: Use cmp instruction instead of subcc to compare integers.
Venkatraman Govindaraju [Fri, 7 Jun 2013 00:03:36 +0000 (00:03 +0000)]
[Sparc]: Use cmp instruction instead of subcc to compare integers.

llvm-svn: 183463

11 years agoImplement DR7
David Majnemer [Thu, 6 Jun 2013 23:43:20 +0000 (23:43 +0000)]
Implement DR7

Disallowing deriving from classes that have private virtual base classes
except in instances where the deriving class would be able to cast
itself to the private virtual base via a different derivation.

llvm-svn: 183462

11 years agoSimplify code. No functionality change.
Jakub Staszak [Thu, 6 Jun 2013 23:34:59 +0000 (23:34 +0000)]
Simplify code. No functionality change.

llvm-svn: 183461

11 years agoRemove unneeded #include.
Jakub Staszak [Thu, 6 Jun 2013 23:34:11 +0000 (23:34 +0000)]
Remove unneeded #include.

llvm-svn: 183460

11 years agoCodeGenSchedule: smallvector.push_back(smallvector[0]) is dangerous
Arnold Schwaighofer [Thu, 6 Jun 2013 23:23:14 +0000 (23:23 +0000)]
CodeGenSchedule: smallvector.push_back(smallvector[0]) is dangerous

The element passed to push_back is not copied before the vector reallocates.
The client needs to copy the element first before passing it to push_back.

No test case, will be tested by follow-up swift scheduler model change (it
segfaults without this change).

llvm-svn: 183459

11 years agoR600: Rewrite an awkward loop in R600MachineScheduler
Vincent Lejeune [Thu, 6 Jun 2013 23:08:32 +0000 (23:08 +0000)]
R600: Rewrite an awkward loop in R600MachineScheduler

llvm-svn: 183458