Commit Graph

100572 Commits

Author SHA1 Message Date
Jason W Kim 85b0af177f Rework some .ARM.attribute work for improved gcc compatibility.
Unified EmitTextAttribute for both Asm and Obj emission (.cpu only)
Added necessary cortex-A8 related attrs for codegen compat tests.

llvm-svn: 124995
2011-02-07 00:49:53 +00:00
Chris Lattner 6e57b15228 teach instsimplify to transform (X / Y) * Y to X
when the div is an exact udiv.

llvm-svn: 124994
2011-02-06 22:05:31 +00:00
Chris Lattner 9c70414551 rename test.
llvm-svn: 124993
2011-02-06 21:59:10 +00:00
Chris Lattner 35315d065b enhance vmcore to know that udiv's can be exact, and add a trivial
instcombine xform to exercise this.

Nothing forms exact udivs yet though.  This is progress on PR8862

llvm-svn: 124992
2011-02-06 21:44:57 +00:00
Eric Christopher b54605b8e2 Remove premature optimization that avoided calculating argument weights
if we weren't going to inline the function. The rest of the code using
this was removed.

Fixes PR9154.

llvm-svn: 124991
2011-02-06 21:27:46 +00:00
Anders Carlsson ecf8e159e3 Simplify test, as suggested by Chris.
llvm-svn: 124990
2011-02-06 20:22:49 +00:00
Anders Carlsson 49d81a3d7e Remove a virtual inheritance case that clang can devirtualize fully now.
llvm-svn: 124989
2011-02-06 20:16:49 +00:00
Anders Carlsson 43760c3d42 Add another test that we can fully devirtualize now.
llvm-svn: 124988
2011-02-06 20:16:20 +00:00
Anders Carlsson d21b06a0db When loading from a constant, fold inttoptr if the integer type and the resulting pointer type both have the same size.
llvm-svn: 124987
2011-02-06 20:11:56 +00:00
Anders Carlsson e866d44417 Fix self-host; if a thunk already exists and has available_externally linkage, we should change its linkage instead of asserting.
llvm-svn: 124986
2011-02-06 20:09:44 +00:00
Oscar Fuentes 7dc9dce770 Don't define NDEBUG on MSVC_IDE and XCode builds. Fixes PR9155.
llvm-svn: 124985
2011-02-06 19:07:06 +00:00
Anders Carlsson 8b02183ff3 When building with optimizations, emit thunks with available_externally linkage so devirtualized function calls can also be de-thunked.
llvm-svn: 124984
2011-02-06 18:31:40 +00:00
Anders Carlsson fe8a9939f9 Simplify thunks code.
llvm-svn: 124983
2011-02-06 17:15:43 +00:00
Oscar Fuentes ced8836182 CLANG_BINARY_DIR is not the same thing as LLVM_BINARY_DIR when Clang
is built as part of LLVM.

llvm-svn: 124982
2011-02-06 15:33:08 +00:00
Chris Lattner 7031ae38bb add some missing builtins.
llvm-svn: 124981
2011-02-06 12:45:51 +00:00
Nick Lewycky cb1a4c26ee Simplify away redundant test, and document what's going on.
llvm-svn: 124977
2011-02-06 05:04:00 +00:00
Nick Lewycky f8797fda44 Remove specialized comparison of InlineAsm objects. They're uniqued on creation
now, and this wasn't comparing some of their relevant bits anyhow.

llvm-svn: 124976
2011-02-06 04:33:50 +00:00
Oscar Fuentes 82a0d26294 Support running tests from the VS IDE and XCode.
Untested, but should work :)

llvm-svn: 124975
2011-02-05 21:37:51 +00:00
Oscar Fuentes 1b6a38e3c6 Remove the clang++ symlink with `make clean'.
llvm-svn: 124974
2011-02-05 21:37:37 +00:00
Douglas Gregor 7115aee109 Add a __has_feature check for default template arguments in function
templates, a C++0x feature.

llvm-svn: 124973
2011-02-05 20:35:30 +00:00
Oscar Fuentes c9fe3b94a5 CMake: libclang shall be named libclang.so, not liblibclang.so.
It is not possible to simply change that target name to `clang'
because we already have one.

llvm-svn: 124972
2011-02-05 20:00:13 +00:00
Douglas Gregor 606c4ac325 Improve our uniquing of file entries when files are re-saved or are
overridden via remapping. Thus, when we create a "virtual" file in the
file manager, we still stat() the real file that lives behind it so
that we can provide proper uniquing based on inodes. This helps keep
the file manager much more consistent.

To take advantage of this when reparsing files in libclang, we disable
the use of the stat() cache when reparsing or performing code
completion, since the stat() cache is very likely to be out of date in
this use case.

llvm-svn: 124971
2011-02-05 19:42:43 +00:00
Sebastian Redl 0890502f44 Basic implementation of inherited constructors. Only generates declarations, and probably only works for very basic use cases.
llvm-svn: 124970
2011-02-05 19:23:19 +00:00
Oscar Fuentes 84cb3947e5 Support `make clang-test' when Clang is compiled outside of LLVM.
This may not work on build platforms that place the binaries on
special folders ($build_dir/bin/Release/) such as the VS IDE and
XCode. For fixing this it is necessary to add a lit.py configuration
option for saying where the Clang binaries are, and apply to that path
the same magit that is used with the path to the LLVM tools binary
directory. Doing this requires a bit of autoconf work.

llvm-svn: 124969
2011-02-05 19:08:56 +00:00
Oscar Fuentes 3522179e36 Moved more stuff to HandleLLVMOptions.cmake
llvm-svn: 124968
2011-02-05 19:08:42 +00:00
Anders Carlsson 73f97534b0 Pass a 'ForVTable' flag to GetAddrOfThunk and pass it along to GetOrCreateLLVMFunction so that we
won't assert when building a thunk for an implicit virtual member function that is not marked used.

llvm-svn: 124967
2011-02-05 18:48:55 +00:00
Anders Carlsson 36c6d23074 Fix another warning.
llvm-svn: 124961
2011-02-05 18:33:43 +00:00
Anders Carlsson 630125ab27 Fix a clang warning.
llvm-svn: 124960
2011-02-05 18:19:35 +00:00
Tobias Grosser b0e0597d07 python bindings: Add support for different kind of completion chunks
llvm-svn: 124959
2011-02-05 17:54:10 +00:00
Tobias Grosser b0949a17a0 python bindings: Get the string representation of a CompletionChunk
llvm-svn: 124958
2011-02-05 17:54:07 +00:00
Tobias Grosser 85bb48fce7 python bindings: Add CodeCompletionResults
llvm-svn: 124957
2011-02-05 17:54:04 +00:00
Tobias Grosser 2a8aac5ff4 python bindings: Add support for translationUnit.reparse().
This is the first step to make the clang_complete vim plugin work with
libclang. Reparsing improves parsing time from 0.8 to 0.25 secs for
one of my LLVM .cpp files.

llvm-svn: 124956
2011-02-05 17:54:00 +00:00
Tobias Grosser 4748651060 python bindings: Include local headers the right way.
llvm-svn: 124955
2011-02-05 17:53:55 +00:00
Tobias Grosser 0e19c192f5 python bindings: Remove unneeded instruction
llvm-svn: 124954
2011-02-05 17:53:53 +00:00
Tobias Grosser 5153e79931 python bindings: fix Diagnostics.range iterator
The iterator did never throw an IndexError. It was therefore not possible
to use it in a normal foreach loop as that loop would never stop.

llvm-svn: 124953
2011-02-05 17:53:51 +00:00
Tobias Grosser 82c18a502f python bindings: Use python Diagnostics as function arguments
This improves the readability of the code and fixes one testsuite bug.

The bug happend, because we only stored the pointer to the diagnostic in the
FixIt iterator, but not the python Diagnostic object. So it could happen that
the FixIt iterator still exists, but the python Diagnostic object is freed.
However, as the python Diagnostic is freed the pointer to the diagnostic is also
freed and the FixIt iterator is referencing a freed pointer.

llvm-svn: 124952
2011-02-05 17:53:48 +00:00
Tobias Grosser 2128823e74 python bindings: Synchronize cursor kinds
clang-c/Index.h contained cursor kinds not yet available in the python bindings.

Contributed-By: jmuizelaar@mozilla.com
llvm-svn: 124951
2011-02-05 17:53:47 +00:00
NAKAMURA Takumi 03a541f5c4 Windows/DynamicLibrary.inc: Split explicit symbols into explicit_symbols.inc.
config.h.* have conditions whether each symbol is defined or not.
Autoconf and CMake may check symbols in libgcc.a for JIT on Mingw.

llvm-svn: 124950
2011-02-05 15:11:53 +00:00
NAKAMURA Takumi 1850c80afb Target/X86: Tweak allocating shadow area (aka home) on Win64. It must be enough for caller to allocate one.
llvm-svn: 124949
2011-02-05 15:11:32 +00:00
NAKAMURA Takumi b21c3db920 lib/Target/X86/X86ISelLowering.cpp: Introduce a new variable "IsWin64". No functional changes.
llvm-svn: 124948
2011-02-05 15:11:13 +00:00
NAKAMURA Takumi b1bbdd8d44 lib/Target/X86/X86JITInfo.cpp: Add Win64 stuff.
llvm-svn: 124947
2011-02-05 15:11:03 +00:00
NAKAMURA Takumi f7f319d4d3 Target/X86: Fix whitespace.
llvm-svn: 124946
2011-02-05 15:10:54 +00:00
NAKAMURA Takumi 3e600a29d3 Windows/Program.inc: Quote arguments when dubious characters (used by cmd.exe or MSYS shell) are included to invoke CreateProcess(). Thanks to Danil Malyshev.
llvm-svn: 124945
2011-02-05 08:53:12 +00:00
Greg Clayton 068d16b4df Fixup on setlinebuf() patch to make it work.
llvm-svn: 124944
2011-02-05 06:41:57 +00:00
Greg Clayton edd5192d13 Configuration support for setlinebuf support from Kirk Beitz.
llvm-svn: 124943
2011-02-05 06:37:53 +00:00
Greg Clayton 8442fba3b4 Apple specific fix for Host.cpp from Kirk Beitz.
llvm-svn: 124942
2011-02-05 06:36:35 +00:00
Greg Clayton 4c2c0fcb9f Apple specific change from Kirk Beitz.
llvm-svn: 124941
2011-02-05 06:35:06 +00:00
Argyrios Kyrtzidis dd03d8ddaa [analyzer] Fix a false positive of the 'self' initialization checker.
A common pattern in classes with multiple initializers is to put the
subclass's common initialization bits into a static function that receives
the value of 'self', e.g:

   if (!(self = [super init]))
     return nil;
   if (!(self = _commonInit(self)))
     return nil;

It was reported that 'self' was not set to the result of [super init].
Until we can use inter-procedural analysis, in such a call, transfer the
ObjCSelfInitChecker flags associated with 'self' to the result of the call.

Fixes rdar://8937441 & http://llvm.org/PR9094

llvm-svn: 124940
2011-02-05 05:54:53 +00:00
Argyrios Kyrtzidis 3d3208675f When the out-of-line definition differs from the declaration in the return type,
say "out-of-line definition differ from the declaration in the return type" instead of
the silly "functions that differ only in their return type cannot be overloaded".

Addresses rdar://7980179.

llvm-svn: 124939
2011-02-05 05:54:49 +00:00
Greg Clayton 0360eac4df A tool for examining a mach process and its threads.
llvm-svn: 124937
2011-02-05 05:27:30 +00:00