History log of /llvm-project-15.0.7/clang/lib/CodeGen/CodeGenModule.cpp (Results 1026 – 1050 of 1864)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# bbecd096 15-Aug-2013 David Majnemer <[email protected]>

CodeGen: __uuidof should work even with an incomplete _GUID type

Summary:
We would crash in CodeGen::CodeGenModule::EmitUuidofInitializer
because our attempt to enter CodeGen::CodeGenModule::EmitCon

CodeGen: __uuidof should work even with an incomplete _GUID type

Summary:
We would crash in CodeGen::CodeGenModule::EmitUuidofInitializer
because our attempt to enter CodeGen::CodeGenModule::EmitConstantValue
will be foiled: the type of the constant value is incomplete.

Instead, create an unnamed type with the proper layout on all platforms.
Punt the problem of wrongly defined struct _GUID types to the user.
(It's impossible because the TU may never get to see the type and thus
we can't verify that it is suitable.)

This fixes PR16856.

Reviewers: rsmith, rnk, thakis

Reviewed By: rnk

CC: cfe-commits

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

llvm-svn: 188481

show more ...


# 8eaab6ff 13-Aug-2013 David Majnemer <[email protected]>

[-cxx-abi microsoft] Mangle __uuidof correctly into template parameters

Summary:
It seems that __uuidof introduces a global extern "C" declaration of
type __s_GUID. However, our implementation of _

[-cxx-abi microsoft] Mangle __uuidof correctly into template parameters

Summary:
It seems that __uuidof introduces a global extern "C" declaration of
type __s_GUID. However, our implementation of __uuidof does not provide
such a declaration and thus must open-code the mangling for __uuidof in
template parameters.

This allows us to codegen scoped COM pointers and other such things.

This fixes PR16836.
Depends on D1356.

Reviewers: rnk, cdavis5x, rsmith

Reviewed By: rnk

CC: cfe-commits

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

llvm-svn: 188252

show more ...


# d6e043ba 12-Aug-2013 Alexey Samsonov <[email protected]>

Use new llvm::SpecialCaseList API in CodeGenModule

llvm-svn: 188170


# cf963cec 09-Aug-2013 David Majnemer <[email protected]>

[-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the proper section

Revert r188055 which reverted r188053. An unrelated change previously snuck in.

llvm-svn: 188060


# a2724ae4 09-Aug-2013 David Majnemer <[email protected]>

Revert "[-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the proper section"

This commit reverts r188053.

It is breaking the build bots.

llvm-svn: 188055


# 94a76b64 09-Aug-2013 David Majnemer <[email protected]>

[-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the proper section

We mangled them like:
L___uuid_12345678-1234-1234-1234-123456789abc

We should've mangled them like:
__GUID_12345678_123

[-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the proper section

We mangled them like:
L___uuid_12345678-1234-1234-1234-123456789abc

We should've mangled them like:
__GUID_12345678_1234_1234_1234_123456789abc

Furthermore, they are external symbols.

llvm-svn: 188053

show more ...


# 39a1e507 06-Aug-2013 Larisse Voufo <[email protected]>

Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Stati

Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention...

llvm-svn: 187762

show more ...


# 40f2fa9a 04-Aug-2013 Timur Iskhodzhanov <[email protected]>

Emit the constructor for abstract classes when using -cxx-abi microsoft, fixes PR16735

llvm-svn: 187709


# e7de47ef 22-Jul-2013 Reid Kleckner <[email protected]>

[ms-cxxabi] Emit linkonce complete dtors in TUs that need them

Based on Peter Collingbourne's destructor patches.

Prior to this change, clang was considering ?1 to be the complete
destructor and th

[ms-cxxabi] Emit linkonce complete dtors in TUs that need them

Based on Peter Collingbourne's destructor patches.

Prior to this change, clang was considering ?1 to be the complete
destructor and the base destructor, which was wrong. This lead to
crashes when clang tried to emit two LLVM functions with the same name.

In this ABI, TUs with non-inline dtors might not emit a complete
destructor. They are emitted as inline thunks in TUs that need them,
and they always delegate to the base dtors of the complete class and its
virtual bases. This change uses the DeferredDecls machinery to emit
complete dtors as needed.

Currently in clang try body destructors can catch exceptions thrown by
virtual base destructors. In the Microsoft C++ ABI, clang may not have
the destructor definition, in which case clang won't wrap the virtual
virtual base destructor calls in a try-catch. Diagnosing this in user
code is TODO.

Finally, for classes that don't use virtual inheritance, MSVC always
calls the base destructor (?1) directly. This is a useful code size
optimization that avoids emitting lots of extra thunks or aliases.
Implementing it also means our existing tests continue to pass, and is
consistent with MSVC's output.

We can do the same for Itanium by tweaking GetAddrOfCXXDestructor, but
it will require further testing.

Reviewers: rjmccall

CC: cfe-commits

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

llvm-svn: 186828

show more ...


# f6ce2b5f 22-Jul-2013 Reid Kleckner <[email protected]>

Rename D to GD to match the type, which is GlobalDecl

Now we can save GD.getDecl() in D and shorten some casts.

llvm-svn: 186826


# 8d0dc31d 21-Jul-2013 Richard Smith <[email protected]>

Tighten up the set of operator new/operator delete calls we're permitted to
optimize, to follow the permissions granted in N3664. Under those rules, only
calls generated by new-expressions and delete

Tighten up the set of operator new/operator delete calls we're permitted to
optimize, to follow the permissions granted in N3664. Under those rules, only
calls generated by new-expressions and delete-expressions are permitted to be
optimized, and direct calls to ::operator new and ::operator delete must be
treated as normal calls.

llvm-svn: 186799

show more ...


# 8978a9dd 10-Jul-2013 Eli Friedman <[email protected]>

Get rid of dead/useless code for block mangling.

llvm-svn: 185989


Revision tags: llvmorg-3.3.1-rc1
# c48d31c3 01-Jul-2013 Eli Friedman <[email protected]>

Simplify linkage code for static local vars.

The key insight here is that weak linkage for a static local variable
should always mean linkonce_odr, because every file that needs it will
generate a d

Simplify linkage code for static local vars.

The key insight here is that weak linkage for a static local variable
should always mean linkonce_odr, because every file that needs it will
generate a definition. We don't actually care about the precise linkage
of the parent context. I feel a bit silly that I didn't realize this before.

llvm-svn: 185381

show more ...


# 7e346a81 01-Jul-2013 Eli Friedman <[email protected]>

Fix mangling for block literals.

Blocks, like lambdas, can be written in contexts which are required to be
treated as the same under ODR. Unlike lambdas, it isn't possible to actually
take the addr

Fix mangling for block literals.

Blocks, like lambdas, can be written in contexts which are required to be
treated as the same under ODR. Unlike lambdas, it isn't possible to actually
take the address of a block, so the mangling of the block itself doesn't
matter. However, objects like static variables inside a block do need to
be mangled in a consistent way.

There are basically three components here. One, block literals need a
consistent numbering. Two, objects/types inside a block literal need
to be mangled using it. Three, objects/types inside a block literal need
to have their linkage computed correctly.

llvm-svn: 185372

show more ...


# 9dc6eef7 30-Jun-2013 Stephen Lin <[email protected]>

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 ...


# 19cee187 19-Jun-2013 Stephen Lin <[email protected]>

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

<rdar://problem/14209661>

llvm-svn: 184384


# 9157b55c 19-Jun-2013 NAKAMURA Takumi <[email protected]>

Fix a warning. [-Wunused-variable]

llvm-svn: 184284


# 9691f7fa 19-Jun-2013 Manman Ren <[email protected]>

Debug Info: support for gdwarf-2 gdwarf-3 gdwarf-4

These options will add a module flag with name "Dwarf Version".
The behavior flag is currently set to Warning, so when two values disagree,
a warni

Debug Info: support for gdwarf-2 gdwarf-3 gdwarf-4

These options will add a module flag with name "Dwarf Version".
The behavior flag is currently set to Warning, so when two values disagree,
a warning will be emitted.

llvm-svn: 184276

show more ...


# a637fb8c 18-Jun-2013 Stephen Lin <[email protected]>

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 ...


# a509f2fd 14-Jun-2013 Richard Smith <[email protected]>

Emit initializers for static-storage-duration temporaries as constants where
possible.

llvm-svn: 183967


# d4b6e7a9 13-Jun-2013 Eli Friedman <[email protected]>

Fix the linkage of static locals inside a CapturedStmt. (Found in the
process of trying to fix the related issue for block literals.)

llvm-svn: 183951


# cc1b96d3 12-Jun-2013 Richard Smith <[email protected]>

PR12086, PR15117

Introduce CXXStdInitializerListExpr node, representing the implicit
construction of a std::initializer_list<T> object from its underlying array.
The AST representation of such an ex

PR12086, PR15117

Introduce CXXStdInitializerListExpr node, representing the implicit
construction of a std::initializer_list<T> object from its underlying array.
The AST representation of such an expression goes from an InitListExpr with a
flag set, to a CXXStdInitializerListExpr containing a MaterializeTemporaryExpr
containing an InitListExpr (possibly wrapped in a CXXBindTemporaryExpr).

This more detailed representation has several advantages, the most important of
which is that the new MaterializeTemporaryExpr allows us to directly model
lifetime extension of the underlying temporary array. Using that, this patch
*drastically* simplifies the IR generation of this construct, provides IR
generation support for nested global initializer_list objects, fixes several
bugs where the destructors for the underlying array would accidentally not get
invoked, and provides constant expression evaluation support for
std::initializer_list objects.

llvm-svn: 183872

show more ...


Revision tags: llvmorg-3.3.0
# 4d90dba7 05-Jun-2013 Peter Collingbourne <[email protected]>

[ms-cxxabi] Thread GlobalDecls through to CodeGenModule::getFunctionLinkage.

This is so that we can give destructor variants different linkage later.

Differential Revision: http://llvm-reviews.chan

[ms-cxxabi] Thread GlobalDecls through to CodeGenModule::getFunctionLinkage.

This is so that we can give destructor variants different linkage later.

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

llvm-svn: 183324

show more ...


# e6c01442 05-Jun-2013 Richard Smith <[email protected]>

Model temporary lifetime-extension explicitly in the AST. Use this model to
handle temporaries which have been lifetime-extended to static storage duration
within constant expressions. This correctly

Model temporary lifetime-extension explicitly in the AST. Use this model to
handle temporaries which have been lifetime-extended to static storage duration
within constant expressions. This correctly handles nested lifetime extension
(through reference members of aggregates in aggregate initializers) but
non-constant-expression emission hasn't yet been updated to do the same.

llvm-svn: 183283

show more ...


Revision tags: llvmorg-3.3.0-rc3
# 5d041beb 04-Jun-2013 Aaron Ballman <[email protected]>

Adding support for MSVC #pragma detect_mismatch functionality by emitting a FAILIFMISMATCH linker command into the object file.

llvm-svn: 183178


1...<<41424344454647484950>>...75