Commit Graph

116477 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis fed29142ba When applying ARC __weak to a non-objc pointer, do not give error that
__weak is unsupported by the deployment target, since it is going to be
ignored anyway.

Makes it easier for incremental migration from GC.

llvm-svn: 143975
2011-11-07 18:40:21 +00:00
Eric Christopher 2c5dab541d Avoid the use of a local temporary for comment twines.
llvm-svn: 143974
2011-11-07 18:34:47 +00:00
Matt Beaumont-Gay 50da84bdb9 Better fix for -Wnon-virtual-dtor
llvm-svn: 143972
2011-11-07 18:30:47 +00:00
Eric Christopher cc979f9ae6 Allow for the case where the name of the subprogram is "".
Fixes a self-host error.

llvm-svn: 143970
2011-11-07 18:10:17 +00:00
Matt Beaumont-Gay 4703a29e4a Remove duplicate listings for core.DivideZero
llvm-svn: 143969
2011-11-07 18:00:03 +00:00
Douglas Gregor 4109afa1f1 Drastically simplify the mapping from the declaration corresponding to
the injected-class-name of a class (or class template) to the
declaration that results from substituting the given template
arguments. Previously, we would actually perform a substitution into
the injected-class-name type and then retrieve the resulting
declaration. However, in certain, rare circumstances involving
deeply-nested member templates, we would get the wrong substitution
arguments.

This new approach just matches up the declaration with a declaration
that's part of the current context (or one of its parents), which will
either be an instantiation (during template instantiation) or the
declaration itself (during the definition of the template). This is
both more efficient (we're avoiding a substitution) and more correct
(we can't get the template arguments wrong in the member-template
case). 

Fixes <rdar://problem/9676205>.

Reinstated, now that we have the fix in r143967.

llvm-svn: 143968
2011-11-07 17:43:18 +00:00
Douglas Gregor df593fbeda Tighten up the conditions under which we consider ourselves to be
entering the context of a nested-name-specifier. Fixes
<rdar://problem/10397846>.

llvm-svn: 143967
2011-11-07 17:33:42 +00:00
Owen Anderson 7635bb7ae2 Fix llvm-objdump's MachO mode to not depend on the value returned by RelocationRef::getInfo().
llvm-svn: 143966
2011-11-07 17:21:36 +00:00
Matt Beaumont-Gay 43e15ff357 Appease -Wnon-virtual-dtor
llvm-svn: 143965
2011-11-07 17:16:31 +00:00
Richard Osborne 561fac4d4e Don't introduce custom nodes after legalization in TargetLowering::BuildSDIV()
and TargetLowering::BuildUDIV(). Fixes PR11283

llvm-svn: 143964
2011-11-07 17:09:05 +00:00
Benjamin Kramer f5fbe436bc Fix an unsafe use of Twine.
llvm-svn: 143962
2011-11-07 16:02:25 +00:00
Tobias Grosser 76c2e32a8e ScopInfo: Extract function getIdForParam()
llvm-svn: 143961
2011-11-07 12:58:59 +00:00
Tobias Grosser 120db6b583 SCEVValidator: Move into own file
llvm-svn: 143960
2011-11-07 12:58:54 +00:00
Tobias Grosser 60e85cbd9d ScopDetection: Introduce methods to check attributes of ValidatorResult
This simplifies e.g:

if (Op.type == SCEVType::INT || Op.type == SCEVType::PARAM)

  to

if (Op.isConstant())

llvm-svn: 143959
2011-11-07 12:58:46 +00:00
Tobias Grosser eadc4285db ScopDetection: Add ValidatorResult class
llvm-svn: 143958
2011-11-07 12:58:41 +00:00
Eric Christopher 8c7505f258 Remove unnecessary addition to API. Replace with something much simpler.
llvm-svn: 143925
2011-11-07 09:38:42 +00:00
Eric Christopher e1c874aa70 Add new files to cmake.
llvm-svn: 143924
2011-11-07 09:37:06 +00:00
Eric Christopher 4996c70034 Add the support code to enable the dwarf accelerator tables. Upcoming patches
to fix the types section (all types, not just global types), and testcases.

The code to do the final emission is disabled by default.

llvm-svn: 143923
2011-11-07 09:24:32 +00:00
Richard Smith f3e9e43da4 Constant expression evaluation: support for arrays.
llvm-svn: 143922
2011-11-07 09:22:26 +00:00
Eric Christopher 6e47204b0c Add a new dwarf accelerator table prototype with the goal of replacing
the pubnames and pubtypes tables. LLDB can currently use this format
and a full spec is forthcoming and submission for standardization is planned.

A basic summary:

The dwarf accelerator tables are an indirect hash table optimized
for null lookup rather than access to known data. They are output into
an on-disk format that looks like this:

.-------------.
|  HEADER     |
|-------------|
|  BUCKETS    |
|-------------|
|  HASHES     |
|-------------|
|  OFFSETS    |
|-------------|
|  DATA       |
`-------------'

where the header contains a magic number, version, type of hash function,
the number of buckets, total number of hashes, and room for a special
struct of data and the length of that struct.

The buckets contain an index (e.g. 6) into the hashes array. The hashes
section contains all of the 32-bit hash values in contiguous memory, and
the offsets contain the offset into the data area for the particular
hash.

For a lookup example, we could hash a function name and take it modulo the
number of buckets giving us our bucket. From there we take the bucket value
as an index into the hashes table and look at each successive hash as long
as the hash value is still the same modulo result (bucket value) as earlier.
If we have a match we look at that same entry in the offsets table and
grab the offset in the data for our final match.

llvm-svn: 143921
2011-11-07 09:18:42 +00:00
Eric Christopher a7b6189071 Expose a way to get the beginning of the dwarf string section.
llvm-svn: 143920
2011-11-07 09:18:38 +00:00
Eric Christopher 6abc9c5aaa Fix up comment.
llvm-svn: 143919
2011-11-07 09:18:35 +00:00
Eric Christopher 2b4f77350d Typo.
llvm-svn: 143918
2011-11-07 09:18:32 +00:00
Chandler Carruth a62ba81682 Rip out one of the features I added for the driver-include-management.
We don't actually need a separate flag for non-sysrooted paths as the
driver has to manage the sysroot anyways. The driver is not infrequently
adding paths to the header search based on their existence on the
filesystem. For that, it has to add the sysroot anyways, we should pass
it on down to CC1 already joined. More importantly, the driver cannot in
all cases distinguish between sysrooted paths and paths that are
relative to the Clang binary's installation directory. Essentially, we
always need to ignore the system root for these internal header search
options. It turns out in most of the places we were already providing
the system root in the driver, and then another one in CC1 so this fixes
several bugs.

llvm-svn: 143917
2011-11-07 09:17:31 +00:00
Chandler Carruth f470173e46 Fix Linux libc++ usage. Somehow this slipped through during the port.
Test cases for this and all the rest of the port are still in the works,
but will wait for a fixed computer and post 3.0 merging...

llvm-svn: 143916
2011-11-07 09:01:17 +00:00
Craig Topper a6d409d543 Add AVX2 variable shift instructions and intrinsics.
llvm-svn: 143915
2011-11-07 08:26:24 +00:00
Richard Smith bcb4eb2813 Fix 32-bit build bots and remove some casting-away-const warnings.
llvm-svn: 143914
2011-11-07 07:31:09 +00:00
David Blaikie 103a3a03a2 Colorize. (this is consistent with the coloring in diagnostics.html, but perhaps that's a bit out of date because it doesn't look like current clang behavior)
llvm-svn: 143913
2011-11-07 06:28:33 +00:00
Anna Zaks 82a5b7bd25 [analyzer] Add the Checker Developer Manual to the menu.
It's still under construction but has enough info to be useful.

llvm-svn: 143912
2011-11-07 05:40:51 +00:00
Anna Zaks 5259086b8e [analyzer] Add overview and checker registration to the checker developer manual.
llvm-svn: 143911
2011-11-07 05:36:29 +00:00
John McCall ffc8ca2d84 Rip out CK_GetObjCProperty.
llvm-svn: 143910
2011-11-07 05:09:54 +00:00
Richard Smith 8081560048 Constant expression evaluation: preserve subobject designator when flattening a
core constant value down to an APValue.

llvm-svn: 143909
2011-11-07 05:07:52 +00:00
John McCall c109a259d2 Rip the ObjCPropertyRef l-value kind out of IR-generation.
llvm-svn: 143908
2011-11-07 03:59:57 +00:00
David Blaikie 8c045bcf9d Remove duplicate word & unnecessary conditional.
llvm-svn: 143907
2011-11-07 03:30:03 +00:00
David Blaikie b06c68d320 Move tests to the appropriate directory to match the spec hierarchy.
llvm-svn: 143906
2011-11-07 03:27:58 +00:00
Richard Smith a08acd8588 Allow constexpr variables' initializers to be folded in C++11 mode. This
partially undoes the revert in r143491, but does not introduce any new instances
of the underlying issue (which is not yet fixed) in code which does not use
the 'constexpr' keyword.

llvm-svn: 143905
2011-11-07 03:22:51 +00:00
Craig Topper ff39be0afc Add AVX2 VPMOVMASK instructions and intrinsics.
llvm-svn: 143904
2011-11-07 03:20:35 +00:00
Craig Topper e122dcbf4a Add AVX2 VEXTRACTI128 and VINSERTI128 instructions. Fix VPERM2I128 to be qualified with HasAVX2 instead of HasAVX. Mark VINSERTF128 and VEXTRACTF128 as never having side effects.
llvm-svn: 143902
2011-11-07 02:00:04 +00:00
Craig Topper 620db14aac Fix accidental edit to __builtin_ia32_vperm2f128_ps256's name
llvm-svn: 143901
2011-11-07 00:54:28 +00:00
Chandler Carruth efad16ad6b Begin lifting some of the one-off checking logic into generic helper
routines on the base toolchain class.

llvm-svn: 143900
2011-11-06 23:39:37 +00:00
Chandler Carruth 4c90fba23e Move the GCC installation detection logic down into the Generic_GCC
toolchain. The logic is mostly generic already, and where possible
should be made more generic. Also, it has no impact other than to expose
a set of methods which each toolchain can then query to setup their
desired configuration. These should be available to toolchains beyond
just Linux.

llvm-svn: 143899
2011-11-06 23:39:34 +00:00
NAKAMURA Takumi 012d681acd Fix CRT selection logic when using CMake NMake generator.
CMAKE_CONFIGURATION_TYPES is only set on Visual Studio generators.  For NMake CMAKE_BUILD_TYPE is used instead.

Patch by EJose Fonseca!

llvm-svn: 143898
2011-11-06 23:37:22 +00:00
Chandler Carruth 0c0981ee47 Remove an old OpenSUSE hack that is no longer needed -- it is exactly
the same as a directory added further down in the new logic.

llvm-svn: 143897
2011-11-06 23:10:49 +00:00
Chandler Carruth d0b93d6daf Remove the HasMultilib check. It was essentially useless. The driver now
looks for evidence of a multilib installation, and adds the appropriate
bits to the search paths.

llvm-svn: 143896
2011-11-06 23:09:05 +00:00
Craig Topper f01f1b5cb9 More AVX2 instructions and their intrinsics.
llvm-svn: 143895
2011-11-06 23:04:08 +00:00
David Blaikie 876657b9c8 Correcting grammar.
llvm-svn: 143894
2011-11-06 22:28:03 +00:00
Benjamin Kramer 20baffb257 Replace (Lower|Upper)caseString in favor of StringRef's newest methods.
llvm-svn: 143891
2011-11-06 20:37:06 +00:00
Benjamin Kramer e3b94d1b55 Fix a typo.
llvm-svn: 143890
2011-11-06 20:36:50 +00:00
Benjamin Kramer 44f91da8cc Use StringRef's case transformation methods.
llvm-svn: 143889
2011-11-06 20:36:48 +00:00
Daniel Dunbar 490aa6fd87 Revert "llvm-config-2: Switch to using real library dependency table." while I
investigate build failure.

llvm-svn: 143888
2011-11-06 19:57:04 +00:00