summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDeclCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate toChandler Carruth2013-01-021-1/+1
| | | | | | | | reflect the migration in r171366. Re-sort the #include lines to reflect the new paths. llvm-svn: 171369
* Rename llvm::Attributes to llvm::Attribute.Bill Wendling2012-12-201-1/+1
| | | | llvm-svn: 170722
* Revert r170500. It over-zealously converted *ALL* things named Attributes, ↵Bill Wendling2012-12-201-1/+1
| | | | | | which is wrong here. llvm-svn: 170721
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-1/+1
| | | | | | single attribute in the future. llvm-svn: 170500
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-2/+2
| | | | | | | | | | | | | 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
* Implement codegen for init_priority attribute properly - make sure itAnton Korobeynikov2012-11-061-16/+38
| | | | | | | | works between the modules. No functionality change on Darwin/Windows. This fixes PR11480. llvm-svn: 167496
* Rename LangOptions members for address sanitizer and thread sanitizer fromRichard Smith2012-11-051-1/+1
| | | | | | *Sanitizer to Sanitize* in preparation for later patches. llvm-svn: 167405
* Simplify: replace getContext().getLangOpts() with just getLangOpts().Richard Smith2012-11-011-1/+1
| | | | llvm-svn: 167261
* Initialize debug info for special cases of functions that lack declarations ↵Alexey Samsonov2012-10-251-0/+12
| | | | | | and are generated by Clang (global initializers/destructors, thunks) . Fixes PR13942. llvm-svn: 166676
* Transform pattern:Alexey Samsonov2012-10-161-2/+3
| | | | | | | | | | | if (CGM.getModuleDebugInfo()) DebugInfo = CGM.getModuleDebugInfo() into a call: maybeInitializeDebugInfo(); This is a simplification for a possible future fix of PR13942. llvm-svn: 166019
* Have 'addFnAttr' take the attribute enum value. Then have it build the ↵Bill Wendling2012-10-101-1/+1
| | | | | | attribute object and add it appropriately. No functionality change. llvm-svn: 165596
* Emit debug info for dynamic initializers. Permit __attribute__((nodebug)) onNick Lewycky2012-07-241-2/+5
| | | | | | | variables that have static storage duration, it removes debug info on the emitted initializer function but not all debug info about this variable. llvm-svn: 160659
* [asan] add missing asan instrumentation in generated global init functionsKostya Serebryany2012-06-261-0/+3
| | | | llvm-svn: 159191
* Abstract the emission of global destructors into ABI-specific codeJohn McCall2012-05-011-62/+8
| | | | | | | | | | | | | and only consider using __cxa_atexit in the Itanium logic. The default logic is to use atexit(). Emit "guarded" initializers in Microsoft mode unconditionally. This is definitely not correct, but it's closer to correct than just not emitting the initializer. Based on a patch by Timur Iskhodzhanov! llvm-svn: 155894
* Fix a trivial oversight with apple-kext static local destructorsJohn McCall2012-04-131-0/+1
| | | | | | and add a test case. llvm-svn: 154653
* Use atexit when __cxa_atexit isn't available instead of adding aJohn McCall2012-04-061-26/+98
| | | | | | | | | global destructor entry. For some reason this isn't enabled for apple-kexts; it'd be good to have documentation for that. Based on a patch by Nakamura Takumi! llvm-svn: 154191
* Rename GenerateCXXGlobalDtorFunc to GenerateCXXGlobalDtorsFunc.John McCall2012-04-061-2/+2
| | | | llvm-svn: 154190
* Revert r153723, and its follow-ups r153728 and r153733.Chandler Carruth2012-03-301-2/+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/+2
| | | | | | other things which might mess with the variable's type. llvm-svn: 153733
* Revert r153613 as it's causing large compile-time regressions on the nightly ↵Chad Rosier2012-03-291-5/+3
| | | | | | testers. llvm-svn: 153660
* When we can't prove that the target of an aggregate copy isJohn McCall2012-03-281-3/+5
| | | | | | | a complete object, the memcpy needs to use the data size of the structure instead of its sizeof() value. Fixes PR12204. llvm-svn: 153613
* CodeGen/CGDeclCXX.cpp: Twine-ize CreateGlobalInitOrDestructFunction().NAKAMURA Takumi2012-03-281-1/+1
| | | | llvm-svn: 153578
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-3/+3
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Emit the exact size for the invariant intrinsics.Nick Lewycky2012-02-211-4/+7
| | | | llvm-svn: 151010
* Don't emit optimization-specific intrinsic at -O0.Richard Smith2012-02-171-0/+4
| | | | llvm-svn: 150838
* The clang half of r150794: after the construction of a global or static constRichard Smith2012-02-171-1/+17
| | | | | | | | variable ends, if the variable has a trivial destructor and no mutable subobjects then emit an llvm.invariant.start call for it. globalopt knows to make the variable const when evaluating this. llvm-svn: 150798
* Whether an argument is required (in contrast with being anJohn McCall2012-02-171-6/+7
| | | | | | | | | | | | | | | | | | | | | 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
* Deal with a horrible C++11 special case. If a non-literal type has a constexprRichard Smith2012-02-131-10/+17
| | | | | | | | | | | constructor, and that constructor is used to initialize an object of static storage duration such that all members and bases are initialized by constant expressions, constant initialization is performed. In this case, the object can still have a non-trivial destructor, and if it does, we must emit a dynamic initializer which performs no initialization and instead simply registers that destructor. llvm-svn: 150419
* simplify a bunch of code to use the well-known LLVM IR types computed by ↵Chris Lattner2012-02-071-12/+4
| | | | | | CodeGenModule. llvm-svn: 149943
* Use function pointers, rather than references, to pass DestroyersPeter Collingbourne2012-01-261-1/+1
| | | | | | | around, in the process cleaning up the various gcc/msvc compiler workarounds. llvm-svn: 149036
* Switch LValue so that it exposes alignment in CharUnits. (No functional ↵Eli Friedman2011-12-031-1/+1
| | | | | | change.) llvm-svn: 145753
* Extend the ASTContext constructor to delay the initialization ofDouglas Gregor2011-09-021-1/+1
| | | | | | | | builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). llvm-svn: 138985
* Track whether an AggValueSlot is potentially aliased, and do notJohn McCall2011-08-251-1/+2
| | | | | | | | | | emit call results into potentially aliased slots. This allows us to properly mark indirect return slots as noalias, at the cost of requiring an extra memcpy when assigning an aggregate call result into a l-value. It also brings us into compliance with the x86-64 ABI. llvm-svn: 138599
* Use stronger typing for the flags on AggValueSlot and requireJohn McCall2011-08-251-1/+2
| | | | | | | creators to tell us whether something needs GC barriers. No functionality change. llvm-svn: 138581
* Remove some unnecessary single element array temporaries.Jay Foad2011-07-291-2/+1
| | | | llvm-svn: 136461
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-2/+2
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* de-constify llvm::Type, patch by David Blaikie!Chris Lattner2011-07-181-6/+6
| | | | llvm-svn: 135370
* Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad2011-07-151-1/+1
| | | | llvm-svn: 135265
* Generalize the routine for destroying an object with staticJohn McCall2011-07-131-45/+51
| | | | | | | storage duration, then explicitly exempt ownership-qualified types from it. llvm-svn: 135028
* clang side to match the LLVM IR type system rewrite patch.Chris Lattner2011-07-091-3/+4
| | | | llvm-svn: 134831
* Emit guard variables for any weak global that has a run-timeDouglas Gregor2011-07-011-6/+5
| | | | | | | initializer. Previously, we only used guard variables for weak static data members. Fixes <rdar://problem/9692249>. llvm-svn: 134266
* Restore correct use of GC barriers.John McCall2011-06-161-17/+14
| | | | llvm-svn: 133144
* Automatic Reference Counting.John McCall2011-06-151-7/+20
| | | | | | | | | | Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. llvm-svn: 133103
* Eliminate temporary argument vectors.Benjamin Kramer2011-05-281-8/+2
| | | | llvm-svn: 132260
* Reset the emitted initializers.Axel Naumann2011-05-061-0/+2
| | | | | | This enables incremental codegen, where the initializer array can be removed from the module, such that only new initializers will be emitted and run. llvm-svn: 130986
* Template static data members can have weak_odr linkage, not justJohn McCall2011-04-121-2/+5
| | | | | | | | weak linkage. Also, fix a problem where global weak variables with non-trivial initializers were getting guard variables, or at least were checking for them and then crashing. llvm-svn: 129342
* __cxa_atexit does not throw.Anders Carlsson2011-03-201-0/+2
| | | | llvm-svn: 127977
* The Darwin kernel does not provide useful guard variable support.John McCall2011-03-181-0/+8
| | | | | | | | Issue this as an IR-gen error; it's not really worthwhile doing this "right", i.e. in Sema, because IR gen knows a lot of tricks beyond what the constant evaluator knows. llvm-svn: 127854
* Use the "undergoes default argument promotion" bit on parameters toJohn McCall2011-03-091-14/+15
| | | | | | | | | | simplify the logic of initializing function parameters so that we don't need both a variable declaration and a type in FunctionArgList. This also means that we need to propagate the CGFunctionInfo down in a lot of places rather than recalculating it from the FAL. There's more we can do to eliminate redundancy here, and I've left FIXMEs behind to do it. llvm-svn: 127314
* Revert "Add CC_Win64ThisCall and set it in the necessary places."Tilmann Scheller2011-03-021-7/+4
| | | | | | This reverts commit 126863. llvm-svn: 126886
OpenPOWER on IntegriCloud