aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
AgeCommit message (Collapse)AuthorFilesLines
2012-11-20Update method calls to the new interface re r168354.Bill Wendling1-2/+2
llvm-svn: 168355
2012-11-05Rename LangOptions members for address sanitizer and thread sanitizer fromRichard Smith1-3/+3
*Sanitizer to Sanitize* in preparation for later patches. llvm-svn: 167405
2012-11-01Update the front end to use minsize attributeQuentin Colombet1-0/+3
llvm-svn: 167266
2012-10-29Revert commit r166946Quentin Colombet1-3/+0
llvm-svn: 166957
2012-10-29Make forcesizeopt attribute available to the end userQuentin Colombet1-0/+3
llvm-svn: 166946
2012-10-26Add comment for my patch in r166809.Fariborz Jahanian1-0/+2
llvm-svn: 166823
2012-10-26objective-C IRGen: for @implementation nested in Fariborz Jahanian1-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
2012-10-24Remove the HiddenWeakTemplateVTables CodeGen option. It's currently unused.Douglas Gregor1-3/+1
llvm-svn: 166561
2012-10-23Switch CodeGenOptions over to a .def file, like we do with LangOptions.Douglas Gregor1-3/+3
llvm-svn: 166497
2012-10-17Set a special flag in class metadata when an Objective-C classJohn McCall1-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
2012-10-17"'Might as well make it static const.' -- John McCall" -- Michael ScottNico Weber1-1/+1
llvm-svn: 166080
2012-10-16When using a symbol with attribute weakref, search for it first andJoerg Sonnenberger1-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
2012-10-15Use enum values instead of magic numbers for indexing into the attribute list.Bill Wendling1-3/+7
llvm-svn: 165925
2012-10-15Attributes RewriteBill Wendling1-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
2012-10-14Remove operator cast method in favor of querying with the correct method.Bill Wendling1-3/+5
llvm-svn: 165900
2012-10-13Simplify. Suggestion by Sean Silva.Nico Weber1-11/+3
llvm-svn: 165885
2012-10-11Add codegen support for __uuidof().Nico Weber1-1/+81
llvm-svn: 165710
2012-10-10Rename ObjCMethodDecl::isSynthesized to isPropertyAccessor.Jordan Rose1-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
2012-10-10Have 'addFnAttr' take the attribute enum value. Then have it build the ↵Bill Wendling1-11/+11
attribute object and add it appropriately. No functionality change. llvm-svn: 165596
2012-10-09We use the enums to query whether an Attributes object has that attribute. TheBill Wendling1-1/+1
opaque layer is responsible for knowing where that specific attribute is stored. llvm-svn: 165489
2012-10-08Move TargetData to DataLayout.Micah Villmow1-5/+5
llvm-svn: 165395
2012-10-05Propagate calling convention for aliases and weakrefs.Alex Rosenberg1-2/+3
llvm-svn: 165343
2012-09-28PR13941: Mark all virtual functions as unnamed_addr. It's not possible toRichard Smith1-0/+4
observe their addresses (taking their address gives the vtable slot) so we are free to merge their definitions. llvm-svn: 164864
2012-09-28Add basic support for adding !tbaa.struct metadata on llvm.memcpy calls forDan Gohman1-0/+6
struct assignment. llvm-svn: 164853
2012-09-26Update to new function attribute querying syntax.Bill Wendling1-1/+1
llvm-svn: 164726
2012-09-06Dont cast away const needlessly. Found by gcc48 -Wcast-qual.Roman Divacky1-1/+1
llvm-svn: 163325
2012-08-24Push ArrayRef through the Expr hierarchy.Benjamin Kramer1-4/+4
No functionality change. llvm-svn: 162552
2012-08-22Reduce duplicated hash map lookups.Benjamin Kramer1-6/+2
llvm-svn: 162361
2012-08-21[asan] If we are compiling with ASan, add metadata indicating dynamically ↵Kostya Serebryany1-0/+12
initialized globals. Patch by Reid Watson, reviewed by Richard Smith llvm-svn: 162259
2012-08-10Decrementing std::string::end is not portable, use array access instead.Joerg Sonnenberger1-1/+1
llvm-svn: 161659
2012-07-19Remove HasSynthBitfield and all callers/writers/etc. Also removeEric Christopher1-9/+1
previous ResetObjCLayout calls since this is now handled in Sema. Part of rdar://11842763 llvm-svn: 160527
2012-07-12Add the ObjFW runtime. Patch by Jonathan Schleifer!John McCall1-0/+1
llvm-svn: 160102
2012-07-03Rename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstepDavid Chisnall1-3/+3
runtime to gnustep from gnu. Fix EH for the GCC runtime. llvm-svn: 159684
2012-07-02When we're looking for redeclarations which might provide a definition in ↵Eli Friedman1-0/+1
CodeGen, make sure we examine all the redeclarations. PR13252. llvm-svn: 159586
2012-06-28Add -ftls-model command-line flag.Hans Wennborg1-7/+41
This allows for setting the default TLS model. (PR9788) llvm-svn: 159336
2012-06-26block literal irgen: several improvements on naming blockFariborz Jahanian1-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
2012-06-23IRGen: Factor v-table generation into the CGCXXABI object.Charles Davis1-2/+2
llvm-svn: 159091
2012-06-23Support the tls_model attribute (PR9788)Hans Wennborg1-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
2012-06-20Restructure how the driver communicates information about theJohn McCall1-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
2012-06-18[MSExtensions] Add support for __forceinline.Michael J. Spencer1-2/+2
__forceinline is a combination of the inline keyword and __attribute__((always_inline)) llvm-svn: 158653
2012-06-10PR13064: Store whether an in-class initializer uses direct or copyRichard Smith1-2/+2
initialization, and use that information to produce the right kind of initialization during template instantiation. llvm-svn: 158288
2012-06-06Revert Decl's iterators back to pointer value_type rather than reference ↵David Blaikie1-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
2012-05-28adjust to mainline llvm API change.Chris Lattner1-4/+2
llvm-svn: 157557
2012-05-20CUDA: add CodeGen support for global variable address spaces.Peter Collingbourne1-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
2012-05-12Add support for __attribute__((hot)) and __attribute__((cold)).Benjamin Kramer1-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
2012-05-04This patch adds a new Clang compiler flag "-gline-tables-only".Alexey Samsonov1-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
2012-04-30Remove the ref/value inconsistency in filter_decl_iterator.David Blaikie1-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
2012-04-27Use enum to set debug info size generated by ClangAlexey Samsonov1-1/+2
llvm-svn: 155697
2012-04-24enable TBAA when -fthread-sanitizer is given, even with -O0 or ↵Kostya Serebryany1-3/+4
-relaxed-aliasing llvm-svn: 155430
2012-04-16Typo.Eric Christopher1-1/+1
llvm-svn: 154880