History log of /external/clang/lib/CodeGen/CodeGenTypes.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

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

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/CodeGen/CodeGenTypes.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/CodeGenTypes.cpp
0f7c47b20a4cf6afcfaf2f9805e753243fcc5365 25-Oct-2013 Mark Lacey <mark.lacey@apple.com> Remove unused CodeGenOptions from CodeGenTypes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193376 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
278048971c8b2e153d305ee8917618c9bf38b1c3 15-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Unify & optimize the lazy addition of record types

Rather than going through the whole getOrCreateType machinery to
manifest a type, cut straight to the implementation because we know we
have to do work.

While the previous implementation was sufficient for the two cases
(completeness and required completeness) we have already (the general
machinery could inspect the type for those attributes & go down the full
definition path), a pending change (to emit info for types when we emit
their vtables) won't have that luxury & we'll need to force the creation
rather than relying on the general purpose routine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
076f51fd1f306cafc3b1f1d323d25ac81bf7d4f7 21-Jun-2013 David Blaikie <dblaikie@gmail.com> Fix all the silly things I committed in r184509

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
eab6a36cf1eed9a7fec0babd2206048e28dedd02 21-Jun-2013 David Blaikie <dblaikie@gmail.com> Alternative fix for r184473.

This just seems a bit tidier/more principled. Based on a patch provided
by Adrian - with the only minor tweak that it needed to use
"getTypeOrNull" rather than "getCompletedTypeOrNull" since we don't
store declarations in the CompletedTypes cache.

No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
dc7a4f5d7a7e3b60d4dc4a80338d7a2728540998 30-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Don't treat a non-deduced 'auto' type as being type-dependent. Instead, there
are now two distinct canonical 'AutoType's: one is the undeduced 'auto'
placeholder type, and the other is a deduced-but-dependent type. All
deduced-to-a-non-dependent-type cases are still non-canonical.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
64aa4b3ec7e62288e2e66c1935487ece995ca94b 17-Apr-2013 John McCall <rjmccall@apple.com> Standardize accesses to the TargetInfo in IR-gen.

Patch by Stephen Lin!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
9eda3abe7e183b05834947391c0cdc291f4ee0d8 07-Mar-2013 John McCall <rjmccall@apple.com> Promote atomic type sizes up to a power of two, capped by
MaxAtomicPromoteWidth. Fix a ton of terrible bugs with
_Atomic types and (non-intrinsic-mediated) loads and stores
thereto.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176658 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
b063ef0222a99ee168631afa7b5a882d494b8fde 23-Feb-2013 Benjamin Kramer <benny.kra@googlemail.com> Add streamed versions of getQualifiedNameAsString.

Move the cold virtual method getNameForDiagnostic out of line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
21f18c4fda167dc5f72feddbd6a7ac1b63200a0d 07-Feb-2013 Guy Benyei <guy.benyei@intel.com> Add OpenCL samplers as Clang builtin types and check sampler related restrictions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
19dbb20ac4371fae3190379a7e7bd467af3c00aa 23-Jan-2013 Joey Gouly <joey.gouly@arm.com> Add a new LangOpt NativeHalfType. This option allows for native half/fp16
operations (as opposed to storage only half/fp16).

Also add some semantic checks for OpenCL half types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
e6b9d802fb7b16d93474c4f1c179ab36202e8a8b 20-Jan-2013 Guy Benyei <guy.benyei@intel.com> Implement OpenCL event_t as Clang builtin type, including event_t related OpenCL restrictions (OpenCL 1.2 spec 6.9)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
3b844ba7d5be205a9b4f5f0b0d1b7978977f4b8c 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate to
reflect the migration in r171366.

Re-sort the #include lines to reflect the new paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
b13621d08e20ac7aa550e05896de8a57ee99c1e8 18-Dec-2012 Guy Benyei <guy.benyei@intel.com> Re-commit r170428 changes with Linux style file endings.

Add OpenCL images as clang builtin types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
7f92f2d8d9b7a07900c030183bc13a9ff60057cc 18-Dec-2012 Guy Benyei <guy.benyei@intel.com> Revert changes from r170428, as I accidentally changed the line endings of these files to Windows style.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
736104a7619c53ef92553780273d7357a3cdde81 18-Dec-2012 Guy Benyei <guy.benyei@intel.com> Add OpenCL images as clang builtin types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.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/CodeGenTypes.cpp
84fd6df966208b380cba072d2f2883962b9d270a 16-Nov-2012 Eli Friedman <eli.friedman@gmail.com> Make sure CodeGenTypes correctly reconverts function types. Fixes PR14355, a crash in IR generation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
25a6a84cf5067b32c271e3ba078676dee838798d 08-Oct-2012 Micah Villmow <villmow@gmail.com> Move TargetData to DataLayout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.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/CodeGenTypes.cpp
47bfcca2d6972d98a1b25239cd1aa658b60680e2 12-Apr-2012 Douglas Gregor <dgregor@apple.com> Fix some i1/i8 confusion within _Atomic(bool) in IR generation, both
in general (such an atomic has boolean representation) and
specifically for IR generation of __c11_atomic_init. The latter also
means actually using initialization semantics for this initialization,
rather than just creating a store.

On a related note, make sure we actually put in non-atomic-to-atomic
conversions when performing an implicit conversion sequence. IR
generation is far too kind here, but we still want the ASTs to make
sense.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.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/CodeGenTypes.cpp
bcf38f2782d9cada139e22aa1ab8df10c9b047e5 25-Feb-2012 Douglas Gregor <dgregor@apple.com> Trying to increase my Ohloh ranking with trivial tweaks

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151414 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
4a59bc26b3f2d00055e24332c3164c894fafac27 25-Feb-2012 Douglas Gregor <dgregor@apple.com> Simplify check per Eli's comment

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
a98a28534e48e59d5f7d69adae121589e298dd43 24-Feb-2012 Douglas Gregor <dgregor@apple.com> For the purposes of building LLVM types, a forward-declared
enumeration type with a fixed underlying type is complete. Fixes
<rdar://problem/10916155>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151403 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.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/CodeGenTypes.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/CodeGenTypes.cpp
3026348bd4c13a0f83b59839f64065e0fcbea253 20-Jan-2012 David Blaikie <dblaikie@gmail.com> More dead code removal (using -Wunreachable-code)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
2dde35bc626153492f5f58202506c88a27fbff5b 19-Oct-2011 John McCall <rjmccall@apple.com> More metaprogramming with builtin types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
0ddaeb9b031070ec64afe92d9892875ac44df427 17-Oct-2011 John McCall <rjmccall@apple.com> Add a new placeholder type to represent "unbridged"
casts in ARC.

No semantic analysis yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
aa4a99b4a62615db243f7a5c433169f2fc704420 15-Oct-2011 Anton Korobeynikov <asl@math.spbu.ru> Provide half floating point support as a storage only type.
Lack of half FP was a regression compared to llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
5e1cdac63c3d9c9b32fa41fa0b2d242a58a20d49 07-Oct-2011 John McCall <rjmccall@apple.com> Rename TagDecl::isDefinition -> isCompleteDefinition
for better self-documenting code, since the semantics
are subtly different from getDefinition().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
6595935602f57b4f2115785bb39dabc83e4232dc 07-Oct-2011 John McCall <rjmccall@apple.com> Record layout requires not just a definition, but a complete
definition. Assert this. Change IR generation to not try to
aggressively emit the IR translation of a record during its
own definition. Fixes PR10912.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
b001de7458d17c17e6d8b8034c7cfcefd3b70c00 07-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Support for C1x _Atomic specifier (see testcase). This is primarily being committed at the moment to help support C++0x <atomic>, but it should be a solid base for implementing the full specification of C1x _Atomic.

Thanks to Jeffrey Yasskin for the thorough review!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.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/CodeGenTypes.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/CodeGenTypes.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/CodeGenTypes.cpp
c1c20114a401e503c07d68c47e0728bb063f35c8 12-Aug-2011 Chris Lattner <sabre@nondot.org> switch clang to use the new-new way of creating llvm::StructType's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.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/CodeGenTypes.cpp
01c5d1ddc8bd589b629b8c0185c279d090bba115 22-Jul-2011 Chris Lattner <sabre@nondot.org> fix PR10384: C++ allows external arrays of incomplete type as well.
Many thanks to Eli for reducing this great testcase.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135752 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
181eeee36b057a1a66227123fad0978d1d0f034a 20-Jul-2011 Chris Lattner <sabre@nondot.org> fix a case where we're using ConvertType for a memory object.
It doesn't matter in practice, but it is good to be tidy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135571 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.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/CodeGenTypes.cpp
71305cc81bd379ddb8aa0d49e268267383202ca9 15-Jul-2011 Chris Lattner <sabre@nondot.org> Enhance the IR type lowering code to be much smarter about recursively lowering
types. Fore xample, we used to lower:

struct bar { int a; };
struct foo {
void (*FP)(struct bar);
} G;

to:

%struct.foo = type { {}* }

since the function pointer would cause recursive translation of bar and
we didn't know if that would get us into trouble. We are now smart enough
to know that it is fine, so we get this type instead:

%struct.foo = type { void (i32)* }

Codegen still needs to be prepared for uncooperative types at any place,
which is why I let the maximally uncooperative code sit around for awhile to
help shake out the bugs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
2045b2dd6a779e9b35ac42a60cf30a6b07cb4bb6 13-Jul-2011 Chris Lattner <sabre@nondot.org> per john's advice, speculatively lower uses of forward-declared enums to
i32. They almost always end up this way in the end anyway, and if we get
lucky, this avoids generating some bitcasts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
3a2b657088de9413714a51bff153a59565adb3ef 12-Jul-2011 Chris Lattner <sabre@nondot.org> Fix a problem Eli ran into where we now reject incomplete arrays of
uncompleted struct types. We now do what llvm-gcc does and compile
them into [i8 x 0]. If the type is later completed, we make sure that
it is appropriately cast.

We compile the terrible example to something like this now:

%struct.A = type { i32, i32, i32 }

@g = external global [0 x i8]

define void @_Z1fv() nounwind {
entry:
call void @_Z3fooP1A(%struct.A* bitcast ([0 x i8]* @g to %struct.A*))
ret void
}

declare void @_Z3fooP1A(%struct.A*)

define %struct.A* @_Z2f2v() nounwind {
entry:
ret %struct.A* getelementptr inbounds ([0 x %struct.A]* bitcast ([0 x i8]* @g to [0 x %struct.A]*), i32 0, i64 1)
}





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134972 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
cd87d1e4d1b0097877b0f9c2065900717d2aacba 12-Jul-2011 Chris Lattner <sabre@nondot.org> fix an unintended behavior change in the type system rewrite, which caused us to compile
stuff like this:

typedef struct {
int x, y, z;
} foo_t;

foo_t g;

into:
%"struct.<anonymous>" = type { i32, i32, i32 }
we now get:
%struct.foo_t = type { i32, i32, i32 }

This doesn't change the behavior of the compiler, but makes the IR much easier to read.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
ef6de3da8572607f786303c07150daa6e140ab19 11-Jul-2011 Jay Foad <jay.foad@gmail.com> De-constify Types in StructType::get() and TargetData::getIntPtrType().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
3ade97504790bbc5a148baa5b3f7e577aed9c1c6 10-Jul-2011 Chris Lattner <sabre@nondot.org> implement a nice new optimization: CodeGenTypes::UpdateCompletedType
is called whenever a tag type is completed. We previously used that
as the sign to layout the codegen representation for the tag type,
which worked but meant that we laid out *every* completed type, whether
it was used or not.

Now we just lay out the type if we've already seen it somehow else.
This means that we lay out types we've used but haven't seen a body
for, but we don't lay out tons of stuff that noone cares about.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
57eb23f34ed2586069273c66f1a9994fe2b42967 10-Jul-2011 Chris Lattner <sabre@nondot.org> keep track of whether being in a RS_StructPointer state
caused us to skip layout out a function accurately. If
so, flush the type cache for both the function and struct
case to ensure that any pointers to the functions get
recomputed. This is overconservative, but with this patch
clang can build itself again.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
f0a8679b6e6635117533b89894646f1450cea25b 10-Jul-2011 Chris Lattner <sabre@nondot.org> Fix the clang bootstrap and Jay's testcase from llvm-dev by being completely
conservative when converting a functiontype to IR when in a "pointer within
a struct" context. This has the unfortunate sideeffect of compiling all
function pointers inside of structs into "{}*" which, though correct, is
ugly. This has the positive side effect of being correct, and it is pretty
straight-forward to improve on this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
be5f332c4d9eb302cd020047c382aa133ad59501 10-Jul-2011 Chris Lattner <sabre@nondot.org> how about we initialize RecursionState.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.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/CodeGenTypes.cpp
8dd5cdfc462026648b480adaf774e24bc620f7c3 09-Jul-2011 Chris Lattner <sabre@nondot.org> when an enum type is completed, only flush the type cache when
the enum has already been converted. If not, there cannot be any types
built on top of it, so there is no need to flush the cache.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
9cbe4f0ba01ec304e1e3d071c071f7bca33631c0 09-Jul-2011 Chris Lattner <sabre@nondot.org> clang side to match the LLVM IR type system rewrite patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
08d4792bb5d9e0e7f122c6273636807029c06aaa 21-Jun-2011 Daniel Dunbar <daniel@zuster.org> IRgen: Add CGOptions to CGTypes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
7650d95a1a616ea300f37126a8dfc93dc19a662a 19-Jun-2011 Chris Lattner <sabre@nondot.org> update for api change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
864c041e118155c2b1ce0ba36942a3da5a4a055e 26-Apr-2011 John McCall <rjmccall@apple.com> Make yet another placeholder type, this one marking that an expression is a bound
member function, i.e. something of the form 'x.f' where 'f' is a non-static
member function. Diagnose this in the general case. Some of the new diagnostics
are probably worse than the old ones, but we now get this right much more
universally, and there's certainly room for improvement in the diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
e0047b13f0025fa1588f1b776592ed3458b226d6 21-Apr-2011 Anders Carlsson <andersca@mac.com> Don't add type names for enums; they're never used in LLVM IR.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
6aed2a1e4be4c2335d594d27cc3947b0faacd4ac 17-Apr-2011 Anders Carlsson <andersca@mac.com> Add addBaseSubobjectTypeName which isn't used yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
e9742b0f7281d0a21b79e661ec8879e01c4a02e4 17-Apr-2011 Anders Carlsson <andersca@mac.com> Move code to add a type name to a TagDecl type out into a helper function. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129669 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
162e1c1b487352434552147967c3dd296ebee2f7 15-Apr-2011 Richard Smith <richard-llvm@metafoo.co.uk> Support for C++11 (non-template) alias declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
1de4d4e8cb2e9c88809fea8092bc6e835a5473d2 07-Apr-2011 John McCall <rjmccall@apple.com> Basic, untested implementation for an "unknown any" type requested by LLDB.
The idea is that you can create a VarDecl with an unknown type, or a
FunctionDecl with an unknown return type, and it will still be valid to
access that object as long as you explicitly cast it at every use. I'm
still going back and forth about how I want to test this effectively, but
I wanted to go ahead and provide a skeletal implementation for the LLDB
folks' benefit and because it also improves some diagnostic goodness for
placeholder expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
207f4d8543529221932af82836016a2ef066c917 18-Mar-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for language-specific address spaces. On top of that,
add support for the OpenCL __private, __local, __constant and
__global address spaces, as well as the __read_only, _read_write and
__write_only image access specifiers. Patch originally by ARM;
language-specific address space support by myself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
34b41d939a1328f484511c6002ba2456db879a29 20-Feb-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement the C++0x deduced 'auto' feature.

This fixes PR 8738, 9060 and 9132.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126069 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
f4c7371fb1d3cebcfb40abad4537bb82515704ea 19-Jan-2011 John McCall <rjmccall@apple.com> Change QualType::getTypePtr() to return a const pointer, then change a
thousand other things which were (generally inadvertantly) relying on that.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
3f59c975aa5d047f7edd1b900b5e885c38af0ef7 26-Dec-2010 Chris Lattner <sabre@nondot.org> The -fshort-wchar option causes wchar_t to become unsigned, in addition to being
16-bits in size. Implement this by splitting WChar into two enums, like we have
for char. This fixes a miscompmilation of XULRunner, PR8856.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
cb690b111f698f0e16e59ed82ab6a7d660edb6d1 24-Nov-2010 Anders Carlsson <andersca@mac.com> Fix a (probably very old) regression where we weren't using the typedef name for anonymous tag types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
2d987772c2ba3bff93b9fbe7b73bf06eed2b1607 24-Nov-2010 Anders Carlsson <andersca@mac.com> Revert r120110. We don't want to call ConvertType from within getCGRecordLayout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
4cb78b2ab6545624c8c3f80457b974c56ff8ca3b 24-Nov-2010 Anders Carlsson <andersca@mac.com> Use ConvertType instead of ConvertTagDeclType, since ConvertType will assign a name to the type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120110 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
3379e9bd71c0e0051bd97e90d4f2ec964078091d 24-Nov-2010 Anders Carlsson <andersca@mac.com> Simplify code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
82926963cccbc54bc707d5dcf79389166046ef08 24-Nov-2010 Anders Carlsson <andersca@mac.com> Fix build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
c8f01ebbce3c874b43ee78535f7d179517f5f436 24-Nov-2010 Anders Carlsson <andersca@mac.com> Make CodeGenTypes::getCGRecordLayout compute the layout lazily if it doesn't exist. This matches ASTContext::getASTRecordLayout and is less confusing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
2348c6268a84a55445af73cc6fe26136b2b4dc87 12-Nov-2010 Benjamin Kramer <benny.kra@googlemail.com> Reduce string thrashing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
1274ccd90aec0b205fc838c3d504821ccfb55482 09-Oct-2010 Douglas Gregor <dgregor@apple.com> Implement C++0x scoped enumerations, from Daniel Wallin! (and tweaked a
bit by me).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
0bab0cdab751248ca389a5592bcb70eac5d39260 23-Aug-2010 John McCall <rjmccall@apple.com> Abstract out everything having to do with member pointers into the ABI
class; they should just be completely opaque throughout IR gen now,
although I haven't really audited that.

Fix a bug apparently inherited from gcc-4.2 where we failed to null-check
member data pointers when performing derived-to-base or base-to-derived
conversions on them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
f16aa103d3afd42fbca2ab346f191bf745cec092 22-Aug-2010 John McCall <rjmccall@apple.com> Go back to asking CodeGenTypes whether a type is zero-initializable.
Make CGT defer to the ABI on all member pointer types.
This requires giving CGT a handle to the ABI.
It's way easier to make that work if we avoid lazily creating the ABI.
Make it so.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
a9fa85841102e81daaa23650d89b120fe9dacedc 01-Jul-2010 Chris Lattner <sabre@nondot.org> fix rdar://8147692 - yet another crash due to my abi work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107387 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
bcaedaed309ce453a992fdeef4a4c908cc7d9dfb 30-Jun-2010 Chris Lattner <sabre@nondot.org> Reapply:
r107173, "fix PR7519: after thrashing around and remembering how all this stuff"
r107216, "fix PR7523, which was caused by the ABI code calling ConvertType instead"

This includes a fix to make ConvertTypeForMem handle the "recursive" case, and call
it as such when lowering function types which have an indirect result.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
7bbe03d8ae0772d89f6539d073dd43e49268a42c 30-Jun-2010 Daniel Dunbar <daniel@zuster.org> Revert r107173, "fix PR7519: after thrashing around and remembering how all this stuff", it broke bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107232 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
a9e05156438dc3f0ef1067ffce80037d9333e022 30-Jun-2010 Daniel Dunbar <daniel@zuster.org> Revert r107216, "fix PR7523, which was caused by the ABI code calling ConvertType instead", it is part of a boostrap breaking sequence.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
f1d5d8a7f217119063232f72f74cdba4bebbd714 30-Jun-2010 Chris Lattner <sabre@nondot.org> fix PR7523, which was caused by the ABI code calling ConvertType instead
of ConvertTypeRecursive when it needed to in a few cases, causing pointer
types to get resolved at the wrong time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
376fe5e7800dface235c5382b39d77790d39dfa7 29-Jun-2010 Chris Lattner <sabre@nondot.org> fix PR7519: after thrashing around and remembering how all this stuff
works, the fix is quite simple: just make sure to call ConvertTypeRecursive
when the function type being lowered is in the midst of ConvertType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
ce93399f26f23735b8e291321f18ad54f64cb58a 29-Jun-2010 Chris Lattner <sabre@nondot.org> minor cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
77b89b87c3b9220fea1bc80f6d6598d2003cc8a8 27-Jun-2010 Chris Lattner <sabre@nondot.org> finally get around to doing a significant cleanup to irgen:
have CGF create and make accessible standard int32,int64 and
intptr types. This fixes a ton of 80 column violations
introduced by LLVMContextification and cleans up stuff a lot.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
c00129a08c829bb34f22dc13727043c994c85644 30-May-2010 Eli Friedman <eli.friedman@gmail.com> Fix for PR7040: Don't try to compute the LLVM type for a function where it
isn't possible to compute.

This patch is mostly refactoring; the key change is the addition of the code
starting with the comment, "Check whether the function has a computable LLVM
signature." The solution here is essentially the same as the way the
vtable code handles such functions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105151 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
c39211d2aef5b8ca2bc69c9fb81ca3dfb3711eb0 18-May-2010 Anders Carlsson <andersca@mac.com> Add CodeGenTypes::ContainsPointerToDataMember overload that takes a CXXRecordDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
c12c5bba6ceb6acd4e51e7a0fc03257da9cfd44e 15-May-2010 John McCall <rjmccall@apple.com> Substantially alter the design of the Objective C type AST by introducing
ObjCObjectType, which is basically just a pair of
one of {primitive-id, primitive-Class, user-defined @class}
with
a list of protocols.
An ObjCObjectPointerType is therefore just a pointer which always points to
one of these types (possibly sugared). ObjCInterfaceType is now just a kind
of ObjCObjectType which happens to not carry any protocols.

Alter a rather large number of use sites to use ObjCObjectType instead of
ObjCInterfaceType. Store an ObjCInterfaceType as a pointer on the decl rather
than hashing them in a FoldingSet. Remove some number of methods that are no
longer used, at least after this patch.

By simplifying ObjCObjectPointerType, we are now able to easily remove and apply
pointers to Objective-C types, which is crucial for a certain kind of ObjC++
metaprogramming common in WebKit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
3e5af908ebf4c56b657c488bb2ca22f418e0868b 14-May-2010 Anders Carlsson <andersca@mac.com> Move ContainsPointerToDataMember to CodeGenTypes. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
198bcb44b6271c92fd856403f34b518828100aac 31-Mar-2010 Daniel Dunbar <daniel@zuster.org> IRGen: Move the auxiliary data structures tracking AST -> LLVM mappings out of CodeGenTypes, to per-record CGRecordLayout structures.
- I did a cursory check that this was perf neutral, FWIW.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99978 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
270e203b50ed8791e61afd357596bcf050cf2bfd 31-Mar-2010 Daniel Dunbar <daniel@zuster.org> IRGen: Hide CGRecordLayoutBuilder class, because I can.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
7c465b9e19453789e8be470ee0ddfba3d74b6310 31-Mar-2010 Daniel Dunbar <daniel@zuster.org> IRGen: Narrow getCGRecordLayout type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
2924ade97ee4228fcf3518d89cd4bd1653236b48 31-Mar-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move CGRecordLayout to its own happy little file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
f858da63ace0c810b6d6c67b3784b230c7d2417b 31-Mar-2010 Daniel Dunbar <daniel@zuster.org> Minor formatting/FIXME cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
ad5e73887052193afda72db8efcb812bd083a4a8 02-Mar-2010 John McCall <rjmccall@apple.com> Split out types that are non-canonical unless dependent as their own
category. Use this in a few places to eliminate unnecessary TST cases and
do some future-proofing. Provide terrible manglings for typeof. Mangle
decltype with some hope of accuracy.

Our manglings for some of the cases covered in the testcase are different
from gcc's, which I've raised as an issue with the ABI list.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
ead608af31b6c9abeae1ca6d0b75094dac4641c0 26-Feb-2010 John McCall <rjmccall@apple.com> Use the power of types to track down another canonicalization bug in
the ABI-computation interface. Fixes <rdar://problem/7691046>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97197 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
f177d9d6c27fbbcee8c00fd90b8306985c03c54a 15-Feb-2010 Duncan Sands <baldrick@free.fr> Uniformize the names of type predicates: rather than having isFloatTy and
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
5cfa011e61e14e6f2e1659047d809706c0e4c6a3 05-Feb-2010 John McCall <rjmccall@apple.com> Always start tag definitions before completing them. Assert same.

Fixes latent and not-so-latent objc++ and blocks++ bugs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
86ff308724171494395a840fd2efbe25e62f352e 04-Feb-2010 John McCall <rjmccall@apple.com> Extract a common structure for holding information about the definition
of a C++ record. Exposed a lot of problems where various routines were
silently doing The Wrong Thing (or The Acceptable Thing in The Wrong Order)
when presented with a non-definition. Also cuts down on memory usage.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
6f41c17ae854c8a26126e5ea1c3cd53bd746b7ba 11-Jan-2010 Chris Lattner <sabre@nondot.org> Use the new isInteger() method in a couple places, some random cleanup, and
add a fixme.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
82d0a418c8699fc6f4a9417457ffe93d43bba1c1 10-Jan-2010 Anton Korobeynikov <asl@math.spbu.ru> Generalize target weirdness handling having proper layering in mind:
1. Add helper class for sema checks for target attributes
2. Add helper class for codegen of target attributes

As a proof-of-concept - implement msp430's 'interrupt' attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93118 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
f5f7d864f5067d1ea4bff7fcf41b53a43b7b48ba 29-Dec-2009 Anders Carlsson <andersca@mac.com> Get rid of FixedWidthIntType, as suggested by Chris and Eli.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92246 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
8c69235d21dfb067efb530a8cf1f35d633394270 19-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Cleanup switch so it doesn't have a default case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91725 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
4a2251bb06a03166e34b509ca840b36f816c4081 03-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5659: correct a rather nasty oversight in the type conversion for
member pointer types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
13dcd00615de5c4279d97bdf63cd5f0a14fd9dcc 21-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> This patch implements objective-c's 'SEL' type as a built-in
type and fixes a long-standing code gen. crash reported in
at least two PRs and a radar. (radar 7405040 and pr5025).
There are couple of remaining issues that I would like for
Ted. and Doug to look at:

Ted, please look at failure in Analysis/MissingDealloc.m.
I have temporarily added an expected-warning to make the
test pass. This tests has a declaration of 'SEL' type which
may not co-exist with the new changes.

Doug, please look at a FIXME in PCHWriter.cpp/PCHReader.cpp.
I think the changes which I have ifdef'ed out are correct. They
need be considered for in a few Indexer/PCH test cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
f8f1893c2860e119f8719b49e2a97fee71f87733 20-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Fix a couple minor memory leaks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
3958b502404b4bd67f26fee398cb347abe89e6a8 10-Nov-2009 Jeffrey Yasskin <jyasskin@google.com> Fix clang's use of DenseMap iterators after r86636 fixed their constness.
Patch by Victor Zverovich!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
e27ec8ad56dbf1efb2de004b90fbbb86f740e3f1 24-Oct-2009 John McCall <rjmccall@apple.com> Store the builtin types as CanQualTypes. Expand a bit on the CanQual API,
but also remove some methods that cause ambiguities, and generally
make CanQual<blah> more analogous to QualType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
6b7fc1344d440b2378d7a1825046c60617cadae2 26-Sep-2009 Anders Carlsson <andersca@mac.com> Use the qualified name for tag types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
0953e767ff7817f97b3ab20896b229891eeff45b 24-Sep-2009 John McCall <rjmccall@apple.com> Refactor the representation of qualifiers to bring ExtQualType out of the
Type hierarchy. Demote 'volatile' to extended-qualifier status. Audit our
use of qualifiers and fix a few places that weren't dealing with qualifiers
quite right; many more remain.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
c1eb14a66fdd955aff3f957a5843295f27952bdd 15-Sep-2009 Anders Carlsson <andersca@mac.com> Codegen support for nullptr from C++0x.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
1eb4433ac451dc16f4133a88af2d002ac26c58ef 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
ad3e7118c40711faf5f51f08d599dbd525d3408a 24-Aug-2009 Anders Carlsson <andersca@mac.com> More member pointer work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
8c8f69ec1477424e11faef6b235505584d61e522 14-Aug-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
0032b2781b4deb131f8c9b7968f2030bf2489cdd 13-Aug-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
e607ed068334bacb8d7b093996b4671c6ca79e25 07-Aug-2009 Mike Stump <mrs@apple.com> Fix some const_cast issues. This is the beginning of the rabbit hole.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
47a434ff3d49e7906eda88e8e8242e4297725b32 06-Aug-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
3dee6efcad9ad56d14f7edd1c29924f0b876a7f9 30-Jul-2009 Mike Stump <mrs@apple.com> Add ability to layout the vtable pointer in trivial cases. I noticed
that we would silently do bad things with virtual bases in the layout
code, so, we just turn them off. When people do better things with
them, we can turn them back on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77556 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
6217b80b7a1379b74cced1c076338262c3c980b3 29-Jul-2009 Ted Kremenek <kremenek@apple.com> Change uses of:
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsRecordType() -> Type::getAs<RecordType>()
Type::getAsPointerType() -> Type::getAs<PointerType>()
Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>()
Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>()
Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>()
Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>()
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsTagType() -> Type::getAs<TagType>()

And remove Type::getAsReferenceType(), etc.

This change is similar to one I made a couple weeks ago, but that was partly
reverted pending some additional design discussion. With Doug's pending smart
pointer changes for Types, it seemed natural to take this approach.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
dfcb53830e4e7adcd34a284af1b21403deaa1192 28-Jul-2009 Anders Carlsson <andersca@mac.com> Remove the old RecordOrganizer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
cad86653942d4e33c2674ea40e77d7fe59990130 27-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Some minor changes toward support of data
member access in the presense of non-virtual bases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77246 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
696798febaf1f69020cdf7474b91e71736c5aa69 27-Jul-2009 Anders Carlsson <andersca@mac.com> Use the CGRecordLayoutBuilder even if there are no fields, because in C++ an empty class will have a padding byte.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
742cd1b7bb86b52b23b335d47abbd842dac0e1bf 25-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for non-virtual base class initialization
in constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
8330ceeebb3bfac31116b387b90ff2ce3cef85e4 23-Jul-2009 Anders Carlsson <andersca@mac.com> Move the LLVM field number for bit fields into the BitFieldInfo structure, since it's meaning is completely different than for non-bit fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
45372a6fdcd2b0840704569478db456822e02bae 23-Jul-2009 Anders Carlsson <andersca@mac.com> Check in CGRecordLayoutBuilder which is a reimplementation of the record layout code. (Yay, no more packed structs unless absolutely necessary). We currently don't use the layouts being built but that will change when the new code is mature enough :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
19cc4abea06a9b49e0e16a50d335c064cd723572 18-Jul-2009 Anders Carlsson <andersca@mac.com> Revert r75641.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76327 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
c15cb2af27514ecc879daba9aa01389c5203685d 18-Jul-2009 Steve Naroff <snaroff@apple.com> Remove ObjCQualifiedInterfaceType:-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
35366a67baa970c287c714c957cf78a4131cf60d 17-Jul-2009 Ted Kremenek <kremenek@apple.com> Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methods
until Doug Gregor's Type smart pointer code lands (or more discussion occurs).
These methods just call the new Type::getAs<XXX> methods, so we still have
reduced implementation redundancy. Having explicit getAsXXXType() methods makes
it easier to set breakpoints in the debugger.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
5cad1f74469d4d8b4fc51fe53a7837778aeb6107 17-Jul-2009 Ted Kremenek <kremenek@apple.com> Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
de2e22d33afec98324a66a358dfe0951b3c7259a 15-Jul-2009 Steve Naroff <snaroff@apple.com> Implement the ObjC pseudo built-in types as clang "BuiltinType's". I say pseudo built-in types, since Sema still injects a typedef for recognition (i.e. they aren't truly built-ins from a parser perspective).

This removes the static data/methods on ObjCObjectPointerType while preserving the nice API (no need to fiddle with ASTContext:-).

This patch also adds Type::isObjCBuiltinType().

This should be the last fairly large patch related to recrafting the ObjC type system. The follow-on patches should be fairly small.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
3d598a5ab3c8aabce0a03a2f5dea65eee643e5ac 14-Jul-2009 Anders Carlsson <andersca@mac.com> Rename RecordLayout.h to ASTRecordLayout.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75641 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
f5c209d23b20ada4a9b6235db50317239cbf6ae1 14-Jul-2009 Alisdair Meredith <public@alisdairm.net> Basic support for C++0x unicode types. Support for literals will follow in an incremental patch

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
430ee5a4fd20c02e59d6a0d720401a5f21e4e5c1 13-Jul-2009 Steve Naroff <snaroff@apple.com> Fix 5 issues from Chris's feedback on http://llvm.org/viewvc/llvm-project?view=rev&revision=75314.

Still more to come...just wanted to get the no-brainers out of the way.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75477 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
28e478010eb4d789da85c6378dbfa9d66b95830b 11-Jul-2009 Daniel Dunbar <daniel@zuster.org> Fix type conversion of ObjCObjectPointerType.
- Previous code was based on a misunderstanding (on my part) of the type
representation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
14108da7f7fc059772711e4ffee1322a27b152a7 11-Jul-2009 Steve Naroff <snaroff@apple.com> This patch includes a conceptually simple, but very intrusive/pervasive change.

The idea is to segregate Objective-C "object" pointers from general C pointers (utilizing the recently added ObjCObjectPointerType). The fun starts in Sema::GetTypeForDeclarator(), where "SomeInterface *" is now represented by a single AST node (rather than a PointerType whose Pointee is an ObjCInterfaceType). Since a significant amount of code assumed ObjC object pointers where based on C pointers/structs, this patch is very tedious. It should also explain why it is hard to accomplish this in smaller, self-contained patches.

This patch does most of the "heavy lifting" related to moving from PointerType->ObjCObjectPointerType. It doesn't include all potential "cleanups". The good news is additional cleanups can be done later (some are noted in the code). This patch is so large that I didn't want to include any changes that are purely aesthetic.

By making the ObjC types truly built-in, they are much easier to work with (and require fewer "hacks"). For example, there is no need for ASTContext::isObjCIdStructType() or ASTContext::isObjCClassStructType()! We believe this change (and the follow-up cleanups) will pay dividends over time.

Given the amount of code change, I do expect some fallout from this change (though it does pass all of the clang tests). If you notice any problems, please let us know asap! Thanks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
17945a0f64fe03ff6ec0c2146005a87636e3ac12 30-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> De-ASTContext-ify DeclContext.

Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating".
Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
d1b3c2dd5bc1f3103bee6137957aa7c5f8f2f0bc 18-Jun-2009 Steve Naroff <snaroff@apple.com> First step toward fixing <rdar://problem/6613046> refactor clang objc type representation.

Add a type (ObjCObjectPointerType) and remove a type (ObjCQualifiedIdType).

This large/tedious patch is just a first step. Next step is to remove ObjCQualifiedInterfaceType. After that, I will remove the magic TypedefType for 'id' (installed by Sema). This work will enable various simplifications throughout clang (when dealing with ObjC types).

No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
0e650017acdbbeb0c590e77bbea88c200ea1caef 17-May-2009 Anders Carlsson <andersca@mac.com> Add support for converting member pointer types to LLVM types. Also mangle pointer to member functions correctly and add tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71981 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
9408c45009b417e758749b3d95cdfb87dcb68ea9 09-May-2009 Duncan Sands <baldrick@free.fr> Correct for renaming PaddedSize -> AllocSize in
LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
2df9ced9fd1e8c7d7b38443db07e0e811de22571 30-Apr-2009 Chris Lattner <sabre@nondot.org> initial support for __[u]int128_t, which should be basically
compatible with VC++ and GCC. The codegen/mangling angle hasn't
been fully ironed out yet. Note that we accept int128_t even in
32-bit mode, unlike gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
9a901bb63990574ff0bcc12ff851d7a71cff8ddb 26-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Remove getIntegerConstantExprValue in favor of using EvaluateAsInt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
070eff4df45a810f0fb3a50e932f6d95713875d4 26-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Minor simplification.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
412f59b23fc502b199b9ca96c72ef5d5ad21d62b 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Don't convert interface types (to structs) as part of CodeGenTypes.
- This has pros and cons, but for now the pros seem to significantly
outway the con.

The con is that we will always need to cast in the runtime
implementation to a struct type, if we wish to access an interface
directly.

The pros are:
- Avoid the cost of generating types which are used. Most
manipulation of Objective-C objects is done through messages, and
only the implementation of a class will directly access
memory. Previously, we would convert the type even if it only
appear as a function parameter, for example.

- We don't need to worry about incomplete types, and
UpdateCompletedType for interfaces is gone.

- It becomes easier to narrow the interface to the shadow struct for
Objective-C interfaces (so it can be eliminated).

Currently the runtimes still use the CodeGenTypes machinery to
generate the LLVM structure they need via ConvertTagDecl, but this can
eventually be replaced.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
ae287239879386b9abf6da50a67bbb7fe81897f1 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Simplify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
068360e16fa4504a6fb80affebae5c5713629a96 22-Apr-2009 Chris Lattner <sabre@nondot.org> ObjCQualifiedClass is dead, remove it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69783 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
3b3a45858c6b2a45114e91902c3bf3c4b7f5f302 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Mark another TypeForDecl const and make getObjCInterfaceType's argument const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
6ab3524f72a6e64aa04973fa9433b5559abb3525 09-Apr-2009 Douglas Gregor <dgregor@apple.com> Propagate the ASTContext to various AST traversal and lookup functions.
No functionality change (really).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
285d0dba947b7c9960eaa88e8c4fced0398d4319 01-Apr-2009 Chris Lattner <sabre@nondot.org> fix the two xfails I added with a previous patch by making ObjC interface
types get completed when their definition is seen if previously laid out by
the code generator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
09dc6660487fc2f4a4bb2032e30123d3e0da7230 01-Apr-2009 Chris Lattner <sabre@nondot.org> tidy some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
636efb6ee4382e6fc16724014e9cf70dbeb37c31 31-Mar-2009 Chris Lattner <sabre@nondot.org> remove a dead prototype


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
c90dd0c682fe94b58ab3f95244f782d5f6159653 31-Mar-2009 Chris Lattner <sabre@nondot.org> remove the warning. We don't control what users do, and this code
is run for perfectly reasonable things like NSString* because type
layout is recursive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
9a1a9c41cf7e2735f059bb0c1d85f3207f637b22 31-Mar-2009 Chris Lattner <sabre@nondot.org> do not *copy* objc interface types, just use their reference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
7532dc66648cfe7432c9fe66dec5225f0ab301c6 31-Mar-2009 Douglas Gregor <dgregor@apple.com> Improve the representation of template names in the AST. This
representation handles the various ways in which one can name a
template, including unqualified references ("vector"), qualified
references ("std::vector"), and dependent template names
("MetaFun::template apply").

One immediate effect of this change is that the representation of
nested-name-specifiers in type names for class template
specializations (e.g., std::vector<int>) is more accurate. Rather than
representing std::vector<int> as

std::(vector<int>)

we represent it as

(std::vector)<int>

which more closely follows the C++ grammar.

Additionally, templates are no longer represented as declarations
(DeclPtrTy) in Parse-Sema interactions. Instead, I've introduced a new
OpaquePtr type (TemplateTy) that holds the representation of a
TemplateName. This will simplify the handling of dependent
template-names, once we get there.






git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
7c80bd64032e610c0dbd74fc0ef6ea334447f2fd 17-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Almost complete implementation of rvalue references. One bug, and a few unclear areas. Maybe Doug can shed some light on some of the fixmes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
209bb438042ef7652b2b046e43d4ffb5a00d9725 13-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Fix a bug in building function pointer type
corresponding to block pointer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66940 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
b3b6b9b27ab8bdb2a435a5a92ce62e74e3399377 05-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Initial implementation of CodeGen for incomplete function types; fixes
PR3688. (The FIXME is a rather big performance issue, but it only
affects code using this feature, which is relatively rare.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
57a84fb51de4f3de50debcf12dd194af8c6aaa58 03-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR3687: use the memory representation for booleans when a
sub-type describes a memory location, like the pointee type of a pointer
or the element type of an array.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
c1efaecf0373f1a55c5ef4c234357cf726fc0600 28-Feb-2009 Douglas Gregor <dgregor@apple.com> Eliminate CXXRecordType

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
fd6f08525f9292255249b2434af4c6b2bc02ee93 27-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Change the way clang generates union types a bit so it plays well
with the LLVM C backend.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
72564e73277e29f6db3305d1f27ba408abb7ed88 27-Feb-2009 Douglas Gregor <dgregor@apple.com> Create a new TypeNodes.def file that enumerates all of the types,
giving them rough classifications (normal types, never-canonical
types, always-dependent types, abstract type representations) and
making it far easier to make sure that we've hit all of the cases when
decoding types.

Switched some switch() statements on the type class over to using this
mechanism, and filtering out those things we don't care about. For
example, CodeGen should never see always-dependent or non-canonical
types, while debug info generation should never see always-dependent
types. More switch() statements on the type class need to be moved
over to using this approach, so that we'll get warnings when we add a
new type then fail to account for it somewhere in the compiler.

As part of this, some types have been renamed:

TypeOfExpr -> TypeOfExprType
FunctionTypeProto -> FunctionProtoType
FunctionTypeNoProto -> FunctionNoProtoType

There shouldn't be any functionality change...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
6aeae7fa9cfaacba3a4077d62c01c2531d88a63e 26-Feb-2009 Daniel Dunbar <daniel@zuster.org> Change PointersToResolve to list the pointee type to resolve, not the
pointer type.
- Drops use of PointerLikeType.
- No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65566 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
f7f52e7bf5a4dc36d45b98531e0b21e343fc19de 21-Feb-2009 Steve Naroff <snaroff@apple.com> More work to integrate newly added ObjCQualifiedClassType into the type system.

This is necessary 'plumbing' to fix <rdar://problem/6497631> Message lookup is sometimes different than gcc's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65248 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
f11284ac87daa613bc7b30db9f54bd716d123222 17-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Renamed ASQualType to ExtQualType to reflect its more
general use; as for, objc2's gc type attributes. No
change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
f98aba35e6c3da5aae61843fc01334939e4e12ec 13-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Initial implementation of arbitrary fixed-width integer types.
Currently only used for 128-bit integers.

Note that we can't use the fixed-width integer types for other integer
modes without other changes because glibc headers redefines (u)int*_t
and friends using the mode attribute. For example, this means that uint64_t
has to be compatible with unsigned __attribute((mode(DI))), and
uint64_t is currently defined to long long. And I have a feeling we'll
run into issues if we try to define uint64_t as something which isn't
either long or long long.

This doesn't get the alignment right in most cases, including
the 128-bit integer case; I'll file a PR shortly. The gist of the issue
is that the targets don't really expose the information necessary to
figure out the alignment outside of the target description, so there's a
non-trivial amount of work involved in getting it working right. That
said, the alignment used is conservative, so the only issue with the
current implementation is ABI compatibility.

This makes it trivial to add some sort of "bitwidth" attribute to make
arbitrary-width integers; I'll do that in a followup.

We could also use this for stuff like the following for compatibility
with gcc, but I have a feeling it would be a better idea for clang to be
consistent between C and C++ modes rather than follow gcc's example for
C mode.
struct {unsigned long long x : 33;} x;
unsigned long long a(void) {return x.x+1;}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
55f6b14230c94272efbbcdd89a92224c8db9f225 09-Feb-2009 Douglas Gregor <dgregor@apple.com> Start processing template-ids as types when the template-name refers
to a class template. For example, the template-id 'vector<int>' now
has a nice, sugary type in the type system. What we can do now:

- Parse template-ids like 'vector<int>' (where 'vector' names a
class template) and form proper types for them in the type system.
- Parse icky template-ids like 'A<5>' and 'A<(5 > 0)>' properly,
using (sadly) a bool in the parser to tell it whether '>' should
be treated as an operator or not.

This is a baby-step, with major problems and limitations:
- There are currently two ways that we handle template arguments
(whether they are types or expressions). These will be merged, and,
most likely, TemplateArg will disappear.
- We don't have any notion of the declaration of class template
specializations or of template instantiations, so all template-ids
are fancy names for 'int' :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
541b63b1a9db77e4a8670e9823711c2c12e58afb 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Thread CGFunctionInfo construction through CodeGenTypes.
- Inefficient & leaks memory currently, will be cleaned up subsequently.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
bb36d331f439f49859efcfb4435c61762fbba6f9 02-Feb-2009 Daniel Dunbar <daniel@zuster.org> ABI handling API changes.
- Lift CGFunctionInfo creation up to callers of EmitCall.

- Move isVariadic bit out of CGFunctionInfo, take as argument to
GetFunctionType instead.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
34e7946831a63f96d3ba3478c74ca8e25ee52d7e 29-Jan-2009 Douglas Gregor <dgregor@apple.com> Improvements to code-generation and semantic analysis of designated
initializers.

- We now initialize unions properly when a member other than the
first is named by a designated initializer.
- We now provide proper semantic analysis and code generation for
GNU array-range designators *except* that side effects will occur
more than once. We warn about this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
424c51d3d4bea87291919b75e73ca59386702ad5 25-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Introduce an explicit case for member pointers in CodeGenTypes. However, it simply asserts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62960 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
491c7b77cd8ec8570f646d43b937a5aec688bcbf 12-Jan-2009 Daniel Dunbar <daniel@zuster.org> (LLVM up) Match TargetData API change in LLVM TOT.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
f8d49f64ef6ab7e632717a31631fc289aab69428 09-Jan-2009 Douglas Gregor <dgregor@apple.com> Provide a new kind of iterator, the specific_decl_iterator, that
filters the decls seen by decl_iterator with two criteria: the dynamic
type of the declaration and a run-time predicate described by a member
function. This simplifies EnumDecl, RecordDecl, and ObjCContainerDecl
considerably. It has no measurable performance impact.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
4e174f1b1e95faacc21da2eac70f7853807f3ea3 09-Jan-2009 Daniel Dunbar <daniel@zuster.org> Convert block types in IRgen. This is not the correct type, but
matches llvm-gcc (?).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
a769c004a2874504c17ea8afccbc4ad35fc33c9f 17-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> This patch will build the Records lazily per Steve's comments.
Note that one test duplicate-ivar-check.m will fail because I
need to re-implement duplicate ivar checking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61154 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
9ee92e84ecf085ccbe6f877d1c6e1500961bbbce 15-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Name of addLayoutToClass is confusing as no layout calculation
is done. Layout is calculated lazily at code gen type.
This patch changes the name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61054 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
fd64bb635dc221baa19f81d5d2a084f7eb269f7f 15-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Code gen. for ivar references; including bitfield
ivars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
e267ff35b2f4e9d2b0d8bf24109d41cc7398b61b 11-Dec-2008 Douglas Gregor <dgregor@apple.com> Address some comments on the name lookup/DeclContext patch from Chris

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60897 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
a4c46df1cd63e06af2a094b68b902a3eb232f056 11-Dec-2008 Douglas Gregor <dgregor@apple.com> Actually distinguish between RecordDecl::field_iterator and RecordDecl::field_const_iterator, propagating the constness down to the FieldDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60883 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
44b4321feab46299d3f5cfd404680884752a0fcf 11-Dec-2008 Douglas Gregor <dgregor@apple.com> Unifies the name-lookup mechanisms used in various parts of the AST
and separates lexical name lookup from qualified name lookup. In
particular:
* Make DeclContext the central data structure for storing and
looking up declarations within existing declarations, e.g., members
of structs/unions/classes, enumerators in C++0x enums, members of
C++ namespaces, and (later) members of Objective-C
interfaces/implementations. DeclContext uses a lazily-constructed
data structure optimized for fast lookup (array for small contexts,
hash table for larger contexts).

* Implement C++ qualified name lookup in terms of lookup into
DeclContext.

* Implement C++ unqualified name lookup in terms of
qualified+unqualified name lookup (since unqualified lookup is not
purely lexical in C++!)

* Limit the use of the chains of declarations stored in
IdentifierInfo to those names declared lexically.

* Eliminate CXXFieldDecl, collapsing its behavior into
FieldDecl. (FieldDecl is now a ScopedDecl).

* Make RecordDecl into a DeclContext and eliminates its
Members/NumMembers fields (since one can just iterate through the
DeclContext to get the fields).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
898574e7496ba8fd76290079d3a9d06954992734 06-Dec-2008 Douglas Gregor <dgregor@apple.com> Introduce basic support for dependent types, type-dependent
expressions, and value-dependent expressions. This permits us to parse
some template definitions.

This is not a complete solution; we're missing type- and
value-dependent computations for most of the expression types, and
we're missing checks for dependent types and type-dependent
expressions throughout Sema.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
72c3f314d92d65c050ee1c07b7753623c044d6c7 05-Dec-2008 Douglas Gregor <dgregor@apple.com> Representation of template type parameters and non-type template
parameters, with some semantic analysis:
- Template parameters are introduced into template parameter scope
- Complain about template parameter shadowing (except in Microsoft mode)

Note that we leak template parameter declarations like crazy, a
problem we'll remedy once we actually create proper declarations for
templates.

Next up: dependent types and value-dependent/type-dependent
expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
d9d22dd9c94618490dbffb0e2caf222530ca39d3 24-Nov-2008 Chris Lattner <sabre@nondot.org> Rename NamedDecl::getName() to getNameAsString(). Replace a bunch of
uses of getName() with uses of getDeclName(). This upgrades a bunch of
diags to take DeclNames instead of std::strings.

This also tweaks a couple of diagnostics to be cleaner and changes
CheckInitializerTypes/PerformInitializationByConstructor to pass
around DeclarationNames instead of std::strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59947 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
6b1da0ea19c12346192f5ea4d70872c13bfcc82a 13-Oct-2008 Daniel Dunbar <daniel@zuster.org> Lift out ABIInfo abstract base class.
- Currently still lives in CGCall.cpp but is intended to be the
target specific place for hooking ABI information.
- Select ABIInfo to use based on Target's prefix and pointer width.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
3304e55f613ce34d9a14c3aaf06f5949408b3092 12-Oct-2008 Chris Lattner <sabre@nondot.org> silence release-assert warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
45c25ba11cbf8c9a461def5b03f6ee9481e06769 10-Sep-2008 Daniel Dunbar <daniel@zuster.org> Move FunctionType conversion into CGCall.cpp:
- Added CodeGenTypes::GetFunctionType, taking a CGFunctionInfo.
- Updated Obj-C runtimes to use this instead of rolling the
llvm::FunctionType by hand.
- Killed CodeGenTypes::{ConvertReturnType, DecodeArgumentTypes}.

Add ABIArgInfo class to encapsulate ABI decision of how to lower types
to LLVM.
- Will move to target sometime soon.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56047 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
efb6d0dc3eafbcf4f8cd053138bd1abed1dda8d4 06-Sep-2008 Daniel Dunbar <daniel@zuster.org> Key LLVM types for TagDecl's off of the clang Type, since there is now
a many-to-one relationship between TagDecl's and types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
9048891ff983d0681c116c6e8f1073aa31bdd6e8 28-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix double-free error with sizeof applied to VLA types.
- PR2727.

Also, fix warning in CodeGenTypes for new BlockPointer type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
8af9c78c7e5e8165f89c9858baee5e9bb9ec3a89 25-Aug-2008 Daniel Dunbar <daniel@zuster.org> Name struct types generated for Obj-C classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
6c2dae7923f887b5f7746dd84c2d9535eb2112c0 24-Aug-2008 Anders Carlsson <andersca@mac.com> Convert qualified interface types correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55287 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
32442bbc98bafa512fa42d46fedf60ed7d79f574 14-Aug-2008 Daniel Dunbar <daniel@zuster.org> Update some isIntegerConstantExpr uses to use
getIntegerConstantExprValue where appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
98c5ead87d720d8b68b6f236c3c3579a388fc882 12-Aug-2008 Daniel Dunbar <daniel@zuster.org> Protocol related tweaks
- Implement type conversion of ObjCQualifiedIdType
- Wire @protocol(...) to GenerateProtocolRef in ScalarExprEmitter


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
acc5f3e42334525bf28c86471551f83dfce222d5 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Kill unnecessary #includes in .cpp files. This is an automatic
sweep so some things removed are actually used, but happen to be
included by a previous header. I tried to get rid of the obvious
examples and this was the easiest way to trim the #includes in one
fell swoop.
- We now return to regularly scheduled development.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
c4a1dea2dc56bd1357ec91b829a0b9e68229a13e 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h
- Moved Sema::getCurMethodDecl() out of line (dependent on
ObjCMethodDecl via dyn_cast).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
de7fb8413b13651fd85b7125d08b3c9ac2816d9d 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Remove internal uses of AST.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
e91593ef084479340582b2ba177b44be50a717b7 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and
SourceLocation.h)
- Move ASTContext constructor into implementation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54627 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
afef76e43a30380b3c612a674738f2f574c8f166 10-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Handle BuiltinType::WChar inside CodeGenTypes::ConvertNewType().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
9619662a1d42e2008b865d3459c0677e149dad1b 27-Jul-2008 Chris Lattner <sabre@nondot.org> remove uses of QualType::getCanonicalType() from codegen for PR2189


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
b7cfe88e88cb4f46308de89cf3f0c81bfe624128 30-Jun-2008 Chris Lattner <sabre@nondot.org> Make a few related changes:

1) add a new ASTContext::getFloatTypeSemantics method.
2) Use it from SemaExpr.cpp, CodeGenTypes.cpp and other places.
3) Change the TargetInfo.h get*Format methods to return their
fltSemantics byref instead of by pointer.
4) Change CodeGenFunction::EmitBuiltinExpr to allow builtins which
sometimes expand specially and othertimes fall back to libm.
5) Add support for __builtin_nan("") to codegen, cases that don't pass
in an empty string are currently lowered to libm calls.
6) Fix codegen of __builtin_infl.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
18ae3cfe2a3ba43519ccd2f665892014c64e8d4a 21-Jun-2008 Chris Lattner <sabre@nondot.org> Don't add isa with @defs only to work around it in the code generator, patch
by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
4111024be81e7c0525e42dadcc126d27e5bf2425 17-Jun-2008 Chris Lattner <sabre@nondot.org> Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl.
Patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
39ba4aeca296b1c9f04bde7d9d3cbbf129f1abd3 10-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Changes to TagDecl:
Added TagKind enum.
Added getTagKind() method.
Added convenience methods: isEnum(), isStruct(), isUnion(), isClass().
-RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
b853ca876e92ea6e171bd7bb5d161fcbc9e9b032 04-Jun-2008 Eli Friedman <eli.friedman@gmail.com> clang fix to parallel LLVM r51928
(http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080602/063306.html).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
e36a3c8b5c7db4916342e4381caa2fdc93eb5745 30-May-2008 Eli Friedman <eli.friedman@gmail.com> Add FIXME to CodeGen struct layout.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51764 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
0408f6805c164f317937e97d7bc222781164bfeb 29-May-2008 Eli Friedman <eli.friedman@gmail.com> Always use packed structs. This isn't really very nice, but there's
nothing fundamentally wrong with it. Emitting unpacked structs where
possible is more work for almost no practical benefit. We'll probably
want to fix it at some point anyway, but it's low priority.

The issue with long double in particular is that LLVM thinks an X86 long
double is 10 bytes, while clang considers it for all purposes to be
either 12 or 16 bytes, depending on the platform, even in a packed
struct.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
2fb86e61e3d8c39f7981d0270278541fb7cad255 28-May-2008 Devang Patel <dpatel@apple.com> Check first member alignment and uses packed struct if required.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
f6a943e047f541619a2202f9e43b20b3d7c0a96d 27-May-2008 Eli Friedman <eli.friedman@gmail.com> Generalize the float type generation code, and specifically fix the
codegen of X86 long double.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
cbadaf6ced6d664015ee409f62ab1bc20ae0bf73 27-May-2008 Eli Friedman <eli.friedman@gmail.com> Rewrite struct/union layout. This is mostly cleanup; this might also fix
a few bugs, but I don't know of any in particular. This has good effects
besides cleanup, though: it also should make it easier to implement the
aligned and packed attributes, and also target-specific struct layouts,
because the code won't have to be duplicated in codegen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
d79a726dc3c8af61b486948c97a183c7fe5b0179 23-May-2008 Dan Gohman <gohman@apple.com> Change uses of llvm::Type::isFirstClassType to use the new
llvm::Type::isSingleValueType. Currently these two functions have
the same behavior, but soon isFirstClassType will return true for
struct and array types.

Clang may some day want to use of isFirstClassType for some of
these some day as an optimization, but it'll require some
consideration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
5cada6bd7f0a9f1c0f82613924610177d676ced5 08-May-2008 Devang Patel <dpatel@apple.com> Begin handling union bitfields.
Note, this is just beginning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50835 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
d8ecd3c8f7716124e1efb278a46b6747c697668d 06-May-2008 Devang Patel <dpatel@apple.com> Fix PR2101 - Codegen crash during bitfield initialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
213541a68a3e137d11d2cefb612c6cdb410d7e8e 19-Apr-2008 Nate Begeman <natebegeman@mac.com> OCUVector -> ExtVector, shorthand for extended vector, per feedback from Chris.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49942 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
c8b1227fa8c17d9881815e40c04e19334be536f8 18-Apr-2008 Nate Begeman <natebegeman@mac.com> Allow targets to override double size, alignment, and semantics, and tie this
information into the IR type codegen. This allows a target to codegen the C
'double' type as either double or float.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
fce71b8ea53b6eb9c1630da24659289bc848f837 03-Apr-2008 Chris Lattner <sabre@nondot.org> Fix PR2081 (problems codegen'ing some recursive structures) patch
by Lauro Venancio!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
bdcd637c29ec1540f912ea6860c88b910e78c329 02-Apr-2008 Chris Lattner <sabre@nondot.org> add a common base class "PointerLikeType" for PointerType and ReferenceType,
allowing them to be treated the same in some contexts. A suggestion for a
better name is welcome :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
ce5605ecf76d8cde6372138f830bb144d174ced9 31-Mar-2008 Chris Lattner <sabre@nondot.org> some cleanups on top of David's patch. There are still two
remaining open issues I've communicated to him:

1) self can be assigned to, and his patch didn't handle it correctly.
2) CollectObjCIvarTypes is N^2 (because each subclass reprocesses
all parent class ivars) and flattens classes. If A derives from B,
and both have an int, I'd expect to get { {i32}, i32}, not { i32, i32}.

David, please review.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48970 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
391d77a26382dddf25da73e29fc1fa5aaaea4c6f 31-Mar-2008 Chris Lattner <sabre@nondot.org> Add initial support for objc codegen for methods, ivars, and the
etoile runtime, patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
572cf09ae8a78af1c56d40b016ec4cf1837163ac 19-Mar-2008 Chris Lattner <sabre@nondot.org> simplify code by using the variadic StructType::get method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CodeGenTypes.cpp
bda0b626e74513950405c27525af87e214e605e2 16-Mar-2008 Chris Lattner <sabre@nondot.org> Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it. This follows the main
llvm tree, and allows the libraries to be built in parallel. The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in. This speeds
up parallel builds, particularly incremental ones.


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