Commit Graph

157059 Commits

Author SHA1 Message Date
Rafael Espindola fac3a018d1 Error on linking appending globals with different unnamed_addr.
llvm-svn: 189950
2013-09-04 15:33:34 +00:00
Howard Hinnant 6272680119 Evgeniy Stepanov: Add noexcept to ~bad_optional_access() to silence warning during build.
llvm-svn: 189949
2013-09-04 15:21:08 +00:00
Venkatraman Govindaraju b803cec00e [Sparc] Fix an assertion failure while lowering fcmp on long double.
This assertion is triggered because an integer constant is created with wrong
  type.

llvm-svn: 189948
2013-09-04 15:15:20 +00:00
Alexander Kornienko 472d27aa22 A minor fix in the documentation.
llvm-svn: 189947
2013-09-04 15:14:18 +00:00
Alexander Kornienko d278e0eee3 Added documentation for clang-format style options.
Summary:
The main contents is in the ClangFormatStyleOptions.rst, which can be
updated from the Format.h by the dump_format_style.py script.

Reviewers: djasper, klimek

Reviewed By: klimek

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1597

llvm-svn: 189946
2013-09-04 15:09:13 +00:00
Rafael Espindola fd9a9415f5 Fix linking of unnamed_addr in functions.
llvm-svn: 189945
2013-09-04 14:59:03 +00:00
Rafael Espindola df814e976d Rename in preparation for adding tests for function linking.
llvm-svn: 189944
2013-09-04 14:40:49 +00:00
Kostya Serebryany 2e57127cf7 [asan] add a test that demonstrates why the current use-after-return is not signal-safe
llvm-svn: 189943
2013-09-04 14:39:43 +00:00
Rafael Espindola 3a3563d4be Use CHECK-DAG instead of sort.
llvm-svn: 189942
2013-09-04 14:35:48 +00:00
Pavel Labath 1ef8342e11 ASTDumper: fix dump of CXXCatchStmt
Summary: I added the display of the VarDecl contained in the statement.

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1596

llvm-svn: 189941
2013-09-04 14:35:00 +00:00
NAKAMURA Takumi 7a0423468e Support/Process: Add comments about PageSize and AllocationGranularity on Cygwin and Win32.
llvm-svn: 189940
2013-09-04 14:12:26 +00:00
NAKAMURA Takumi 65fc51bbe2 MemoryBuffer.cpp: Don't peek the next page if file is multiple of *physical* pagesize(4k) but is not multiple of AllocationGranularity(64k), when a null terminator is required, on cygwin and win32.
For example, r189780's SparcISelLowering.cpp has the size 98304. It crashed clang to touch a null terminator on cygwin.

FIXME: It's not good to hardcode 4096 here. dwPageSize shows 4096.
llvm-svn: 189939
2013-09-04 14:12:19 +00:00
NAKAMURA Takumi 9542678508 Whitespace.
llvm-svn: 189938
2013-09-04 14:12:12 +00:00
Alexander Kornienko 24ae06bff3 Cleaned doxygen comments.
llvm-svn: 189937
2013-09-04 14:09:59 +00:00
Alexander Kornienko b40cfe4866 Handle 'Cpp03' and 'Cpp11' strings in LanguageStandard serialization for
consistency of serialized form with the actual enum member names without
a prefix.

llvm-svn: 189936
2013-09-04 14:09:13 +00:00
Rafael Espindola d4885daefa Fix linking of unnamed_addr.
This was regression from r134829. When linking we have to be conservative. If
one of the symbols has a significant address, then the result should have it
too.

llvm-svn: 189935
2013-09-04 14:05:09 +00:00
Virgile Bello 0a3b151fdf Remove <windows.h> from lldb-types.h.
llvm-svn: 189934
2013-09-04 13:56:11 +00:00
Manuel Klimek f017dc0156 Remove code duplication in unwrapped line parser.
llvm-svn: 189933
2013-09-04 13:34:14 +00:00
Manuel Klimek 516e054c05 Implement parsing of blocks (^{ ... }) in the unwrapped line parser.
This patch makes sure we produce the right number of unwrapped lines,
a follow-up patch will make the whitespace formatting consistent.

Before:
 void f() {
   int i = {[operation setCompletionBlock : ^{ [self onOperationDone];
 }]
 }
 ;
 }

After:
 void f() {
   int i = {[operation setCompletionBlock : ^{
     [self onOperationDone];
   }] };
 }

llvm-svn: 189932
2013-09-04 13:25:30 +00:00
Tim Northover dc647a2603 InstCombine: allow unmasked icmps to be combined with logical ops
"(icmp op i8 A, B)" is equivalent to "(icmp op i8 (A & 0xff), B)" as a
degenerate case. Allowing this as a "masked" comparison when analysing "(icmp)
&/| (icmp)" allows us to combine them in more cases.

rdar://problem/7625728

llvm-svn: 189931
2013-09-04 11:57:17 +00:00
Tim Northover c0756c454c InstCombine: look for masked compares with subset relation
Even in cases which aren't universally optimisable like "(A & B) != 0 && (A &
C) != 0", the masks can make one of the comparisons completely redundant. In
this case, since we've gone to the effort of spotting masked comparisons we
should combine them.

rdar://problem/7625728

llvm-svn: 189930
2013-09-04 11:57:13 +00:00
Kostya Serebryany 1f13414d45 [asan] make use-after-return handle very deep recursion; fixes 483.xalancbmk in UAR mode
llvm-svn: 189929
2013-09-04 10:59:32 +00:00
Manuel Klimek a1a43abe38 More lambda formatting tests; update test comments.
llvm-svn: 189928
2013-09-04 10:06:46 +00:00
NAKAMURA Takumi ee9fba2042 clang/test/Driver/working-directory.c: Exclude msys bash rather than tweaking expressions.
llvm-svn: 189927
2013-09-04 09:37:12 +00:00
Hao Liu b1852eed38 Inplement aarch64 neon instructions in AdvSIMD(shift). About 24 shift instructions:
sshr,ushr,ssra,usra,srshr,urshr,srsra,ursra,sri,shl,sli,sqshlu,sqshl,uqshl,shrn,sqrshr$
 and 4 convert instructions:
      scvtf,ucvtf,fcvtzs,fcvtzu

llvm-svn: 189926
2013-09-04 09:29:13 +00:00
Hao Liu d4aede098f Inplement aarch64 neon instructions in AdvSIMD(shift). About 24 shift instructions:
sshr,ushr,ssra,usra,srshr,urshr,srsra,ursra,sri,shl,sli,sqshlu,sqshl,uqshl,shrn,sqrshrun,sqshrn,uqshr,sqrshrn,uqrshrn,sshll,ushll
 and 4 convert instructions:
      scvtf,ucvtf,fcvtzs,fcvtzu

llvm-svn: 189925
2013-09-04 09:28:24 +00:00
Manuel Klimek bab25fdfa5 Fix layout of lambda captures.
Before:
 int c = [ &, &a, a]{
   [ =, c, &d]{
     return b++;
   }();
 }();

After:
 int c = [&, &a, a] {
   [=, c, &d] {
     return b++;
   }();
 }();

llvm-svn: 189924
2013-09-04 08:20:47 +00:00
Alexey Samsonov 5b2000e4d9 Disable FindPathToBinary test on Android
llvm-svn: 189923
2013-09-04 06:40:48 +00:00
Eric Christopher 8c37b8d0b4 Attempt to silence some defined but not used warnings.
llvm-svn: 189922
2013-09-04 06:06:06 +00:00
Eric Christopher 913152fc64 Use Intrinsic::ID for the pattern match templates, fixing a signed/unsigned
comparison warning.

llvm-svn: 189921
2013-09-04 05:08:32 +00:00
Eric Christopher 8b6f708cda Only fail this on darwin since most other platforms should have a newer
gdb.

llvm-svn: 189920
2013-09-04 05:06:10 +00:00
Rafael Espindola b69b7fedbf Disable llvm optimizations, but keep -O1 to test available_externally.
llvm-svn: 189919
2013-09-04 04:59:11 +00:00
Rafael Espindola d120b89a77 Disable llvm optimizations, but keep -O1 to test available_externally.
llvm-svn: 189918
2013-09-04 04:55:03 +00:00
Rafael Espindola 01caeb80cd Use %clang_cc1.
llvm-svn: 189917
2013-09-04 04:51:39 +00:00
Serge Pavlov 8260530cb2 Clear LookupResult object if invalid candidate is found.
If source code is invalid, error recovery can lead to name lookup in a set containing invalid declaration. The lookup is stopped once found such declaration, but LookupResult object could remain in inconsistent state. Its destructor triggered a check, which caused assert violation.
This patch fixes PR16964 and PR12791.

llvm-svn: 189916
2013-09-04 04:50:29 +00:00
Michael Gottesman 9672fcf1e5 XFAILed the static-member.cpp test since we no longer support emitting debug info that support what Eric calls "the member hack".
llvm-svn: 189915
2013-09-04 04:44:05 +00:00
Michael Gottesman c89466fc22 Revert "Revert "Remove the darwin gdb option, that version of gdb is now dead and the rest of the compatibility should be done on a dwarf-N level.""
This reverts commit r189913.

Talked with Eric on IRC. I am going to XFAIL the failing test since it
is using what Eric described as "the member hack" which was needed on
that old GDB.

Sorry for the noise!

llvm-svn: 189914
2013-09-04 04:39:38 +00:00
Michael Gottesman a318370b8d Revert "Remove the darwin gdb option, that version of gdb is now dead and the rest of the compatibility should be done on a dwarf-N level."
This reverts commit r189903.

This commit broke the phase 1 buildbot for a while.

http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/6684

llvm-svn: 189913
2013-09-04 04:31:56 +00:00
Michael Gottesman c9f5859f81 Add llvm namespace to llvm::next.
llvm-svn: 189912
2013-09-04 04:26:09 +00:00
Michael Gottesman 114ac1a230 Use llvm::next() instead of incrementing begin iterators of std::vector.
Iterator of std::vector may be implemented as a raw pointer. In
this case begin iterators are rvalues and cannot be incremented.
For example, this is the case with STDCXX implementation of vector.

Patch by Konstantin Tokarev <annulen@yandex.ru>.

llvm-svn: 189911
2013-09-04 04:19:01 +00:00
Rafael Espindola ff7cea8c1a Don't pass -O0 to clang_cc1, it is the default.
llvm-svn: 189910
2013-09-04 04:12:25 +00:00
Reid Kleckner 1d1844a7c7 clang-cl: Use "clang cl.exe" when disambiguating the diagnostic prefix.
llvm-svn: 189909
2013-09-04 03:10:36 +00:00
James Dennett b52922b1c5 Documentation fix: remove advice to use cast/dyn_cast on TypeLocs, updating
it to refer to castAs/getAs.

The original change to remove the (broken) cast/dyn_cast support from TypeLoc
was in r175462.  (Thanks to David Blaikie for the reference.)

llvm-svn: 189908
2013-09-04 02:47:23 +00:00
Shankar Easwaran 8c705690ab [lld][ELF] Differentiate between Note sections(RW/RO)
It looks like there is a possibility of seeing RO/RW note sections
and we would need to create an appropriate RO/RW segment associated
with them.

Adds a test too.

llvm-svn: 189907
2013-09-04 02:42:02 +00:00
David Blaikie ab415a4b35 Revert "DebugInfo: Remove explicit declaration-emissiong handling now that we have a more principled approach (the 'requires complete type' callback)"
This reverts commit r189013.

This is causing a segfault crash in a test case I have. Reverting while
I investigate the issue.

llvm-svn: 189906
2013-09-04 02:12:12 +00:00
NAKAMURA Takumi 8270dcac33 MCDwarf.h: Prune a few stray \param(s). [-Wdocumentation]
\param should be used to describe individual parameters. Use a command like \a or \c for visual enhancements.

llvm-svn: 189905
2013-09-04 02:10:32 +00:00
NAKAMURA Takumi 3b6ef78954 Suppress test/modularize/NoProblemsDependencies.modularize on msvc, for now. Investigating.
llvm-svn: 189904
2013-09-04 02:03:03 +00:00
Eric Christopher 614dc83603 Remove the darwin gdb option, that version of gdb is now dead and
the rest of the compatibility should be done on a dwarf-N level.

llvm-svn: 189903
2013-09-04 02:02:10 +00:00
Eric Christopher 38f1c64098 Make the default dwarf version 3 for darwin when we can't find one
in the module. Add a FIXME with a comment about darwin's ld.

llvm-svn: 189902
2013-09-04 01:38:30 +00:00
Reid Kleckner dc74af1ab8 clang-cl: Avoid confusing diagnostics when clang-cl is called just cl.exe
llvm-svn: 189901
2013-09-04 01:37:22 +00:00