summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-12/+12
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Fix PR14474: don't emit debug info for interface types in -gline-tables-only ↵Alexey Samsonov2012-12-031-3/+3
| | | | | | mode. llvm-svn: 169138
* Update method calls to the new interface re r168354.Bill Wendling2012-11-201-2/+2
| | | | llvm-svn: 168355
* Rename LangOptions members for address sanitizer and thread sanitizer fromRichard Smith2012-11-051-3/+3
| | | | | | *Sanitizer to Sanitize* in preparation for later patches. llvm-svn: 167405
* Update the front end to use minsize attributeQuentin Colombet2012-11-011-0/+3
| | | | llvm-svn: 167266
* Revert commit r166946Quentin Colombet2012-10-291-3/+0
| | | | llvm-svn: 166957
* Make forcesizeopt attribute available to the end userQuentin Colombet2012-10-291-0/+3
| | | | llvm-svn: 166946
* Add comment for my patch in r166809.Fariborz Jahanian2012-10-261-0/+2
| | | | llvm-svn: 166823
* objective-C IRGen: for @implementation nested in Fariborz Jahanian2012-10-261-1/+8
| | | | | | | | | extern "C", its method definitions must be IRGen'ed before meta-data for class is generated. Otherwise, IRGen crashes (to say the least). // rdar://12581683 llvm-svn: 166809
* 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
OpenPOWER on IntegriCloud