summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* fix objc codegen to not have its own list of things that eventually get into ↵Chris Lattner2009-07-171-5/+1
| | | | | | | | llvm.used, just populate CGM's list directly. llvm-svn: 76266
* Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methodsTed Kremenek2009-07-171-1/+1
| | | | | | | | | until Doug Gregor's Type smart pointer code lands (or more discussion occurs). These methods just call the new Type::getAs<XXX> methods, so we still have reduced implementation redundancy. Having explicit getAsXXXType() methods makes it easier to set breakpoints in the debugger. llvm-svn: 76193
* Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), ↵Ted Kremenek2009-07-171-1/+1
| | | | | | Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents. llvm-svn: 76139
* use CreateRuntimeVariable to get __CFConstantStringClassReferenceChris Lattner2009-07-161-11/+6
| | | | | | | instead of doing it manually (which might end up getting auto-renamed), fixing a FIXME. rdar://7065446 llvm-svn: 76079
* codegen string literals using private linkage now like llvm-gcc, eliminatingChris Lattner2009-07-161-15/+17
| | | | | | some target hooks. llvm-svn: 75895
* Update for LLVM API change, and contextify a bunch of related stuff.Owen Anderson2009-07-141-44/+47
| | | | llvm-svn: 75705
* Revert 75648 for now. It is causing test failures.Devang Patel2009-07-141-3/+1
| | | | llvm-svn: 75684
* Use LLVM mangler to get mangled name for debug info entry.Devang Patel2009-07-141-1/+3
| | | | llvm-svn: 75589
* Update for LLVM API change.Owen Anderson2009-07-131-3/+3
| | | | llvm-svn: 75446
* Update for LLVM API change.Owen Anderson2009-07-081-25/+20
| | | | llvm-svn: 75028
* Update for LLVM API change.Owen Anderson2009-07-081-10/+12
| | | | llvm-svn: 74986
* De-ASTContext-ify DeclContext.Argyrios Kyrtzidis2009-06-301-9/+6
| | | | | | | Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating". Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit. llvm-svn: 74506
* Remove the ASTContext parameter from the getBody() methods of Decl and ↵Argyrios Kyrtzidis2009-06-301-2/+2
| | | | | | | | subclasses. Timings showed no significant difference before and after the commit. llvm-svn: 74504
* Remove the ASTContext parameter from the attribute-related methods of Decl.Argyrios Kyrtzidis2009-06-301-29/+29
| | | | | | | | | The implementations of these methods can Use Decl::getASTContext() to get the ASTContext. This commit touches a lot of files since call sites for these methods are everywhere. I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it. llvm-svn: 74501
* Improve code generation for function template specializations:Douglas Gregor2009-06-291-4/+12
| | | | | | | | | | | | | | | | - Track implicit instantiations vs. the not-yet-supported explicit specializations - Give implicit instantiations of function templates (and member functions of class templates) linkonce_odr linkage. - Improve name mangling for function template specializations, including the template arguments of the instantiation and the return type of the function. Note that our name-mangling is improved, but not correct: we still don't mangle substitutions, although the manglings we produce can be demangled. llvm-svn: 74466
* Keep track of function template specializations, to eliminateDouglas Gregor2009-06-291-0/+2
| | | | | | | redundant, implicit instantiations of function templates and provide a place where we can hang function template specializations. llvm-svn: 74454
* Move FunctionDecl::TemplateSpecializationInfo out into its own class,Douglas Gregor2009-06-291-0/+10
| | | | | | FunctionTemplateSpecializationInfo, in DeclTemplate.h. No functionality change. llvm-svn: 74431
* Patch fixes an obscure bug when 'used' attribute is applied toFariborz Jahanian2009-06-231-2/+9
| | | | | | | | | variables in ObjC's Next runtime mode. Next runtime also implicitly applies 'used' attribute on some of its meta-data. This results in two 'llvm.used' arrays to be generated, and one of them is renamed to 'llvm.used1'. llvm-svn: 74008
* Parsing and AST support for using declarations, from John Thompson!Douglas Gregor2009-06-201-0/+3
| | | | llvm-svn: 73812
* Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.Douglas Gregor2009-06-181-30/+35
| | | | llvm-svn: 73702
* Move CXXMethodDecl::OutOfLineDefinition into Decl::OutOfLine.Argyrios Kyrtzidis2009-06-171-1/+1
| | | | llvm-svn: 73651
* Sink the BuiltinInfo object from ASTContext into theChris Lattner2009-06-141-0/+1
| | | | | | | | preprocessor and initialize it early in clang-cc. This ensures that __has_builtin works in all modes, not just when ASTContext is around. llvm-svn: 73319
* move GetBuiltinType from Builtin::Context to ASTContext.Chris Lattner2009-06-141-3/+3
| | | | llvm-svn: 73316
* Don't assert when generating code with static_asserts.Anders Carlsson2009-06-111-1/+5
| | | | llvm-svn: 73208
* weak_import should not make definitions have weak linkage.Daniel Dunbar2009-06-051-2/+2
| | | | | | - <rdar://problem/6948703> clang treats weak_import like weak llvm-svn: 72967
* Make ReplaceUsesOfNonProtoTypeWithRealFunction verify that a call is *to* theChris Lattner2009-06-041-1/+2
| | | | | | function of interest, not an operand of it. llvm-svn: 72869
* Add code for emitting C++ destructors. Not used yet.Anders Carlsson2009-05-291-0/+2
| | | | llvm-svn: 72591
* Handle the edge case of a weak function with incomplete type correctly. Eli Friedman2009-05-261-6/+9
| | | | | | Found by code inspection; I haven't seen this in real-world code. llvm-svn: 72408
* extern "C" should preserve the 'extern' qualifier for VarDecls. Fixes 6853728.Anders Carlsson2009-05-161-2/+3
| | | | llvm-svn: 71957
* Reflow some comments.Mike Stump2009-05-161-14/+11
| | | | llvm-svn: 71937
* A C++ member function always has either weak linkage (if it's inline or ↵Anders Carlsson2009-05-151-0/+8
| | | | | | defined inline) or strong linkage (other cases). llvm-svn: 71873
* push GlobalDecl through enough of the CodeGenModule interfacesChris Lattner2009-05-121-23/+21
| | | | | | | | | to allow us to support generation of deferred ctors/dtors. It looks like codegen isn't emitting a call to the dtor in member-functions.cpp:test2, but when it does, its body should get emitted. llvm-svn: 71594
* add an initial stab at emitting deferred c++ inline functions. This handles ↵Chris Lattner2009-05-121-0/+9
| | | | | | | | | static functions and methods declared inline, but not ctors/dtors or methods not declared inline (apparently my previous patch wasn't good enough). llvm-svn: 71591
* cleanups, no functionality change.Chris Lattner2009-05-121-3/+5
| | | | llvm-svn: 71590
* revert my previous patch, I committed the wrong file.Chris Lattner2009-05-121-10/+2
| | | | llvm-svn: 71585
* static methods don't get this pointers.Chris Lattner2009-05-121-2/+10
| | | | llvm-svn: 71583
* When defining a function whose type has no prototype, make an effortChris Lattner2009-05-051-6/+79
| | | | | | | | to go back and clean up existing uses of the bitcasted function. This is not just an optimization: it is required for correctness to get always inline functions to work, see testcases in function-attributes.c. llvm-svn: 70971
* Refactor global decls to hold either a regular Decl or a CXXConstructorDecl ↵Anders Carlsson2009-05-051-14/+31
| | | | | | + ctor type or a CXXDestructorDecl + dtor type. llvm-svn: 70962
* Fix comment to account for r70786.Eli Friedman2009-05-031-1/+1
| | | | llvm-svn: 70789
* PR4133: fix always_inline implementation to be consistent with gcc.Eli Friedman2009-05-031-2/+1
| | | | llvm-svn: 70786
* Improve compatibility with GCC regarding inline semantics in GNU89Douglas Gregor2009-04-281-2/+10
| | | | | | | | | | | mode and in the presence of __gnu_inline__ attributes. This should fix both PR3989 and PR4069. As part of this, we now keep track of all of the attributes attached to each declaration even after we've performed declaration merging. This fixes PR3264. llvm-svn: 70292
* Fix handling of C99 "extern inline" semantics when dealing withDouglas Gregor2009-04-231-6/+5
| | | | | | | multiple declarations of the function. Should fix PR3989 and <rdar://problem/6818429>. llvm-svn: 69905
* Eliminate the three SmallVectors in ObjCImplDecl (for instanceDouglas Gregor2009-04-231-4/+5
| | | | | | | | | | | methods, class methods, and property implementations) and instead place all of these entities into the DeclContext. This eliminates more linear walks when looking for class or instance methods and should make PCH (de-)serialization of ObjCDecls trivial (and lazy). llvm-svn: 69849
* Don't convert interface types (to structs) as part of CodeGenTypes.Daniel Dunbar2009-04-221-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - This has pros and cons, but for now the pros seem to significantly outway the con. The con is that we will always need to cast in the runtime implementation to a struct type, if we wish to access an interface directly. The pros are: - Avoid the cost of generating types which are used. Most manipulation of Objective-C objects is done through messages, and only the implementation of a class will directly access memory. Previously, we would convert the type even if it only appear as a function parameter, for example. - We don't need to worry about incomplete types, and UpdateCompletedType for interfaces is gone. - It becomes easier to narrow the interface to the shadow struct for Objective-C interfaces (so it can be eliminated). Currently the runtimes still use the CodeGenTypes machinery to generate the LLVM structure they need via ConvertTagDecl, but this can eventually be replaced. llvm-svn: 69797
* Fix some mishandling of the attr(gnu_inline) mode when used withChris Lattner2009-04-221-16/+13
| | | | | | | | | | extern. Previously we would warn about it and ignore the attribute. This is incorrect, it should be handled as a c89 "extern inline" function. Many thanks to Matthieu Castet for pointing this out and beating me over the head until I got it. PR3988: extern inline function are not externally visible llvm-svn: 69756
* Fix emission of static tentative definitions referenced from other static ↵Douglas Gregor2009-04-211-9/+11
| | | | | | functions llvm-svn: 69699
* Explictly track tentative definitions within Sema, then hand thoseDouglas Gregor2009-04-211-16/+11
| | | | | | | | | | | | | | | tentative definitions off to the ASTConsumer at the end of the translation unit. Eliminate CodeGen's internal tracking of tentative definitions, and instead hook into ASTConsumer::CompleteTentativeDefinition. Also, tweak the definition-deferal logic for C++, where there are no tentative definitions. Fixes <rdar://problem/6808352>, and will make it much easier for precompiled headers to cope with tentative definitions in the future. llvm-svn: 69681
* the __gnuc_inline__ attribute is actually named __gnu_inline__,Chris Lattner2009-04-201-1/+1
| | | | | | PR4023 llvm-svn: 69618
* PR3853: Add CodeGen support for __thread.Eli Friedman2009-04-191-5/+3
| | | | llvm-svn: 69545
* silence a warning, it isn't clear what the right answer is here,Chris Lattner2009-04-191-1/+1
| | | | | | will talk to steve. llvm-svn: 69519
OpenPOWER on IntegriCloud