History log of /llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp (Results 601 – 625 of 1023)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-3.4.0
# c4327996 19-Dec-2013 Aaron Ballman <aaron@aaronballman.com>

Switched code from using hasAttr followed by getAttr to simply call getAttr directly and check the resulting value.

No functional changes intended.

llvm-svn: 197652


# 89077a1b 17-Dec-2013 Reid Kleckner <reid@kleckner.net>

[ms-cxxabi] The 'most derived' ctor parameter usually comes last

Unlike Itanium's VTTs, the 'most derived' boolean or bitfield is the
last parameter for non-variadic constructors, rather than the se

[ms-cxxabi] The 'most derived' ctor parameter usually comes last

Unlike Itanium's VTTs, the 'most derived' boolean or bitfield is the
last parameter for non-variadic constructors, rather than the second.
For variadic constructors, the 'most derived' parameter comes after the
'this' parameter. This affects constructor calls and constructor decls
in a variety of places.

Reviewers: timurrrr

Differential Revision: http://llvm-reviews.chandlerc.com/D2405

llvm-svn: 197518

show more ...


Revision tags: llvmorg-3.4.0-rc3
# 0503a870 05-Dec-2013 Reid Kleckner <reid@kleckner.net>

Add an AdjustedType sugar node for adjusting calling conventions

Summary:
In general, this type node can be used to represent any type adjustment
that occurs implicitly without losing type sugar. T

Add an AdjustedType sugar node for adjusting calling conventions

Summary:
In general, this type node can be used to represent any type adjustment
that occurs implicitly without losing type sugar. The immediate use of
this is to adjust the calling conventions of member function pointer
types without breaking template instantiation.

Fixes PR17996.

Reviewers: rsmith

Differential Revision: http://llvm-reviews.chandlerc.com/D2332

llvm-svn: 196451

show more ...


Revision tags: llvmorg-3.4.0-rc2
# 0f06606b 22-Nov-2013 Justin Bogner <mail@justinbogner.com>

CodeGen: Whitespace

llvm-svn: 195437


Revision tags: llvmorg-3.4.0-rc1
# b47c36f8 05-Nov-2013 Richard Smith <richard-llvm@metafoo.co.uk>

C++1y sized deallocation: if we have a use, but not a definition, of a sized
deallocation function (and the corresponding unsized deallocation function has
been declared), emit a weak discardable def

C++1y sized deallocation: if we have a use, but not a definition, of a sized
deallocation function (and the corresponding unsized deallocation function has
been declared), emit a weak discardable definition of the function that
forwards to the corresponding unsized deallocation.

This allows a C++ standard library implementation to provide both a sized and
an unsized deallocation function, where the unsized one does not just call the
sized one, for instance by putting both in the same object file within an
archive.

llvm-svn: 194055

show more ...


# a8e7df36 30-Oct-2013 Mark Lacey <mark.lacey@apple.com>

Add CodeGenABITypes.h for use in LLDB.

CodeGenABITypes is a wrapper built on top of CodeGenModule that exposes
some of the functionality of CodeGenTypes (held by CodeGenModule),
specifically methods

Add CodeGenABITypes.h for use in LLDB.

CodeGenABITypes is a wrapper built on top of CodeGenModule that exposes
some of the functionality of CodeGenTypes (held by CodeGenModule),
specifically methods that determine the LLVM types appropriate for
function argument and return values.

I addition to CodeGenABITypes.h, CGFunctionInfo.h is introduced, and the
definitions of ABIArgInfo, RequiredArgs, and CGFunctionInfo are moved
into this new header from the private headers ABIInfo.h and CGCall.h.

Exposing this functionality is one part of making it possible for LLDB
to determine the actual ABI locations of function arguments and return
values, making it possible for it to determine this for any supported
target without hard-coding ABI knowledge in the LLDB code.

llvm-svn: 193717

show more ...


# b453cd64 20-Oct-2013 Peter Collingbourne <peter@pcc.me.uk>

Implement function type checker for the undefined behavior sanitizer.

This uses function prefix data to store function type information at the
function pointer.

Differential Revision: http://llvm-r

Implement function type checker for the undefined behavior sanitizer.

This uses function prefix data to store function type information at the
function pointer.

Differential Revision: http://llvm-reviews.chandlerc.com/D1338

llvm-svn: 193058

show more ...


# 2d84e842 02-Oct-2013 Nick Lewycky <nicholas@mxc.ca>

Thread a SourceLocation into the EmitCheck for "load_invalid_value". This occurs
when scalars are loaded / undergo lvalue-to-rvalue conversion.

llvm-svn: 191808


# 2b391ab7 26-Sep-2013 Faisal Vali <faisalv@yahoo.com>

Implement a rudimentary form of generic lambdas.

Specifically, the following features are not included in this commit:
- any sort of capturing within generic lambdas
- generic lambdas within te

Implement a rudimentary form of generic lambdas.

Specifically, the following features are not included in this commit:
- any sort of capturing within generic lambdas
- generic lambdas within template functions and nested
within other generic lambdas
- conversion operator for captureless lambdas
- ensuring all visitors are generic lambda aware
(Although I have gotten some useful feedback on my patches of the above and will be incorporating that as I submit those patches for commit)

As an example of what compiles through this commit:

template <class F1, class F2>
struct overload : F1, F2 {
using F1::operator();
using F2::operator();
overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }
};

auto Recursive = [](auto Self, auto h, auto ... rest) {
return 1 + Self(Self, rest...);
};
auto Base = [](auto Self, auto h) {
return 1;
};
overload<decltype(Base), decltype(Recursive)> O(Base, Recursive);
int num_params = O(O, 5, 3, "abc", 3.14, 'a');

Please see attached tests for more examples.

This patch has been reviewed by Doug and Richard. Minor changes (non-functionality affecting) have been made since both of them formally looked at it, but the changes involve removal of supernumerary return type deduction changes (since they are now redundant, with richard having committed a recent patch to address return type deduction for C++11 lambdas using C++14 semantics).



Some implementation notes:

- Add a new Declarator context => LambdaExprParameterContext to
clang::Declarator to allow the use of 'auto' in declaring generic
lambda parameters

- Add various helpers to CXXRecordDecl to facilitate identifying
and querying a closure class

- LambdaScopeInfo (which maintains the current lambda's Sema state)
was augmented to house the current depth of the template being
parsed (id est the Parser calls Sema::RecordParsingTemplateParameterDepth)
so that SemaType.cpp::ConvertDeclSpecToType may use it to immediately
generate a template-parameter-type when 'auto' is parsed in a generic
lambda parameter context. (i.e we do NOT use AutoType deduced to
a template parameter type - Richard seemed ok with this approach).
We encode that this template type was generated from an auto by simply
adding $auto to the name which can be used for better diagnostics if needed.

- SemaLambda.h was added to hold some common lambda utility
functions (this file is likely to grow ...)

- Teach Sema::ActOnStartOfFunctionDef to check whether it
is being called to instantiate a generic lambda's call
operator, and if so, push an appropriately prepared
LambdaScopeInfo object on the stack.

- various tests were added - but much more will be needed.

There is obviously more work to be done, and both Richard (weakly) and Doug (strongly)
have requested that LambdaExpr be removed form the CXXRecordDecl LambdaDefinitionaData
in a future patch which is forthcoming.

A greatful thanks to all reviewers including Eli Friedman, James Dennett,
and especially the two gracious wizards (Richard Smith and Doug Gregor)
who spent hours providing feedback (in person in Chicago and on the mailing lists).
And yet I am certain that I have allowed unidentified bugs to creep in; bugs, that I will do my best to slay, once identified!

Thanks!

llvm-svn: 191453

show more ...


# b39be1f3 10-Sep-2013 Nick Lewycky <nicholas@mxc.ca>

Generate code for the move assignment operator using memcpy, the same as we do
for the copy assignment operator.

llvm-svn: 190385


# 0ebf1bb1 30-Aug-2013 Yunzhong Gao <Yunzhong_Gao@playstation.sony.com>

Revert r189649 because it was breaking sanitizer bots.

llvm-svn: 189660


# be8d7ba9 30-Aug-2013 Yunzhong Gao <Yunzhong_Gao@playstation.sony.com>

Fixing a bug where debug info for a local variable gets emitted at file scope.

The patch was discussed in Phabricator. See:
http://llvm-reviews.chandlerc.com/D1281

llvm-svn: 189649


# 92848dee 26-Aug-2013 David Blaikie <dblaikie@gmail.com>

Simplify/clean up debug info suppression in CodeGenFunction

CodeGenFunction is run on only one function - a new object is made for
each new function. I would add an assertion/flag to this effect, bu

Simplify/clean up debug info suppression in CodeGenFunction

CodeGenFunction is run on only one function - a new object is made for
each new function. I would add an assertion/flag to this effect, but
there's an exception: ObjC properties involve emitting helper functions
that are all emitted by the same CodeGenFunction object, so such a check
is not possible/correct.

llvm-svn: 189277

show more ...


# 2fdbea28 22-Aug-2013 Manuel Klimek <klimek@google.com>

Revert "Implement a rudimentary form of generic lambdas."

This reverts commit 606f5d7a99b11957e057e4cd1f55f931f66a42c7.

llvm-svn: 189004


# fd5277c0 22-Aug-2013 Faisal Vali <faisalv@yahoo.com>

Implement a rudimentary form of generic lambdas.

Specifically, the following features are not included in this commit:
- any sort of capturing within generic lambdas
- nested lambdas
- conver

Implement a rudimentary form of generic lambdas.

Specifically, the following features are not included in this commit:
- any sort of capturing within generic lambdas
- nested lambdas
- conversion operator for captureless lambdas
- ensuring all visitors are generic lambda aware


As an example of what compiles:

template <class F1, class F2>
struct overload : F1, F2 {
using F1::operator();
using F2::operator();
overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }
};

auto Recursive = [](auto Self, auto h, auto ... rest) {
return 1 + Self(Self, rest...);
};
auto Base = [](auto Self, auto h) {
return 1;
};
overload<decltype(Base), decltype(Recursive)> O(Base, Recursive);
int num_params = O(O, 5, 3, "abc", 3.14, 'a');

Please see attached tests for more examples.

Some implementation notes:

- Add a new Declarator context => LambdaExprParameterContext to
clang::Declarator to allow the use of 'auto' in declaring generic
lambda parameters

- Augment AutoType's constructor (similar to how variadic
template-type-parameters ala TemplateTypeParmDecl are implemented) to
accept an IsParameterPack to encode a generic lambda parameter pack.

- Add various helpers to CXXRecordDecl to facilitate identifying
and querying a closure class

- LambdaScopeInfo (which maintains the current lambda's Sema state)
was augmented to house the current depth of the template being
parsed (id est the Parser calls Sema::RecordParsingTemplateParameterDepth)
so that Sema::ActOnLambdaAutoParameter may use it to create the
appropriate list of corresponding TemplateTypeParmDecl for each
auto parameter identified within the generic lambda (also stored
within the current LambdaScopeInfo). Additionally,
a TemplateParameterList data-member was added to hold the invented
TemplateParameterList AST node which will be much more useful
once we teach TreeTransform how to transform generic lambdas.

- SemaLambda.h was added to hold some common lambda utility
functions (this file is likely to grow ...)

- Teach Sema::ActOnStartOfFunctionDef to check whether it
is being called to instantiate a generic lambda's call
operator, and if so, push an appropriately prepared
LambdaScopeInfo object on the stack.

- Teach Sema::ActOnStartOfLambdaDefinition to set the
return type of a lambda without a trailing return type
to 'auto' in C++1y mode, and teach the return type
deduction machinery in SemaStmt.cpp to process either
C++11 and C++14 lambda's correctly depending on the flag.

- various tests were added - but much more will be needed.

A greatful thanks to all reviewers including Eli Friedman,
James Dennett and the ever illuminating Richard Smith. And
yet I am certain that I have allowed unidentified bugs to creep in;
bugs, that I will do my best to slay, once identified!

Thanks!

llvm-svn: 188977

show more ...


# 4a9ec7b5 19-Aug-2013 David Blaikie <dblaikie@gmail.com>

PR16933: Don't try to codegen things after we've seen errors.

Refactor the underlying code a bit to remove unnecessary calls to
"hasErrorOccurred" & make them consistently at all the entry points to

PR16933: Don't try to codegen things after we've seen errors.

Refactor the underlying code a bit to remove unnecessary calls to
"hasErrorOccurred" & make them consistently at all the entry points to
the IRGen ASTConsumer.

llvm-svn: 188707

show more ...


# 524ba1f1 25-Jul-2013 Adrian Prantl <aprantl@apple.com>

Debug Info: Fine-tune the simple return expression location handling to
only affect functions without a separate return block. This fixes the
linetable for void functions with cleanups and multiple r

Debug Info: Fine-tune the simple return expression location handling to
only affect functions without a separate return block. This fixes the
linetable for void functions with cleanups and multiple returns.

llvm-svn: 187090

show more ...


# 66ed89d0 13-Jul-2013 David Blaikie <dblaikie@gmail.com>

Correctly classify pack expansions as NON_CANONICAL_UNLESS_DEPENDENT

Test coverage for non-dependent pack expansions doesn't demonstrate a
failure prior to this patch (a follow-up commit improving d

Correctly classify pack expansions as NON_CANONICAL_UNLESS_DEPENDENT

Test coverage for non-dependent pack expansions doesn't demonstrate a
failure prior to this patch (a follow-up commit improving debug info
will cover this commit specifically) but covers a related hole in our
test coverage.

Reviewed by Richard Smith & Eli Friedman.

llvm-svn: 186261

show more ...


Revision tags: llvmorg-3.3.1-rc1
# 9dc6eef7 30-Jun-2013 Stephen Lin <stephenwlin@gmail.com>

Restore r184205 and associated commits (after commit of r185290)

This allows clang to use the backend parameter attribute 'returned' when generating 'this'-returning constructors and destructors in

Restore r184205 and associated commits (after commit of r185290)

This allows clang to use the backend parameter attribute 'returned' when generating 'this'-returning constructors and destructors in ARM and MSVC C++ ABIs.

llvm-svn: 185291

show more ...


# 8a36502a 24-Jun-2013 Reid Kleckner <reid@kleckner.net>

[AST] Introduce a new DecayedType sugar node

The goal of this sugar node is to be able to look at an arbitrary
FunctionType and tell if any of the parameters were decayed from an
array or function t

[AST] Introduce a new DecayedType sugar node

The goal of this sugar node is to be able to look at an arbitrary
FunctionType and tell if any of the parameters were decayed from an
array or function type. Ultimately this is necessary to implement
Microsoft's C++ name mangling scheme, which mangles decayed arrays
differently from normal pointers.

Reviewers: rsmith

Differential Revision: http://llvm-reviews.chandlerc.com/D1014

llvm-svn: 184763

show more ...


# 19cee187 19-Jun-2013 Stephen Lin <stephenwlin@gmail.com>

Revert r184205 and associated patches while investigating issue with broken buildbot (possible interaction with LTO)

<rdar://problem/14209661>

llvm-svn: 184384


# a637fb8c 18-Jun-2013 Stephen Lin <stephenwlin@gmail.com>

CodeGen: Have 'this'-returning constructors and destructors to take advantage of the new backend 'returned' attribute.

The backend will now use the generic 'returned' attribute to form tail calls wh

CodeGen: Have 'this'-returning constructors and destructors to take advantage of the new backend 'returned' attribute.

The backend will now use the generic 'returned' attribute to form tail calls where possible, as well as avoid save-restores of 'this' in some cases (specifically the cases that matter for the ARM C++ ABI).

This patch also reverts a prior front-end only partial implementation of these optimizations, since it's no longer required.

llvm-svn: 184205

show more ...


# 736a947b 12-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk>

Reapply r183721, reverted in r183776, with a fix for a bug in the former (we
were lacking ExprWithCleanups nodes in some cases where the new approach to
lifetime extension needed them).

Original com

Reapply r183721, reverted in r183776, with a fix for a bug in the former (we
were lacking ExprWithCleanups nodes in some cases where the new approach to
lifetime extension needed them).

Original commit message:

Rework IR emission for lifetime-extended temporaries. Instead of trying to walk
into the expression and dig out a single lifetime-extended entity and manually
pull its cleanup outside the expression, instead keep a list of the cleanups
which we'll need to emit when we get to the end of the full-expression. Also
emit those cleanups early, as EH-only cleanups, to cover the case that the
full-expression does not terminate normally. This allows IR generation to
properly model temporary lifetime when multiple temporaries are extended by the
same declaration.

We have a pre-existing bug where an exception thrown from a temporary's
destructor does not clean up lifetime-extended temporaries created in the same
expression and extended to automatic storage duration; that is not fixed by
this patch.

llvm-svn: 183859

show more ...


Revision tags: llvmorg-3.3.0, llvmorg-3.3.0-rc3
# 4bb41e91 30-May-2013 Adrian Prantl <aprantl@apple.com>

fix formatting.

llvm-svn: 182946


Revision tags: llvmorg-3.3.0-rc2
# 48b3c7dd 16-May-2013 Adrian Prantl <aprantl@apple.com>

Clarify comment.

llvm-svn: 181959


1...<<21222324252627282930>>...41