History log of /external/clang/lib/CodeGen/CGVTables.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ef8225444452a1486bd721f3285301fe84643b00 21-Jul-2014 Stephen Hines <srhines@google.com> Update Clang for rebase to r212749.

This also fixes a small issue with arm_neon.h not being generated always.

Includes a cherry-pick of:
r213450 - fixes mac-specific header issue
r213126 - removes a default -Bsymbolic on Android

Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
/external/clang/lib/CodeGen/CGVTables.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/CodeGen/CGVTables.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/CodeGen/CGVTables.cpp
8e3eec5fed242ef730b4ea023051650420e9c443 07-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196658:
------------------------------------------------------------------------
r196658 | d0k | 2013-12-07 08:12:52 -0800 (Sat, 07 Dec 2013) | 7 lines

CodeGen: Don't emit linkage on thunks that aren't emitted because they're vararg.

This can happen when we're trying to emit a thunk with available_externally
linkage with optimization enabled but bail because it doesn't make sense
for vararg functions.

PR18098.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
93b717ac956f5c82f7895ed8874cbd514c6d0a4e 15-Nov-2013 Hans Wennborg <hans@hanshq.net> [-cxx-abi microsoft] Emit thunks for pointers to virtual member functions

Instead of storing the vtable offset directly in the function pointer and
doing a branch to check for virtualness at each call site, the MS ABI
generates a thunk for calling the function at a specific vtable offset,
and puts that in the function pointer.

This patch adds support for emitting such thunks. However, it doesn't support
pointers to virtual member functions that are variadic, have an incomplete
aggregate return type or parameter, or are overriding a function in a virtual
base class.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
5f0db587078b5af32fc9ac41fe4276b80918fd8d 05-Nov-2013 Timur Iskhodzhanov <timurrrr@google.com> Fix vbtable indices when a class shares the vbptr with a non-virtual base

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
71fdc127d21bb138b4bbc2b2ce1db460715271f1 04-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Use aliases for more constructors and destructors.

With this patch we produce alias for cases like

template<typename T>
struct foobar {
foobar() {
}
};
template struct foobar<void>;

We just have to be careful to produce the same aliases in every TU because
of comdats.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194000 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
8b54999a831bb195c08541ca995ef0505c96193f 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 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
c70cc5d90403f99ccce5cab3a6c022ad9cdcb66c 30-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> Make thunk this/return adjustment ABI-specific. Also, fix the return adjustment when using -cxx-abi microsoft

Reviewed at http://llvm-reviews.chandlerc.com/D2026

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
7bb723065f787633f11f1e1b7eece86191d3815b 11-Oct-2013 Reid Kleckner <reid@kleckner.net> Use castAs instead of cast in thunk generation

Calling convention attributes can add sugar to methods that we have to
look through. This fixes an assertion failure in the provided test
case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192496 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
f07465828da2a07297646a2277ba8fe3abd2d4c3 09-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> Code cleanup: rename VTableContext to ItaniumVTableContext, VTableBuilder to ItaniumVTableBuilder and clang-format code around

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
2cb17a06befb61b1434aaa991652fea4338c95d7 09-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> Reland 192220 "Abstract out parts of thunk emission code, add support for simple thunks when using -cxx-abi microsoft" with relaxed assertions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
0ac66c03c01ae95bc34cca71067ba8dd65e06a1d 08-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> Revert 192220 as it fails on an assertion

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
c3dcfa20f8ec56fad90ffe42d0f4bc0168a2e138 08-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> Abstract out parts of thunk emission code, add support for simple thunks when using -cxx-abi microsoft

Reviewed at http://llvm-reviews.chandlerc.com/D1787

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192220 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
11f22a35b7f08a8d017f6ab26e440edffc930f96 03-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> Extract ABI-specific parts of MangleContext into separate classes

Reviewed at http://llvm-reviews.chandlerc.com/D1807

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
4ee7dc2369c1f0257a73b2e83a7d38fdebdd9176 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
a53d7a0259ff88f78ba8ecac7d0cb3ea96302b1d 27-Sep-2013 Timur Iskhodzhanov <timurrrr@google.com> Abstract out the emission of vtables, add basic support for vtable emission when using -cxx-abi microsoft

Reviewed at http://llvm-reviews.chandlerc.com/D1532

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
889a6758554c27ca4cf93502cfb5dc788cb47990 03-Sep-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't emit an available_externally vtable pointing to linkonce_odr funcs.

This fixes pr13124.

From the discussion at
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-June/022606.html
we know that we cannot make funcions in a weak_odr vtable also weak_odr. They
should remain linkonce_odr.

The side effect is that we cannot emit a available_externally vtable unless we
also emit a copy of the function. This also has an issue: If codegen is going
to output a function, sema has to mark it used. Given llvm.org/pr9114, it looks
like sema cannot be more aggressive at marking functions used because
of vtables.

This leaves us with a few unpleasant options:

* Marking functions in vtables used if possible. This sounds a bit sloppy, so
we should avoid it.
* Producing available_externally vtables only when all the functions in it are
already used or weak_odr. This would cover cases like

--------------------
struct foo {
virtual ~foo();
};
struct bar : public foo {
virtual void zed();
};
void f() {
foo *x(new bar);
delete x;
}
void g(bar *x) {
x->~bar(); // force the destructor to be used
}
--------------------------

and

----------------------------------
template<typename T>
struct bar {
virtual ~bar();
};
template<typename T>
bar<T>::~bar() {
}

// make the destructor weak_odr instead of linkonce_odr
extern template class bar<int>;

void f() {
bar<int> *x(new bar<int>);
delete x;
}
----------------------------

These look like corner cases, so it is unclear if it is worth it.

* And finally: Just nuke this optimization. That is what this patch implements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
c7971a9efdf9880448a69aabb5182c3c27eecf6d 28-Aug-2013 David Blaikie <dblaikie@gmail.com> Revert "PR14569: Omit debug info for thunks"

This reverts commit r189320.

Alexey Samsonov and Dmitry Vyukov presented some arguments for keeping
these around - though it still seems like those tasks could be solved by
a tool just using the symbol table. In a very small number of cases,
thunks may be inlined & debug info might be able to save profilers &
similar tools from misclassifying those cases as part of the caller.

The extra changes here plumb through the VarDecl for various cases to
CodeGenFunction - this provides better fidelity through a few APIs but
generally just causes the CGF::StartFunction to fallback to using the
name of the IR function as the name in the debug info.

The changes to debug-info-global-ctor-dtor.cpp seem like goodness. The
two names that go missing (in favor of only emitting those names as
linkage names) are names that can be demangled - emitting them only as
the linkage name should encourage tools to do just that.

Again, thanks to Dinesh Dwivedi for investigation/work on this issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189421 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
1942e1869d14ae6e810c11fb4b41d6ae31887a3f 27-Aug-2013 David Blaikie <dblaikie@gmail.com> PR14569: Omit debug info for thunks

This was added in r166676 based on PR13942 on the basis that tools may
need debug information for any executable code/function for some fairly
broad/non-specific purposes. It seems to me (as noted in PR14569) that
the major/only purpose is in backtraces, which should generally not
apply to thunks as they won't appear in the stack themselves. By
removing them we fix PR14569 and reduce the size of Clang's debug info.

Strangely enough this doesn't seem to have a substantial impact on
Clang's self-hosted debug info (at least looking at DWO file size) size
at all. Not sure if I failed to test this correctly but I only observed
a 0.004% change in DWO file size over Clang+LLVM.

With thanks to Dinesh Dwivedi for work on this PR.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
c3030bc285d90a139fb74629daadef5617283203 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, 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
6a29f674f649197780a4c60602cd08f491022ac8 22-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: emit the definition of types when construction vtables are required as these types may never end up emitting the full class data

This might be able to be optimized further by only doing this in the
absence of a key function, but it doesn't look like GCC is doing that so
I'm not rushing to do it just yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
5434fc29cb3ddbd0466b10a40ac0485f4cd7bc74 20-Aug-2013 David Blaikie <dblaikie@gmail.com> Revert "Revert "Revert "Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class""""

This reverts commit r188687 (reverts r188642 (reverts 188600 (reverts
188576))).

With added test coverage & fix for -gline-tables-only.

Thanks Michael Gottesman for reverting this patch when it demonstrated
problems & providing a reproduction/details to help me track this down.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
90e5523e4cd2230b86c6921b34affdcd35e0c4c0 19-Aug-2013 Michael Gottesman <mgottesman@apple.com> Revert "Revert "Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class"""

This reverts commit r188642.

This change is causing LTO builds to cause our 16 GB machines to swap and OOM
all weekend. I am going to work with Dave Blaikie to resolve the issue.

Sorry Dave =(.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188687 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
fcbeab6828268b7b044461e6406baab8d5a91577 18-Aug-2013 David Blaikie <dblaikie@gmail.com> Revert "Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class""

This reverts commit r188600.

r188640/r188639 fixed the root cause of the crash-on-valid that r188600
originally introduced. This now appears to bootstrap debug clang
successfully to the best of my testing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
05a0569aa1fa4191ba2b3fe1c5cb3f080740209c 17-Aug-2013 David Blaikie <dblaikie@gmail.com> Revert "DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class"

This reverts commit r188576.

Reverting while I investigate a selfhosting buildbot failure on Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188600 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
152701b54acf1e09ec4e7c6d6cb16fe6d82e23c6 16-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Omit debug info for dynamic classes in TUs that do not have the vtable for that class

This reduces Clang's .dwo (fission debug info) size by 23% over
Clang+LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
635de28950ef84ae26308ff734e778bad1ddde92 30-Jul-2013 Timur Iskhodzhanov <timurrrr@google.com> Add MicrosoftVFTableContext to AST

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187409 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
3b50e8d78c34fc57e25781015a2cb0536ca54f89 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 ARM and MSVC C++ ABIs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
3258abc2bad74e8bb1799d124bc4113c7234fa42 20-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>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
9063302a82423cb83f002257a416741850739a70 19-Jun-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Emit and install appropriately mangled vbtables

In Itanium, dynamic classes have one vtable with several different
address points for dynamic base classes that can't share vtables.

In the MS C++ ABI, each vbtable that can't be shared gets its own
symbol, similar to how ctor vtables work in Itanium. However, instead
of mangling the subobject offset into the symbol, the unique portions of
the inheritance path are mangled into the symbol to make it unique.

This patch implements the MSVC 2012 scheme for forming unique vbtable
symbol names. MSVC 2010 use the same mangling with a different subset
of the path. Implementing that mangling and possibly others is TODO.

Each vbtable is an array of i32 offsets from the vbptr that points to it
to another virtual base subobject. The first entry of a vbtable always
points to the base of the current subobject, implying that it is the
same no matter which parent class contains it.

Reviewers: rjmccall

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184309 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
d4c0cd07641681de6ed12164aa7a4495ab4b18e5 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 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
144a31f53b0a97a2c46bfcb1e2a40fa8327b8e89 05-Jun-2013 Peter Collingbourne <peter@pcc.me.uk> [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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183324 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
181e3ecc0907ae0103586a9f4db52241995a8267 13-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Cleanup handling of UniqueExternalLinkage.

This patch renames getLinkage to getLinkageInternal. Only code that
needs to handle UniqueExternalLinkage specially should call this.

Linkage, as defined in the c++ standard, is provided by
getFormalLinkage. It maps UniqueExternalLinkage to ExternalLinkage.

Most places in the compiler actually want isExternallyVisible, which
handles UniqueExternalLinkage as internal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
9d232c884ea9872d6555df0fd7359699819bc1f1 07-Mar-2013 John McCall <rjmccall@apple.com> Change hasAggregateLLVMType, which conflates complex and
aggregate types in a profoundly wrong way that has to be
worked around in every call site, to getEvaluationKind,
which classifies and distinguishes between all of these
cases.

Also, normalize the API for loading and storing complexes.

I'm working on a larger patch and wanted to pull these
changes out, but it would have be annoying to detangle
them from each other.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
1d4fff5551c2347010b955b4337a2aa7d65a050e 27-Feb-2013 Timur Iskhodzhanov <timurrrr@google.com> Better support for constructors with -cxx-abi microsoft, partly fixes PR12784

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
d4c3d66be70ae2d0bd828329022dc428cc277a1c 20-Feb-2013 John McCall <rjmccall@apple.com> Add a new 'type_visibility' attribute to allow users to
control the visibility of a type for the purposes of RTTI
and template argument restrictions independently of how
visibility propagates to its non-type member declarations.

Also fix r175326 to not ignore template argument visibility
on a template explicit instantiation when a member has
an explicit attribute but the instantiation does not.

The type_visibility work is rdar://11880378

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
b4127a28a6dd81852469d05c611a487beb233784 16-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> Emit vtables for an extern template class as available_externally, not as
linkonce_odr. Emit construction vtables as internal in this case, since the ABI
does not guarantee that they will be availble externally.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
d5617eeafc93209a26b9f88276c88cf997c3a0a7 25-Jan-2013 John McCall <rjmccall@apple.com> The standard ARM C++ ABI dictates that inline functions are
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
55fc873017f10f6f566b182b70f6fc22aefa3464 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort all of Clang's files under 'lib', and fix up the broken headers
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
34b41f80aad3679c545a4ba9bca9c1a318d41844 25-Oct-2012 Alexey Samsonov <samsonov@google.com> Initialize debug info for special cases of functions that lack declarations and are generated by Clang (global initializers/destructors, thunks) . Fixes PR13942.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
aafd111afa6acd50fe4bec6c41add02ecf556535 24-Oct-2012 Douglas Gregor <dgregor@apple.com> Remove the HiddenWeakTemplateVTables CodeGen option. It's currently unused.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
2eb9a959d24ad757a82ecab61f343635ad67749a 17-Oct-2012 David Blaikie <dblaikie@gmail.com> PR13684: Emit vtable entries for deleted functions as __cxa_deleted_function.

This is consistent/interoperable with GCC 4.7 (& __cxa_deleted_function isn't
present in 4.4 - not sure when it got added, but you'll need something with
that function available for this to work).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166069 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
022301b85823fc474965ce487fc9d61a156287e2 21-Sep-2012 Rafael Espindola <rafael.espindola@gmail.com> Call CGM.SetLLVMFunctionAttributesForDefinition on thunks so that they get
attributes like uwtable. Without uwtable a stack unwinder would be unable
to go past the thunks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164411 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
9b5ede58c32e779a777e828ea0bff29fb3d27bd4 19-Sep-2012 Benjamin Kramer <benny.kra@googlemail.com> Update clang for API change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
82bad6bbb6c04ec6e34562988d0d1f9e450a7279 14-Sep-2012 Eli Friedman <eli.friedman@gmail.com> Fix thunk emission for covariant virtual functions in cases which require
both a virtual and a non-virtual offset. PR13832.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
cf15f17f04995766883f5c5c76cb82bb25617e6d 14-Sep-2012 Eli Friedman <eli.friedman@gmail.com> Fix line endings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
bd9b65ae534cb11aa39737aa43ab82bb29e078f6 31-Jul-2012 John McCall <rjmccall@apple.com> Don't crash *or* insert a bogus autorelease when emitting a
this-adjustment thunk in ARC++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
e9af3e66cffa1b3d6dc75433b8a9673ecae33044 17-Jul-2012 Joao Matos <ripzonetriton@gmail.com> Fixed whitespace issue introduced in r160373.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
285baac67d722beb6854f5faa45ee1aa62a7ce92 17-Jul-2012 Joao Matos <ripzonetriton@gmail.com> [Windows] Abstract pure virtual method calls in the ABI. Fix the Windows ABI to forward to the correct function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160373 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
0f3d0970dcdf6cf17550b86838dff12813968dbc 07-Jul-2012 John McCall <rjmccall@apple.com> Distinguish more carefully between free functions and C++ instance methods
in the ABI arrangement, and leave a hook behind so that we can easily
tweak CCs on platforms that use different CCs by default for C++
instance methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
fce80091da9e5d83d05944e36c834f9137dc329c 20-Mar-2012 Benjamin Kramer <benny.kra@googlemail.com> Fix a use-after-free in thunk emission. EmitThunk may call RAUW on Init, invalidating the pointer.

Fixes PR12284. The test case only triggered under asan/valgrind, but it's better than nothing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d 11-Mar-2012 David Blaikie <dblaikie@gmail.com> Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).

The member variable is always "LangOpts" and the member function is always "getLangOpts".

Reviewed by Chris Lattner

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
de5d3c717684f3821b8db58037bc7140acf134aa 17-Feb-2012 John McCall <rjmccall@apple.com> Whether an argument is required (in contrast with being an
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
cec5ebd4a6a89a7023d04cec728fd340b541ed61 11-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Basic support for referring to captured variables from lambdas. Some simple examples seem to work. Tests coming up soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
8b418685e9e4f02f4eb2a76e1ec063e07552b68d 07-Feb-2012 Chris Lattner <sabre@nondot.org> simplify a bunch of code to use the well-known LLVM IR types computed by CodeGenModule.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
f7ccbad5d9949e7ddd1cbef43d482553b811e026 05-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> Basic: import SmallString<> into clang namespace

(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
6f42b62b6194f53bcbc349f5d17388e1936535d7 05-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> Basic: import OwningPtr<> into clang namespace

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149798 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
24018467ddb13857b764182f7753764d2f32f87d 26-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Move VTable builder to AST

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
ab172b5858d80af7254be7547980b5b9bf86e4e5 26-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Have CodeGenVTables::GenerateConstructionVTable use VTableLayout

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
9984d12729206c9c8d8009ed7eaab5be18c7ce89 26-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Move vtable dumper call to VTableBuilder ctor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
e00fe697ccc755a1f4aca4dab2d47fcb40903947 26-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Implement VTableContext::createConstructionVTableLayout

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
e09cdf46aa2b86c24e6bf7a7ead2eaded964f2ff 26-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Move all vtable layout data into new VTableLayout class

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
ba6ffeb51f89aefbec50347e4c73c17e825bd694 26-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Move VTableComponent to header file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140505 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
84fcc48817bb04c7de1acafcaa1f54ee3235a97b 26-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Move vtable component accessors to VTableContext

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
bf1c5aeadc5d4bb7fca5b0ee12208a94971f8492 26-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Remove CodeGenVTables::ComputeVTableRelatedInformation dependency on CodeGen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
1d2b31710539d705a3850c9fc3aa1804c2a5efee 26-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Create a VTableContext class and start moving CodeGenVTables methods to it

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
eb2d1f1c88836bd5382e5d7aa8f6b85148a88b27 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Removing a bunch of dead returns/breaks after llvm_unreachables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Switch assert(0/false) llvm_unreachable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
bcfd1f55bfbb3e5944cd5e03d07b343e280838c4 02-Sep-2011 Douglas Gregor <dgregor@apple.com> Extend the ASTContext constructor to delay the initialization of
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).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
03f486168fa69c46f1ffd651bd0819b0ea5d0409 09-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Revert bad change. (It may look equivalent, but it isn't.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137132 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
c55db3b76df62f2c89e9bcc7437d1065512fb139 09-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Cleanup; no functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
5f9e272e632e951b1efe824cd16acb4d96077930 23-Jul-2011 Chris Lattner <sabre@nondot.org> remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
2acc6e3feda5e4f7d9009bdcf8b1cd777fecfe2d 18-Jul-2011 Chris Lattner <sabre@nondot.org> de-constify llvm::Type, patch by David Blaikie!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
f742eb0196e1b25c0b71e91da4a2b856d16a1dab 10-Jul-2011 Chris Lattner <sabre@nondot.org> Rename CGT::VerifyFuncTypeComplete to isFuncTypeConvertible since
it is a predicate, not an action. Change the return type to be a bool,
not the incomplete member. Enhace it to detect the recursive compilation
case, allowing us to compile Eli's testcase on llvmdev:

struct T {
struct T (*p)(void);
} t;

into:

%struct.T = type { {}* }

@t = common global %struct.T zeroinitializer, align 8




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
97357602a289749d59520ac4ac31149f8d32e12e 22-Jun-2011 Jay Foad <jay.foad@gmail.com> Replace the existing forms of ConstantArray::get() with a single form
that takes an ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
e3d6cf2149beb1c215ea6e87023c27b4f37712ad 16-May-2011 Anders Carlsson <andersca@mac.com> Fix another regression from the "skip vtable pointer initialization"
optimization. Make sure to require a vtable when trying to get the address
of a VTT, otherwise we would never end up emitting the VTT.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131400 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
7dcdf5ba9324a9577461eae302e88fdd52e310c5 06-May-2011 Eli Friedman <eli.friedman@gmail.com> Add an implementation of thunks for varargs methods. The implementation is a bit messy, but it is correct as long as the method in question doesn't use indirect gotos. A couple of possible alternative implementations are outlined in FIXME's in this patch. rdar://problem/8077308 .



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
04c9a49ee251424b11d7c4e8b1c23637684cecb6 02-May-2011 Eli Friedman <eli.friedman@gmail.com> Simplify code a bit by using CallArgList::add. No intended functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
b8bced0b75fa4188c91753d5a1de6d164af45450 10-Apr-2011 Anders Carlsson <andersca@mac.com> Change CollectPrimaryBases to collect the bases in the right order. Fixes one half of PR9660.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
d24e50c2e6c3f6e85965ef7b860c62a6bd7bcbb3 10-Apr-2011 Anders Carlsson <andersca@mac.com> Make -fdump-vtable-layouts also dump vtable indices for all virtual member functions in the class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
14c65ca4cd914f3090d7eedb9bff4deb0ffc7927 07-Apr-2011 Ken Dyck <kd@kendyck.com> [Reapply r128776, modified so that it does not break debug info.]

Change the return type of CodeGenVTables::getVirtualBaseOffsetOffset() to
CharUnits. No change in functionality intended.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
1a7f7526b7fd817e3f49c210302d189eff981b5e 07-Apr-2011 Ken Dyck <kd@kendyck.com> [Reapply r128773. This is not the source of the issues Devang was seeing
with debug info.]

Use CharUnits for the offsets in the VirtualBaseClassOffsetOffsetsMapTy. No
change in functionality intended.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
3015c4c7d4f00326d3a9d88c38a6ab8a158f3e93 07-Apr-2011 Ken Dyck <kd@kendyck.com> [Reapply r128771. It wasn't the source of the issues Devang saw with debug
info.]

Use CharUnits for the offset type in the ClassNamesAndOffsets map in
dumpLayout(). No change in functionality intended.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
d28c33caf38aadae30473ba04ad67e88bece5938 07-Apr-2011 Ken Dyck <kd@kendyck.com> Reapply r128770. It's not the cause of the issues Devang saw with debug info.

Use CharUnits for the offsets in the VBaseOffsetOffsetsMapTy types. No
change in functionality intended.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
62c117db25cf7142e149fce82d2b3caa1237674c 04-Apr-2011 Devang Patel <dpatel@apple.com> Revert r128770, r128771, r128773 and r128776 for now. It breaks debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
4fbabd37fd107e0e477b45146499d38a77bf9335 02-Apr-2011 Ken Dyck <kd@kendyck.com> Change the return type of CodeGenVTables::getVirtualBaseOffsetOffset() to
CharUnits. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
d22153218848a8c7c4d81758aec09da39fef29ae 02-Apr-2011 Ken Dyck <kd@kendyck.com> Use CharUnits for the offsets in the VirtualBaseClassOffsetOffsetsMapTy. No
change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
2c026e1baa0d26421cbdfcd7290c1701cd9fbd7c 02-Apr-2011 Ken Dyck <kd@kendyck.com> Use CharUnits for the offset type in the ClassNamesAndOffsets map in
dumpLayout(). No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
e3e34e91649b2336f37cf7391b11ad395277fe7b 02-Apr-2011 Ken Dyck <kd@kendyck.com> Use CharUnits for the offsets in the VBaseOffsetOffsetsMapTy types. No
change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128770 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
396e4f672b4fc22936f385e0478a09eb223f113a 02-Apr-2011 Ken Dyck <kd@kendyck.com> Convert BaseOffset::NonVirtualOffset to CharUnits. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
c40a3fdf9b1d4bfcea4b5b0d5c8e39c9b891868f 02-Apr-2011 Ken Dyck <kd@kendyck.com> Convert offset parameters and return values of VTableComponent methods to
CharUnits. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128754 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
c952d38437700eb5dd39ab52d24f9fdf19d953e4 02-Apr-2011 Ken Dyck <kd@kendyck.com> Convert the offsets in VCallOffsetMap to CharUnits. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
413e7d216df32d7f37f7efd066f4386ac3efce22 02-Apr-2011 Ken Dyck <kd@kendyck.com> Convert offset parameters of VTableBuilder::IsOverriderUsed() to CharUnits.
No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128752 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
3ed994bbdbb236842bab98da0c91e537b2b3b100 31-Mar-2011 Ken Dyck <kd@kendyck.com> Convert the return value of
VCallAndVBaseOffsetBuilder::getCurrentOffsetOffset() to CharUnits. No change
in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
bb625e9692e5b8d839f64208b8fa29684c668f8b 31-Mar-2011 Ken Dyck <kd@kendyck.com> Convert the OffsetInLayoutClass parameter of
VCallAndVBaseOffsetBuilder::AddVBaseOffsets() to CharUnits. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128600 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
3ecfa2d3218cdab5545f637a17ff46354873b63f 31-Mar-2011 Ken Dyck <kd@kendyck.com> Convert the OffsetInLayoutClass of the VCallAndVBaseOffsetBuilder
constructor to CharUnits. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
f38d8ae5a0f0c0971321680056763632705dc2f4 31-Mar-2011 Ken Dyck <kd@kendyck.com> Convert the RealBaseOffset parameter of
VCallAndVBaseOffsetBuilder::AddVCallAndVBaseOffsets() to
CharUnits. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
bbf3bacb3e0c1ebb3e8a4a8b1330404a7e379315 30-Mar-2011 Jay Foad <jay.foad@gmail.com> Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
PHINode::Create() giving the (known or expected) number of operands.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
301af86e8d1a309a625230d9c80bbf3e78a50fc6 30-Mar-2011 Ken Dyck <kd@kendyck.com> Convert the offset parameter of
VCallAndVBaseOffsetBuilder::AddVCallOffsets() to CharUnits. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
0c64b7dcf17338cbeaf491206aad96ca15ae4d24 30-Mar-2011 Ken Dyck <kd@kendyck.com> Convert local offset variable to CharUnits in AddVCallOffsets. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
7262e90a10a65d50350465e831ff3df75d86a454 30-Mar-2011 Ken Dyck <kd@kendyck.com> Convert a local offset variable to CharUnits. No change in functionality
intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
8fe599325ea3cafbca56376f8379e6ddfc449215 30-Mar-2011 Ken Dyck <kd@kendyck.com> Convert the OffsetInLayoutClass parameter of DeterminePrimaryVirtualBases()
to CharUnits. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
75762b35a85ddf9666ab7ad64bdd6332f741d116 30-Mar-2011 Ken Dyck <kd@kendyck.com> Convert the OffsetInLayoutClass parameter of LayoutSecondaryVTables to
CharUnits. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
7ba8f522f32d37dc86e54b3c202a3f30bc1685d0 27-Mar-2011 Ken Dyck <kd@kendyck.com> Convert offset parameter in LayoutPrimaryAndSecondaryVTables() to CharUnits.
No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
23da84a4eb3fd6e8df765d77f236f857b0134c3f 27-Mar-2011 Ken Dyck <kd@kendyck.com> Convert VTableBuilder::MostDerivedClassOffset to CharUnits. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
fc72420a2245774b5a3f0cd0d7f7527f0f5c84db 27-Mar-2011 Ken Dyck <kd@kendyck.com> Convert FinalOverriders::MostDerivedClassOffset to CharUnits. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
9198e399121274481e7383669633bb955e06045c 27-Mar-2011 Ken Dyck <kd@kendyck.com> Remove a fixed FIXME comment (the base offset has already been converted to
CharUnits).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128386 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
3a726802cd05b2161ec5d9f2903749fa27093576 27-Mar-2011 Ken Dyck <kd@kendyck.com> Convert the offset parameters of AddMethods() to CharUnits. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
0e55ade4f73afca6e4667af105f9272c5e0be007 27-Mar-2011 Ken Dyck <kd@kendyck.com> Convert the BaseOffsetInLayoutClass parameter of ComputeThisAdjustment() to
CharUnits. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
82abeaed0b565e819407b523ed73aa5a4185b27f 27-Mar-2011 Ken Dyck <kd@kendyck.com> Convert offset members in MethodInfo to CharUnits. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
bda0d6bda0f1a08a9fdf3ee4cf550b6b10d454ec 27-Mar-2011 John McCall <rjmccall@apple.com> We were emitting construction v-tables with internal linkage all the time.
Emit them instead with the linkage of the VTT.

I'm actually really ambivalent about this; it's what GCC does, but outside
of improving code size (if the linkage is coalescing), I'm not sure it's
at all relevant. Construction vtables are naturally referenced only by the
VTT, which is itself only referenced by complete-object constructors and
destructors; giving the construction vtables possibly-external linkage is
important if you have an optimization that drills through the VTT to a
reference to a particular construction vtable which it cannot just emit
itself.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
4421d2b341d041df44013769f23c306308bbab83 26-Mar-2011 Douglas Gregor <dgregor@apple.com> On Mac OS X, the presence of an 'availability' attribute for that
platform implies default visibility. To achieve these, refactor our
lookup of explicit visibility so that we search for both an explicit
VisibilityAttr and an appropriate AvailabilityAttr, favoring the
VisibilityAttr if it is present.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
b4c82b4a2c8bfab8161029425f679087277ea763 26-Mar-2011 Ken Dyck <kd@kendyck.com> Convert the OffsetInLayoutClass parameter of
FinalOverriders::ComputeBaseOffsets() to CharUnits. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
17d8519035e9cfcc507fc145de6a9321f295b09c 26-Mar-2011 Ken Dyck <kd@kendyck.com> Convert FinalOverriders::Offset to CharUnits. No change in functionality
intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
e6203134056fe3912f4c436099a69bc6242d770f 26-Mar-2011 Ken Dyck <kd@kendyck.com> Convert offset in MethodBaseOffsetPairTy to CharUnits. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
35c416bf3580fabebebdfd36acc57a4bd370d78c 26-Mar-2011 Ken Dyck <kd@kendyck.com> Convert the offsets in SubobjectOffsetMapTy to CharUnits. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
57ebe33b0d72f126a54960c44315d3790c7fa7a9 26-Mar-2011 Ken Dyck <kd@kendyck.com> Convert several local variables to CharUnits. No change in functionality
intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
4230d529a8797bbeef2328b60abeae333f7e143f 24-Mar-2011 Ken Dyck <kd@kendyck.com> Convert the BaseOffset member of BaseSubobject to CharUnits from bits. No
change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
413ebdb1af6fb0d81845b61254daf02ba0449afd 11-Mar-2011 John McCall <rjmccall@apple.com> Use a slightly more semantic interface for emitting call arguments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
311b442a5050048e7d498e5ed352a9204b9a3c24 09-Mar-2011 John McCall <rjmccall@apple.com> Tame this assert, hopefully fixing self-host.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
d26bc76c98006609002d9930f8840490e88ac5b5 09-Mar-2011 John McCall <rjmccall@apple.com> Use the "undergoes default argument promotion" bit on parameters to
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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
9c6082fe89c61af697f017aa80937581cc2128d8 02-Mar-2011 Tilmann Scheller <tilmann.scheller@googlemail.com> Revert "Add CC_Win64ThisCall and set it in the necessary places."

This reverts commit 126863.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
ca0df92f3c4462969ba055c941c98a41a47de7c5 02-Mar-2011 Tilmann Scheller <tilmann.scheller@googlemail.com> Revert "Add preliminary support for MSVC-style vtables."

This reverts commit 126865.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126876 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
ab456cf6cd9e76f4f033984b4d5b103f28a4afe4 02-Mar-2011 Tilmann Scheller <tilmann.scheller@googlemail.com> Add preliminary support for MSVC-style vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
88d117c2eedd7c5bec57ac983a98d5e12bdd2cc6 02-Mar-2011 Tilmann Scheller <tilmann.scheller@googlemail.com> Add CC_Win64ThisCall and set it in the necessary places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
f0be979bddb8baa28e77693a3dc931e487b2a9f2 11-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> For consistency, use llvm::raw_ostream in the rest of the mangle api.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125360 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
d16c2cf1cafa413709aa487cbbd5dc392f1ba1ff 08-Feb-2011 John McCall <rjmccall@apple.com> Reorganize CodeGen{Function,Module} to eliminate the unfortunate
Block{Function,Module} base class. Minor other refactorings.

Fixed a few address-space bugs while I was there.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
22df7b17f1b086f4347256406703d259753a0cbf 06-Feb-2011 Anders Carlsson <andersca@mac.com> Fix self-host; if a thunk already exists and has available_externally linkage, we should change its linkage instead of asserting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
14e82fd91c6d5041aa840574143521d244f185cd 06-Feb-2011 Anders Carlsson <andersca@mac.com> When building with optimizations, emit thunks with available_externally linkage so devirtualized function calls can also be de-thunked.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
84c49e4e4baeb4c30251fd72220efb344b033cf0 06-Feb-2011 Anders Carlsson <andersca@mac.com> Simplify thunks code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
bbfd5babab059af14eed20b63b2aabedaa6a6ac7 05-Feb-2011 Anders Carlsson <andersca@mac.com> Pass a 'ForVTable' flag to GetAddrOfThunk and pass it along to GetOrCreateLLVMFunction so that we
won't assert when building a thunk for an implicit virtual member function that is not marked used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
1faa89f9c619e4b2411fab4af7e22ee7a2bd9009 05-Feb-2011 Anders Carlsson <andersca@mac.com> Re-land r124768, with a fix for PR9130.

We now emit everything except unused implicit virtual member functions when building the vtable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
01de7a44cea9f77cbcda65faad8edc8b48a3b617 03-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Revert 124768.
This reopens PR99114, but that one at least can be avoided with an #include.
PR9130 cannot.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
aedd9d5ad3cc776fd61457050bcd54cac4c5ea66 03-Feb-2011 Anders Carlsson <andersca@mac.com> Don't try to mark virtual members referenced for classes where the key function
is not defined in the current translation unit. Doing so lead to compile errors
such as PR9114.

Instead, when CodeGen is building the vtable, don't try to emit a definition
for functions that aren't marked used in the current translation unit.
Fixes PR9114.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
6d7f8473cd6e967b3676948894ce72472102f9cb 30-Jan-2011 Anders Carlsson <andersca@mac.com> When building with optimizations, emit vtables where the key is not in the
current translation unit as available_externally.

This helps devirtualize the second example in PR3100, comment 18:

struct S { S() {}; virtual void xyzzy(); };
inline void foo(S *s) { s->xyzzy(); }
void bar() { S s; foo(&s); }

This involved four major changes:

1. In DefineUsedVTables, always mark virtual member functions as referenced for
non-template classes and class template specializations.
2. In CodeGenVTables::ShouldEmitVTableInThisTU return true if optimizations are
enabled, even if the key function is not implemented in this translation
unit. We don't ever do this for code compiled with -fapple-kext, because we
don't ever want to devirtualize virtual member function calls in that case.
3. Give the correct linkage for vtables where the key function is not defined.
4. Update the linkage for RTTI structures when necessary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
fa2e99f72f9bfe2270ea8caf76d0eef11c45259f 29-Jan-2011 Anders Carlsson <andersca@mac.com> Change CodeGenModule::setTypeVisibility to take a TypeVisibilityKind enum instead of an "IsForRTTI" flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
0ffeaad72cb335b926b064379be4c9886bbff004 29-Jan-2011 Anders Carlsson <andersca@mac.com> Get rid of an unneeded parameter from setGlobalVisibility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
1cbce125b91cad81c8be3f8bbae8df917211176c 29-Jan-2011 Anders Carlsson <andersca@mac.com> Make emitting a VTT a two-step process, much like emitting a VTable. You first get the address of the VTT, and then pass it to EmitVTTDefinition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124539 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
96eaf2992b5955d1470fc9cce7a96e7e1e3b4ea7 29-Jan-2011 Anders Carlsson <andersca@mac.com> Use CGM.CreateOrReplaceCXXRuntimeVariable in CGVTables.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
c93a776c89bd0820813e5c7c87af2c820d9bbd27 29-Jan-2011 Anders Carlsson <andersca@mac.com> Remove IsDefinition from CodeGenModule::setTypeVisibility; it is always true.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124529 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
a50e33eb0ff7b73d44aebce88de3732583a7e960 29-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> More work to support -fapple-kext regarding
indirect vf calls and addition of extra entry
at bottom of vtbls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
cd3ac4bd96cb19af5117eded84bfe8320c5d787e 15-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Also set unnamed_addr on declarations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
62b1607e440b26f3683c92be887e8fd94af9c904 13-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Only add unnamed_addr to definitions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123354 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
9f959db60e8913abafe7d5f5f5a83dc6a5c8d87e 11-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Add unnamed_addr to vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
c9e814ba193f38a7b08268612248f63beb279bb3 25-Nov-2010 Anders Carlsson <andersca@mac.com> Rename RecordLayout::getPrimaryBaseWasVirtual to isPrimaryBaseVirtual.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120133 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
bdb4a9da62c585c4f5384a5976cdb36725a44f98 25-Nov-2010 Anders Carlsson <andersca@mac.com> Move code off the primary base info iterator. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120132 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
4e3b17c9ce4a198eaeac4355b12e4b523185ecb5 09-Nov-2010 John McCall <rjmccall@apple.com> When re-using a vtable slot for the nearest overridden method, just because
there's no return adjustment from the overridden to the overrider doesn't
mean there isn't a return adjustment from the overrider to the final
overrider. This matters if we're emitting a virtual this-adjustment thunk
because the overrider virtually inherits from the class providing the
nearest overridden method. Do the appropriate return adjustment in this case.

Fixes PR7611.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
a14f5979572aa25c03d24750ee4724d2031d4ede 01-Nov-2010 Anders Carlsson <andersca@mac.com> Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
af14603ca61757cf4361b583b45639a04c57e651 30-Oct-2010 John McCall <rjmccall@apple.com> Better solution: calculate the visibility of functions and variables
independently of whether they're definitions, then teach IR generation to
ignore non-explicit visibility when emitting declarations. Use this to
make sure that RTTI, vtables, and VTTs get the right visibility.

More of rdar://problem/8613093



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
d2c47bde3bc0c0debd8a9728781d3375efe22bc5 11-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make sure the VTables for template instantiations are emitted even if the key function doesn't have a body.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
4c40d98ab7acf5f27fa89b17bd8fc0ef7683df37 31-Aug-2010 John McCall <rjmccall@apple.com> Teach IR generation to return 'this' from constructors and destructors
under the ARM ABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
279b5eb6910d64a293e9c0e2887a05c65d8737d7 13-Aug-2010 John McCall <rjmccall@apple.com> Just disable the hidden-visibility optimization for now by hiding it behind
a -cc1 option. The Darwin linker complains about mixed visibility when linking
gcc-built objects with clang-built objects, and the optimization isn't really
that valuable. Platforms with less ornery linkers can feel free to enable this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
7a536907da776bdc47a704e7cafd641e8150e653 05-Aug-2010 John McCall <rjmccall@apple.com> It turns out that linkers (at least, the Darwin linker) don't necessarily
do the right thing with mixed-visibility symbols, so disable the visibility
optimization where that's possible, i.e. with template classes (since it's
possible that an arbitrary template might be subject to an explicit
instantiation elsewhere). 447.dealII actually does this.

I've put the code under an option that's currently not hooked up to anything.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
65005536dee9216b14e2361153a14ddd8a7cd50a 05-Aug-2010 John McCall <rjmccall@apple.com> Extend the visibility-hidden optimization to linkonce_odr thunks for
functions with in-line definitions, since such thunks will be emitted at any
use of the function.

Completes the feature work for rdar://problem/7523229.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
cbfe50224b19119e759802bd0c1463269dffd09e 04-Aug-2010 John McCall <rjmccall@apple.com> Emit standard-library RTTI with external linkage, not weak_odr.

Apply hidden visibility to most RTTI; libstdc++ does not rely on exact
pointer equality for the type info (just the type info names). Apply
the same optimization to RTTI that we do to vtables.

Fixes PR5962.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110192 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
0c7d32bde03ae90367cb0666cf8614d425290aa3 04-Aug-2010 John McCall <rjmccall@apple.com> Extend the hidden-visibility vtables optimization to template classes that
haven't been explicitly instantiated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
3d640e606165daf2eaf18d52c0697f68daec106a 03-Aug-2010 John McCall <rjmccall@apple.com> Emit weak vtables of non-template classes with hidden visibility.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
ff331c15729f7d4439d253c97f4d60f2a7ffd0c6 25-Jul-2010 Douglas Gregor <dgregor@apple.com> Remove the vast majority of the Destroy methods from the AST library,
since we aren't going to be calling them ever.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
c66bcfd32b941d8008284ecae9d16d7d47c96b0b 15-Jun-2010 Douglas Gregor <dgregor@apple.com> Make sure to set the visible on a vtable; VTTs and typeinfo already
handle visibility properly. Fixes <rdar://problem/8091955>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
b9cae1dd33592f89b13499bd7730aa628bf38dba 04-Jun-2010 Anders Carlsson <andersca@mac.com> Remove now unused code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
147a23dea1e6f247a568870b32eda1ce9a39a632 04-Jun-2010 Anders Carlsson <andersca@mac.com> Use CXXRecordDecl::getFinalOverriders to get final overriders. This speeds up vtable layout by moving away from the old final overrider computation code that had O(N^2) complexity in some cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
e21323588b32caf674213c9897dd12e2f0ea3cc5 02-Jun-2010 John McCall <rjmccall@apple.com> Don't try to emit the vtable for a class just because we're emitting a
virtual function from it.

Fixes PR7241.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
0a02860928ea022a17e1504417e34d2a741d0226 02-Jun-2010 Anders Carlsson <andersca@mac.com> More cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
7097e75a59b1cab605547b894ef39be7cc4bceb3 02-Jun-2010 Anders Carlsson <andersca@mac.com> More cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
263876434796b94176bf6e56165f965d6765ce78 02-Jun-2010 Anders Carlsson <andersca@mac.com> Cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
8be373b0901a9fdff4ed473a4e7365ff2b445202 30-May-2010 Anders Carlsson <andersca@mac.com> Remove unused parameter to FinalOverriders::PropagateOverrider.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
2736071ea3a46f90e65c93418961611d96c10ab9 27-May-2010 John McCall <rjmccall@apple.com> Correctly pass aggregates by reference when emitting thunks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
8b2423361648c39a7d8a3c5e8129e12006deac32 25-May-2010 John McCall <rjmccall@apple.com> If a function definition has any sort of weak linkage, its static local
variables should have that linkage. Otherwise, its static local
variables should have internal linkage. To avoid computing this excessively,
set a function's linkage before we emit code for it.

Previously we were assigning weak linkage to the static variables of
static inline functions in C++, with predictably terrible results. This
fixes that and also gives better linkage than 'weak' when merging is required.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
663218b576d8d79dea546c5726d7c90c216b1358 21-May-2010 Douglas Gregor <dgregor@apple.com> When generating the call arguments in a thunk to call the thunkee, do
not make copies non-POD arguments or arguments passed by reference:
just copy the pointers directly. This eliminates another source of the
dreaded memcpy-of-non-PODs. Fixes PR7188.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104327 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
cb359df81b83dd4f938d05cb9cf5c34bd20068bd 20-May-2010 Douglas Gregor <dgregor@apple.com> When creating a this-adjustment thunk where the return value is of C++
class type (that uses a return slot), pass the return slot to the
callee directly rather than allocating new storage and trying to copy
the object. This appears to have been the cause of the remaining two
Boost.Interprocess failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
6fb745bdf1ff1e32caf07e42093a7920726892c1 13-May-2010 Douglas Gregor <dgregor@apple.com> Rework when and how vtables are emitted, by tracking where vtables are
"used" (e.g., we will refer to the vtable in the generated code) and
when they are defined (i.e., because we've seen the key function
definition). Previously, we were effectively tracking "potential
definitions" rather than uses, so we were a bit too eager about emitting
vtables for classes without key functions.

The new scheme:
- For every use of a vtable, Sema calls MarkVTableUsed() to indicate
the use. For example, this occurs when calling a virtual member
function of the class, defining a constructor of that class type,
dynamic_cast'ing from that type to a derived class, casting
to/through a virtual base class, etc.
- For every definition of a vtable, Sema calls MarkVTableUsed() to
indicate the definition. This happens at the end of the translation
unit for classes whose key function has been defined (so we can
delay computation of the key function; see PR6564), and will also
occur with explicit template instantiation definitions.
- For every vtable defined/used, we mark all of the virtual member
functions of that vtable as defined/used, unless we know that the key
function is in another translation unit. This instantiates virtual
member functions when needed.
- At the end of the translation unit, Sema tells CodeGen (via the
ASTConsumer) which vtables must be defined (CodeGen will define
them) and which may be used (for which CodeGen will define the
vtables lazily).

From a language perspective, both the old and the new schemes are
permissible: we're allowed to instantiate virtual member functions
whenever we want per the standard. However, all other C++ compilers
were more lazy than we were, and our eagerness was both a performance
issue (we instantiated too much) and a portability problem (we broke
Boost test cases, which now pass).

Notes:
(1) There's a ton of churn in the tests, because the order in which
vtables get emitted to IR has changed. I've tried to isolate some of
the larger tests from these issues.
(2) Some diagnostics related to
implicitly-instantiated/implicitly-defined virtual member functions
have moved to the point of first use/definition. It's better this
way.
(3) I could use a review of the places where we MarkVTableUsed, to
see if I missed any place where the language effectively requires a
vtable.

Fixes PR7114 and PR6564.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
b0e921622100486175448a7554909d7f019d21ea 07-May-2010 Douglas Gregor <dgregor@apple.com> Fix typo in comment; 80 col violation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
7e21ffb97e1da7ee5470865859c5b4bfbe0b91a3 06-May-2010 Chris Lattner <sabre@nondot.org> Pass the globaldecl into GetOrCreateLLVMFunction so that llvm
function attributes like byval get applied to the function
definition. This fixes PR7058 and makes i386 llvm/clang bootstrap
pass all the same tests as x86-64 bootstrap for me (the llvmc
tests still fail in both).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
046c294a43024874ff35656c6e785b64e72f1f36 17-Apr-2010 Anders Carlsson <andersca@mac.com> Vtable -> VTable renames across the board.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
fbf05613db16a521ce124391388891c488c47a0c 17-Apr-2010 Anders Carlsson <andersca@mac.com> Fix a bug where we would sometimes incorrectly mark an vtable function as unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
73e6fa00ff7aa3be32b1cfc8790761a4db716bb0 12-Apr-2010 Anders Carlsson <andersca@mac.com> Fix another bug where we wouldn't generate secondary vtables for construction vtables in some cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
718d06995662ab5ea34c52988bde3813f4ef25cc 12-Apr-2010 Anders Carlsson <andersca@mac.com> More renames.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
9123284640b33e902c23aac15cb7f547ca1ff71f 12-Apr-2010 Anders Carlsson <andersca@mac.com> Rename a function parameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
af6ddf20711ccc6824545a5ac901d4fe3e462c3d 11-Apr-2010 Anders Carlsson <andersca@mac.com> Fix a bug where we were adding too many vcall offsets in some cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
4995997eb3372c4bc07efdf3ecdc967c00c17cba 10-Apr-2010 Anders Carlsson <andersca@mac.com> Enable an assert and remove a now unnecessary assert.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
f622b450d722b2954572e6ba04e1cdf18a21a41f 10-Apr-2010 Anders Carlsson <andersca@mac.com> Fix a bug where we would add the same function twice in a vtable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
9446481d4af332ac0be9417392b7919712f5dae4 10-Apr-2010 Anders Carlsson <andersca@mac.com> Rename VtableComponent and VtableBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp
461e326e74fa840945330a04df33b1180b08ddc0 08-Apr-2010 Anders Carlsson <andersca@mac.com> Rename CGVtable files to CGVTables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGVTables.cpp