summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove the HiddenWeakTemplateVTables CodeGen option. It's currently unused.Douglas Gregor2012-10-241-3/+1
| | | | llvm-svn: 166561
* Switch CodeGenOptions over to a .def file, like we do with LangOptions.Douglas Gregor2012-10-231-3/+3
| | | | llvm-svn: 166497
* Set a special flag in class metadata when an Objective-C classJohn McCall2012-10-171-2/+2
| | | | | | | | | has ivars that require destruction, but none that require anything except zero-initialization. This is common in ARC and (when true throughout a class hierarchy) permits the elimination of an unnecessary message-send during allocation. llvm-svn: 166088
* "'Might as well make it static const.' -- John McCall" -- Michael ScottNico Weber2012-10-171-1/+1
| | | | llvm-svn: 166080
* When using a symbol with attribute weakref, search for it first andJoerg Sonnenberger2012-10-161-5/+8
| | | | | | | | don't try the normal GetOrCreateLLVM. The latter could drop the weak atrtibute on the second reference, if there is no explicit declaration of the aliasee. llvm-svn: 166032
* Use enum values instead of magic numbers for indexing into the attribute list.Bill Wendling2012-10-151-3/+7
| | | | llvm-svn: 165925
* Attributes RewriteBill Wendling2012-10-151-1/+2
| | | | | | | | Convert the uses of the Attributes class over to the new format. The Attributes::get method call now takes an LLVM context so that the attributes object can be uniquified and stored. llvm-svn: 165918
* Remove operator cast method in favor of querying with the correct method.Bill Wendling2012-10-141-3/+5
| | | | llvm-svn: 165900
* Simplify. Suggestion by Sean Silva.Nico Weber2012-10-131-11/+3
| | | | llvm-svn: 165885
* Add codegen support for __uuidof().Nico Weber2012-10-111-1/+81
| | | | llvm-svn: 165710
* 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
OpenPOWER on IntegriCloud