Commit Graph

8 Commits

Author SHA1 Message Date
Douglas Gregor d763b3e014 Comment a wacky test case
llvm-svn: 123758
2011-01-18 18:38:18 +00:00
Daniel Dunbar 8f0be43669 Avoid unneeded calls to opt/llvm-dis.
llvm-svn: 100236
2010-04-02 22:29:38 +00:00
Douglas Gregor a71cc15361 Implement promotion for enumeration types.
WHAT!?!

It turns out that Type::isPromotableIntegerType() was not considering
enumeration types to be promotable, so we would never do the
promotion despite having properly computed the promotion type when the
enum was defined. Various operations on values of enum type just
"worked" because we could still compute the integer rank of an enum
type; the oddity, however, is that operations such as "add an enum and
an unsigned" would often have an enum result type (!). The bug
actually showed up as a spurious -Wformat diagnostic
(<rdar://problem/7595366>), but in theory it could cause miscompiles.

In this commit:
  - Enum types with a promotion type of "int" or "unsigned int" are
  promotable.
  - Tweaked the computation of promotable types for enums
  - For all of the ABIs, treat enum types the same way as their
  underlying types (*not* their promotion types) for argument passing
  and return values
  - Extend the ABI tester with support for enumeration types

llvm-svn: 95117
2010-02-02 20:10:50 +00:00
Daniel Dunbar 8fbe78f6fc Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

llvm-svn: 91446
2009-12-15 20:14:24 +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 25bd032084 Force triple for codegen tests which have expectations on output
types.

llvm-svn: 63669
2009-02-03 21:54:49 +00:00
Chris Lattner 807979824e use -emit-llvm-bc
llvm-svn: 45372
2007-12-27 20:35:58 +00:00
Chris Lattner 8a241f9359 Teach Type::is[un]SignedIntegerType about enum decls. This allows the code generator
to emit signed comparisons when needed for enum decl references.  This implements
test/CodeGen/enum.c.  I think enums should be good now.

llvm-svn: 41572
2007-08-29 17:48:46 +00:00