summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename ObjCMethodDecl::isSynthesized to isPropertyAccessor.Jordan Rose2012-10-101-3/+3
| | | | | | | | | | | | | This more accurately reflects its use: this flag is set when a method matches the getter or setter name for a property in the same class, and does not actually specify whether or not the definition of the method will be synthesized (either implicitly or explicitly with @synthesize). This renames the setter and backing field as well, and changes the (soon-to-be-obsolete?) XML dump format to use 'property_accessor' instead of 'synthesized'. llvm-svn: 165626
* Have 'addFnAttr' take the attribute enum value. Then have it build the ↵Bill Wendling2012-10-101-11/+11
| | | | | | attribute object and add it appropriately. No functionality change. llvm-svn: 165596
* We use the enums to query whether an Attributes object has that attribute. TheBill Wendling2012-10-091-1/+1
| | | | | | opaque layer is responsible for knowing where that specific attribute is stored. llvm-svn: 165489
* Move TargetData to DataLayout.Micah Villmow2012-10-081-5/+5
| | | | llvm-svn: 165395
* Propagate calling convention for aliases and weakrefs.Alex Rosenberg2012-10-051-2/+3
| | | | llvm-svn: 165343
* PR13941: Mark all virtual functions as unnamed_addr. It's not possible toRichard Smith2012-09-281-0/+4
| | | | | | | observe their addresses (taking their address gives the vtable slot) so we are free to merge their definitions. llvm-svn: 164864
* Add basic support for adding !tbaa.struct metadata on llvm.memcpy calls forDan Gohman2012-09-281-0/+6
| | | | | | struct assignment. llvm-svn: 164853
* Update to new function attribute querying syntax.Bill Wendling2012-09-261-1/+1
| | | | llvm-svn: 164726
* Dont cast away const needlessly. Found by gcc48 -Wcast-qual.Roman Divacky2012-09-061-1/+1
| | | | llvm-svn: 163325
* Push ArrayRef through the Expr hierarchy.Benjamin Kramer2012-08-241-4/+4
| | | | | | No functionality change. llvm-svn: 162552
* Reduce duplicated hash map lookups.Benjamin Kramer2012-08-221-6/+2
| | | | llvm-svn: 162361
* [asan] If we are compiling with ASan, add metadata indicating dynamically ↵Kostya Serebryany2012-08-211-0/+12
| | | | | | initialized globals. Patch by Reid Watson, reviewed by Richard Smith llvm-svn: 162259
* Decrementing std::string::end is not portable, use array access instead.Joerg Sonnenberger2012-08-101-1/+1
| | | | llvm-svn: 161659
* Remove HasSynthBitfield and all callers/writers/etc. Also removeEric Christopher2012-07-191-9/+1
| | | | | | | | previous ResetObjCLayout calls since this is now handled in Sema. Part of rdar://11842763 llvm-svn: 160527
* Add the ObjFW runtime. Patch by Jonathan Schleifer!John McCall2012-07-121-0/+1
| | | | llvm-svn: 160102
* Rename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstepDavid Chisnall2012-07-031-3/+3
| | | | | | runtime to gnustep from gnu. Fix EH for the GCC runtime. llvm-svn: 159684
* When we're looking for redeclarations which might provide a definition in ↵Eli Friedman2012-07-021-0/+1
| | | | | | CodeGen, make sure we examine all the redeclarations. PR13252. llvm-svn: 159586
* Add -ftls-model command-line flag.Hans Wennborg2012-06-281-7/+41
| | | | | | This allows for setting the default TLS model. (PR9788) llvm-svn: 159336
* block literal irgen: several improvements on naming blockFariborz Jahanian2012-06-261-3/+7
| | | | | | | | | | | | literal helper functions. All helper functions (global and locals) use block_invoke as their prefix. Local literal helper names are prefixed by their enclosing mangled function names. Blocks in non-local initializers (e.g. a global variable or a C++11 field) are prefixed by their mangled variable name. The descriminator number added to end of the name starts off with blank (for first block) and _<N> (for the N+2-th block). llvm-svn: 159206
* IRGen: Factor v-table generation into the CGCXXABI object.Charles Davis2012-06-231-2/+2
| | | | llvm-svn: 159091
* Support the tls_model attribute (PR9788)Hans Wennborg2012-06-231-1/+7
| | | | | | | | | | | | | | This adds support for the tls_model attribute. This allows the user to choose a TLS model that is better than what LLVM would select by default. For example, a variable might be declared as: __thread int x __attribute__((tls_model("initial-exec"))); if it will not be used in a shared library that is dlopen'ed. This depends on LLVM r159077. llvm-svn: 159078
* Restructure how the driver communicates information about theJohn McCall2012-06-201-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | target Objective-C runtime down to the frontend: break this down into a single target runtime kind and version, and compute all the relevant information from that. This makes it relatively painless to add support for new runtimes to the compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z, available at the driver level as a better and more general alternative to -fgnu-runtime and -fnext-runtime. This new concept of an Objective-C runtime also encompasses what we were previously separating out as the "Objective-C ABI", so fragile vs. non-fragile runtimes are now really modelled as different kinds of runtime, paving the way for better overall differentiation. As a sort of special case, continue to accept the -cc1 flag -fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak. I won't go so far as to say "no functionality change", even ignoring the new driver flag, but subtle changes in driver semantics are almost certainly not intended. llvm-svn: 158793
* [MSExtensions] Add support for __forceinline.Michael J. Spencer2012-06-181-2/+2
| | | | | | __forceinline is a combination of the inline keyword and __attribute__((always_inline)) llvm-svn: 158653
* PR13064: Store whether an in-class initializer uses direct or copyRichard Smith2012-06-101-2/+2
| | | | | | | initialization, and use that information to produce the right kind of initialization during template instantiation. llvm-svn: 158288
* Revert Decl's iterators back to pointer value_type rather than reference ↵David Blaikie2012-06-061-1/+1
| | | | | | | | | | | | | | value_type In addition, I've made the pointer and reference typedef 'void' rather than T* just so they can't get misused. I would've omitted them entirely but std::distance likes them to be there even if it doesn't use them. This rolls back r155808 and r155869. Review by Doug Gregor incorporating feedback from Chandler Carruth. llvm-svn: 158104
* adjust to mainline llvm API change.Chris Lattner2012-05-281-4/+2
| | | | llvm-svn: 157557
* CUDA: add CodeGen support for global variable address spaces.Peter Collingbourne2012-05-201-3/+21
| | | | | | | | | Because in CUDA types do not have associated address spaces, globals are declared in their "native" address space, and accessed by bitcasting the pointer to address space 0. This relies on address space 0 being a unified address space. llvm-svn: 157167
* Add support for __attribute__((hot)) and __attribute__((cold)).Benjamin Kramer2012-05-121-0/+4
| | | | | | | | Currently cold functions are marked with the "optsize" attribute in CodeGen so they are always optimized for size. The hot attribute is just ignored, LLVM doesn't have a way to express hotness at the moment. llvm-svn: 156723
* This patch adds a new Clang compiler flag "-gline-tables-only".Alexey Samsonov2012-05-041-1/+2
| | | | | | | | | | | | | | It reduces the amount of emitted debug information: 1) DIEs in .debug_info have types DW_TAG_compile_unit, DW_TAG_subprogram, DW_TAG_inlined_subroutine (for opt builds) and DW_TAG_lexical_block only. 2) .debug_str contains only function names. 3) No debug data for types/namespaces/variables is emitted. 4) The data in .debug_line is enough to produce valid stack traces with function names and line numbers. Reviewed by Eric Christopher. llvm-svn: 156160
* Remove the ref/value inconsistency in filter_decl_iterator.David Blaikie2012-04-301-1/+1
| | | | | | | | | | | | | filter_decl_iterator had a weird mismatch where both op* and op-> returned T* making it difficult to generalize this filtering behavior into a reusable library of any kind. This change errs on the side of value, making op-> return T* and op* return T&. (reviewed by Richard Smith) llvm-svn: 155808
* Use enum to set debug info size generated by ClangAlexey Samsonov2012-04-271-1/+2
| | | | llvm-svn: 155697
* enable TBAA when -fthread-sanitizer is given, even with -O0 or ↵Kostya Serebryany2012-04-241-3/+4
| | | | | | -relaxed-aliasing llvm-svn: 155430
* Typo.Eric Christopher2012-04-161-1/+1
| | | | llvm-svn: 154880
* Enable debug info for objective c implementations that may not haveEric Christopher2012-04-111-0/+5
| | | | | | | | an explicit instance variable. rdar://10590352 llvm-svn: 154481
* Revert r153723, and its follow-ups r153728 and r153733.Chandler Carruth2012-03-301-3/+2
| | | | | | | | | | | | | | | | These patches cause us to miscompile and/or reject code with static function-local variables in an extern-C context. Previously, we were papering over this as long as the variables are within the same translation unit, and had not seen any failures in the wild. We still need a proper fix, which involves mangling static locals inside of an extern-C block (as GCC already does), but this patch causes pretty widespread regressions. Firefox, and many other applications no longer build. Lots of test cases have been posted to the list in response to this commit, so there should be no problem reproducing the issues. llvm-svn: 153768
* Do the static-locals thing properly in the face of unions andJohn McCall2012-03-301-2/+3
| | | | | | other things which might mess with the variable's type. llvm-svn: 153733
* The UTF16 string referenced by a CFString should go into the __TEXT,__ustringBill Wendling2012-03-301-26/+24
| | | | | | | | | | | | | section. A 'normal' string will go into the __TEXT,__const section, but this isn't good for UTF16 strings. The __ustring section allows for coalescing, among other niceties (such as allowing the linker to easily split up strings). Instead of outputting the UTF16 string as a series of bytes, output it as a series of shorts. The back-end will then nicely place the UTF16 string into the correct section, because it's a mensch. <rdar://problem/10655949> llvm-svn: 153710
* Fix whitespace.Bill Wendling2012-03-291-6/+5
| | | | llvm-svn: 153698
* add tbaa metadata to vtable pointer loads/storesKostya Serebryany2012-03-261-0/+6
| | | | llvm-svn: 153447
* Simplify some users of DenseMap::erase.Benjamin Kramer2012-03-241-4/+1
| | | | llvm-svn: 153389
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-40/+40
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Replace MarkVarRequired with a more genericRafael Espindola2012-03-081-2/+6
| | | | | | HandleCXXStaticMemberVarInstantiation. Suggested by Argyrios. llvm-svn: 152320
* Fix a small difference in sema and codegen views of what needs to be output.Rafael Espindola2012-03-051-0/+3
| | | | | | | | | | | | In the included testcase, soma thinks that we already have a definition after we see the out of line decl. Codegen puts it in a deferred list, to be output if a use is seen. This would break when we saw an explicit template instantiation definition, since codegen would not be notified. This patch adds a method to the consumer interface so that soma can notify codegen that this decl is now required. llvm-svn: 152024
* Reinstate r151879, r151880, reverted in r151922, along with a bugfix forRichard Smith2012-03-021-1/+2
| | | | | | | | | scalar emission of DeclRefExprs to const bools: emit scalar bools as i1, not as i8. In addition to the extra unit testing, this has successfully bootstrapped. llvm-svn: 151955
* Hack in a loud error for PR12086. Better than a silent miscompile.Sebastian Redl2012-02-271-1/+12
| | | | llvm-svn: 151586
* CodeGen support for global variables of type std::initializer_list<X>.Sebastian Redl2012-02-251-2/+117
| | | | | | | | | | | | | This emits a backing array with internal linkage and fills it with data, then has the initializer_list point at the array. Dynamic initialization and global destructors are correctly supported. What doesn't work is nested initializer_lists. I have no idea how to get them to work, either. However, these should be very rare, and so I'll just call it a known bug and declare generalized initializers DONE! llvm-svn: 151457
* Remove UpdateCompletedType from the debug info emission. We nowEric Christopher2012-02-181-2/+0
| | | | | | | emit less than complete types on purpose on occasion and so our caches aren't useful for this kind of lazy emitting. llvm-svn: 150856
* Bug fix: do not emit static const local variables with mutable membersRichard Smith2012-02-171-15/+18
| | | | | | | | | as constants. Refactor and simplify all the separate checks for whether a type can be emitted as a constant. llvm-svn: 150793
* When performing IRGen on a global, emit it as a constant if:Richard Smith2012-02-171-1/+0
| | | | | | | | | | | 1) It has a const-qualified type, and 2) It has no mutable members, and 3) It has no dynamic initialization, and 4) It has trivial destruction. Remove the unnecessary requirement that the type be POD. This allows us to mark all constexpr objects with no mutable members as 'constant'. llvm-svn: 150792
* Whether an argument is required (in contrast with being anJohn McCall2012-02-171-7/+4
| | | | | | | | | | | | | | | | | | | | | optional argument passed through the variadic ellipsis) potentially affects how we need to lower it. Propagate this information down to the various getFunctionInfo(...) overloads on CodeGenTypes. Furthermore, rename those overloads to clarify their distinct purposes, and make sure we're calling the right one in the right place. This has a nice side-effect of making it easier to construct a function type, since the 'variadic' bit is no longer separable. This shouldn't really change anything for our existing platforms, with one minor exception --- we should now call variadic ObjC methods with the ... in the "right place" (see the test case), which I guess matters for anyone running GNUStep on MIPS. Mostly it's just a substantial clean-up. llvm-svn: 150788
OpenPOWER on IntegriCloud