Commit Graph

56866 Commits

Author SHA1 Message Date
Dale Johannesen f259f3f312 Change JIT for different layout of fp80.
llvm-svn: 67629
2009-03-24 17:35:45 +00:00
Daniel Dunbar 9ea0e77572 Driver: ArgList::getLastArg was in fact returning the first matching arg.
- <rdar://problem/6715818> clang doesn't honor gcc semantic that last
    -O optimization option wins.

llvm-svn: 67628
2009-03-24 17:31:30 +00:00
Anders Carlsson b57738b09c Fix the bug that Eli noticed where we wouldn't look at function decls outside the class declaration.
llvm-svn: 67627
2009-03-24 17:23:42 +00:00
Chris Lattner f37e09e0fc improve error recovery for when type parsing fails.
llvm-svn: 67626
2009-03-24 17:21:43 +00:00
Chris Lattner deab7250fb fix "Comment#1" from PR3872
llvm-svn: 67625
2009-03-24 17:05:27 +00:00
Chris Lattner 803802d4d6 random cleanups.
llvm-svn: 67624
2009-03-24 17:04:48 +00:00
Douglas Gregor 4044d995c9 Template instantiation for constructors
llvm-svn: 67623
2009-03-24 16:43:20 +00:00
Dan Gohman 9fc30d5c30 Add a testcase for the scheduling heuristic introduced in r67586.
llvm-svn: 67622
2009-03-24 16:38:27 +00:00
Chris Lattner 02428f6aa6 -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.

llvm-svn: 67621
2009-03-24 16:18:41 +00:00
Douglas Gregor 0caea8cca7 Add another C++ open project
llvm-svn: 67620
2009-03-24 16:16:53 +00:00
Chris Lattner 73a7cab9e1 change the __VERSION__ string to be more sensible. It would be useful to include the clang version # too.
llvm-svn: 67619
2009-03-24 16:09:18 +00:00
Chris Lattner c35847e109 more tidying: name the components of PhysReg in the case when
the target constraint specifies a specific physreg.

llvm-svn: 67618
2009-03-24 15:27:37 +00:00
Chris Lattner 42eceb3491 Tidy a bit more.
llvm-svn: 67617
2009-03-24 15:25:07 +00:00
Chris Lattner 246eda43bd simplify this code a bit now that "allocation to a vreg class" can never
fail.

llvm-svn: 67616
2009-03-24 15:22:11 +00:00
Daniel Dunbar d7a1860eba Driver: Forward -MMD (not -MM) to clang-cc; this got lost in
translation, the former we support, the later we don't (yet).

llvm-svn: 67611
2009-03-24 07:20:59 +00:00
Daniel Dunbar 2afa8abdfb 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.

llvm-svn: 67610
2009-03-24 06:17:45 +00:00
Ted Kremenek 97eaaddc22 More path updates with clang-cc...
llvm-svn: 67609
2009-03-24 05:30:14 +00:00
Ted Kremenek c13a6bc593 Update scan-build/ccc-analyzer to use 'clang-cc' instead of 'clang'.
llvm-svn: 67608
2009-03-24 04:29:13 +00:00
Daniel Dunbar 2dbe89af65 Install clang-cc to libexec/clang-cc (instead of bin/clang-cc).
- Updated ccc & driver to look in libexec/ for tools.

llvm-svn: 67607
2009-03-24 04:07:10 +00:00
Daniel Dunbar 36245c5a90 Rename clang-driver to clang.
Again, I tried to update cmake but it is untested.

llvm-svn: 67606
2009-03-24 03:07:05 +00:00
Daniel Dunbar e5a7ecc23a Move <root>/Driver into <root>/tools/clang-cc.
Again, I tried to update cmake but it is untested.

llvm-svn: 67605
2009-03-24 03:00:12 +00:00
Daniel Dunbar 3db73ab7f6 Add CMake files for tools/driver; I am just guessing here, can someone test/fix?
llvm-svn: 67604
2009-03-24 02:52:57 +00:00
Daniel Dunbar bf1fe8c36c Support member reference on ?: of struct type.
llvm-svn: 67603
2009-03-24 02:38:23 +00:00
Daniel Dunbar a45cf5b6b0 Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.

llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Daniel Dunbar 4aacad1f93 Use not instead of ! in tests.
llvm-svn: 67601
2009-03-24 01:59:55 +00:00
Anders Carlsson 8f0d218598 Handle pointers to arrays of abstract types.
llvm-svn: 67598
2009-03-24 01:46:45 +00:00
Anders Carlsson b0ab31b7f6 Remove a task that's completed now.
llvm-svn: 67596
2009-03-24 01:25:56 +00:00
Anders Carlsson b6da73f2e0 class.abstract is complete. Anything that doesn't work is a bug.
llvm-svn: 67595
2009-03-24 01:24:06 +00:00
Anders Carlsson b5a27b460c 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. 

llvm-svn: 67594
2009-03-24 01:19:16 +00:00
Eli Friedman 94c25c66b5 Fix PR3868 by making Evaluate handle cases like "(long)&a + 4".
llvm-svn: 67593
2009-03-24 01:14:50 +00:00
Eli Friedman 703a77f313 Fix a couple of tests.
llvm-svn: 67592
2009-03-24 01:11:18 +00:00
Daniel Dunbar d5f35ca0bf ccc: Have generic GCC tool chain search the driver directory for
executables (e.g., clang).
 - This matches the clang-driver behavior.

llvm-svn: 67590
2009-03-24 01:06:18 +00:00
Dan Gohman efd2d44aa5 I was convinced that it's ok to allow a second i8 return value
to be returned in DL. LLVM's multiple-return-value support is
not ABI-conforming; front-ends that wish to have code emitted
that conforms to an ABI are currently expected to make
arrangements for this on their own rather than assuming that
multiple-return-values will automatically do the right thing.
This commit doesn't fundamentally change this situation.

llvm-svn: 67588
2009-03-24 01:04:34 +00:00
Dan Gohman f3746cbc56 Minor compile-time optimization; don't bother checking
canClobberPhysRegDefs if the successor node doesn't
clobber any physical registers.

llvm-svn: 67587
2009-03-24 00:50:07 +00:00
Dan Gohman 9a658d72db Add a pre-pass to the burr-list scheduler which makes adjustments to
help out the register pressure reduction heuristics in the case of
nodes with multiple uses. Currently this uses very conservative
heuristics, so it doesn't have a broad impact, but in cases where it
does help it can make a big difference.

llvm-svn: 67586
2009-03-24 00:49:12 +00:00
Douglas Gregor 2134209a2a Cleanup template instantiation for methods, destructors
llvm-svn: 67585
2009-03-24 00:38:23 +00:00
Ted Kremenek 74250d1d68 Update checker build.
llvm-svn: 67584
2009-03-24 00:35:59 +00:00
Daniel Dunbar 06686abfdc Driver: lipo wasn't being called correctly (translation failure from
ccc due to the different way we handle output arguments).

llvm-svn: 67583
2009-03-24 00:24:37 +00:00
Daniel Dunbar b5860facfd ccc/Driver: -r option doesn't take an argument.
llvm-svn: 67581
2009-03-24 00:20:13 +00:00
Evan Cheng a774a99245 Do not emit comments unless -asm-verbose.
llvm-svn: 67580
2009-03-24 00:17:40 +00:00
Douglas Gregor 654b07e029 Template instantiation for destructors. This is somewhat repetitive;
eliminating the duplication is next on the list.

llvm-svn: 67579
2009-03-24 00:15:49 +00:00
Dale Johannesen 32dfb35281 Use a SmallPtrSet instead of std::set.
llvm-svn: 67578
2009-03-23 23:39:20 +00:00
Eli Friedman 2dc5f29ff2 Fix the ABI convention for struct returns on x86 outside of Darwin.
llvm-svn: 67577
2009-03-23 23:26:24 +00:00
Douglas Gregor 1f0ce935e8 Another use of adjustParameterType. Plus, GetTypeForDeclarator will
always get ParmVarDecls with already-adjusted types. Assert it.

Thanks, Anders!

llvm-svn: 67576
2009-03-23 23:17:00 +00:00
Douglas Gregor f4f296de01 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).

llvm-svn: 67575
2009-03-23 23:06:20 +00:00
Evan Cheng 7fe1b0f50f Fix a bug in spill weight computation. If the alias is a super-register, and the super-register is in the register class we are trying to allocate. Then add the weight to all sub-registers of the super-register even if they are not aliases.
e.g. allocating for GR32, bh is not used, updating bl spill weight.                                                                                                        
     bl should get the same spill weight otherwise it will be choosen                                                                                              
     as a spill candidate since spilling bh doesn't make ebx available.
This fix PR2866.

llvm-svn: 67574
2009-03-23 22:57:19 +00:00
Ted Kremenek f718f0112e Deallocate 'DeclRefExpr's in correctly formed '#pragma unused'
llvm-svn: 67573
2009-03-23 22:50:47 +00:00
Ted Kremenek af6543455f A test case to test that -warn-dead-stores does not emit a warning for stores to variables marked with '#pragma unused'.
llvm-svn: 67570
2009-03-23 22:30:58 +00:00
Ted Kremenek fd14fade2f Implement '#pragma unused'.
llvm-svn: 67569
2009-03-23 22:28:25 +00:00
Ted Kremenek c8e54db801 Add sanity check in Clang TableGen backend to check if 'Component' is a string.
llvm-svn: 67565
2009-03-23 21:54:33 +00:00