Commit Graph

38046 Commits

Author SHA1 Message Date
Chris Lattner 07b201d9c0 implement test/Sema/typedef-prototype.c, allowing code
to declare a function with a typedef:

typedef int unary_int_func(int arg);
unary_int_func add_one;

This patch contributed by Seo Sanghyeon!

llvm-svn: 44100
2007-11-14 06:34:38 +00:00
Chris Lattner a77e74edba Implement PR1796 and Transforms/SimplifyCFG/noreturn-call.ll
by inserting unreachable after no-return calls.

llvm-svn: 44099
2007-11-14 06:19:25 +00:00
Steve Naroff c17b056427 Comment out recent regression r44096.
llvm-svn: 44098
2007-11-14 03:37:28 +00:00
Owen Anderson 9306de0727 Start the process of making MachineLoopInfo possible by templating Loop.
llvm-svn: 44097
2007-11-14 02:33:58 +00:00
Fariborz Jahanian fe38ba24af Rewrite @optional/@required directives used inside protocol definitions.
llvm-svn: 44096
2007-11-14 01:37:46 +00:00
Fariborz Jahanian da6165c3dc Rewrite of forward protocol declaration.
llvm-svn: 44095
2007-11-14 00:42:16 +00:00
Ted Kremenek 164faf98f3 Implemented serialization of FunctionTypeNoProto.
llvm-svn: 44094
2007-11-14 00:38:50 +00:00
Ted Kremenek 7068cef079 Implemented serialization of VariableArrayTypes.
llvm-svn: 44093
2007-11-14 00:31:36 +00:00
Ted Kremenek eef4a6296f Implemented serialization of TypedefType.
llvm-svn: 44092
2007-11-14 00:27:46 +00:00
Ted Kremenek ea27383d68 Implemented serialization of ConstantArrayType.
llvm-svn: 44091
2007-11-14 00:17:21 +00:00
Ted Kremenek f35e589847 Implemented serialization of TagTypes.
llvm-svn: 44090
2007-11-14 00:03:56 +00:00
Ted Kremenek 919858a428 Modified ASTContext::getTagDeclType() to accept a NULL pointer for the passed
in TagDecl*. This allows the deserializer to use ASTContext to create the
TagTypes. Deserialize TagTypes then rely on pointer-backpatching to resolve
the decls.

This may not be the interface that we want, but as the implementation of
TagTypes will potentially change significantly in the future, I'm leaving this
for now. An appropriate FIXME is in place.

llvm-svn: 44089
2007-11-14 00:03:20 +00:00
Steve Naroff 971d2f1242 Fix regression with ObjC method definitions and -ast-print
llvm-svn: 44088
2007-11-13 23:48:03 +00:00
Fariborz Jahanian bc92fd7542 Type encoding for structs.
llvm-svn: 44087
2007-11-13 23:21:38 +00:00
Hartmut Kaiser 6f5421cbee Fixed a compilation error.
llvm-svn: 44083
2007-11-13 23:04:28 +00:00
Hartmut Kaiser dde99f6a07 Fixed a strange construct. Please review.
llvm-svn: 44082
2007-11-13 23:04:06 +00:00
Hartmut Kaiser 1d4816584f Updated VC++ build system
llvm-svn: 44081
2007-11-13 23:03:32 +00:00
Steve Naroff 7b8fa4746a Rewrite method definition bodies. Also renamed a method to distinguish between method declarations and definitions.
llvm-svn: 44080
2007-11-13 23:01:27 +00:00
Ted Kremenek 204a1d3976 Removed line with typo (declared friendship with ASTContext). Line was
not needed since friendship is declared elsewhere.

llvm-svn: 44079
2007-11-13 22:57:59 +00:00
Ted Kremenek 767e7507c2 Added pretty-printing of statements during serialization.
llvm-svn: 44078
2007-11-13 22:56:10 +00:00
Ted Kremenek 049059a7db Implemented serialization of AsmStmt (or rather what is currently implemented
in AsmStmt).

llvm-svn: 44077
2007-11-13 22:55:51 +00:00
Ted Kremenek d86dcfe8ca Fixed bug in FunctionDecl serialization where we crashed when the
FunctionDecl had decls for its parameters but still had greater than 0
arguments.

llvm-svn: 44076
2007-11-13 22:51:08 +00:00
Ted Kremenek da551c3b1e Implemented serialization for SizeOfAlignOfTypeExpr.
llvm-svn: 44075
2007-11-13 22:30:29 +00:00
Ted Kremenek b8f51d5512 Implemented serialization for MemberExpr.
llvm-svn: 44074
2007-11-13 22:16:23 +00:00
Nate Begeman a0f78974a6 Give AST-walk passes a way to access DeclSpec attributes on functions and
variables.

llvm-svn: 44073
2007-11-13 22:14:47 +00:00
Fariborz Jahanian 989e03989b Fixed a rewrite of metadata bug when category implementation has no matching interface.
llvm-svn: 44072
2007-11-13 22:09:49 +00:00
Ted Kremenek 24726c3fc9 Rewrote type serialization to used the same methodology as we do for Decls.
Removed tons of dead code in ASTContext concerning how types use to be
serialized.
Removed serialization methods from QualType that are no longer used.

llvm-svn: 44070
2007-11-13 22:02:55 +00:00
Nate Begeman 313f8ca67b Rename Sema method to follow class naming convention
llvm-svn: 44069
2007-11-13 21:49:48 +00:00
Chris Lattner 68f04fa941 Fix the regression on Transforms/GlobalOpt/deadglobal-2.ll from my
patch on friday.

llvm-svn: 44068
2007-11-13 21:46:23 +00:00
Chris Lattner f150ace6cb upgrade test
llvm-svn: 44067
2007-11-13 21:42:48 +00:00
Fariborz Jahanian 5633835d17 Populate metadata with adrress of method code.
llvm-svn: 44066
2007-11-13 21:02:00 +00:00
Chris Lattner 47791a4051 Parse "sizeof(arr)[0]" as a sizeof of an expr if arr
is an expression.

llvm-svn: 44065
2007-11-13 20:50:37 +00:00
Owen Anderson d8167ab332 Run computeDomForest() on the set of registers that need to be tested for
interference.

llvm-svn: 44064
2007-11-13 20:13:24 +00:00
Owen Anderson 569ef71e44 Preserve LiveVariables when doing critical edge splitting.
llvm-svn: 44063
2007-11-13 20:04:45 +00:00
Fariborz Jahanian c54d8462fb Rewrite of method definitions in categories.
llvm-svn: 44062
2007-11-13 20:04:28 +00:00
Owen Anderson 4696e959fe Wow. I definitely shouldn't write code when I'm tird.
Make my previous patch actually do what it was intended to do.

llvm-svn: 44061
2007-11-13 19:56:28 +00:00
Fariborz Jahanian 98ba6cde3d Order of methods are OK and generated .c file can be compiled.
llvm-svn: 44060
2007-11-13 19:21:13 +00:00
Ted Kremenek 794d8a6cde Updated test case to flag about comparisons against constants. We may
invert this case (i.e., not flag a warning) in the future.

llvm-svn: 44059
2007-11-13 19:18:22 +00:00
Ted Kremenek b83f182b59 Modified -Wfloat-equal logic to suppress warnings where floating point values
are compared against builtins such as __builtin_inf.

llvm-svn: 44058
2007-11-13 19:17:00 +00:00
Dale Johannesen 7904708369 Revert previous; these files aren't ready to go in yet.
llvm-svn: 44057
2007-11-13 19:16:02 +00:00
Dale Johannesen 7a7085f6d3 Add parameter to getDwarfRegNum to permit targets
to use different mappings for EH and debug info;
no functional change yet.
Fix warning in X86CodeEmitter.

llvm-svn: 44056
2007-11-13 19:13:01 +00:00
Fariborz Jahanian 1e5f64e2ea First patch in rewrie of method definitions. This is work in progress.
llvm-svn: 44055
2007-11-13 18:44:14 +00:00
Ted Kremenek 577437de8b Updated diagnostic for -Wfloat-equal to underline the offending expressions.
llvm-svn: 44054
2007-11-13 18:40:33 +00:00
Ted Kremenek 2272f72723 Added -Wfloat-equal option to the driver. This makes warnings about
floating point comparisons using == or != an opt-in rather than a default
warning.

Updated test case to use -Wfloat-equal.

llvm-svn: 44053
2007-11-13 18:37:02 +00:00
Chris Lattner 07328f0b8b Make llvm2cpp better, patch for PR1794, contributed by Zack Rusin.
llvm-svn: 44051
2007-11-13 18:22:33 +00:00
Chris Lattner 034b49dca0 Clean up types, removing some casts. Patch contributed by
Cedric Venet.

llvm-svn: 44050
2007-11-13 18:16:41 +00:00
Chris Lattner 2f72c427cf improve handling of address of global when checking for
constants and initializers.  Patch by Sanghyeon Seo, thanks!

llvm-svn: 44049
2007-11-13 18:05:45 +00:00
Evan Cheng c891ae92dc Fix x86-64 jit: remove reliance on Dwarf numbers.
llvm-svn: 44048
2007-11-13 17:54:34 +00:00
Steve Naroff b666625493 Teach Sema::CheckCompareOperands() about "void *" (C99 6.5.9p2)
llvm-svn: 44047
2007-11-13 14:57:38 +00:00
Bill Wendling 77b13af9a6 Unifacalize the CALLSEQ{START,END} stuff.
llvm-svn: 44045
2007-11-13 09:19:02 +00:00