Commit Graph

130460 Commits

Author SHA1 Message Date
Dmitri Gribenko 9460fbf219 Make concepts of optional and forbidden end tags separate. Thanks Jordan for pointing this!
llvm-svn: 160149
2012-07-12 23:37:09 +00:00
Eric Christopher bf57091f8b The end of the prologue should be marked with is_stmt.
Fixes PR13303.

Patch by Paul Robinson!

llvm-svn: 160148
2012-07-12 23:30:25 +00:00
Jim Ingham 9aa15a4562 Unify how we get host version on Mac OS X & iOS.
Also remove our dependency on UIKit & AppKit.
Cleaned up the project files a bit.

<rdar://problem/11814498>

llvm-svn: 160147
2012-07-12 23:16:43 +00:00
Greg Clayton 1d60909e81 <rdar://problem/11740973>
Fixed issues that could happen when the UUID doesn't change in a binary and old stale debug info could end up being used.

llvm-svn: 160145
2012-07-12 22:51:12 +00:00
Jim Grosbach 5f111b2721 TableGen: Assembly matcher 'insufficient operands' diagnostic.
Make sure the tblgen'erated asm matcher correctly returns numoperands+1
as the ErrorInfo when the problem was that there weren't enough operands
specified.

rdar://9142751

llvm-svn: 160144
2012-07-12 21:37:20 +00:00
Akira Hatanaka a13cd0666e Fix check strings in test/MC/Disassembler/Mips/* and run FileCheck.
Patch by Vladimir Medic.

llvm-svn: 160143
2012-07-12 21:19:32 +00:00
Galina Kistanova 7da6578291 Fixed few warnings.
llvm-svn: 160142
2012-07-12 20:45:36 +00:00
Sean Callanan 27e02d07fd Added a check to the Section to make sure we don't
return sections that don't have valid modules.

<rdar://problem/11605824>

llvm-svn: 160141
2012-07-12 20:44:21 +00:00
Greg Clayton 4e0fe8ab95 <rdar://problem/11791234>
Fixed a case where the python interpreter could end up holding onto a previous lldb::SBProcess (probably in lldb.process) when run under Xcode. Prior to this fix, the lldb::SBProcess held onto a shared pointer to a lldb_private::Process. This in turn could cause the process to still have a thread list with stack frames. The stack frames would have module shared pointers in the lldb_private::SymbolContext objects. 

We also had issues with things staying in the shared module list too long when we found things by UUID (we didn't remove the out of date ModuleSP from the global module cache).

Now all of this is fixed and everything goes away between runs.

llvm-svn: 160140
2012-07-12 20:32:19 +00:00
Rafael Espindola 6140847647 Use the canonical template decl when trying to find if it has a visibility
attribute.

llvm-svn: 160139
2012-07-12 20:05:04 +00:00
Manuel Klimek 05b56315d5 Updates the example to the latest incarnation of clang-check and
adds a paragraph on builtin headers.

llvm-svn: 160138
2012-07-12 18:32:50 +00:00
Benjamin Kramer 4d0916788d Give the rdrand instructions a SideEffect flag and a chain so MachineCSE and MachineLICM don't touch it.
I already had the necessary things in place for IR-level passes but missed the machine passes.

llvm-svn: 160137
2012-07-12 18:14:57 +00:00
Howard Hinnant 9146984e73 Fixed a bug in wstring_convert concerning zero-length inputs. Thanks to Jonathan Coxhead for reporting this bug.
llvm-svn: 160136
2012-07-12 18:07:41 +00:00
Sean Callanan 41f88aad98 Blacklisted a UUID that is generated by OpenCL on
Mac OS X, because the UUID is the same for all
OpenCL-generated dylibs and therefore would
conflict.

<rdar://problem/11620586>

llvm-svn: 160135
2012-07-12 18:04:03 +00:00
Eric Christopher 54c39e0688 Regenerate.
llvm-svn: 160134
2012-07-12 17:59:12 +00:00
Dmitri Gribenko c06cbd14e3 Always initialize variable. If opening quote is the last character in comment, we will be using an uninitialized value. There is already a test for that in unittests/AST/CommentLexer.cpp, but it seems like we were lucky with the value that got loaded into the variable so the test passed.
llvm-svn: 160133
2012-07-12 16:34:32 +00:00
Alexander Kornienko 8480d420d3 Updated -help message in clang-check.
Summary: Provide more information on usage in -help

Test Plan: ran once

Reviewers: klimek, chandlerc, djasper

Reviewed By: klimek

CC: cfe-commits

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

llvm-svn: 160132
2012-07-12 14:34:23 +00:00
Timur Iskhodzhanov 3f7e9d2b45 [Windows] Split the back reference tests into two separate files as the templates are getting hairy
llvm-svn: 160131
2012-07-12 14:33:58 +00:00
Filipe Cabecinhas 0c251adf75 Provide more information when process launch can't change directory to the
path passed with -w

Test this functionality.

llvm-svn: 160130
2012-07-12 14:09:25 +00:00
Nadav Rotem fdce33a495 The LIT tests below do not specify the exact cpu model and fail on AVX2 machines, because we select different instructions such as vbroadcast, new shuffles, etc.
Patch by Michael Liao.

llvm-svn: 160129
2012-07-12 13:45:15 +00:00
Gabor Greif c6c28ff8e6 detabify
llvm-svn: 160128
2012-07-12 13:18:13 +00:00
Gabor Greif 1e71896bb4 fix typo in generated comment
llvm-svn: 160127
2012-07-12 13:05:12 +00:00
NAKAMURA Takumi ff4cd7792a test/CodeGen/rdrand-builtins.c: Define __MM_MALLOC_H before including <*mmintrin.h> .
Rawr!

llvm-svn: 160125
2012-07-12 10:36:27 +00:00
NAKAMURA Takumi f415fe70f3 llvm/test/CodeGen/X86/rdrand.ll: Relax expression corresponding to Win64 CC.
llvm-svn: 160124
2012-07-12 10:22:57 +00:00
NAKAMURA Takumi 0b00f994a6 llvm/test/CMakeLists.txt: Add llvm-diff to deps.
llvm-svn: 160123
2012-07-12 10:15:48 +00:00
Benjamin Kramer 72ec3756f9 Don't include mm_malloc.h in test, it pulls in system headers on msvc.
llvm-svn: 160122
2012-07-12 09:56:18 +00:00
Timur Iskhodzhanov c5098ad371 [Windows] Use thiscall as the default calling convention for class methods. PR12785
llvm-svn: 160121
2012-07-12 09:50:54 +00:00
Benjamin Kramer cbac2f3bc9 Use %s instead of the explicit name, the latter doesn't work in out-of-tree builds.
llvm-svn: 160120
2012-07-12 09:36:29 +00:00
Benjamin Kramer a43b6999ff Add _rdrand{16,32,64}_step intrinsics to immintrin.h
llvm-svn: 160118
2012-07-12 09:33:03 +00:00
Benjamin Kramer 0ab2794eda Add intrinsics for Ivy Bridge's rdrand instruction.
The rdrand/cmov sequence is the same that is emitted by both
GCC and ICC.

Fixes PR13284.

llvm-svn: 160117
2012-07-12 09:31:43 +00:00
Duncan Sands 671cc2575d The result type of EXTRACT_VECTOR_ELT doesn't have to match the element type of
the input vector, it can be bigger (this is helpful for powerpc where <2 x i16>
is a legal vector type but i16 isn't a legal type, IIRC).  However this wasn't
being taken into account by ExpandRes_EXTRACT_VECTOR_ELT, causing PR13220.
Lightly tweaked version of a patch by Michael Liao.

llvm-svn: 160116
2012-07-12 09:01:35 +00:00
Daniel Jasper 4e566c4aed This commit combines three patches to the ASTMatchers.
One adds matchers for the various parts of a for loop (initializer, condition,
increment), as well as extending the hasBody matcher to work for while and
do-while loops. The second patch adds an isInteger matcher for types.
The third patch fixes a bug in allOf, where a few of the name chages
(AllOf --> allOf) had been missed.

All matchers come with unit tests.

Patches by Sam Panzer!

llvm-svn: 160115
2012-07-12 08:50:38 +00:00
Benjamin Kramer 20863e3692 Be lax about trailing whitespace when checking fixit formatting, this depends on locale settings.
If a non-unicode locale is used, the unicode character is escaped and any
byte that is in the escaped representation but not the semicolon will
become whitespace.

llvm-svn: 160113
2012-07-12 08:34:31 +00:00
Benjamin Kramer 29f90e804d PR13312: Don't crash when printing a fixit that ends in a unicode character.
llvm-svn: 160112
2012-07-12 08:20:49 +00:00
Gregory Szorc 9a2cb42451 [clang.py] Implement Token API
llvm-svn: 160111
2012-07-12 07:21:12 +00:00
Craig Topper f7755df776 Update GATHER instructions to support 2 read-write operands. Patch from myself and Manman Ren.
llvm-svn: 160110
2012-07-12 06:52:41 +00:00
Gregory Szorc bdbb73d276 [clang.py] Add TranslationUnit.get_{file,source_location,source_range}
llvm-svn: 160107
2012-07-12 05:05:56 +00:00
Gregory Szorc f1b7e3c7ba [clang.py] Refactor how ctypes functions are registered
llvm-svn: 160106
2012-07-12 04:56:46 +00:00
Rafael Espindola 4dedd0ceb8 Process #pragma visibility early in the parsing of class definitions. Fixes
pr13338.

llvm-svn: 160105
2012-07-12 04:47:34 +00:00
Rafael Espindola 06e1b13209 Ignore visibility attributes after definitions. This matches newer (4.7) gcc's
behavior and is the first step in fixing pr13338.

llvm-svn: 160104
2012-07-12 04:32:30 +00:00
NAKAMURA Takumi e5494ffe4f Revert r160052, "Default to -std=c++11 on Windows.", for now.
Failing Tests (3):
    Clang :: Index/complete-cxx-inline-methods.cpp
    Clang :: Index/recursive-cxx-member-calls.cpp
    Clang :: SemaTemplate/inject-templated-friend-post.cpp

llvm-svn: 160103
2012-07-12 03:14:56 +00:00
John McCall 775086e67c Add the ObjFW runtime. Patch by Jonathan Schleifer!
llvm-svn: 160102
2012-07-12 02:07:58 +00:00
Evan Cheng 493eb32ff4 Instcombine was transforming:
%shr = lshr i64 %key, 3
  %0 = load i64* %val, align 8
  %sub = add i64 %0, -1
  %and = and i64 %sub, %shr
  ret i64 %and

to:
  %shr = lshr i64 %key, 3
  %0 = load i64* %val, align 8
  %sub = add i64 %0, 2305843009213693951
  %and = and i64 %sub, %shr
  ret i64 %and

The demanded bit optimization is actually a pessimization because add -1 would
be codegen'ed as a sub 1. Teach the demanded constant shrinking optimization
to check for negated constant to make sure it is actually reducing the width
of the constant.

rdar://11793464

llvm-svn: 160101
2012-07-12 01:45:35 +00:00
Jim Ingham 17ce5b977b Add a command channel to wait on along with the file descriptor the ConnectionFileDescriptor class is managing, so we can always pop ourselves out of our select call regardless of how well behaved the channel we are talking to is.
<rdar://problem/11448282>

llvm-svn: 160100
2012-07-12 01:17:55 +00:00
Sean Callanan 7d69f12e75 Added a mutex to the call frame info to guard
generation of the FDE index.

<rdar://problem/11813705>

llvm-svn: 160099
2012-07-12 01:11:40 +00:00
Jim Grosbach d2aabd3bb2 TableGen: Location information for diagnostic.
def Pat<...>;

Results in 'record name is not a string!' diagnostic. Not the best,
but the lack of location information moves it from not very helpful
into completely useless. We're in the Record class when throwing the
error, so just add the location info directly.

llvm-svn: 160098
2012-07-12 00:53:31 +00:00
NAKAMURA Takumi 0e449c4e54 AST/CommentSema.cpp: Fix signess in abs() to appease msvc. It would not make sense to pass (unsigned)-(unsigned) to abs().
llvm-svn: 160097
2012-07-12 00:45:08 +00:00
NAKAMURA Takumi 7073024ffd clang/lib/Basic/CMakeLists.txt: Add missing dependency, ClangDiagnosticComment.
llvm-svn: 160096
2012-07-12 00:27:55 +00:00
Jason Molenda 380241a81f Add a new 'target modules show-unwind' command to show the different
UnwindPlans for a function.  This specifically does not use any
previously-generated UnwindPlans so if any logging is performed
while creating the UnwindPlans, it will be repeated.  This is
useful for when an lldb stack trace is not correct and you want
to gather diagnostic information from the user -- they can do 
log enable -v lldb unwind, image show-unwind of the function, and
you'll get the full logging as the UnwindPlans are recreated.

llvm-svn: 160095
2012-07-12 00:20:07 +00:00
Jordan Rose d66bee3f76 [analyzer] Don't inline virtual calls unless we can devirtualize properly.
Previously we were using the static type of the base object to inline
methods, whether virtual or non-virtual. Now, we try to see if the base
object has a known type, and if so ask for its implementation of the method.

llvm-svn: 160094
2012-07-12 00:16:25 +00:00