summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Unbreak the clang build after r169712.Benjamin Kramer2012-12-091-3/+3
| | | | llvm-svn: 169713
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-4/+4
| | | | | | | | | | | | | 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
* Have clang use LLVM IR's fast-math flags when in FastMath or FiniteMathOnly ↵Michael Ilseman2012-12-041-0/+10
| | | | | | modes. Test cases included. llvm-svn: 169191
* remove trailing whitespaceMichael Ilseman2012-12-041-32/+32
| | | | llvm-svn: 169187
* [ubsan] Add flag to enable recovery from checks when possible.Will Dietz2012-12-021-2/+3
| | | | llvm-svn: 169114
* Simplify code. No functionality change.Benjamin Kramer2012-11-151-18/+12
| | | | llvm-svn: 168047
* When evaluating variably modified types for function parameters, dig out theEli Friedman2012-11-141-1/+10
| | | | | | | | | | type as written from the ParmVarDecl; it's unclear whether the standard (C99 6.9.1p10) requires this, but we're following the precedent set by gcc, and hopefully nobody will ever ask about this again. PR9559 / <rdar://problem/12621983>. llvm-svn: 167985
* Use the individual -fsanitize=<...> arguments to control which of the UBSanRichard Smith2012-11-051-4/+7
| | | | | | | checks to enable. Remove frontend support for -fcatch-undefined-behavior, -faddress-sanitizer and -fthread-sanitizer now that they don't do anything. llvm-svn: 167413
* Simplify: replace getContext().getLangOpts() with just getLangOpts().Richard Smith2012-11-011-5/+5
| | | | llvm-svn: 167261
* Cleanup some clang code to use new type functions instead of using cast<>.Micah Villmow2012-10-251-2/+1
| | | | llvm-svn: 166684
* Switch CodeGenOptions over to a .def file, like we do with LangOptions.Douglas Gregor2012-10-231-1/+1
| | | | llvm-svn: 166497
* Transform pattern:Alexey Samsonov2012-10-161-2/+2
| | | | | | | | | | | if (CGM.getModuleDebugInfo()) DebugInfo = CGM.getModuleDebugInfo() into a call: maybeInitializeDebugInfo(); This is a simplification for a possible future fix of PR13942. llvm-svn: 166019
* At -O0, emit an @llvm.trap() call at the end of a value-returning function whichRichard Smith2012-10-151-0/+2
| | | | | | fails to return a value, to make debugging this issue easier. llvm-svn: 165914
* Have 'addFnAttr' take the attribute enum value. Then have it build the ↵Bill Wendling2012-10-101-2/+2
| | | | | | attribute object and add it appropriately. No functionality change. llvm-svn: 165596
* Tidy up formatting.Richard Smith2012-10-101-2/+1
| | | | llvm-svn: 165584
* -fcatch-undefined-behavior: catch a VLA bound which evalutes to a ↵Richard Smith2012-10-101-1/+18
| | | | | | non-positive value. llvm-svn: 165583
* -fcatch-undefined-behavior: emit calls to the runtime library whenever one ↵Richard Smith2012-10-091-1/+3
| | | | | | of the checks fails. llvm-svn: 165536
* Move TargetData to DataLayout.Micah Villmow2012-10-081-1/+1
| | | | llvm-svn: 165395
* If we flow off the end of a value-returning function:Richard Smith2012-10-041-0/+14
| | | | | | | | - outside C++, return undef (behavior is not undefined unless the value is used) - in C++, with -fcatch-undefined-behavior, perform an appropriate trap - in C++, produce an 'unreachable' (behavior is undefined immediately) llvm-svn: 165273
* Change APInt to APSInt in one instance. Also change a call to operator==() toRichard Trieu2012-07-231-2/+2
| | | | | | APSInt::isSameValue() when comparing different sized APSInt's. llvm-svn: 160641
* Update Clang to reflect the move of MDBuilder in r160237.Chandler Carruth2012-07-151-1/+1
| | | | llvm-svn: 160238
* Add OpenCL metadata for kernel arg names. This output is controlled via a ↵Tanya Lattner2012-07-111-0/+30
| | | | | | | | flag as noted in the OpenCL Spec. Includes a test case. llvm-svn: 160092
* Patch by Anton Lokhmotov to add OpenCL work group size attributes.Tanya Lattner2012-07-091-8/+46
| | | | llvm-svn: 159965
* block literal irgen: several improvements on naming blockFariborz Jahanian2012-06-261-2/+3
| | | | | | | | | | | | 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
* Documentation cleanup:James Dennett2012-06-151-1/+1
| | | | | | | | * Escaped Objective-C @keywords in Doxygen comments; * Documented more accurate \params; * Exposed some more summaries using \brief. llvm-svn: 158559
* wire -fbounds-checking to the new LLVM bounds checking passNuno Lopes2012-05-221-1/+0
| | | | llvm-svn: 157262
* add -fbounds-checking option.Nuno Lopes2012-05-081-0/+1
| | | | | | | | When enabled, clang generates bounds checks for array and pointers dereferences. Work to follow in LLVM's backend. OK'ed by Chad; thanks for the review. llvm-svn: 156431
* 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
* PR12571: Objects of type clang::ConstantArrayType aren't always emitted withRichard Smith2012-04-221-10/+26
| | | | | | | type llvm::ArrayType -- sometimes we emit them as packed structs. Don't assert if such a global array has an element type with a non-trivial destructor. llvm-svn: 155305
* Remove support for -fast-math metadata for the moment.Duncan Sands2012-04-161-4/+0
| | | | llvm-svn: 154851
* Generate fpmath metadata when -ffast-math. Note that no optimizations are hookedDuncan Sands2012-04-161-1/+6
| | | | | | up to this yet. llvm-svn: 154835
* Propagate alignment on lvalues through EmitLValueForField. PR12395.Eli Friedman2012-04-161-2/+6
| | | | llvm-svn: 154789
* [frontend] Add support for disabling the "inline" keyword using Chad Rosier2012-03-141-7/+8
| | | | | | | | | | | -fno-inline-functions. This behaves much like -fno-inline in gcc, but based on a discussion with Daniel it was decided that -fno-inline-functions should subsume -fno-inline. Please speak up if you object. The -fno-inline flag remains ignored. Final part of rdar://10972766 llvm-svn: 152754
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-5/+5
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Implement "optimization" for lambda-to-block conversion which inlines the ↵Eli Friedman2012-03-011-2/+1
| | | | | | | | generated block literal for lambdas which are immediately converted to block pointer type. This simplifies the AST, avoids an unnecessary copy of the lambda and makes it much easier to avoid copying the result onto the heap. Note that this transformation has a substantial semantic effect outside of ARC: it gives the converted lambda lifetime semantics similar to a block literal. With ARC, the effect is much less obvious because the lifetime of blocks is already managed. llvm-svn: 151797
* Work-in-progress for lambda conversion-to-block operator. Still need to ↵Eli Friedman2012-02-251-1/+2
| | | | | | implement the retain+autorelease outside of ARC, and there's a bug that causes the generated code to crash in ARC (which I think is unrelated to my code, although I'm not completely sure). llvm-svn: 151428
* Remove redundant check.Chad Rosier2012-02-181-3/+2
| | | | llvm-svn: 150855
* Rework the Sema/AST/IRgen dance for the lambda closure type'sDouglas Gregor2012-02-171-7/+9
| | | | | | | | | | | | | | | | | | | | conversion to function pointer. Rather than having IRgen synthesize the body of this function, we instead introduce a static member function "__invoke" with the same signature as the lambda's operator() in the AST. Sema then generates a body for the conversion to function pointer which simply returns the address of __invoke. This approach makes it easier to evaluate a call to the conversion function as a constant, makes the linkage of the __invoke function follow the normal rules for member functions, and may make life easier down the road if we ever want to constexpr'ify some of lambdas. Note that IR generation is responsible for filling in the body of __invoke (Sema just adds a dummy body), because the body can't generally be expressed in C++. Eli, please review! llvm-svn: 150783
* Start of IRGen for lambda conversion operators.Eli Friedman2012-02-161-0/+9
| | | | llvm-svn: 150649
* Remove useless if statement.Eli Friedman2012-02-141-19/+14
| | | | llvm-svn: 150459
* Basic support for referring to captured variables from lambdas. Some simple ↵Eli Friedman2012-02-111-7/+27
| | | | | | examples seem to work. Tests coming up soon. llvm-svn: 150293
* CodeGen: Move EHPersonality from CGException.h into the cpp file, it has no ↵Benjamin Kramer2012-02-081-1/+0
| | | | | | | | other users. While at it make it value-initializable to get rid of static ctors. llvm-svn: 150070
* simplify a bunch of code to use the well-known LLVM IR types computed by ↵Chris Lattner2012-02-071-4/+2
| | | | | | CodeGenModule. llvm-svn: 149943
* Fixed VLA code generation.Abramo Bagnara2012-01-111-14/+22
| | | | llvm-svn: 147933
* Fixed TypeofExpr AST and code generation.Abramo Bagnara2012-01-071-5/+19
| | | | llvm-svn: 147730
* Small refactoring and simplification of constant evaluation and some of itsRichard Smith2011-12-281-7/+5
| | | | | | clients. No functionality change. llvm-svn: 147318
* Enter the cleanups for a block outside the enclosingJohn McCall2011-11-101-1/+9
| | | | | | | | | | | | full-expression. Naturally they're inactive before we enter the block literal expression. This restores the intended behavior that blocks belong to their enclosing scope. There's a useful -O0 / compile-time optimization that we're missing here with activating cleanups following straight-line code from their inactive beginnings. llvm-svn: 144268
* Rename Expr::Evaluate to Expr::EvaluateAsRValue to make it clear that it willRichard Smith2011-10-291-1/+1
| | | | | | | | implicitly perform an lvalue-to-rvalue conversion if used on an lvalue expression. Also improve the documentation of Expr::Evaluate* to indicate which of them will accept expressions with side-effects. llvm-svn: 143263
OpenPOWER on IntegriCloud