summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
AgeCommit message (Collapse)Author
2013-01-30Move UTF conversion routines from clang/lib/Basic to llvm/lib/SupportDmitri Gribenko
This is required to use them in TableGen. llvm-svn: 173924
2013-01-27Use the AttributeSet instead of AttributeWithIndex.Bill Wendling
In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the internals of the AttributeSet to outside users, which isn't goodness. llvm-svn: 173605
2013-01-25Move the decision about the kind of CGCXXABI to make insideJohn McCall
the family-specific files. llvm-svn: 173530
2013-01-25The standard ARM C++ ABI dictates that inline functions areJohn McCall
never key functions. We did not implement that rule for the iOS ABI, which was driven by what was implemented in gcc-4.2. However, implement it now for other ARM-based platforms. llvm-svn: 173515
2013-01-25First pass at abstracting out a class for the target C++ ABI.John McCall
llvm-svn: 173514
2013-01-23Remove the last of uses that use the Attribute object as a collection of ↵Bill Wendling
attributes. Collections of attributes are handled via the AttributeSet class now. This finally frees us up to make significant changes to how attributes are structured. llvm-svn: 173229
2013-01-23Use the AttributeSet when adding multiple attributes and an Attribute::AttrKindBill Wendling
when adding a single attribute to the function. llvm-svn: 173211
2013-01-21Have AttributeSet::getRetAttributes() return an AttributeSet instead of ↵Bill Wendling
Attribute. This further restricts the use of the Attribute class to the Attribute family of classes. llvm-svn: 173099
2013-01-21Make AttributeSet::getFnAttributes() return an AttributeSet instead of an ↵Bill Wendling
Attribute. This is more code to isolate the use of the Attribute class to that of just holding one attribute instead of a collection of attributes. llvm-svn: 173095
2013-01-18Use the AttributeSet query method instead of the Attribute method.Bill Wendling
llvm-svn: 172849
2013-01-18[ubsan] Add support for -fsanitize-blacklistWill Dietz
llvm-svn: 172808
2013-01-17[IRgen] Update modules autolink metadata to use module flags (as now specifiedDaniel Dunbar
in the LangRef). llvm-svn: 172692
2013-01-16Add -fmodules-autolink/-fno-modules-autolink (defaults to on) so thatDouglas Gregor
users can explicitly enable/disable modules autolinking. llvm-svn: 172592
2013-01-15Fix Const CastDavid Greene
Do proper casting to avoid a cast-away-const error. llvm-svn: 172559
2013-01-14Topologically sort the link options generated for modules based onDouglas Gregor
module-import dependencies, so we'll get the link order correct for those silly linkers that need it. llvm-svn: 172459
2013-01-14When forming the link options for an imported module, also include theDouglas Gregor
link options for the modules it imports. llvm-svn: 172448
2013-01-14Switch autolinking metadata format over to actual linker options, e.g.,Douglas Gregor
!0 = metadata !{metadata !"-lautolink"} !1 = metadata !{metadata !"-framework", metadata !"autolink_framework"} referenced from llvm.module.linkoptions, e.g., !llvm.module.linkoptions = !{!0, !1, !2, !3} This conceptually moves the logic for figuring out the syntax the linker will accept from LLVM into Clang. Moreover, it makes it easier to support MSVC's #pragma comment(linker, "some option") in the future, should anyone care to do so. llvm-svn: 172441
2013-01-14Implement parsing, AST, (de-)serialization, and placeholder globalDouglas Gregor
metadata for linking against the libraries/frameworks for imported modules. The module map language is extended with a new "link" directive that specifies what library or framework to link against when a module is imported, e.g., link "clangAST" or link framework "MyFramework" Importing the corresponding module (or any of its submodules) will eventually link against the named library/framework. For now, I've added some placeholder global metadata that encodes the imported libraries/frameworks, so that we can test that this information gets through to the IR. The format of the data is still under discussion. llvm-svn: 172437
2013-01-12Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko
brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
2013-01-02Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate toChandler Carruth
reflect the migration in r171366. Re-sort the #include lines to reflect the new paths. llvm-svn: 171369
2012-12-30Remove the Function::getFnAttributes method in favor of using the AttributeSetBill Wendling
directly. This is in preparation for removing the use of the 'Attribute' class as a collection of attributes. That will shift to the AttributeSet class instead. llvm-svn: 171254
2012-12-20Rename llvm::Attributes to llvm::Attribute.Bill Wendling
llvm-svn: 170722
2012-12-20Revert r170500. It over-zealously converted *ALL* things named Attributes, ↵Bill Wendling
which is wrong here. llvm-svn: 170721
2012-12-19Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling
single attribute in the future. llvm-svn: 170500
2012-12-12Rewrite calls to bitcast unprototyped functions when emitting a definition.John McCall
My variadics patch, r169588, changed these calls to typically be bitcasts rather than calls to a supposedly variadic function. This totally subverted a hack where we intentionally dropped excess arguments from such calls in order to appease the inliner and a "warning" from the optimizer. This patch extends the hack to also work with bitcasts, as well as teaching it to rewrite invokes. llvm-svn: 170034
2012-12-07s/AttrListPtr/AttributeSet/g to better label what this class is going to be ↵Bill Wendling
in the near future. llvm-svn: 169652
2012-12-04Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth
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
2012-12-03Fix PR14474: don't emit debug info for interface types in -gline-tables-only ↵Alexey Samsonov
mode. llvm-svn: 169138
2012-11-20Update method calls to the new interface re r168354.Bill Wendling
llvm-svn: 168355
2012-11-05Rename LangOptions members for address sanitizer and thread sanitizer fromRichard Smith
*Sanitizer to Sanitize* in preparation for later patches. llvm-svn: 167405
2012-11-01Update the front end to use minsize attributeQuentin Colombet
llvm-svn: 167266
2012-10-29Revert commit r166946Quentin Colombet
llvm-svn: 166957
2012-10-29Make forcesizeopt attribute available to the end userQuentin Colombet
llvm-svn: 166946
2012-10-26Add comment for my patch in r166809.Fariborz Jahanian
llvm-svn: 166823
2012-10-26objective-C IRGen: for @implementation nested in Fariborz Jahanian
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 Gregor
llvm-svn: 166561
2012-10-23Switch CodeGenOptions over to a .def file, like we do with LangOptions.Douglas Gregor
llvm-svn: 166497
2012-10-17Set a special flag in class metadata when an Objective-C classJohn McCall
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 Weber
llvm-svn: 166080
2012-10-16When using a symbol with attribute weakref, search for it first andJoerg Sonnenberger
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 Wendling
llvm-svn: 165925
2012-10-15Attributes RewriteBill Wendling
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 Wendling
llvm-svn: 165900
2012-10-13Simplify. Suggestion by Sean Silva.Nico Weber
llvm-svn: 165885
2012-10-11Add codegen support for __uuidof().Nico Weber
llvm-svn: 165710
2012-10-10Rename ObjCMethodDecl::isSynthesized to isPropertyAccessor.Jordan Rose
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 Wendling
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 Wendling
opaque layer is responsible for knowing where that specific attribute is stored. llvm-svn: 165489
2012-10-08Move TargetData to DataLayout.Micah Villmow
llvm-svn: 165395
2012-10-05Propagate calling convention for aliases and weakrefs.Alex Rosenberg
llvm-svn: 165343