Commit Graph

122032 Commits

Author SHA1 Message Date
Eli Friedman c9751069f5 Make sure Sema creates a field for 'this' captures. (Doug, please double-check that this is correct.)
llvm-svn: 150292
2012-02-11 02:51:16 +00:00
Argyrios Kyrtzidis d0e58e9be8 [libclang] For a reference of an implicit template instantiation just give
a reference for the instantiation decl. Also test that its location is correct
after previous commit.

llvm-svn: 150291
2012-02-11 02:00:00 +00:00
Argyrios Kyrtzidis e378948c8a For class template implicit instantiation, also update its location to point
to the pattern template that it came from, otherwise we had this situation:

template <typename T1, typename T2>
struct S {
};

template <typename T>
struct S<T, int> {
};

void f() {
  S<int, int> s; // location of declaration "S<int, int>" was of "S<T1, T2>" not "S<T, int>"
}

llvm-svn: 150290
2012-02-11 01:59:57 +00:00
Sean Callanan d4a7c123f3 Made the "--no-inlines" option on
"target modules lookup" also work with the
"--function" option, so you can search for
functions that aren't inlined.  This is the
same query that the expression parser makes, so
it's good for diagnosing situations where the
expression parser doesn't find a function you
think should be there.

llvm-svn: 150289
2012-02-11 01:22:21 +00:00
Jakob Stoklund Olesen fd338e9777 Allow Post-RA LICM to hoist reserved register reads.
When using register masks, registers like %rip are clobbered by the
register mask. LICM should still be able to hoist instructions reading
%rip from a loop containing calls.

llvm-svn: 150288
2012-02-11 00:44:19 +00:00
Jakob Stoklund Olesen 17402e3d5a Handle register masks in local live range splitting.
Again the goal is to produce identical assembly with register mask
operands enabled.

llvm-svn: 150287
2012-02-11 00:42:18 +00:00
Jakob Stoklund Olesen c8046c02c2 Don't read PreRegAlloc before it is initialized.
llvm-svn: 150286
2012-02-11 00:40:36 +00:00
Sean Callanan f6172c2cbc Make the output from "target modules lookup -n"
prettier.

llvm-svn: 150285
2012-02-11 00:24:04 +00:00
Eli Friedman 7e7da2d285 const-qualify CXXRecordDecl::getCaptureFields.
llvm-svn: 150284
2012-02-11 00:18:00 +00:00
Douglas Gregor 28be7c5e20 Add simple semantic test for C++11 [expr.prim.lambda]p16, which covers recursive capture. This is far more interesting for IRgen.
llvm-svn: 150283
2012-02-10 23:38:02 +00:00
Douglas Gregor f0d495100c Implement C++11 [expr.lambda.prim]p13, which prohibits lambdas in
default arguments if in fact those lambdas capture any entity.

llvm-svn: 150282
2012-02-10 23:30:22 +00:00
Fariborz Jahanian cb1d9f3706 objc translator: more modern metadata stuff.
llvm-svn: 150281
2012-02-10 23:18:24 +00:00
Eli Friedman 4286fba606 Set UserLabelPrefix and MCountName correctly for DragonFly BSD. Patch by Sascha Wildner.
Setting UserLabelPrefix correctly fixes PR11949.

llvm-svn: 150280
2012-02-10 23:02:29 +00:00
Sean Callanan 9df05fbb7f Extended function lookup to allow the user to
indicate whether inline functions are desired.
This allows the expression parser, for instance,
to filter out inlined functions when looking for
functions it can call.

llvm-svn: 150279
2012-02-10 22:52:19 +00:00
David Blaikie 59fe3f89cb Support all null pointer literals in format strings.
llvm-svn: 150276
2012-02-10 21:07:25 +00:00
Fariborz Jahanian 6b83daefd3 objctive-c translator: modern metadata for ivars. wip.
llvm-svn: 150275
2012-02-10 20:47:10 +00:00
Jim Grosbach 1c9dd2974f Revert r150222, as the clang driver now handles this properly.
Now that the clang driver passes the CPU and feature information to
the backend when processing assembly files (150273), this isn't necessary.

llvm-svn: 150274
2012-02-10 20:38:46 +00:00
Jim Grosbach 576452b830 Have the driver pass CPU and target feature information to cc1as.
When creating the MCSubtargetInfo, the assembler driver uses the CPU and
feature string to construct a more accurate model of what instructions
are and are not legal.

rdar://10840476

llvm-svn: 150273
2012-02-10 20:37:10 +00:00
Sean Callanan 49bce8ecdb Improved detection of object file types, moving
detection of kernels into the object file and
adding a new category for raw binary images.
Fixed all clients who previously searched for
sections manually, making them use the object
file's facilities instead.

llvm-svn: 150272
2012-02-10 20:22:35 +00:00
Greg Clayton 1ada7bc09d Fixed incorrect #include directives.
llvm-svn: 150271
2012-02-10 20:13:26 +00:00
Argyrios Kyrtzidis 4701cf61d7 [libclang] Indexing API: fully index using decls and directives.
llvm-svn: 150268
2012-02-10 20:10:48 +00:00
Argyrios Kyrtzidis e5dc5b31f2 [libclang] Indexing API: Fully index implict template instantiations.
llvm-svn: 150267
2012-02-10 20:10:44 +00:00
Argyrios Kyrtzidis 9e0cd46d93 Add ArrayRef goodness in MultiplexASTMutationListener.
llvm-svn: 150266
2012-02-10 20:10:38 +00:00
Argyrios Kyrtzidis 926227811b Update MultiplexASTMutationListener with the missing methods from ASTMutationListener.
llvm-svn: 150265
2012-02-10 20:10:36 +00:00
Argyrios Kyrtzidis 1b6e5dc6a5 [libclang] Encode the template specialization parameters of a function
specialization in its USR string.

llvm-svn: 150264
2012-02-10 20:10:32 +00:00
Jakob Stoklund Olesen 91a3da0f73 Clean up comment.
llvm-svn: 150262
2012-02-10 19:27:34 +00:00
Jakob Stoklund Olesen 024d7ae110 Add a static MachineOperand::clobbersPhysReg().
It can be necessary to detach a register mask pointer from its
MachineOperand. This method is convenient for checking clobbered
physregs on a detached bitmask pointer.

llvm-svn: 150261
2012-02-10 19:23:53 +00:00
Ted Kremenek dde2adec89 Enhance checking for null format string literal to take into account __null. Fixes <rdar://problem/8269537>.
llvm-svn: 150260
2012-02-10 19:13:51 +00:00
Jakob Stoklund Olesen a16ae59722 Add register mask support to InterferenceCache.
This makes global live range splitting behave identically with and
without register mask operands.

This is not necessarily the best way of using register masks for live
range splitting.  It would be more efficient to first split global live
ranges around calls (i.e., register masks), and reserve the fine grained
per-physreg interference guidance for global live ranges that do not
cross calls.

For now the goal is to produce identical assembly when enabling register
masks.

llvm-svn: 150259
2012-02-10 18:58:34 +00:00
Jakob Stoklund Olesen b7c1715df1 Remove unused variable.
llvm-svn: 150258
2012-02-10 18:52:15 +00:00
Pete Cooper 13e082d8ba Added description of invariant.load metadata to LangRef. It was added to the compiler in r144100
llvm-svn: 150257
2012-02-10 18:13:54 +00:00
Douglas Gregor a1bffa26ca Allow implicit capture of 'this' in a lambda even when the capture
default is '=', and reword the warning about explicitly capturing
'this' in such lambdas to indicate that only explicit capture is
banned. 

Introduce Fix-Its for this and other "save the programmer from
themself" rules regarding what can be explicitly captured and what
must be implicitly captured.

llvm-svn: 150256
2012-02-10 17:46:20 +00:00
Douglas Gregor 01db64f0ac Add test from [expr.prim.lambda]p12, which deals with odr-use and
nested captures. We currently don't get odr-use correct in array
bounds, so that bit is commented out while we sort out what we need to
do.

llvm-svn: 150255
2012-02-10 16:48:36 +00:00
Bob Wilson e67004e2f1 Back out some changes that accidentally committed.
llvm-svn: 150254
2012-02-10 16:41:46 +00:00
Bob Wilson ddd971564e Revert r150232 since it breaks the build when there's no ARM assembler.
llvm-svn: 150253
2012-02-10 16:36:49 +00:00
Douglas Gregor 04bbab586b Don't introduce a lambda's operator() into the class until after we
have finished parsing the body, so that name lookup will never find
anything within the closure type. Then, add this operator() and the
conversion function (if available) before completing the class.

llvm-svn: 150252
2012-02-10 16:13:20 +00:00
Jason W Kim c7f4841769 Make valgrind happy.
llvm-svn: 150251
2012-02-10 16:07:59 +00:00
Hal Finkel 1bde3f86d1 Update BBVectorize to use aliasesUnknownInst.
This allows BBVectorize to check the "unknown instruction" list in the
alias sets. This is important to prevent instruction fusing from reordering
function calls. Resolves PR11920.

llvm-svn: 150250
2012-02-10 15:52:40 +00:00
Hal Finkel 56f6b0f219 Have AliasSet::aliasesUnknownInst use pointer TBAA info when available
llvm-svn: 150249
2012-02-10 15:52:39 +00:00
Hal Finkel 9d87207f57 Make aliasesPointer and aliasesUnknownInst public members of AliasSet.
These query functions are safe for external use and, furthermore,
are the only way to make queries against the "unknown instructions" array.
BBVectorize will use these functions.

llvm-svn: 150248
2012-02-10 15:52:37 +00:00
Duncan Sands 26641d7c02 Fix PR11948: the result type of an icmp may be a vector of boolean -
don't assume it is a boolean.

llvm-svn: 150247
2012-02-10 14:31:24 +00:00
Duncan Sands bf48ac622a Revert commit 149912 (lattner) and add a testcase that shows the problem (which
is that patterns no longer match for vectors of booleans, because you only get
ConstantDataVector when the vector element type is i8, i16, etc, not when it is
i1).  Original commit message:
Remove some dead code and tidy things up now that vectors use ConstantDataVector
instead of always using ConstantVector.

llvm-svn: 150246
2012-02-10 14:26:42 +00:00
Benjamin Kramer bf152d57a4 Put instruction names into an indexed string table on the side, removing a pointer from MCInstrDesc.
Make them accessible through MCInstrInfo. They are only used for debugging purposes so this doesn't
have an impact on performance. X86MCTargetDesc.o goes from 630K to 461K on x86_64.

llvm-svn: 150245
2012-02-10 13:18:44 +00:00
Richard Smith 63168c7533 PR11684, core issue 1417:
o Correct the handling of the restrictions on usage of cv-qualified and
  ref-qualified function types.
o Fix a bug where such types were rejected in template type parameter default
  arguments, due to such arguments not being treated as a template type arg
  context.
o Remove the ExtWarn for usage of such types as template arguments; that was
  a standard defect, not a GCC extension.
o Improve the wording and unify the code for diagnosing cv-qualifiers with the
  code for diagnosing ref-qualifiers.

llvm-svn: 150244
2012-02-10 11:05:11 +00:00
Richard Smith d98937b011 Test cleanup: prefer static_assert to handmade alternative.
llvm-svn: 150243
2012-02-10 10:55:13 +00:00
Evgeniy Stepanov 0247b99171 Loosen the test from r150238 a bit to make some of our bots happy.
llvm-svn: 150242
2012-02-10 10:04:01 +00:00
Richard Smith 5e580292ac Track whether a function type has a trailing return type as type sugar. Use this
to pretty-print such function types better, and to fix a case where we were not
instantiating templates in lexical order. In passing, move the Variadic bit from
Type's bitfields to FunctionProtoType to get the Type bitfields down to 32 bits.
Also ensure that we always substitute the return type of a function when
substituting explicitly-specified arguments, since that can cause us to bail
out with a SFINAE error before we hit a hard error in parameter substitution.

llvm-svn: 150241
2012-02-10 09:58:53 +00:00
Richard Smith 25a01eca11 --lies.
llvm-svn: 150240
2012-02-10 09:37:07 +00:00
Douglas Gregor 136b2f24f0 Add a lambda example from the working draft.
llvm-svn: 150239
2012-02-10 09:37:05 +00:00
Evgeniy Stepanov 3fae4aeae4 Fix function prolog codegen whe coerce-to type is a struct.
This changes function prolog in such a way as to avoid out-of-bounds
stack store in the case when coerce-to type has a larger storage size
than the real argument type.

Fixes PR11905.

llvm-svn: 150238
2012-02-10 09:30:15 +00:00