]> granicus.if.org Git - clang/log
clang
12 years ago-Wuninitialized: assume that an __attribute__((returns_twice)) function might
Richard Smith [Mon, 2 Jul 2012 23:23:04 +0000 (23:23 +0000)]
-Wuninitialized: assume that an __attribute__((returns_twice)) function might
initialize any variable. This is extremely conservative, but is sufficient for
now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159620 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup:
James Dennett [Mon, 2 Jul 2012 23:17:34 +0000 (23:17 +0000)]
Documentation cleanup:
* Primarily, added \brief to most of include/clang/Basic, instead of prefixing
  the comments with "DeclaredName - ";
* Made some brief summaries significantly briefer;
* Fixed up some erroneous uses of \see and \arg;
* Fixed up some extraneous backslashes in \code...\endcode blocks;
* Fixed up some typos/spelling errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159616 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agotest/Driver/crash-report.c: don't fail if there are no files left behind by a previou...
Richard Smith [Mon, 2 Jul 2012 23:11:27 +0000 (23:11 +0000)]
test/Driver/crash-report.c: don't fail if there are no files left behind by a previous run of this test!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159615 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThread safety analysis: fixed bug that occurs when very silly people
DeLesley Hutchins [Mon, 2 Jul 2012 22:26:29 +0000 (22:26 +0000)]
Thread safety analysis:  fixed bug that occurs when very silly people
use scoped_lockable without putting unlock_function on the
destructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159609 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Introduce CXXAllocatorCall to handle placement arg invalidation.
Jordan Rose [Mon, 2 Jul 2012 22:21:47 +0000 (22:21 +0000)]
[analyzer] Introduce CXXAllocatorCall to handle placement arg invalidation.

This is NOT full-blown support for operator new, but removes some nasty
duplicated code introduced in r158784.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159608 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThread safety analysis: fixed incorrect error message at the end of a locks_required...
DeLesley Hutchins [Mon, 2 Jul 2012 22:16:54 +0000 (22:16 +0000)]
Thread safety analysis: fixed incorrect error message at the end of a locks_required function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159607 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThread safety analysis: don't warn in case of duplicate annotation.
DeLesley Hutchins [Mon, 2 Jul 2012 22:12:12 +0000 (22:12 +0000)]
Thread safety analysis: don't warn in case of duplicate annotation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159606 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoImprove crash reporting test coverage.
David Blaikie [Mon, 2 Jul 2012 22:07:20 +0000 (22:07 +0000)]
Improve crash reporting test coverage.

This adds validation that the
* repro source is only rewrite-includes processed, not fully preprocessed.
* repro script contains macro definitions (-DFOO=BAR).

Based on suggestions/help by Matt Beaumont-Gay.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159605 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThread Safety Analysis: turn off checking within trylock functions.
DeLesley Hutchins [Mon, 2 Jul 2012 21:59:24 +0000 (21:59 +0000)]
Thread Safety Analysis: turn off checking within trylock functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159601 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a warning flag for "'extern' variable has an initializer".
Matt Beaumont-Gay [Mon, 2 Jul 2012 21:58:14 +0000 (21:58 +0000)]
Add a warning flag for "'extern' variable has an initializer".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159600 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoExtend a workaround for a CMake bug in LLVM's r159593 to apply to
Chandler Carruth [Mon, 2 Jul 2012 21:46:03 +0000 (21:46 +0000)]
Extend a workaround for a CMake bug in LLVM's r159593 to apply to
a Clang target which hits the same bug directly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159598 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] If 'super' is known to be nil, we can still mark its range.
Jordan Rose [Mon, 2 Jul 2012 21:41:56 +0000 (21:41 +0000)]
[analyzer] If 'super' is known to be nil, we can still mark its range.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159596 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRevert "Remove unused member (& consequently unused parameter) in SA's Call code."
Jordan Rose [Mon, 2 Jul 2012 21:41:53 +0000 (21:41 +0000)]
Revert "Remove unused member (& consequently unused parameter) in SA's Call code."

...and instead add an accessor. We're not using this today, but it's something
that should probably stay in the source for potential clients, and it doesn't
cost a lot. (ObjCPropertyAccess is only created on the stack, and right now
there's only ever one alive at a time.)

This reverts r159581 / commit 8e674e1da34a131faa7d43dc3fcbd6e49120edbe.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159595 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWe support a mode where the Clang regression tests are run but not the
Chandler Carruth [Mon, 2 Jul 2012 21:37:04 +0000 (21:37 +0000)]
We support a mode where the Clang regression tests are run but not the
Clang unit tests. It's not clear why we support this mode in builds
where LLVM is available (LLVM itself does not), but at least this makes
us support it correctly.

This also fixes a long-standing bug where we would pass the unit test
param flag to lit in the standalone build even though the standalone
build *never* has the unittests built and ready for testing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159594 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoInclude -D files in crash report repro scripts. (PR13255)
David Blaikie [Mon, 2 Jul 2012 21:28:00 +0000 (21:28 +0000)]
Include -D files in crash report repro scripts. (PR13255)

Now that we're only using -frewrite-includes rather than full preprocessing
when producing repro source files, we should also include command line macro
definitions in the repro script.

I don't have a test case for this because I'm not sure if/how I can open the
crash report file when the name is only known by scraping the crash report
output. Suggestions welcome if anyone thinks it'd be helpful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159592 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoIn blocks, only pretend that enum constants have enum type if necessary.
Jordan Rose [Mon, 2 Jul 2012 21:19:23 +0000 (21:19 +0000)]
In blocks, only pretend that enum constants have enum type if necessary.

In C, enum constants have the type of the enum's underlying integer type,
rather than the type of the enum. (This is not true in C++.) Thus, when a
block's return type is inferred from an enum constant, it is incompatible
with expressions that return the enum type.

In r158899, I told block returns to pretend that enum constants have enum
type, like in C++. Doug Gregor pointed out that this can break existing code.

Now, we don't check the types of return statements until the end of the block.
This lets us go back and add implicit casts in blocks with mixed enum
constants and enum-typed expressions.

<rdar://problem/11662489> (again)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159591 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen we're looking for redeclarations which might provide a definition in CodeGen...
Eli Friedman [Mon, 2 Jul 2012 21:05:30 +0000 (21:05 +0000)]
When we're looking for redeclarations which might provide a definition in CodeGen, make sure we examine all the redeclarations.  PR13252.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159586 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake this test invariant to future changes of the max loop unrolling count.
Ted Kremenek [Mon, 2 Jul 2012 21:02:22 +0000 (21:02 +0000)]
Make this test invariant to future changes of the max loop unrolling count.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159585 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoBe more eager about setting the 'Invalid' bit on an invalid class
Douglas Gregor [Mon, 2 Jul 2012 21:00:41 +0000 (21:00 +0000)]
Be more eager about setting the 'Invalid' bit on an invalid class
template instantiation. I wasn't able to reproduce this down to
anything small enough to put in our test suite, but it's "obviously"
okay to set the invalid bit earlier and precludes a
known-broken-but-not-marked-broken class from being used elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159584 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoClone a bit of LIT flag defaults from the LLVM CMake file into the
Chandler Carruth [Mon, 2 Jul 2012 20:52:55 +0000 (20:52 +0000)]
Clone a bit of LIT flag defaults from the LLVM CMake file into the
standalone section of the Clang CMake files.

This will likely make the lit runs in Clang much more suitable to IDEs
such as Xcode and MSVC when operating in a standalone mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159582 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove unused member (& consequently unused parameter) in SA's Call code.
David Blaikie [Mon, 2 Jul 2012 20:44:57 +0000 (20:44 +0000)]
Remove unused member (& consequently unused parameter) in SA's Call code.

This member became unused in r159559.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159581 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoReintroduced FieldDecl public methods setBitWidth and removeBitWidth.
Abramo Bagnara [Mon, 2 Jul 2012 20:35:48 +0000 (20:35 +0000)]
Reintroduced FieldDecl public methods setBitWidth and removeBitWidth.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159579 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoBail out the LiveVariables analysis when the CFG is very large, as
Ted Kremenek [Mon, 2 Jul 2012 20:21:52 +0000 (20:21 +0000)]
Bail out the LiveVariables analysis when the CFG is very large, as
we are encountering some scalability issues with memory usage.   The
appropriate long term fix is to make the analysis more scalable, but
this will at least prevent the analyzer swapping when
analyzing very large functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159578 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix subtle bug in AnalysisConsumer where we would not analyze functions whose parent
Ted Kremenek [Mon, 2 Jul 2012 20:21:48 +0000 (20:21 +0000)]
Fix subtle bug in AnalysisConsumer where we would not analyze functions whose parent
in the call graph had been inlined but for whatever reason we did not inline some
of its callees.

Also, fix a related traversal bug where we meant to do a BFS of the callgraph but
instead were doing a DFS.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159577 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSwitch from using a lit.cfg-generator variable to the real variable in
Chandler Carruth [Mon, 2 Jul 2012 20:14:59 +0000 (20:14 +0000)]
Switch from using a lit.cfg-generator variable to the real variable in
the standalone mode. We've changed scoping and sequencing of variables
being defined and that cause this to start to be unset breaking some
cmake users. Thanks to Jordan Rose for the report.

The fix also makes the condition on the preceding line much more
sensible. =D

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159576 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoReduce default template instantiation depth to 512; we're blowing out
Douglas Gregor [Mon, 2 Jul 2012 19:56:23 +0000 (19:56 +0000)]
Reduce default template instantiation depth to 512; we're blowing out
the stack too often with 1024. Fixes <rdar://problem/11678534>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159573 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Convert existing checkers to use check::preCall and check::postCall.
Jordan Rose [Mon, 2 Jul 2012 19:28:21 +0000 (19:28 +0000)]
[analyzer] Convert existing checkers to use check::preCall and check::postCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159563 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Add generic preCall and postCall checks.
Jordan Rose [Mon, 2 Jul 2012 19:28:16 +0000 (19:28 +0000)]
[analyzer] Add generic preCall and postCall checks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159562 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Convert CXXConstructExpr over to use CallEvent for evaluation.
Jordan Rose [Mon, 2 Jul 2012 19:28:12 +0000 (19:28 +0000)]
[analyzer] Convert CXXConstructExpr over to use CallEvent for evaluation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159561 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Use CallEvent for inlining and call default-evaluation.
Jordan Rose [Mon, 2 Jul 2012 19:28:09 +0000 (19:28 +0000)]
[analyzer] Use CallEvent for inlining and call default-evaluation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159560 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Finish replacing ObjCMessage with ObjCMethodDecl and friends.
Jordan Rose [Mon, 2 Jul 2012 19:28:04 +0000 (19:28 +0000)]
[analyzer] Finish replacing ObjCMessage with ObjCMethodDecl and friends.

The preObjCMessage and postObjCMessage callbacks now take an ObjCMethodCall
argument, which can represent an explicit message send (ObjCMessageSend) or an
implicit message generated by a property access (ObjCPropertyAccess).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159559 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Begin replacing ObjCMessage with ObjCMethodCall and friends.
Jordan Rose [Mon, 2 Jul 2012 19:27:56 +0000 (19:27 +0000)]
[analyzer] Begin replacing ObjCMessage with ObjCMethodCall and friends.

Previously, the CallEvent subclass ObjCMessageInvocation was just a wrapper
around the existing ObjCMessage abstraction (over message sends and property
accesses). Now, we have abstract CallEvent ObjCMethodCall with subclasses
ObjCMessageSend and ObjCPropertyAccess.

In addition to removing yet another wrapper object, this should make it easy
to add a ObjCSubscriptAccess call event soon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159558 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Move the last bits of CallOrObjCMessage over to CallEvent.
Jordan Rose [Mon, 2 Jul 2012 19:27:51 +0000 (19:27 +0000)]
[analyzer] Move the last bits of CallOrObjCMessage over to CallEvent.

This involved refactoring some common pointer-escapes code onto CallEvent,
then having MallocChecker use those callbacks for whether or not to consider
a pointer's /ownership/ as escaping. This still needs to be pinned down, and
probably we want to make the new argumentsMayEscape() function a little more
discerning (content invalidation vs. ownership/metadata invalidation), but
this is a good improvement.

As a bonus, also remove CallOrObjCMessage from the source completely.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159557 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Convert CallAndMessageChecker and ObjCSelfInitChecker to CallEvent.
Jordan Rose [Mon, 2 Jul 2012 19:27:46 +0000 (19:27 +0000)]
[analyzer] Convert CallAndMessageChecker and ObjCSelfInitChecker to CallEvent.

Both of these got uglier rather than cleaner because we don't have preCall and
postCall yet; properly wrapping a CallExpr in a CallEvent requires doing a bit
of deconstruction on the callee. Even when we have preCall and postCall we may
want to expose the current CallEvent to pre/postStmt<CallExpr>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159556 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Convert RetainCountChecker to use CallEvent as much as possible.
Jordan Rose [Mon, 2 Jul 2012 19:27:43 +0000 (19:27 +0000)]
[analyzer] Convert RetainCountChecker to use CallEvent as much as possible.

This ended allowing quite a bit of cleanup, and some minor changes.

- CallEvent makes it easy to use hasNonZeroCallbackArg more aggressively, which
  we check in order to avoid false positives with callbacks that might release
  the object.
- In order to support this for functions which consume their arguments, there
  are two new ArgEffects: DecRefAndStopTracking and DecRefMsgAndStopTracking.
  These act just like StopTracking, except that if the object only had a
  return count of +1 it's now considered released instead (so we still get
  use-after-free messages).
- On the plus side, we no longer have to special-case
  +[NSObject performSelector:withObject:afterDelay:] and friends.
- The use of IdentifierInfos in the method summary cache is now hidden; only
  the ObjCInterfaceDecl gets passed around most of the time.
- Since we cache all "simple" summaries and check every function call, there is
  no real benefit to having NULL stand in for default summaries anymore.
- Whitespace, unused methods, etc.

Even more simplification to come when we get check::postCall and can unify all
these other post* checks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159555 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Add a new abstraction over all types of calls: CallEvent
Jordan Rose [Mon, 2 Jul 2012 19:27:35 +0000 (19:27 +0000)]
[analyzer] Add a new abstraction over all types of calls: CallEvent

This is intended to replace CallOrObjCMessage, and is eventually intended to be
used for anything that cares more about /what/ is being called than /how/ it's
being called. For example, inlining destructors should be the same as inlining
blocks, and checking __attribute__((nonnull)) should apply to the allocator
calls generated by operator new.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159554 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[PCH] Make sure that all newly introduced visible decls in a DeclContext
Argyrios Kyrtzidis [Mon, 2 Jul 2012 19:19:01 +0000 (19:19 +0000)]
[PCH] Make sure that all newly introduced visible decls in a DeclContext
coming from an AST file are registered for serialization.

A static data member instantiation of in a chained PCH could be missed
when serializing decls; the result was that when emitting the visible decls
map of its DeclContext, we would use a DeclID that was not actually emitted,
leading to crashes or hangs.

Fix this by making sure such decls are always registered for serialization.
Also introduce extra sanity checks to make sure we don't register new
declarations or types after we have serialized the types/decls block.

rdar://11728990

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159550 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoA ':' after an enum-specifier at class scope is a bitfield, not a typo for a ';'.
Richard Smith [Mon, 2 Jul 2012 19:14:01 +0000 (19:14 +0000)]
A ':' after an enum-specifier at class scope is a bitfield, not a typo for a ';'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159549 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a new libclang completion API to get brief documentation comment that is
Dmitri Gribenko [Mon, 2 Jul 2012 17:35:10 +0000 (17:35 +0000)]
Add a new libclang completion API to get brief documentation comment that is
attached to a declaration in the completion string.

Since extracting comments isn't free, a new code completion option is
introduced.

A new code completion option that enables including brief comments
into CodeCompletionString should be a, err, code completion option.
But because ASTUnit caches global declarations during parsing before
even completion consumer is created, the option is duplicated as a
translation unit option (in both libclang and ASTUnit, like the option
to cache code completion results).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159539 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[asan] update docs: mention MacOS 10.7 and correct the ifdef sample for __has_feature
Kostya Serebryany [Mon, 2 Jul 2012 11:00:33 +0000 (11:00 +0000)]
[asan] update docs: mention MacOS 10.7 and correct the ifdef sample for __has_feature

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159521 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDocumentation cleanup: reformatting/fixing up file comments so that they have
James Dennett [Mon, 2 Jul 2012 07:01:42 +0000 (07:01 +0000)]
Documentation cleanup: reformatting/fixing up file comments so that they have
\file and \brief markup and appear in Doxygen's summaries (and eventually at
http://clang.llvm.org/doxygen/files.html).  Fixed up another couple of minor
glitches in the docs at the same time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159517 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRename tzcnt intrinsics to match gcc.
Craig Topper [Mon, 2 Jul 2012 06:52:51 +0000 (06:52 +0000)]
Rename tzcnt intrinsics to match gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159515 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdditional testing for fixes in r158289 and r158290 to allow implicitly-declared
Richard Smith [Mon, 2 Jul 2012 06:15:40 +0000 (06:15 +0000)]
Additional testing for fixes in r158289 and r158290 to allow implicitly-declared
constructors for non-literal types to be constexpr in some circumstances.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159513 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPR13189: va_list broken with precompiled headers
Meador Inge [Sun, 1 Jul 2012 15:57:25 +0000 (15:57 +0000)]
PR13189: va_list broken with precompiled headers

For some targets a structure named __va_list_tag is built to help define
the __builtin_va_list type.  However, __va_list_tag was not being treated as a
predefined type thus causing problems when serializing the AST.  This commit
fixes that oversight by adding the necessary support to treat __va_list_tag
as a predefined type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159508 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoc-index-test/Makefile: Tweak USEDLIBS for cygwin. cygclang.dll is not linked to c...
NAKAMURA Takumi [Sun, 1 Jul 2012 00:40:17 +0000 (00:40 +0000)]
c-index-test/Makefile: Tweak USEDLIBS for cygwin. cygclang.dll is not linked to c-index-test yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159499 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd support for the C11 _Alignof keyword.
Jordan Rose [Sat, 30 Jun 2012 21:33:57 +0000 (21:33 +0000)]
Add support for the C11 _Alignof keyword.

This behaves like the existing GNU __alignof and C++11 alignof keywords;
most of the patch is simply adding the third token spelling to various places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159494 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[libclang] Make implementation filename match the header's name for CXCompilationDatabase
Arnaud A. de Grandmaison [Sat, 30 Jun 2012 20:43:43 +0000 (20:43 +0000)]
[libclang] Make implementation filename match the header's name for CXCompilationDatabase

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159493 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[cindex.py] Fix comments
Arnaud A. de Grandmaison [Sat, 30 Jun 2012 20:43:37 +0000 (20:43 +0000)]
[cindex.py] Fix comments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159492 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[libclang] Fix autoconf library dependencies for tooling support
Arnaud A. de Grandmaison [Sat, 30 Jun 2012 12:49:09 +0000 (12:49 +0000)]
[libclang] Fix autoconf library dependencies for tooling support

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159490 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoc-index-test.c: Fix missing semicolon(s).
NAKAMURA Takumi [Sat, 30 Jun 2012 11:47:18 +0000 (11:47 +0000)]
c-index-test.c: Fix missing semicolon(s).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159486 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[cindex.py] add CompilationDatabase support
Arnaud A. de Grandmaison [Sat, 30 Jun 2012 11:28:04 +0000 (11:28 +0000)]
[cindex.py] add CompilationDatabase support

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159485 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[libclang] add CompilationDatabase support
Arnaud A. de Grandmaison [Sat, 30 Jun 2012 11:27:57 +0000 (11:27 +0000)]
[libclang] add CompilationDatabase support

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159484 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSwitch Clang to use the new common LLVM CMake infrastructure for adding
Chandler Carruth [Sat, 30 Jun 2012 10:14:27 +0000 (10:14 +0000)]
Switch Clang to use the new common LLVM CMake infrastructure for adding
lit testsuites. This sinks all management of the aggregate lit runs into
the LLVM CMake files, making Clang only responsible for declaring its
own testsuite. In the process we fix numerous "bugs" where the proper
method of invoking lit has changed over time, and the old system
encoded several broken artifacts of this in ABIs and compatibility
tests.

It also switches to 'check-clang' for the canonical name of the test
suite, although 'clang-test' remains as an alias.

The situation when Clang is being built in standalone mode is little
changed. It replicates just enough of the lit setup to cope with the
oddities of being run outside of an LLVM build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159483 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a missing argument index, wordsmith a little, and 80(ish) columns
Matt Beaumont-Gay [Sat, 30 Jun 2012 01:37:38 +0000 (01:37 +0000)]
Add a missing argument index, wordsmith a little, and 80(ish) columns

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159478 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoblocks: fixes a crash when encoding block type
Fariborz Jahanian [Sat, 30 Jun 2012 00:48:59 +0000 (00:48 +0000)]
blocks: fixes a crash when encoding block type
with argument type of size 0. // rdar://11777609
PR13229.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159477 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agotest/Driver/crash-report.c: Mark it as XFAIL on win32 hosts, for now. Investigating.
NAKAMURA Takumi [Sat, 30 Jun 2012 00:29:03 +0000 (00:29 +0000)]
test/Driver/crash-report.c: Mark it as XFAIL on win32 hosts, for now. Investigating.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159476 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove dependency on string.h
Fariborz Jahanian [Fri, 29 Jun 2012 23:48:43 +0000 (23:48 +0000)]
Remove dependency on string.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159475 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUnbreak the test from r159469.
David Blaikie [Fri, 29 Jun 2012 23:16:06 +0000 (23:16 +0000)]
Unbreak the test from r159469.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159474 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix typos from r159463 and update tests. Added Matt Beaumont-Gay's suggestion
Richard Trieu [Fri, 29 Jun 2012 23:11:10 +0000 (23:11 +0000)]
Fix typos from r159463 and update tests.  Added Matt Beaumont-Gay's suggestion
to improve wording of a diagnostic message.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159473 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjective-c IRGen: fixes a crash when method type is being mangled
Fariborz Jahanian [Fri, 29 Jun 2012 22:54:56 +0000 (22:54 +0000)]
objective-c IRGen: fixes a crash when method type is being mangled
when an argument type size is 0. // rdar://11777609, PR13229

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159472 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUse -frewrite-includes for crash reports.
David Blaikie [Fri, 29 Jun 2012 22:03:56 +0000 (22:03 +0000)]
Use -frewrite-includes for crash reports.

In future changes we should:
* use __builtin_trap rather than derefing 'random' volatile pointers.
* avoid dumping temporary files into /tmp when running tests, instead
  preferring a location that is properly cleaned up by lit.

Review by Chandler Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159469 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoIn Sema::ClassifyName, try to avoid nonsensical corrections to
Kaelyn Uhrain [Fri, 29 Jun 2012 21:30:39 +0000 (21:30 +0000)]
In Sema::ClassifyName, try to avoid nonsensical corrections to
keywords when doing type correction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159464 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUpdate the %diff modifer to have an alternate string print when a template tree
Richard Trieu [Fri, 29 Jun 2012 21:12:16 +0000 (21:12 +0000)]
Update the %diff modifer to have an alternate string print when a template tree
is selected.  This will allow more flexibility when converting diagnostics to
use template type diffing.

Also updated the internal manual and test cases for correctly keeping the bold
attribute and for tree printing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159463 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRevert "Tweak insecureAPI analyzer checks to have the ability to be individually...
Ted Kremenek [Fri, 29 Jun 2012 21:01:35 +0000 (21:01 +0000)]
Revert "Tweak insecureAPI analyzer checks to have the ability to be individually disabled."

Jordan Rose corrected me that this actually isn't needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159462 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTweak insecureAPI analyzer checks to have the ability to be individually disabled.
Ted Kremenek [Fri, 29 Jun 2012 20:44:58 +0000 (20:44 +0000)]
Tweak insecureAPI analyzer checks to have the ability to be individually disabled.

The solution is a bit inefficient: it creates N checkers, one for each check, and
each check does a dispatch on the function name.  This is redundant, but we can fix
this once we have the proper ability to enable/disable subchecks.

Fixes <rdar://problem/11780180>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159459 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd a fix-it hint note to -Wunique-enum to suggest that the last element gets
Richard Trieu [Fri, 29 Jun 2012 20:36:14 +0000 (20:36 +0000)]
Add a fix-it hint note to -Wunique-enum to suggest that the last element gets
initialized with the next to last element to silence the warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159458 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjective-c modern translator: synthesize argument type
Fariborz Jahanian [Fri, 29 Jun 2012 19:55:46 +0000 (19:55 +0000)]
objective-c modern translator: synthesize argument type
correctly for blocks and function pointer arguments
in the written constructor.  // rdar://11359268

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159456 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agomodern objc translator: string.h is unavailable on some non-OSX
Fariborz Jahanian [Fri, 29 Jun 2012 19:33:05 +0000 (19:33 +0000)]
modern objc translator: string.h is unavailable on some non-OSX
platforms declare memset in rewritten code instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159454 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agofix a typo in my last commit. I thought I recompiled,
Fariborz Jahanian [Fri, 29 Jun 2012 19:05:11 +0000 (19:05 +0000)]
fix a typo in my last commit. I thought I recompiled,
but apparently I did not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159452 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjc diagnostic: pass IdentifierInfo* to the diagnostic system
Fariborz Jahanian [Fri, 29 Jun 2012 18:43:30 +0000 (18:43 +0000)]
objc diagnostic: pass  IdentifierInfo* to the diagnostic system
to produce quotes instead of adding qoute to the test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159450 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agostd::nullptr_t support in MS headers, from João Matos.
Douglas Gregor [Fri, 29 Jun 2012 18:28:41 +0000 (18:28 +0000)]
std::nullptr_t support in MS headers, from João Matos.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159448 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoPatch for handling C99 veriadic macros when using precompiled headers,
Douglas Gregor [Fri, 29 Jun 2012 18:27:59 +0000 (18:27 +0000)]
Patch for handling C99 veriadic macros when using precompiled headers,
from Filipe Cabecinhas!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159446 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjective-c modern translator: Translation into objc_msgSend_stret
Fariborz Jahanian [Fri, 29 Jun 2012 18:27:08 +0000 (18:27 +0000)]
objective-c modern translator: Translation into objc_msgSend_stret
entry point which requires nil check before calling objc_msgSend_stret.
// rdar://11359268 - wip.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159445 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFactor out a check for block commands (that implicitly start a new paragraph) into...
Dmitri Gribenko [Fri, 29 Jun 2012 18:19:20 +0000 (18:19 +0000)]
Factor out a check for block commands (that implicitly start a new paragraph) into a separate function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159444 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAvoid redundant error when redefining a function as deleted.
David Blaikie [Fri, 29 Jun 2012 18:00:25 +0000 (18:00 +0000)]
Avoid redundant error when redefining a function as deleted.

Reviewed by Doug Gregor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159442 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoChange condition to be the same as in SemaTemplateInstantiate.
Nico Weber [Fri, 29 Jun 2012 16:39:58 +0000 (16:39 +0000)]
Change condition to be the same as in SemaTemplateInstantiate.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159436 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoclang/test/Misc/diag-template-diffing-color.cpp: Remove XFAIL:cygwin. Cygwin has...
NAKAMURA Takumi [Fri, 29 Jun 2012 14:14:25 +0000 (14:14 +0000)]
clang/test/Misc/diag-template-diffing-color.cpp: Remove XFAIL:cygwin. Cygwin has some terminal emulation of escape sequences.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159428 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUpdate Clang to reflect the new home of IRBuilder.h as of r159421.
Chandler Carruth [Fri, 29 Jun 2012 12:39:08 +0000 (12:39 +0000)]
Update Clang to reflect the new home of IRBuilder.h as of r159421.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159422 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUpdate based on move of DIBuilder.h to include/llvm.
Bill Wendling [Fri, 29 Jun 2012 08:32:29 +0000 (08:32 +0000)]
Update based on move of DIBuilder.h to include/llvm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159415 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFrom Philippe Canal:
Axel Naumann [Fri, 29 Jun 2012 07:30:33 +0000 (07:30 +0000)]
From Philippe Canal:
Update the two function overloads
    void TemplateSpecializationType::PrintTemplateArgumentList(raw_ostream &OS,....
to behave like
    std::string TemplateSpecializationType::PrintTemplateArgumentList(const TemplateArgument *Args,...
hence making sure that clang consistently adds a space between two '>' at the end of nested template arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159412 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoX86: add more GATHER intrinsics in Clang
Manman Ren [Fri, 29 Jun 2012 05:19:13 +0000 (05:19 +0000)]
X86: add more GATHER intrinsics in Clang

Support the following intrinsics:
  _mm_i32gather_pd, _mm256_i32gather_pd,
  _mm_i64gather_pd, _mm256_i64gather_pd,
  _mm_i32gather_ps, _mm256_i32gather_ps,
  _mm_i64gather_ps, _mm256_i64gather_ps,
  _mm_i32gather_epi64, _mm256_i32gather_epi64,
  _mm_i64gather_epi64, _mm256_i64gather_epi64,
  _mm_i32gather_epi32, _mm256_i32gather_epi32,
  _mm_i64gather_epi32, _mm256_i64gather_epi32

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159410 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix PR13234 - crash when trying to report an unsupported ABI feature
Timur Iskhodzhanov [Fri, 29 Jun 2012 01:14:21 +0000 (01:14 +0000)]
Fix PR13234 - crash when trying to report an unsupported ABI feature

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159405 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen a builtin that requires a constant is given a type- or
Douglas Gregor [Fri, 29 Jun 2012 01:05:22 +0000 (01:05 +0000)]
When a builtin that requires a constant is given a type- or
value-dependent expression, don't complain that it wasn't the constant
we wanted. Fixes <rdar://problem/11688587> and PR11074.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159404 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoX86: add more GATHER intrinsics in Clang
Manman Ren [Fri, 29 Jun 2012 00:54:35 +0000 (00:54 +0000)]
X86: add more GATHER intrinsics in Clang

Corrected type for index of _mm256_mask_i32gather_pd
  from 256-bit to 128-bit
Corrected types for src|dst|mask of _mm256_mask_i64gather_ps
  from 256-bit to 128-bit

Support the following intrinsics:
  _mm_mask_i32gather_epi64, _mm256_mask_i32gather_epi64,
  _mm_mask_i64gather_epi64, _mm256_mask_i64gather_epi64,
  _mm_mask_i32gather_epi32, _mm256_mask_i32gather_epi32,
  _mm_mask_i64gather_epi32, _mm256_mask_i64gather_epi32

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159403 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTeach the __is_trivially_assignable and __is_trivially_constructible
Douglas Gregor [Fri, 29 Jun 2012 00:49:17 +0000 (00:49 +0000)]
Teach the __is_trivially_assignable and __is_trivially_constructible
type traits that assignment to/construction of a lifetime-qualified
object under ARC is *not* trivial. Fixes <rdar://problem/11738725>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159401 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSwitch Clang's CMake lit.site.cfg generation over to use the common
Chandler Carruth [Fri, 29 Jun 2012 00:39:23 +0000 (00:39 +0000)]
Switch Clang's CMake lit.site.cfg generation over to use the common
helpers rather than its own special-rolled code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159398 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[analyzer] Add a test that we are, in fact, doing a DFS on the ExplodedGraph.
Jordan Rose [Fri, 29 Jun 2012 00:33:10 +0000 (00:33 +0000)]
[analyzer] Add a test that we are, in fact, doing a DFS on the ExplodedGraph.

Previously:
...the comment said DFS...
...the WorkList being instantiated said BFS...
...and the implementation was actually DFS...
...due to an unintentional change in 2010...
...and everything kept working anyway.

This fixes our std::deque implementation of BFS, but switches back to a
SmallVector-based implementation of DFS.

We should probably still investigate the ramifications of DFS vs. BFS,
especially for large functions (and especially when we hit our block path
limit), since this might completely change our memory use. It can also mask
some bugs and reveal others depending on when we halt analysis. But at least
we will not have this kind of little mistake creep in again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159397 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWarn on self-assignment to member variables. PR13104.
Nico Weber [Thu, 28 Jun 2012 23:53:12 +0000 (23:53 +0000)]
Warn on self-assignment to member variables. PR13104.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159394 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThread safety analysis: support release() function on scoped
DeLesley Hutchins [Thu, 28 Jun 2012 22:42:48 +0000 (22:42 +0000)]
Thread safety analysis:  support release() function on scoped
lockable objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159387 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen applying a template diff highlighting to a diagnostic message, remember
Richard Trieu [Thu, 28 Jun 2012 22:39:03 +0000 (22:39 +0000)]
When applying a template diff highlighting to a diagnostic message, remember
to reapply the bold formatting when needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159386 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFactor CXString out of Index.h
Arnaud A. de Grandmaison [Thu, 28 Jun 2012 22:01:06 +0000 (22:01 +0000)]
Factor CXString out of Index.h

No functionnal or interface change. This is done to prepare the landing of
CompilationDatabase in libclang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159382 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix template type diffing coloring (r159216) when forcing color output to a file...
David Blaikie [Thu, 28 Jun 2012 21:46:07 +0000 (21:46 +0000)]
Fix template type diffing coloring (r159216) when forcing color output to a file (not a terminal)

Reviewed (over the shoulder) by Richard Trieu.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159381 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSupport the use of "=delete" and "=default" with delayed template
Douglas Gregor [Thu, 28 Jun 2012 21:43:01 +0000 (21:43 +0000)]
Support the use of "=delete" and "=default" with delayed template
parsing. Fixes <rdar://problem/11700604>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159380 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoobjective-c rewriter: refactoring of rewriting of
Fariborz Jahanian [Thu, 28 Jun 2012 21:20:35 +0000 (21:20 +0000)]
objective-c rewriter: refactoring of rewriting of
objc_msgSend_stret() API. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159379 91177308-0d34-0410-b5e6-96231b3b80d8

12 years ago[libclang] Don't bind a StringRef to a temporary std::string object.
Argyrios Kyrtzidis [Thu, 28 Jun 2012 21:03:08 +0000 (21:03 +0000)]
[libclang] Don't bind a StringRef to a temporary std::string object.
It may end up pointing at garbage.

Fixes the MSVC debug build. rdar://11703319

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159377 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDead code eliminate the massive hexagon builtin intrinsic supporting code.
Benjamin Kramer [Thu, 28 Jun 2012 20:08:55 +0000 (20:08 +0000)]
Dead code eliminate the massive hexagon builtin intrinsic supporting code.

The tablegen'd code does the same thing without this egregious duplication.
In my limited testing everything seems to work, however there can be
differences if the clang and llvm builtin definitions don't match.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159371 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoOnly print a semicolon after "no known conversion for Nth argument" if there
Matt Beaumont-Gay [Thu, 28 Jun 2012 19:20:41 +0000 (19:20 +0000)]
Only print a semicolon after "no known conversion for Nth argument" if there
is a following clause.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159369 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoNow that we use the GCC builtin <-> llvm intrinsic, dead code eliminate the handwritt...
Benjamin Kramer [Thu, 28 Jun 2012 19:10:01 +0000 (19:10 +0000)]
Now that we use the GCC builtin <-> llvm intrinsic, dead code eliminate the handwritten emitter.

The generated code uncovered an invalid prototype for __builtin_mips_shilo, fix it along the way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159368 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSupport MIPS DSP Rev1 intrinsics.
Simon Atanasyan [Thu, 28 Jun 2012 18:23:16 +0000 (18:23 +0000)]
Support MIPS DSP Rev1 intrinsics.
This patch was reviewed in the llvm-commits list by Jim Grosbach.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159366 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCompare the canonical types and document why we give up on the covariant case.
Rafael Espindola [Thu, 28 Jun 2012 17:57:36 +0000 (17:57 +0000)]
Compare the canonical types and document why we give up on the covariant case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159360 91177308-0d34-0410-b5e6-96231b3b80d8