Граф коммитов

318 Коммитов

Автор SHA1 Сообщение Дата
Anders Carlsson e1b29efab3 Add preliminary (and probably broken) codegen support for C++ static initializers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55180 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-22 16:00:37 +00:00
Daniel Dunbar b7ec246872 Add NeXT runtime support for generating methods.
Change CodeGenFunction::EmitParmDecl to take either a ParmVarDecl or an
  ImplicitParamDecl.

Drop hasAggregateLLVMType from CodeGenModule.cpp (use version in
  CodeGenFunction).

Change the Objective-C method generation to use EmitParmDecl for
  implicit parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54838 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-16 03:19:19 +00:00
Daniel Dunbar c4a1dea2dc More #include cleaning
- Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h
 - Moved Sema::getCurMethodDecl() out of line (dependent on
   ObjCMethodDecl via dyn_cast).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54629 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 05:35:13 +00:00
Daniel Dunbar de7fb8413b More #include cleaning
- Remove internal uses of AST.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54628 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11 05:00:27 +00:00
Eli Friedman 1e692ace08 Basic support for volatile loads and stores. Stores the volatile
qualifier in the lvalue, and changes lvalue loads/stores to honor 
the volatile flag.  Places which need some further attention are marked 
with FIXMEs.

Patch by Cédric Venet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52264 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-13 23:01:12 +00:00
Argyrios Kyrtzidis a7a6dc01b7 Make CodeGenFunction::EmitDecl() recognise CXXClass/CXXStruct/CXXUnion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52162 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-09 23:42:47 +00:00
Eli Friedman 2659052c5d Don't crash emitting an initializer for a static local with union type.
This fix just makes sure to construct the global with the appropriate 
type, and fixes up the one user this affects to compensate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52084 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-08 01:23:18 +00:00
Sanjiv Gupta 686226b538 Emit debug information for global and static variables when -g is specified.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51993 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-05 08:59:10 +00:00
Eli Friedman 77eedd6fce Calculate alignment for local variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51826 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-31 21:20:41 +00:00
Sanjiv Gupta cc9b16394f Emit parameter and local variable debug information with -g.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51765 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-30 10:30:31 +00:00
Dan Gohman d79a726dc3 Change uses of llvm::Type::isFirstClassType to use the new
llvm::Type::isSingleValueType. Currently these two functions have
the same behavior, but soon isFirstClassType will return true for
struct and array types.

Clang may some day want to use of isFirstClassType for some of
these some day as an optimization, but it'll require some
consideration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51446 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-22 22:12:56 +00:00
Chris Lattner 2621fd1d6d Add basic support for the pic-* target triples and add support for
targets that do not support recursion (and thus codegen stack variables
as globals).

Patch contributed by Alireza Moshtaghi!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50844 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-08 05:58:21 +00:00
Nate Begeman 8bd4afeb87 Generate code for annotation attributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49951 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-19 04:17:09 +00:00
Steve Naroff 248a753f6b Remove FileVarDecl and BlockVarDecl. They are replaced by VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl().
This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49748 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-15 22:42:06 +00:00
Chris Lattner 8bcfc5bef4 remove the Decl::getCanonicalType() method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49295 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-06 23:10:54 +00:00
Chris Lattner 9b2dc28717 Since isComplexType() no longer returns true for _Complex integers, the code
generator needs to call isAnyComplexType().  This fixes PR1960.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49220 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-04 16:54:41 +00:00
Chris Lattner c8aa5f1f26 Codegen assignment to self correctly, patch by David Chisnall!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49201 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-04 04:07:35 +00:00
Chris Lattner bda0b626e7 Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it.  This follows the main
llvm tree, and allows the libraries to be built in parallel.  The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in.  This speeds
up parallel builds, particularly incremental ones.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15 23:59:48 +00:00