]>
granicus.if.org Git - clang/log
Chris Lattner [Tue, 24 Mar 2009 17:04:48 +0000 (17:04 +0000)]
random cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67624
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 24 Mar 2009 16:43:20 +0000 (16:43 +0000)]
Template instantiation for constructors
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67623
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 24 Mar 2009 16:18:41 +0000 (16:18 +0000)]
-arch ppc should change the triple to powerpc-foo not to ppc-foo.
Similarly for ppc64. This should probably move into the driver, along
with all the other target selection stuff other than -triple.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67621
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 24 Mar 2009 16:16:53 +0000 (16:16 +0000)]
Add another C++ open project
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67620
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 24 Mar 2009 16:09:18 +0000 (16:09 +0000)]
change the __VERSION__ string to be more sensible. It would be useful to include the clang version # too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67619
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 07:20:59 +0000 (07:20 +0000)]
Driver: Forward -MMD (not -MM) to clang-cc; this got lost in
translation, the former we support, the later we don't (yet).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67611
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 06:17:45 +0000 (06:17 +0000)]
Update TestRunner.sh for renaming.
- Substitutes both clang and clang-cc.
- Incorporates patch from Jon Simons to diagnose if clang or clang-cc
isn't found.
- Uses full path when running scripts, for more precision in the
output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67610
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 24 Mar 2009 05:30:14 +0000 (05:30 +0000)]
More path updates with clang-cc...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67609
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 24 Mar 2009 04:29:13 +0000 (04:29 +0000)]
Update scan-build/ccc-analyzer to use 'clang-cc' instead of 'clang'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67608
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 04:07:10 +0000 (04:07 +0000)]
Install clang-cc to libexec/clang-cc (instead of bin/clang-cc).
- Updated ccc & driver to look in libexec/ for tools.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67607
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 03:07:05 +0000 (03:07 +0000)]
Rename clang-driver to clang.
Again, I tried to update cmake but it is untested.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67606
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 03:00:12 +0000 (03:00 +0000)]
Move <root>/Driver into <root>/tools/clang-cc.
Again, I tried to update cmake but it is untested.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67605
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 02:52:57 +0000 (02:52 +0000)]
Add CMake files for tools/driver; I am just guessing here, can someone test/fix?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67604
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 02:38:23 +0000 (02:38 +0000)]
Support member reference on ?: of struct type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67603
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 02:24:46 +0000 (02:24 +0000)]
Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 01:59:55 +0000 (01:59 +0000)]
Use not instead of ! in tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67601
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 24 Mar 2009 01:46:45 +0000 (01:46 +0000)]
Handle pointers to arrays of abstract types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67598
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 24 Mar 2009 01:25:56 +0000 (01:25 +0000)]
Remove a task that's completed now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67596
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 24 Mar 2009 01:24:06 +0000 (01:24 +0000)]
class.abstract is complete. Anything that doesn't work is a bug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67595
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 24 Mar 2009 01:19:16 +0000 (01:19 +0000)]
More work on diagnosing abstract classes. We can now handle cases like
class C {
void g(C c);
virtual void f() = 0;
};
In this case, C is not known to be abstract when doing semantic analysis on g. This is done by recursively traversing the abstract class and checking the types of member functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67594
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 24 Mar 2009 01:14:50 +0000 (01:14 +0000)]
Fix PR3868 by making Evaluate handle cases like "(long)&a + 4".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67593
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Tue, 24 Mar 2009 01:11:18 +0000 (01:11 +0000)]
Fix a couple of tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67592
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 01:06:18 +0000 (01:06 +0000)]
ccc: Have generic GCC tool chain search the driver directory for
executables (e.g., clang).
- This matches the clang-driver behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67590
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 24 Mar 2009 00:38:23 +0000 (00:38 +0000)]
Cleanup template instantiation for methods, destructors
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67585
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 24 Mar 2009 00:35:59 +0000 (00:35 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67584
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 00:24:37 +0000 (00:24 +0000)]
Driver: lipo wasn't being called correctly (translation failure from
ccc due to the different way we handle output arguments).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67583
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 24 Mar 2009 00:20:13 +0000 (00:20 +0000)]
ccc/Driver: -r option doesn't take an argument.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67581
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 24 Mar 2009 00:15:49 +0000 (00:15 +0000)]
Template instantiation for destructors. This is somewhat repetitive;
eliminating the duplication is next on the list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67579
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 23 Mar 2009 23:26:24 +0000 (23:26 +0000)]
Fix the ABI convention for struct returns on x86 outside of Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67577
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 23 Mar 2009 23:17:00 +0000 (23:17 +0000)]
Another use of adjustParameterType. Plus, GetTypeForDeclarator will
always get ParmVarDecls with already-adjusted types. Assert it.
Thanks, Anders!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67576
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 23 Mar 2009 23:06:20 +0000 (23:06 +0000)]
Template instantiation for the declarations of member functions within
a class template. At present, we can only instantiation normal
methods, but not constructors, destructors, or conversion operators.
As ever, this contains a bit of refactoring in Sema's type-checking. In
particular:
- Split ActOnFunctionDeclarator into ActOnFunctionDeclarator
(handling the declarator itself) and CheckFunctionDeclaration
(checking for the the function declaration), the latter of which
is also used by template instantiation.
- We were performing the adjustment of function parameter types in
three places; collect those into a single new routine.
- When the type of a parameter is adjusted, allocate an
OriginalParmVarDecl to keep track of the type as it was written.
- Eliminate a redundant check for out-of-line declarations of member
functions; hide more C++-specific checks on function declarations
behind if(getLangOptions().CPlusPlus).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67575
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 23 Mar 2009 22:50:47 +0000 (22:50 +0000)]
Deallocate 'DeclRefExpr's in correctly formed '#pragma unused'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67573
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 23 Mar 2009 22:30:58 +0000 (22:30 +0000)]
A test case to test that -warn-dead-stores does not emit a warning for stores to variables marked with '#pragma unused'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67570
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 23 Mar 2009 22:28:25 +0000 (22:28 +0000)]
Implement '#pragma unused'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67569
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 23 Mar 2009 21:50:40 +0000 (21:50 +0000)]
Driver: Make argument parsing fast.
On a synthetic command line consisting of almost all defined options,
this drops wall time from .00494 to .00336 and user time from .00258
to .00105.
On the same benchmark, clang-driver is about 15% faster than the
primary gcc driver and almost twice as fast as the gcc driver driver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67564
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 23 Mar 2009 20:47:43 +0000 (20:47 +0000)]
Add SemaTypeInstantiateDecl.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67559
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 23 Mar 2009 19:53:30 +0000 (19:53 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67553
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 23 Mar 2009 19:19:19 +0000 (19:19 +0000)]
Driver: Fix off by one in computation of first searchable option.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67552
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 23 Mar 2009 19:10:40 +0000 (19:10 +0000)]
Must allow for strong cast of floats as well (objc2 gc).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67551
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 23 Mar 2009 19:10:31 +0000 (19:10 +0000)]
More improvements to abstract type checking. Handle arrays correctly, and make sure to check parameter types before they decay.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67550
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 23 Mar 2009 19:03:36 +0000 (19:03 +0000)]
Driver: Add two special groups of "whitelisted" options which we know
clang doesn't support, and don't want to warn are unused. Eventually
these should disappear.
Here is a more readable list than is in the diff:
W options: -Wall, -Wcast-align, -Wchar-align, -Wchar-subscripts,
-Werror, -Wextra, -Winline, -Wint-to-pointer-cast, -Wmissing-braces,
-Wmost, -Wnested-externs, -Wno-format-y2k, -Wno-four-char-constants,
-Wno-missing-field-initializers, -Wno-trigraphs, -Wno-unknown-pragmas,
-Wno-unused-parameter, -Wparentheses, -Wpointer-arith,
-Wpointer-to-int-cast, -Wreturn-type, -Wshorten-64-to-32, -Wswitch,
-Wunused-function, -Wunused-label, -Wunused-value, -Wunused-variable,
-Wwrite-strings.
f options: -fasm-blocks, -fmessage-length=.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67549
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 23 Mar 2009 18:41:45 +0000 (18:41 +0000)]
Driver: Check that options are ordered properly (outside of
Release-Asserts mode).
Also, avoid searching through option groups (which will never match).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67548
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 23 Mar 2009 17:57:53 +0000 (17:57 +0000)]
use isa<>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67543
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 23 Mar 2009 17:49:10 +0000 (17:49 +0000)]
It's an error to try to allocate an abstract object using new.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67542
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 23 Mar 2009 17:47:24 +0000 (17:47 +0000)]
Fix PR3855. When we encounter an incompatible redeclaration of a
library function, accept this declaration and pretend that we do not
know that this is a library function. autoconf depends on this
(broken) behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67541
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 23 Mar 2009 17:32:45 +0000 (17:32 +0000)]
The individual pieces of an invalid paste as still candidates for expansion.
This matters in assembler mode, where this is silently allowed.
This fixes rdar://
6709206 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67539
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 23 Mar 2009 17:10:25 +0000 (17:10 +0000)]
analyzer: Provide temporary workaround for false positive reported by
<rdar://problem/
6704930 > involving SimpleConstraintManager not reasoning well
about symbolic constraint values involving arithmetic operators.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67534
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 23 Mar 2009 16:26:51 +0000 (16:26 +0000)]
Tighten up the determination of whether a function declaration has a
prototype. Thanks Eli!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67533
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 23 Mar 2009 16:24:37 +0000 (16:24 +0000)]
if the driver decides to run clang on a .s file, treat it as a .S file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67532
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 23 Mar 2009 16:17:01 +0000 (16:17 +0000)]
Thanks to Eli for pointing out my misreading of 6.2.2p5
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67530
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 23 Mar 2009 16:15:50 +0000 (16:15 +0000)]
Driver: Setup file and program search paths in tool chains.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67529
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 23 Mar 2009 16:09:04 +0000 (16:09 +0000)]
Ad FreeBSD ARM target info.
- Patch by Ed Schoeten!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67527
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 23 Mar 2009 15:42:58 +0000 (15:42 +0000)]
analyzer: Fix embarrassing regression in BasicStore when invalidating struct
values passed-by-reference to unknown functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67519
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 23 Mar 2009 14:57:31 +0000 (14:57 +0000)]
ccc: Forward -f[no-]builtin to clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67517
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 23 Mar 2009 04:56:01 +0000 (04:56 +0000)]
Minor Evaluate cleanup; add some boilerplate implementations to
Evaluate for __extension__ and __builtin_choose_expr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67506
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 23 Mar 2009 04:38:34 +0000 (04:38 +0000)]
Minor enhancements to Evaluate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67503
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 23 Mar 2009 04:08:46 +0000 (04:08 +0000)]
Some minor fixes for complex IRGen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67501
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 23 Mar 2009 03:00:06 +0000 (03:00 +0000)]
Fix a subtle bug in CodeGen for the increment of a bitfield.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67499
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 23 Mar 2009 02:00:36 +0000 (02:00 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67498
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 23 Mar 2009 00:24:07 +0000 (00:24 +0000)]
Add some FIXMEs relating to incomplete types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67497
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 23 Mar 2009 00:04:01 +0000 (00:04 +0000)]
Fix a few more instances of "&>".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67496
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Mon, 23 Mar 2009 00:00:23 +0000 (00:00 +0000)]
Recognize rvalue references in C++03, but complain about them. This leads to far better error recovery.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67495
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 22 Mar 2009 23:59:44 +0000 (23:59 +0000)]
Partial implementation of PR3342: break out pointer sign
incompatibilities in assignments from other pointer incompatibilities.
Based off of the patch in PR3342. (This doesn't implement -Wno-pointer-sign,
but I don't know the driver code very well.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67494
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 22 Mar 2009 23:50:14 +0000 (23:50 +0000)]
Driver: Drop code for checking bounds in SeparateArg::render, this
situation should never occur now that arguments are parsed correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67493
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 22 Mar 2009 23:49:27 +0000 (23:49 +0000)]
Disallow catching exceptions by rvalue reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67492
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 22 Mar 2009 23:26:56 +0000 (23:26 +0000)]
Adjust isModifiableLvalue to give a slightly more useful diagnostic for
attempting to illegally modify a BlockDeclRefExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67491
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 22 Mar 2009 23:26:43 +0000 (23:26 +0000)]
Driver: Implement 'missing argument' error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67490
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 22 Mar 2009 23:00:19 +0000 (23:00 +0000)]
Fix code to mark block variables as const to actually work. Fix
isObjCObjectPointerType to work with qualified types. Adjust test for
changes.
If the SemaExpr changes are wrong or break existing code, feel free to
delete the "ExprTy.addConst();" line and revert my changes to
test/Sema/block-literal.c.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67489
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 22 Mar 2009 22:58:53 +0000 (22:58 +0000)]
.td files have been used for a few days without complaint. Kill the .def files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67488
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 22 Mar 2009 22:30:06 +0000 (22:30 +0000)]
Implement static_cast from lvalue to rvalue reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67487
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 22 Mar 2009 22:03:03 +0000 (22:03 +0000)]
Add testcase for incomplete call/return types for calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67486
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 22 Mar 2009 22:00:50 +0000 (22:00 +0000)]
Check that the return/argument types of calls are complete.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67485
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 21:56:56 +0000 (21:56 +0000)]
switch getBuiltinLibFunction to use the new GetOrCreateLLVMFunction
functionality, fixing a crash on the attached testcase. Eliminate the
BuiltinFunctions cache, as it can contain dangling pointers. This fixes
a bunch of valgrind errors on test/CodeGen/builtins.c
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67484
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 22 Mar 2009 21:49:20 +0000 (21:49 +0000)]
Don't use &> in tests; dash doesn't understand it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67483
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 21:47:11 +0000 (21:47 +0000)]
emit aliases as the definitions fly by, don't bother deferring until
the end of the module.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67482
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 21:39:12 +0000 (21:39 +0000)]
make alias definition logic more similar to functions/globals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67481
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 22 Mar 2009 21:28:55 +0000 (21:28 +0000)]
Fix build from r67476 and address the easy part of Doug's comments on rvalue refs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67480
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 21:21:57 +0000 (21:21 +0000)]
fix PR3200 by making alias emission use the new infrastructure. Fold
some tests into the alias.c file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67479
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 21:03:39 +0000 (21:03 +0000)]
pull "runtime globals" into the same framework as other functions/global variables.
No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67478
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 22 Mar 2009 20:54:47 +0000 (20:54 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67477
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 22 Mar 2009 20:18:17 +0000 (20:18 +0000)]
Disallow abstract types where appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67476
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 19:35:37 +0000 (19:35 +0000)]
fix a fixme: non-proto struct returning function definitions should be compiled
to something like:
define void @bar(%struct.foo* noalias sret %agg.result) nounwind {
instead of:
define void @bar(%struct.foo* noalias sret %agg.result, ...) nounwind {
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67475
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 19:29:18 +0000 (19:29 +0000)]
add some missing type predicates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67474
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Sun, 22 Mar 2009 17:47:44 +0000 (17:47 +0000)]
fix PR3859: crash with 'cc -V'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67472
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 22 Mar 2009 06:42:39 +0000 (06:42 +0000)]
PTHManager::Create():
- Make the Diagnostic::Level for PTH errors to be specified by the caller
clang (driver):
- Set the PTHManager diagnostic level to "Diagnostic::Error" for -include-pth
(a hard error) and Diagnostic::Warning for -token-cache (we can still
proceed).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67462
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 22 Mar 2009 01:52:17 +0000 (01:52 +0000)]
Keep track of whether a class is abstract or not. This is currently only used for the __is_abstract type trait.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67461
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 00:32:22 +0000 (00:32 +0000)]
don't set the name of a call instruction to "call" in release-asserts
build. This shaves another 3% off.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67460
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 00:24:14 +0000 (00:24 +0000)]
fix CreateTempAlloca to not set a name on the alloca for temporaries
in release-assert builds. For automatic variables, explicitly set
a name with setName that does not make a temporary std::string.
This speeds up -emit-llvm-only -disable-free on PR3810 by 4.6%
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67459
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 00:12:30 +0000 (00:12 +0000)]
set function/global names with setName instead of passing the name into the
ctor function. This avoids creating a temporary std::string for the name,
speeding up the testcase in PR3810 by 3.8%
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67457
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 22 Mar 2009 00:10:22 +0000 (00:10 +0000)]
fix some warnings in release-assert mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67456
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 23:59:11 +0000 (23:59 +0000)]
fix test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67455
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Sat, 21 Mar 2009 21:00:35 +0000 (21:00 +0000)]
Fixup codegen for nested block literals so that we generate
copy_helpers and dispose_helpers as necessary for them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67453
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 21 Mar 2009 18:13:52 +0000 (18:13 +0000)]
Fix a thinko in the pre-allocation strategy for structured initializer
lists. The code wasn't accounting for the distinction between the
top-level call to getStructuredSubobjectInit and later calls that
occur deeper in the hierarchy. This problem manifested itself as
over-allocation in cases where we have large arrays of small
structures (<rdar://problem/
6707362 >).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67452
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 21 Mar 2009 18:06:45 +0000 (18:06 +0000)]
Issue error if variables are defined inside an objc class,
category or protocol.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67450
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 21 Mar 2009 17:56:30 +0000 (17:56 +0000)]
Frontend: Handle empty input on stdin.
- PR3854.
I think it makes more sense to change MemoryBuffer::getSTDIN (return 0
should indicate error, not empty), but it is documented to return 0
for empty inputs, and some other code appears to rely on this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67449
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 21 Mar 2009 17:55:43 +0000 (17:55 +0000)]
Frontend: Handle empty input on stdin.
- PR3854.
I think it makes more sense to change MemoryBuffer::getSTDIN (return 0
should indicate error, not empty), but it is documented to return 0
for empty inputs, and some other code appears to rely on this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67448
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 09:44:56 +0000 (09:44 +0000)]
now that all the decl reference and creation stuff is going through two
very simple places, reimplement the deferred decl emission logic to not be O(N^2),
fixing PR3810.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67447
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 09:25:43 +0000 (09:25 +0000)]
fix a crash that could occur when a variable declaration became a
function definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67446
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 09:16:30 +0000 (09:16 +0000)]
simplify and cleanup global variable creation stuff to all go through one
code path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67445
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 21 Mar 2009 08:53:37 +0000 (08:53 +0000)]
simplify management of llvm::Function creation to all go through
GetAddrOfFunction. This is simpler and more efficient.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67444
91177308 -0d34-0410-b5e6-
96231b3b80d8