Commit Graph

134970 Commits

Author SHA1 Message Date
Bill Wendling a1ed4aa17d Add function to return return attributes.
llvm-svn: 165164
2012-10-03 21:19:35 +00:00
Bill Wendling 71ad78b24b Update to use the predicate methods to query if an attribute exists.
llvm-svn: 165163
2012-10-03 21:17:09 +00:00
Bill Wendling a1ec84474b Remove the directory that these are already in.
llvm-svn: 165162
2012-10-03 21:08:21 +00:00
Argyrios Kyrtzidis f484b139db [libclang] When indexing, invoke the importedASTFile for PCH files as well.
llvm-svn: 165161
2012-10-03 21:05:51 +00:00
Argyrios Kyrtzidis 184b14428e [libclang] Simplify indexing of module imports by handling implicit
imports via ImportDecls.

llvm-svn: 165160
2012-10-03 21:05:44 +00:00
Bob Wilson 1ff65860e4 Back out my temporary workaround for Apple buildbots.
--- Reverse-merging r164909 into '.':
U    make/platform/clang_darwin.mk

llvm-svn: 165159
2012-10-03 21:03:42 +00:00
Richard Smith b815525223 PR14004: Fix typo in documentation.
llvm-svn: 165158
2012-10-03 21:02:25 +00:00
Benjamin Kramer bf56beab7e Fix invalid reads by memcmp.
Str may be smaller than Start->Name here. Use strncmp to avoid scanning past the
end. Found by valgrind.

llvm-svn: 165157
2012-10-03 20:58:09 +00:00
Benjamin Kramer b15b97ef9a Always initialize FPContractable.
false is used as a baseline here, we may want to allow contraction in some of
the cases.  Found by valgrind.

llvm-svn: 165156
2012-10-03 20:58:04 +00:00
Howard Hinnant f543a75be1 Holger Arnold: Correct the use and testing of __GNUC__ and __GNUC_MINOR__ in <__config>.
llvm-svn: 165151
2012-10-03 20:48:05 +00:00
Michael J. Spencer bfdde7cb60 [Options] Store the owning OptTable in Option so it can construct Group and Alias.
llvm-svn: 165150
2012-10-03 19:58:10 +00:00
Simon Atanasyan b16488c9fb Remove useless parameter "WantFile" from Driver::GetProgramPath().
This parameter is useless because nowhere used explicitly and always
gets its default value - "false".

The patch reviewed by Rafael Espindola.

llvm-svn: 165149
2012-10-03 19:52:37 +00:00
Nadav Rotem ac92066b0c Fix a cycle in the DAG. In this code we replace multiple loads with a single load and
multiple stores with a single load. We create the wide loads and stores (and their chains)
before we remove the scalar loads and stores and fix the DAG chain. We attempted to merge
loads with a different chain. When that happened, the assumption that it is safe to RAUW
broke and a cycle was introduced.

llvm-svn: 165148
2012-10-03 19:30:31 +00:00
Nick Kledzik 85a62b1a1d Use unsigned long long instead of uin64_t for OS where that matters.
llvm-svn: 165147
2012-10-03 19:27:25 +00:00
Sean Callanan 7505079a1f An API in Clang got renamed; fixing LLDB to match.
llvm-svn: 165144
2012-10-03 19:23:27 +00:00
Bill Schmidt 25cb349a17 This patch enables general varargs support for the 64-bit PPC SVR4 ABI.
Most of the pieces for this were already in place, but a proper EmitVAArg
is needed for aggregates and complex numbers to be handled.  Although the
va_list for 64-bit PowerPC SVR4 consists of GPRs 3 through 10 together with
the overflow portion of the parameter save area, we can treat va_list as
pointing to contiguous memory for all parameters, since the back end forces
the parameter GPRs to memory for varargs functions.

There is no need at this time to model parameters and return values beyond
what the DefaultABIInfo provides.

llvm-svn: 165143
2012-10-03 19:18:57 +00:00
Fariborz Jahanian e0e4bd3c76 Fix a typo in my last patch reported by Erik Schwiebert.
llvm-svn: 165142
2012-10-03 19:05:41 +00:00
Chad Rosier 095e1cdaca Typos.
llvm-svn: 165141
2012-10-03 19:00:20 +00:00
Benjamin Kramer d95ceff092 Don't call getAsUnsignedInteger directly, it fails to compile if uint64_t is not "unsigned long long".
while there add more test cases.

llvm-svn: 165140
2012-10-03 18:54:36 +00:00
Douglas Gregor e96037923f Remove ASTReader::needPendingInstantiation(), introduced in r164993,
which is neither correct nor necessary. The use of this routine was
eliminated by r165137.

llvm-svn: 165139
2012-10-03 18:38:43 +00:00
Douglas Gregor e4a838ac3f Add some FIXMEs to the ASTReader code
llvm-svn: 165138
2012-10-03 18:36:10 +00:00
Douglas Gregor 559458c830 Revert most of the functionality in r165001. Instead, make sure that
the ASTReader doesn't attach a body to a function that is already
defined elsewhere.

llvm-svn: 165137
2012-10-03 18:34:48 +00:00
Nick Kledzik f8a75eef85 Add getAsUnsignedInteger test case that checks that known bad values are rejected
llvm-svn: 165136
2012-10-03 18:15:27 +00:00
Bill Wendling 76f50f48a1 No need to call functions which do the same thing as the default.
llvm-svn: 165135
2012-10-03 18:10:49 +00:00
Bill Wendling eef9b8a1b5 Remove assert that's too restrictive.
llvm-svn: 165134
2012-10-03 18:08:57 +00:00
Fariborz Jahanian 4a67508685 objective-C arc: Warn under arc about a use of an ivar inside a block
that doesn't have a 'self' as this implicitly captures 'self' and could
create retain cycles. Provide fixit. // rdar://11194874

llvm-svn: 165133
2012-10-03 17:55:29 +00:00
Bill Wendling 8baa61d85d Add methods which query for the specific attribute instead of using the
enums. This allows for better encapsulation of the Attributes class.

llvm-svn: 165132
2012-10-03 17:54:26 +00:00
Simon Atanasyan 53fefd1f6a Implement Adnroid MIPS toolchain support:
1. Add mipsel-linux-android to the list of valid MIPS target triples.
2. Add <gcc install path>/mips-r2 to the list of toolchain specific path
   prefixes if target is mipsel-linux-android.

The patch reviewed by Logan Chien.

llvm-svn: 165131
2012-10-03 17:46:38 +00:00
Preston Gurd 7912de6829 Fix failure of newly added test, by using %clang instead of %clang_cc1
and by specifying a target.

llvm-svn: 165130
2012-10-03 16:52:40 +00:00
Preston Gurd a3d7df6fee Adds a test to verify that Clang does the optimization to use a
fast div/rem instruction (for Intel Atom).

Test case for llvm commit 165126.

Patch by Tyler Nowicki.

llvm-svn: 165129
2012-10-03 16:37:56 +00:00
Tim Northover 471cbb73f8 Implement .rel relocation for R_ARM_ABS32 in MCJIT.
Patch by Amara Emerson.

llvm-svn: 165128
2012-10-03 16:29:42 +00:00
Preston Gurd 5509e3d727 This Patch corrects a problem whereby the optimization to use a faster divide
instruction (for Intel Atom) was not being done by Clang, because
the type context used by Clang is not the default context.

It fixes the problem by getting the global context types for each div/rem
instruction in order to compare them against the types in the BypassTypeMap.

Tests for this will be done as a separate patch to Clang.

Patch by Tyler Nowicki.

llvm-svn: 165126
2012-10-03 16:11:44 +00:00
Nadav Rotem 7cbc12a41d A DAGCombine optimization for mergeing consecutive stores to memory. The optimization
is not profitable in many cases because modern processors perform multiple stores
in parallel and merging stores prior to merging requires extra work. We handle two main cases:

1. Store of multiple consecutive constants:
  q->a = 3;
  q->4 = 5;
In this case we store a single legal wide integer.

2. Store of multiple consecutive loads:
  int a = p->a;
  int b = p->b;
  q->a = a;
  q->b = b;
In this case we load/store either ilegal vector registers or legal wide integer registers.

llvm-svn: 165125
2012-10-03 16:11:15 +00:00
Jordan Rose ef77a87a9e Revert "InlineObjCInstanceMethod.m: Remove lines introduced in r165079."
...and fix the run line so that the expected warnings are the same on
all platforms.

This reverts r165088 / d09074f0ca06626914108f1c0d4e70adeb851e01.

llvm-svn: 165124
2012-10-03 16:00:32 +00:00
Preston Gurd 35fcb54cdd Set up MCSchedModel after detecting the CPU type in X86SubTarget.
Corrects a problem whereby MCSchedModel was not being set up when
the CPU type was auto-detected.

Patch by Andy Zhang.

llvm-svn: 165122
2012-10-03 15:55:13 +00:00
Alexander Potapenko 0f0a50da56 Set ASAN_NEEDS_SEGV=0 on Android only.
llvm-svn: 165120
2012-10-03 15:09:17 +00:00
Benjamin Kramer 3da0563a35 clang-check: Add clangRewriteCore.a to the Makefile build to make it link again.
llvm-svn: 165119
2012-10-03 14:35:38 +00:00
Benjamin Kramer f5c3b9c7cb Matching block names with FileCheck requires asserts.
llvm-svn: 165118
2012-10-03 14:21:33 +00:00
Benjamin Kramer daa0961244 CodeGen: Fix a silly typo when emitting subs of block addresses.
Part of PR14005.

llvm-svn: 165117
2012-10-03 14:15:39 +00:00
Nico Weber 90a415e7ca When mangling an APSInt with the ms abi, make sure to look at all nibbles.
Currently, it's ignored if the number of set bits isn't divisible by 4.

llvm-svn: 165116
2012-10-03 13:39:49 +00:00
Daniel Jasper 30abda1612 As opposed to the clang-fixit tool described on
http://clang.llvm.org/docs/ClangTools.html, this adds -fixit option to
clang-check. Thus, clang-check can become a general-purpose tool to run
clang capitalizing on the info stored in a compilation database.

Review: http://llvm-reviews.chandlerc.com/D51
llvm-svn: 165110
2012-10-03 13:28:43 +00:00
Dmitry Vyukov 84d75cdffd tsan: update the test for new atomic enums
llvm-svn: 165109
2012-10-03 13:19:20 +00:00
Dmitry Vyukov 68845093dd tsan: update the test for new atomic enums
llvm-svn: 165108
2012-10-03 13:13:54 +00:00
Dmitry Vyukov f4cb22121a tsan: prepare for migration to new memory_order enum values (ABI compatible)
llvm-svn: 165107
2012-10-03 13:00:57 +00:00
Dmitry Vyukov be6878365d tsan: prepare for migration to new memory_order enum values (ABI compatible)
llvm-svn: 165106
2012-10-03 13:00:13 +00:00
Logan Chien b914d14e67 Fix typo in comments.
llvm-svn: 165105
2012-10-03 09:26:43 +00:00
Dmitri Gribenko 61b1db1629 Comment to XML conversion: escape XML special chars correctly; use correct
regex for version tuples.

llvm-svn: 165104
2012-10-03 09:04:56 +00:00
Bill Wendling 766d4d22ac The top-level clang Makefile is #included into other Makefiles. (sigh) So we
can't have the logic here to add in the 'tools/{driver,libclang}' directories,
because they will be added in for ALL Makefiles which #include the top-level
one. Place the logic into the 'tools' Makefile.

llvm-svn: 165103
2012-10-03 08:39:19 +00:00
Silviu Baranga 3c314990e6 Fixed a bug in the ExecutionDependencyFix pass that caused dependencies to not propagate through implicit defs.
llvm-svn: 165102
2012-10-03 08:29:36 +00:00
Chandler Carruth 08e5f49f90 Fix an issue where we failed to adjust the alignment constraint on
a memcpy to reflect that '0' has a different meaning when applied to
a load or store. Now we correctly use underaligned loads and stores for
the test case added.

llvm-svn: 165101
2012-10-03 08:26:28 +00:00