Commit Graph

56842 Commits

Author SHA1 Message Date
Devang Patel 4555618854 Before deleting a basic block, give other loop passes a chance cleanup analysis values, related to the instructions in the basic block.
llvm-svn: 67719
2009-03-25 23:57:48 +00:00
Anders Carlsson a28908d575 Tighten the setAccess assert. We now allow AS_none if the decl contex is not a C++ record decl.
Also, fix fallout from the change.

llvm-svn: 67717
2009-03-25 23:38:06 +00:00
Douglas Gregor ef1a09a336 Implement template instantiation for static data members of class
templates, including in-class initializers. For example:

  template<typename T, T Divisor>
  class X {
  public:
    static const T value = 10 / Divisor;
  };

instantiated with, e.g.,

  X<int, 5>::value

to get the value '2'.

llvm-svn: 67715
2009-03-25 23:32:15 +00:00
Jim Grosbach 292ea55130 Modify getRegisterValueType() to allow for a register being in mutliple
register classes. Before, MVT::Other would be returned anytime a reg was
in multiple register classes. Now, MVT::Other is only returned if the types
for those register classes differ.

llvm-svn: 67714
2009-03-25 23:28:33 +00:00
Fariborz Jahanian f909f92799 More for for objc2's ivar layout map (currently
is not in use).

llvm-svn: 67713
2009-03-25 22:36:49 +00:00
Douglas Gregor 6c2adff380 Pass access specifiers through to member classes and member enums.
llvm-svn: 67710
2009-03-25 22:00:53 +00:00
Douglas Gregor f3430ae300 Fix notes regarding the instantiation of member classes (and test 'em).
llvm-svn: 67708
2009-03-25 21:23:52 +00:00
Douglas Gregor 8ea8fd48f2 Instantiation for member classes of class templates. Note that only
the declarations of member classes are instantiated when the owning
class template is instantiated. The definitions of such member classes
are instantiated when a complete type is required.

This change also introduces the injected-class-name into a class
template specialization.

llvm-svn: 67707
2009-03-25 21:17:03 +00:00
Chris Lattner 51a53f92a5 fix PR3880, fixing a comma swallowing bug handling macros that only take
... arguments.

llvm-svn: 67706
2009-03-25 21:08:24 +00:00
Chris Lattner beb9055000 remove some dead code. ArgTokens can never be empty, because it is always
terminated with an EOF token.  The condition it is trying to check for is
handled by this code above.

    // Empty arguments are standard in C99 and supported as an extension in
    // other modes.
    if (ArgTokens.empty() && !Features.C99)
      Diag(Tok, diag::ext_empty_fnmacro_arg);

llvm-svn: 67705
2009-03-25 21:01:40 +00:00
Ted Kremenek a87b8a9a72 CMake: Also include header files in target when the generator is 'XCode'.
llvm-svn: 67703
2009-03-25 20:34:07 +00:00
Evan Cheng 1e550e15cc Add a test case for PR3779: when to promote the function return value.
llvm-svn: 67702
2009-03-25 20:30:19 +00:00
Evan Cheng 2e9f42bed5 Revert 67132. This is breaking some objective-c apps.
Also fixes SDISel so it *does not* force promote return value if the function is not marked signext / zeroext.

llvm-svn: 67701
2009-03-25 20:20:11 +00:00
Anders Carlsson 612f8a4842 It doesn't make sense to set the access specifier to AS_none (I think)
llvm-svn: 67700
2009-03-25 20:19:57 +00:00
Mike Stump 871c1f6f88 Remove -f__block as codegen for __block variables should be solid.
llvm-svn: 67697
2009-03-25 18:05:39 +00:00
Mike Stump d2142cffbf Fixup codegen for block literals that bleed copy/dispose information
from previous block literals.

llvm-svn: 67696
2009-03-25 17:58:24 +00:00
Mike Stump 12ef15f8b2 Update to account for the great driver renaming.
llvm-svn: 67695
2009-03-25 17:56:16 +00:00
Evan Cheng 1bb604aff5 One more test.
llvm-svn: 67694
2009-03-25 17:45:18 +00:00
Dale Johannesen eb1646d28c When optimizing with debug info, don't keep the
stoppoint nodes around until Legalize; doing this
imposed an ordering on a sequence of loads that
came from different lines, interfering with scheduling.

llvm-svn: 67692
2009-03-25 17:36:08 +00:00
Evan Cheng 4b6c049b3f Add __builtin___memcpy_chk tests.
llvm-svn: 67691
2009-03-25 16:49:31 +00:00
Duncan Sands 39d0946db5 These tests pass on linux.
llvm-svn: 67689
2009-03-25 16:43:59 +00:00
Evan Cheng b86a445d39 Add a __builtin_object_size test.
llvm-svn: 67688
2009-03-25 16:29:33 +00:00
Douglas Gregor dfcad11842 Predicate to detect when a RecordDecl is really the injected-class-name
llvm-svn: 67687
2009-03-25 15:59:44 +00:00
Douglas Gregor 8a6555332f Stub out some declaration kinds that cannot ever be instantiated
llvm-svn: 67686
2009-03-25 15:45:12 +00:00
Douglas Gregor 167fa625f3 Fix parsing of template classes prefixed by nested-name-specifiers
llvm-svn: 67685
2009-03-25 15:40:00 +00:00
Douglas Gregor 9106b82ceb Minor refactoring to eliminate an extra switch during template instantiation
llvm-svn: 67684
2009-03-25 15:04:13 +00:00
Daniel Dunbar 0af75a19a4 Driver: Implement Darwin_X86 tool chain level argument translation.
- This is really gross, but its the easiest way to match gcc. Once we
   are confident in the driver, we can try and push these translations
   down into tools.

 - No test cases for this yet, it's hard to see the effects of these
   translations before the gcc tool argument translation is pulled
   over.

 - Interaction with "unused argument" warning hasn't been worked out
   yet.

 - <rdar://problem/6717359> [driver] implement toolchain specific
   argument translation.

"It's horrible in here."

llvm-svn: 67683
2009-03-25 06:58:31 +00:00
Chris Lattner 56a95f6c16 Fix a bug in our autoupgrade support: in an argument list to a function
call, we should treat "i64 zext" as the start of a constant expr, but
"i64 0 zext" as an argument with an obsolete attribute on it (this form
is already tested by test/Assembler/2007-07-30-AutoUpgradeZextSext.ll).

Make the autoupgrade logic more discerning to avoid treating "i64 zext"
as an old-style attribute, causing us to reject a valid constant expr.
This fixes PR3876.

llvm-svn: 67682
2009-03-25 06:36:36 +00:00
Gabor Greif 2755edf4c4 do not rely on callee being operand 0
llvm-svn: 67681
2009-03-25 06:32:59 +00:00
Daniel Dunbar aabb0b11a3 Driver: Handle -Xarch_, including warning for nasty -Xarch_ use cases
we aren't going to support. For example:
  clang -Xarch_i386 -S -Xarch_i386 -o -Xarch_i386 myi386asm.s ...

llvm-svn: 67680
2009-03-25 06:12:34 +00:00
Daniel Dunbar 0e378b1e26 Driver: Replace Option::ForwardToGCC by Option::DriverOption (which
matches the flag in Options.def).

llvm-svn: 67679
2009-03-25 06:08:46 +00:00
Zhongxing Xu 24e7eade19 This patch adds two more SymbolData subclasses: SymIntExpr and SymSymExpr, for
representing symbolic expressions like 'x'+3 and 'x'+'y'. The design is
subjected to change later when we fix the class hierarchy of symbolic
expressions.

llvm-svn: 67678
2009-03-25 05:58:37 +00:00
Daniel Dunbar b2304ee0d1 Driver: Fix typo in JoinedAndSeparateArg::render.
llvm-svn: 67677
2009-03-25 05:23:40 +00:00
Daniel Dunbar dac54a81df Driver: Prep for tool chain specific argument translation.
- Lift ArgList to a base class for InputArgList and DerivedArgList.
 
 - This is not a great decomposition, but it does embed the
   translation into the type system, and keep things efficient for
   tool chains that don't want to do any translation.

 - No intended functionality change.

Eventually I hope to get rid of tool chain specific translation and
have each tool do the right thing, but for now this is the easiest way
to match gcc precisely (which is good for testing).

llvm-svn: 67676
2009-03-25 04:13:45 +00:00
Devang Patel 68b0881d94 Do not ignore DW_TAG_class_type!
llvm-svn: 67675
2009-03-25 03:52:06 +00:00
Chris Lattner 8c37df4f91 simplify some conditionals, don't copy LangOptions.
llvm-svn: 67674
2009-03-25 03:28:08 +00:00
Daniel Dunbar 0e0cf39a9e gcc 4.3 finds my use of ^ suspicious.
llvm-svn: 67673
2009-03-25 03:06:26 +00:00
Anders Carlsson 75fdaa465f Improve handling of base initializers. We now parse initializers in out of line decls, such as:
class C {
    C() { }
    
    int a;
};

C::C() : a(10) { }

We also diagnose when initializers are used on declarations that aren't constructors:

t.cpp:1:10: error: only constructors take base initializers
void f() : a(10) { }
         ^

Doug and/or Sebastian: I'd appreciate a review, especially the nested-name-spec test results (from the looks of it we now match gcc in that test.)

llvm-svn: 67672
2009-03-25 02:58:17 +00:00
Anders Carlsson 3cfc2e214a Add the .td files and remove the .def files from the Xcode project.
llvm-svn: 67671
2009-03-25 02:54:43 +00:00
Evan Cheng 499d5f333f CodeGen still defaults to non-verbose asm, but llc now overrides it and default to verbose.
llvm-svn: 67669
2009-03-25 01:48:21 +00:00
Evan Cheng 5e5a63cf8f CodeGen still defaults to non-verbose asm, but llc now overrides it and default to verbose.
llvm-svn: 67668
2009-03-25 01:47:28 +00:00
Evan Cheng 9966403e90 Don't print global names twice with -asm-verbose.
llvm-svn: 67667
2009-03-25 01:08:42 +00:00
Dan Gohman 7f570d5491 Revert r67655 and r67656, as they are breaking the build. I'm
not going to persue this further at this time.

llvm-svn: 67666
2009-03-25 00:52:11 +00:00
Ted Kremenek 759d5d3fa7 Turn on -analyzer-eagerly-assume by default when using 'clang-cc' to perform
static analysis.

llvm-svn: 67665
2009-03-25 00:38:14 +00:00
Douglas Gregor 1880ba59f3 Template instantiation for conversion functions
llvm-svn: 67664
2009-03-25 00:34:44 +00:00
Ted Kremenek 7b7b3f0817 Turn on '-analyzer-eagerly-assume' by default in ccc for the static analyzer.
llvm-svn: 67663
2009-03-25 00:32:30 +00:00
Chris Lattner c3b2111d97 Fix PR3874 by restoring a condition I removed, but making it more
precise than it used to be.

llvm-svn: 67662
2009-03-25 00:28:58 +00:00
Devang Patel a6e85a19c6 Do not ignore DW_TAG_class_type!
llvm-svn: 67661
2009-03-25 00:28:40 +00:00
Douglas Gregor 3d0d4b833a Move template instantiation for expressions into a separate file
llvm-svn: 67660
2009-03-25 00:27:28 +00:00
Douglas Gregor c08f489d38 In Parser::ParseClassSpecifier, don't conflate a NULL declaration with
failure to perform a declaration. Instead, explicitly note semantic
failures that occur during template parsing with a DeclResult. Fixes
PR3872.

llvm-svn: 67659
2009-03-25 00:13:59 +00:00