Commit Graph

151017 Commits

Author SHA1 Message Date
David Blaikie fbbb8f32b0 We've got the type right, which has broken these tests - but now we need to get the location information correct that the type was papering over
llvm-svn: 183576
2013-06-07 22:09:23 +00:00
David Majnemer 6a42665f9f 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
2013-06-07 22:07:20 +00:00
Quentin Colombet 9b08a0df1c Explicit triple in warn stack size test cases to not depend on OS.
llvm-svn: 183574
2013-06-07 21:09:42 +00:00
Rafael Espindola a0af48fc93 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
2013-06-07 21:08:19 +00:00
Bill Wendling 999dacc55b 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
2013-06-07 21:04:35 +00:00
Bill Wendling 8f26840c5a 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
2013-06-07 21:00:34 +00:00
Bill Wendling 52ca447fdd Remove unused c'tor.
llvm-svn: 183570
2013-06-07 20:59:31 +00:00
Ashok Thirumurthi ec000b6714 Revert r183281, adds a comment about how to reproduce the hang.
llvm-svn: 183569
2013-06-07 20:58:47 +00:00
Tom Stellard d74583777f 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
2013-06-07 20:52:05 +00:00
Bill Wendling 637d97dd51 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
2013-06-07 20:42:15 +00:00
Tom Stellard a6c6e1bfc2 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
2013-06-07 20:37:48 +00:00
Bill Wendling 6235c06ff8 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
2013-06-07 20:35:25 +00:00
Eli Friedman 3bd4716218 Add missing file from r183563 (the recommit of 183466).
llvm-svn: 183564
2013-06-07 20:33:10 +00:00
Eli Friedman 7152fbe57e 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
2013-06-07 20:31:48 +00:00
Rui Ueyama 1b0a949482 [docs] Add link to Microsoft PE/COFF Spec.
llvm-svn: 183562
2013-06-07 20:30:27 +00:00
Bill Wendling 37e9adb091 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
2013-06-07 20:28:55 +00:00
Tom Stellard 3498e4ff1d 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
2013-06-07 20:28:55 +00:00
Tom Stellard 99792774a4 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
2013-06-07 20:28:49 +00:00
Tom Stellard b0804ec2ad R600: Remove unnecessary include
Reviewed-by: Vincent Lejeune <vljn@ovi.com>
llvm-svn: 183558
2013-06-07 20:28:43 +00:00
Bill Wendling 658fb53b7e 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
2013-06-07 20:28:29 +00:00
Fariborz Jahanian bbc126e7df 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
2013-06-07 20:26:51 +00:00
Eli Bendersky 0220e6bd85 Add more explicit link targets to headers in LangRef.rst
llvm-svn: 183555
2013-06-07 20:24:43 +00:00
Rui Ueyama a6b71cabb3 [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
2013-06-07 20:18:39 +00:00
Quentin Colombet 6baf581b93 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
2013-06-07 20:18:12 +00:00
JF Bastien 06ce03d141 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
2013-06-07 20:10:37 +00:00
Richard Smith 5ed79566d6 PR16273: Weaken a bogus assertion.
llvm-svn: 183550
2013-06-07 20:03:01 +00:00
Benjamin Kramer 705d841bb6 R600: Don't compare iterators of different maps.
Found be libstdc's debug mode.

llvm-svn: 183549
2013-06-07 19:59:34 +00:00
Eli Bendersky fdc529ad95 Add explicit link targets to some headers in LangRef.rst
llvm-svn: 183548
2013-06-07 19:40:08 +00:00
Ashok Thirumurthi b65edd4b95 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
2013-06-07 19:21:45 +00:00
Manman Ren 95429cde58 No functionality change.
Constify a few member functions.

llvm-svn: 183546
2013-06-07 18:53:29 +00:00
Rafael Espindola 273bc841b3 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
2013-06-07 18:41:01 +00:00
Quentin Colombet ba366011c8 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
2013-06-07 18:36:03 +00:00
Manman Ren 3c6acec02a DIBuilder: No functionality change.
Use the correct DIType when creating types in DIBuilder.

llvm-svn: 183543
2013-06-07 18:35:53 +00:00
Fariborz Jahanian 4614524d4a Objective-C: Removes a bogus warning about auto-synthesis
of properties. Fixes // rdar://14085456

llvm-svn: 183542
2013-06-07 18:32:55 +00:00
Benjamin Kramer ebe0be9ca4 Vincent says the element is at most once in the vector, so we don't need a full std::remove.
llvm-svn: 183541
2013-06-07 18:18:12 +00:00
Rafael Espindola 8d477dc08f Use isxdigit.
Thanks to Benjamin Kramer for the suggestion.

llvm-svn: 183540
2013-06-07 18:05:03 +00:00
Rafael Espindola a8d766d6fd Make operator== non-member for greater symmetry.
Thanks to David Blaikie for the suggestion.

llvm-svn: 183539
2013-06-07 18:00:04 +00:00
Argyrios Kyrtzidis fe68302fe8 Thread the 'Invalid' out parameter through SourceManager::getSLocEntry() and callees of SourceManager::getSLocEntryByID().
Also add an 'Invalid' check in SourceManager::computeMacroArgsCache().

llvm-svn: 183538
2013-06-07 17:57:59 +00:00
Roman Divacky 158d8069ad 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
2013-06-07 17:46:57 +00:00
Alexander Kornienko ee4ca9ba0e 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
2013-06-07 17:45:07 +00:00
Jordan Rose e2fad6d754 Handle Unicode characters in fix-it replacement strings.
Patch by Sukolsak Sakshuwong!

llvm-svn: 183535
2013-06-07 17:16:01 +00:00
Rui Ueyama 6d0004cd78 [Object/COFF] BaseOfData field should be absent in PE32+.
llvm-svn: 183534
2013-06-07 16:58:30 +00:00
Rafael Espindola aad6c24422 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
2013-06-07 16:35:57 +00:00
Benjamin Kramer a857fe115b R600: Fix a potential iterator invalidation issue.
As a bonus this reduces the loop from O(n^2) to O(n).

llvm-svn: 183532
2013-06-07 16:13:49 +00:00
Fariborz Jahanian 1edacecef4 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
2013-06-07 16:07:38 +00:00
Alexander Kornienko dd7ece53a2 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
2013-06-07 16:02:52 +00:00
Evgeniy Stepanov cead69d4a3 [sanitizer] Handle SIOCGIFCONF ioctl.
llvm-svn: 183529
2013-06-07 15:49:38 +00:00
Vincent Lejeune 931bb768fd R600: Remove an extra break in R600OptimizeVectorRegisters.cpp
llvm-svn: 183528
2013-06-07 15:44:53 +00:00
Alexey Samsonov 4fdf8d66a9 [ASan] fix test case to use absolute paths
llvm-svn: 183527
2013-06-07 15:44:21 +00:00
Alexey Samsonov 35c987dc11 [llvm-symbolizer] rewrite r183213 in a more clear way
llvm-svn: 183526
2013-06-07 15:25:27 +00:00