• Home
  • History
  • Annotate
  • only in /external/clang/lib/CodeGen/
History log of /external/clang/lib/CodeGen/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8b0b2d671156262172b5a04b84cf191bd93fa59e 16-Aug-2014 Tim Murray <timmurray@google.com> Update vector calling convention for AArch64.

bug 16846318

Change-Id: I3cfd167758b4bd634d8480ee6ba6bb55d61f82a7
argetInfo.cpp
ef8225444452a1486bd721f3285301fe84643b00 21-Jul-2014 Stephen Hines <srhines@google.com> Update Clang for rebase to r212749.

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

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

Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
ndroid.mk
ackendUtil.cpp
GAtomic.cpp
GBlocks.cpp
GBuiltin.cpp
GCXX.cpp
GCXXABI.cpp
GCXXABI.h
GCall.cpp
GClass.cpp
GCleanup.h
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprScalar.cpp
GLoopInfo.cpp
GLoopInfo.h
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GOpenMPRuntime.cpp
GOpenMPRuntime.h
GRTTI.cpp
GStmt.cpp
GStmtOpenMP.cpp
GVTables.cpp
GVTables.h
MakeLists.txt
odeGenABITypes.cpp
odeGenAction.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenPGO.cpp
odeGenPGO.h
odeGenTypes.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
icrosoftRTTI.cpp
oduleBuilder.cpp
anitizerBlacklist.cpp
anitizerBlacklist.h
argetInfo.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
ndroid.mk
ackendUtil.cpp
GAtomic.cpp
GBlocks.cpp
GBlocks.h
GBuilder.h
GBuiltin.cpp
GCUDARuntime.cpp
GCXX.cpp
GCXXABI.cpp
GCXXABI.h
GCall.cpp
GCall.h
GClass.cpp
GCleanup.cpp
GCleanup.h
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GLoopInfo.cpp
GLoopInfo.h
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GObjCRuntime.h
GOpenCLRuntime.cpp
GOpenMPRuntime.cpp
GOpenMPRuntime.h
GRTTI.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
GStmt.cpp
GStmtOpenMP.cpp
GVTables.cpp
GValue.h
MakeLists.txt
odeGenAction.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenPGO.cpp
odeGenPGO.h
odeGenTBAA.cpp
odeGenTypes.cpp
HScopeStack.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
icrosoftRTTI.cpp
oduleBuilder.cpp
argetInfo.cpp
argetInfo.h
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
BIInfo.h
ndroid.mk
ackendUtil.cpp
GAtomic.cpp
GBlocks.cpp
GBuiltin.cpp
GCUDANV.cpp
GCUDARuntime.cpp
GCXX.cpp
GCXXABI.cpp
GCXXABI.h
GCall.cpp
GCall.h
GClass.cpp
GCleanup.cpp
GCleanup.h
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GObjCRuntime.h
GOpenCLRuntime.cpp
GRTTI.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
GStmt.cpp
GVTT.cpp
GVTables.cpp
GVTables.h
MakeLists.txt
odeGenABITypes.cpp
odeGenAction.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenPGO.cpp
odeGenPGO.h
odeGenTypes.cpp
odeGenTypes.h
HScopeStack.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
icrosoftVBTables.cpp
icrosoftVBTables.h
oduleBuilder.cpp
argetInfo.cpp
argetInfo.h
229d345dd5a73ef6ba75d1d730ecf96e8dc9ecec 08-Feb-2014 Stephen Hines <srhines@google.com> Update clang for merge to LLVM 3.4.

Update TableGen rules:
- AttrExprArgs
+ AttrIdentifierArg
+ AttrParsedAttrImpl
+ AttrTypeArg

Update config.h files.

Adjust Android.mk for added/removed files:

+ TransProtectedScope.cpp

- DumpXML.cpp

+ Consumed.cpp

+ CodeGenABITypes.cpp

+ SanitizerArgs.cpp

+ AllocationDiagnostics.cpp
- CommonBugCategories.cpp
+ IdenticalExprChecker.cpp

+ CommonBugCategories.cpp
- SymbolManager.cpp
- TextPathDiagnostics.cpp
+ SymbolManager.cpp

Change-Id: I73bea10e7e73e611f678bc5bf9935e26da63be17
ndroid.mk
1fab7c3e3bd97a909a80b1bfea1909c6e7347fc0 12-Feb-2014 Stephen Hines <srhines@google.com> Merge remote-tracking branch 'upstream/release_34' into merge-20140211

Conflicts:
lib/Basic/Targets.cpp
lib/Sema/SemaDeclAttr.cpp

Change-Id: I17ca7161f32007272ee82036d237d051847dd02e
b66a0f46ebf715835fb643d06510cd822f946c17 11-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196995:
------------------------------------------------------------------------
r196995 | rsmith | 2013-12-10 17:40:16 -0800 (Tue, 10 Dec 2013) | 5 lines

When performing an array new of a multidimensional array with an initializer
list, each element of the initializer list may provide more than one of the
base elements of the array. Be sure to initialize the right type and bump the
array pointer by the right amount.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@197005 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
01f3d00bc5074a2f105eda35ef7aee8088e938d6 10-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196771:
------------------------------------------------------------------------
r196771 | majnemer | 2013-12-09 02:44:32 -0800 (Mon, 09 Dec 2013) | 17 lines

[-cxx-abi microsoft] Mangle large integral constants correctly

Testing has revealed that large integral constants (i.e. > INT64_MAX)
are always mangled as-if they are negative, even in places where it
would not make sense for them to be negative (like non-type template
parameters of type unsigned long long).

To address this, we change the way we model number mangling: always
mangle as-if our number is an int64_t. This should result in correct
results when we have large unsigned numbers.

N.B. Bizarrely, things that are 32-bit displacements like vbptr offsets
are mangled as-if they are unsigned 32-bit numbers. This is a pretty
egregious waste of space, it would be a 4x savings if we could mangle it
like a signed 32-bit number. Instead, we explicitly cast these
displacements to uint32_t and let the mangler proceed.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196878 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
82e23c2d8aaecc50793e48505e7bb8e820801b35 09-Dec-2013 Manman Ren <manman.ren@gmail.com> Merging r196145:
------------------------------------------------------------------------
r196145 | mren | 2013-12-02 12:10:37 -0800 (Mon, 02 Dec 2013) | 5 lines

Debug Info: Move the constant for Debug Info Version from Dwarf.h to Metadata.h.

Suggested by Eric.
Paired commit with r196144.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196820 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f8609ea852fc14933a332573f1d50303081af017 09-Dec-2013 Manman Ren <manman.ren@gmail.com> Merging r196143:
------------------------------------------------------------------------
r196143 | mren | 2013-12-02 11:37:35 -0800 (Mon, 02 Dec 2013) | 1 line

Expand comments for Debug Info Version.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196818 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
1f856a010fcaf573aa10e1791244a4cbd338d729 09-Dec-2013 Manman Ren <manman.ren@gmail.com> Merging r195495:
------------------------------------------------------------------------
r195495 | mren | 2013-11-22 11:42:45 -0800 (Fri, 22 Nov 2013) | 5 lines

Debug Info: add a "Debug Info Version" module flag to output the current debug
info version number.

Will error out when modules have different version numbers.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196812 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d6f42ac4ce92771d486c8ce459d3e1266567c244 08-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196361:
------------------------------------------------------------------------
r196361 | kevinqin | 2013-12-04 00:02:11 -0800 (Wed, 04 Dec 2013) | 1 line

[AArch64 NEON] Add ACLE intrinsic vceqz_f64.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196682 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
612f5bfeac5c4d923bb448b2f06e3aeab318130f 08-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196359:
------------------------------------------------------------------------
r196359 | kevinqin | 2013-12-03 23:53:09 -0800 (Tue, 03 Dec 2013) | 1 line

[AArch64 NEON] Add missing compare intrinsics.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196680 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
917b328a7f565f9f3f0ae2067a8b97732efaa9f8 08-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196211:
------------------------------------------------------------------------
r196211 | haoliu | 2013-12-02 22:07:13 -0800 (Mon, 02 Dec 2013) | 3 lines

[AArch64]Add missing floating point convert, round and misc intrinsics.
E.g. int64x1_t vcvt_s64_f64(float64x1_t a) -> FCVTZS Dd, Dn

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196679 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
d93bc4320ac3b2035a542fcf2004fce0c91abd11 08-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196199:
------------------------------------------------------------------------
r196199 | haoliu | 2013-12-02 19:40:08 -0800 (Mon, 02 Dec 2013) | 3 lines

AArch64: Add missing scalar pair intrinsics.
E.g. "float32_t vaddv_f32(float32x2_t a)" to be matched into "faddp s0, v1.2s".

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196676 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
8e3eec5fed242ef730b4ea023051650420e9c443 07-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196658:
------------------------------------------------------------------------
r196658 | d0k | 2013-12-07 08:12:52 -0800 (Sat, 07 Dec 2013) | 7 lines

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

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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196666 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
148a352abe7851d1a1d421d1d205577ab0fd0998 04-Dec-2013 Richard Sandiford <rsandifo@linux.vnet.ibm.com> Merging r196370:
------------------------------------------------------------------------
r196370 | rsandifo | 2013-12-04 09:59:57 +0000 (Wed, 04 Dec 2013) | 14 lines

[SystemZ] Fix handling of pass-by-pointer arguments

I'd misunderstood getIndirect() to mean that the argument should be passed
as a pointer at the ABI level, with the ByVal argument choosing caller-copy
semantics over no-caller-copy (callee-copy-on-write) semantics. But
getIndirect(x) actually means that x is passed by pointer at the IR
level but (at least on all other targets I looked at) directly at the
ABI level. getIndirect(x, false) selects a pointer to a caller-made
copy, which is what SystemZ was aiming for.

This fixes a miscompilation of c-index-test. Structure arguments were being
passed by pointer, but no copy was being made, so a write in the callee
stomped over a caller's local variable.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196371 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
08efe365cc491ad289132cb9e286382eb0493753 01-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r195942:
------------------------------------------------------------------------
r195942 | haoliu | 2013-11-28 18:13:17 -0800 (Thu, 28 Nov 2013) | 3 lines

Fix the problem that the range check for scalar narrow shift is too wide.
E.g. the immediate value of vshrns_n_s16 is [1,16], which should be [1,8].

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196022 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
38750138231fbf4e9ef18ce93e55ee3bc6ac592d 01-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r195804:
------------------------------------------------------------------------
r195804 | mcrosier | 2013-11-26 17:46:19 -0800 (Tue, 26 Nov 2013) | 1 line

[AArch64] Add support for NEON scalar floating-point absolute difference.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195995 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
c02b18c27fa9b586291d016a99970ce78a41f4cd 01-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r195789:
------------------------------------------------------------------------
r195789 | mcrosier | 2013-11-26 14:17:51 -0800 (Tue, 26 Nov 2013) | 2 lines

[AArch64] Add support for NEON scalar floating-point to integer convert
instructions.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195992 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
2b3e50eef807c4ff4e247f4039dca8c55b8c4592 26-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195587:
------------------------------------------------------------------------
r195587 | alp | 2013-11-24 16:40:53 -0800 (Sun, 24 Nov 2013) | 11 lines

Add heading and remove leftover personal email addresses

clang's attribute support is mature by now so replace Sean's warning and email
address with a standard LLVM copyright heading.

Also remove a personal email address and credit docstring from CGObjCGNU that
shouldn't have been there.

This is in line with the LLVM developer policy introduced in r45410.
Contributors can add themselves to CREDITS.txt while active module owners are
listed in CODE_OWNERS.TXT.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195724 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
a36ef5bd79b056bff82ff30449522b9e39a4363b 25-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195556:
------------------------------------------------------------------------
r195556 | akirtzidis | 2013-11-23 10:41:35 -0800 (Sat, 23 Nov 2013) | 3 lines

[CodeGen] If there is a function definition with duplicate mangled name, emit an error instead of asserting.

rdar://15522601 & http://llvm.org/PR18031
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195623 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
cc05778672e43c2851849d12200c70e00be5ecd5 25-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195501:
------------------------------------------------------------------------
r195501 | joerg | 2013-11-22 13:34:35 -0800 (Fri, 22 Nov 2013) | 5 lines

Adjust r194296 to not apply the alias replacement for externally
available always-inline functions. This breaks libc++'s locale
implementation. Code generation for this case should be fixed, but this
is a stop gap fix for clang 3.4.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195615 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
bc5de89da7dbd930c339757b1d01cb926be768fc 25-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195329:
------------------------------------------------------------------------
r195329 | apazos | 2013-11-21 00:15:01 -0800 (Thu, 21 Nov 2013) | 5 lines

Implemented Neon scalar vdup_lane intrinsics.

Fixed scalar dup alias and added test case.


------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195614 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
f27429d06ab3cea0e97ad9878c4440dfb06d2fe7 25-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195326:
------------------------------------------------------------------------
r195326 | apazos | 2013-11-20 23:36:33 -0800 (Wed, 20 Nov 2013) | 6 lines

Implemented Neon scalar by element intrinsics.

Intrinsics implemented: vqdmull_lane, vqdmulh_lane, vqrdmulh_lane,
vqdmlal_lane, vqdmlsl_lane scalar Neon intrinsics.


------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195613 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
13ba7190c087d592104ca4f6b730a62647ee277e 22-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195367:
------------------------------------------------------------------------
r195367 | joey | 2013-11-21 09:09:05 -0800 (Thu, 21 Nov 2013) | 17 lines

Fix a crash in EmitStoreThroughExtVectorComponentLValue for vectors of odd sizes.

In OpenCL a vector of 3 elements, acts like a vector of four elements.
So for a vector of size 3 the '.hi' and '.odd' accessors, would access
the elements {2, 3} and {1, 3} respectively.
However, in EmitStoreThroughExtVectorComponentLValue we are still operating on
a vector of size 3, so we should only access {2} and {1}. We do this by checking
the last element to be accessed, and ignore it if it is out-of-bounds.

EmitLoadOfExtVectorElementLValue doesn't have a similar problem, because it does
a direct shufflevector with undef, so an out-of-bounds access just gives an undef
value.

Patch by Anastasia Stulova!



------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195386 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
846ff9f2d11efd645825f94c9c997c741d9b3248 22-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195268:
------------------------------------------------------------------------
r195268 | jholewinski | 2013-11-20 12:35:34 -0800 (Wed, 20 Nov 2013) | 3 lines

[NVPTX] Update ABI handling

For PTX, we want the target to handle struct returns directly.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195385 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
0cbb3ed856d7b9059c6b52cdeb38db2a5d1a3a66 21-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195283:
------------------------------------------------------------------------
r195283 | hans | 2013-11-20 16:15:56 -0800 (Wed, 20 Nov 2013) | 10 lines

[-cxx-abi microsoft] Emit linkonce_odr definitions for declarations of static data members with inline initializers (PR17689)

This makes Clang emit a linkonce_odr definition for 'val' in the code below,
to be compatible with MSVC-compiled code:

struct Foo {
static const int val = 1;
};

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195314 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
odeGenModule.cpp
icrosoftCXXABI.cpp
7b0fe5d62cc31a61188a20b243794b800baa3e7e 20-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195168:
------------------------------------------------------------------------
r195168 | rnk | 2013-11-19 15:23:00 -0800 (Tue, 19 Nov 2013) | 17 lines

Add a mangler entry point for TBAA rather than using RTTI directly

Summary:
RTTI is not yet implemented for the Microsoft C++ ABI and isn't expected
soon. We could easily add the mangling, but the error is what prevents
us from silently miscompiling code that expects RTTI.

Instead, add a new mangleTypeName entry point that simply forwards to
mangleName or mangleType to produce a string that isn't part of the ABI.
Itanium can continue to use RTTI names to avoid unecessary test
breakage.

This also seems like the right design. The fact that TBAA names happen
to be RTTI names is now an implementation detail of the mangler, rather
than part of TBAA.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195227 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
11a94f9ccaf29bb7cd073787d5cb6d130a38bf62 19-Nov-2013 Hao Liu <Hao.Liu@arm.com> Implement AArch64 neon instructions class SIMD lsone and SIMD lone-post.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195079 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
96b7bd42f8ffc47a28491d366d60d6d7ca7dccc8 19-Nov-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Update caller based on DIType's MDNode* ctor becoming explicit in r195055.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195056 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
dd12780e86575795fa912529a911b01e2abc4677 18-Nov-2013 Hao Liu <Hao.Liu@arm.com> Implement the newly added AArch64 ACLE functions for ld1/st1 with 2/3/4 vectors.
The functions are like: vst1_s8_x2 ...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194991 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
ce5b5f13a6c90904040b29b9eb765bb7cd736f0b 17-Nov-2013 Hal Finkel <hfinkel@anl.gov> Add -freroll-loops to enable loop rerolling

This adds -freroll-loops (and -fno-reroll-loops in the usual way) to enable
loop rerolling as part of the optimization pass manager. This transformation
can enable vectorization, reduce code size (or both).

Briefly, loop rerolling can transform a loop like this:

for (int i = 0; i < 3200; i += 5) {
a[i] += alpha * b[i];
a[i + 1] += alpha * b[i + 1];
a[i + 2] += alpha * b[i + 2];
a[i + 3] += alpha * b[i + 3];
a[i + 4] += alpha * b[i + 4];
}

into this:

for (int i = 0; i < 3200; ++i) {
a[i] += alpha * b[i];
}

Loop rerolling is currently disabled by default at all optimization levels.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194967 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
d478c0d8abeafb9d57600e4ca271a63aa8e05386 16-Nov-2013 Benjamin Kramer <benny.kra@googlemail.com> Remove unused but set variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194920 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
51cc0172a173599b769968696e20638754d1dcd6 16-Nov-2013 Ana Pazos <apazos@codeaurora.org> Implemented aarch64 Neon scalar vmulx_lane intrinsics
Implemented aarch64 Neon scalar vfma_lane intrinsics
Implemented aarch64 Neon scalar vfms_lane intrinsics

Implemented legacy vmul_n_f64, vmul_lane_f64, vmul_laneq_f64
intrinsics (v1f64 parameter type) using Neon scalar instructions.

Implemented legacy vfma_lane_f64, vfms_lane_f64,
vfma_laneq_f64, vfms_laneq_f64 intrinsics (v1f64 parameter type)
using Neon scalar instructions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194889 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
2f2fb5a304d96443fdcab70ba909346b96757d8b 15-Nov-2013 Hans Wennborg <hans@hanshq.net> Fix typo in CGRecordLayoutBuilder.cpp: s/Field/Fields/ in comment

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194863 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
7ff541687eadff6bb7d407bb0d50b0e9f8a35844 15-Nov-2013 Alp Toker <alp@nuanti.com> Remove an unused local from r194827

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

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194827 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
odeGenFunction.h
icrosoftCXXABI.cpp
54307dac5910aa02358f217773786d61fd83989d 15-Nov-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Fix test failures after addrspacecast added.

Bitcasts between address spaces are no longer allowed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194765 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f46e56bf99384b742228a9be215f38bf107c1a3b 14-Nov-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for legacy AArch32 NEON scalar shift right by immediate
and accumulate instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194732 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
758c4d86bb9b2298374fce5b3ca4a35f953f2d2e 14-Nov-2013 Joey Gouly <joey.gouly@arm.com> [OpenCL] Make sure we put string literals in the constant address space.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194717 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
624bb5e59dbcc24efeee7dff12c9b48d2b5077e9 14-Nov-2013 Kevin Qin <Kevin.Qin@arm.com> [AArch64 neon] support poly64 and relevant intrinsic functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194660 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
8137a607eebe799d95fd05226fb91119a5b054b0 14-Nov-2013 Kevin Qin <Kevin.Qin@arm.com> Implement aarch64 neon instruction class misc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194657 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
2e22f29b92768ea65ac5c26d354226ecc7509311 14-Nov-2013 Jiangning Liu <jiangning.liu@arm.com> Implement AArch64 NEON instruction set AdvSIMD (table).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194649 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
dc8e93803de63a938ca42b5de0305e75783e6884 14-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't use alias from derived dtor to base dtor at -O0.

This patch disables aliasing (and rauw) of derived dtors to base dtors at -O0.
This optimization can have a negative impact on the debug quality.

This was a latent bug for some time with local classes, but got noticed when it
was generalized and broke gdb's destrprint.exp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194618 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
6526de425dbfd368407566ff123b5bdc0924859a 13-Nov-2013 Reid Kleckner <reid@kleckner.net> -fms-extensions: Recognize _alloca as an alias for the alloca builtin

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194617 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
a665321a6885ff659ae6d75bb2ee2f083f78ddd7 13-Nov-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Tests for legacy AArch32 NEON scalar shift by immediate instructions.
A number of non-overloaded intrinsics have been replaced by thier overloaded
counterparts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194599 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
c5f4a8c3e36942ddae5dfa396df4e109de7eb555 13-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Drop windows specific handling of equivalent destructors.

Now that the relevant tests use -mconstructor-aliases and the missing
features have been implemented, we can just drop this.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194595 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
42e68d5b2355d4d4de19ea70e6dc57dfea4da247 13-Nov-2013 Timur Iskhodzhanov <timurrrr@google.com> No need to use CGM.getCXXABI() from CXXABI

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194584 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
b85a9ec6df63f30bbdef9a3975b1d31a680b15c1 13-Nov-2013 Diego Novillo <dnovillo@google.com> Add -fprofile-sample-use to Clang's driver.

This adds a new option -fprofile-sample-use=filename to Clang. It
tells the driver to schedule the SampleProfileLoader pass and passes
on the name of the profile file to use.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194567 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
610616c279681aa195cdf63b6472bc811e7d75a0 12-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Avoid producing mismatched comdats.

The problem was that given

template<typename T>
struct foo {
~foo() {}
};
template class foo<int>;

We would produce a alias, creating a comdat with D0 and D1, since the symbols
have to be weak. Another TU is not required to have a explicit template
instantiation definition or an explict template instantiation declaration and
for

template<typename T>
struct foo {
~foo() {}
};
foo<int> a;

we would produce a comdat with only one symbol in it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194520 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
081c215cca971b6b6d7988e9f48e4793ceb374dc 12-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Keep the old function order in CodeGenModule::applyReplacements.

The original decls are created when used. The replacements are created at the
end of the TU in reverse order.

This makes the original order far better for testing. This is particularly
important since the replacement logic could be used even when
-mconstructor-aliases is not used, but that would make many tests hard to read.

This is a fixed version of r194357 which handles replacing a destructor with
another which is an alias to a third one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194452 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
dda91e0c4b794b1054a6672a6267942ec72d387f 11-Nov-2013 Akira Hatanaka <ahatanaka@mips.com> [mips] Partially revert r193640. Stack alignment should not be determined by
the floating point register mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194426 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
47a2ab904faf4bbf3a97fc7172c549db1c1f3090 11-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Fix pr17875.

The assert this patch deletes was valid only when aliasing D2 to D1, not when
looking at a base class. Since the assert was in the path where we had already
decided to not produce an alias, just drop it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194411 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
9473c1945f9f1dfa143e172622f16e4264e2628b 11-Nov-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar floating-point convert to fixed-point instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194395 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
e7baa02fc3dd3ce0cc0ba0a321367badb36c5e8c 11-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert "Keep the old function order in CodeGenModule::applyReplacements."

This reverts commit r194357.

Debugging a cast failure during bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194358 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
90f535f3f6d57403ce3d9177745900b2d015dcee 10-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Keep the old function order in CodeGenModule::applyReplacements.

The original decls are created when used. The replacements are created at the
end of the TU in reverse order.

This makes the original order far better for testing. This is particularly
important since the replacement logic could be used even when
-mconstructor-aliases is not used, but that would make many tests hard to read.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194357 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
471b52aaab1d175ddad7c24d825dbf0582a1767e 10-Nov-2013 Benjamin Kramer <benny.kra@googlemail.com> Avoid double StringMap lookups. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194355 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6e84e92f72f0634cf9f43767444d48dcf99c0121 09-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't emit an internal destructor that is identical to an external one.

It is not safe to emit alias to undefined (not supported by ELF or COFF), but
it is safe to rauw when the alias would have been internal or linkonce_odr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194307 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
1b9c0248527cb13638c80939c4029ba1197d7599 09-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Use rauw for all discardable aliases, not just linkonce_odr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194296 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
c56991755e6799f1f733d02f7a98d3159e94c185 09-Nov-2013 Nick Lewycky <nicholas@mxc.ca> Remove an incorrect optimization inside Clang's IRGen. Its check to determine
whether we can safely lower a conditional operator to select was insufficient.
I've left a large comment in place to explaining the sort of problems that this
transform can encounter in clang in the hopes of discouraging others from
reimplementing it wrongly again in the future. (The test should also help with
that, but it's easy to work around any single test I might add and think that
your particular implementation doesn't miscompile any code.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194289 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
0171c6b348815df326a063c7e78eb81b7347fa25 08-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> If a linkonce_odr dtor/ctor is identical to another one, just rauw.

Unlike an alias a rauw is always safe, so we don't need to avoid this
optimization when the replacement is not know to be available in every TU.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194288 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
562d45ce29e8904e686e4caf18b8e6c4d6d3798d 08-Nov-2013 Will Dietz <wdietz2@illinois.edu> ubsan: Only emit constants for filenames and type descriptors once.

Produces neater IR in significantly less time.

(~18% faster -O0 compile time for sqlite3 with -fsanitize=undefined)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194231 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenModule.h
40aa366f994f7b2c103e94f903a34226b4b8f06b 07-Nov-2013 Timur Iskhodzhanov <timurrrr@google.com> Minor refinement of VTableBuilder.h: fix wrong indentation, rename a struct field with a more appropriate name

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194202 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
bafa74f360cb3ec82fa8c688845330f491d167fd 07-Nov-2013 David Majnemer <david.majnemer@gmail.com> [-fms-extensions] Add support for __FUNCDNAME__

Summary:
Similar to __FUNCTION__, MSVC exposes the name of the enclosing mangled
function name via __FUNCDNAME__. This implementation is very naive and
unoptimized, it is expected that __FUNCDNAME__ would be used rarely in
practice.

Reviewers: rnk, rsmith, thakis

CC: cfe-commits, silvas

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194181 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
e6d509f2e09698df4e334b77596ca40e4899b2e4 06-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Fix the -cxx-abi microsoft -mconstructor-aliases combination.

On the microsoft ABI clang is producing one weak_odr and one linkonce_odr
destructor, which is reasonable since only one is required.

The fix is simply to move the assert past the special case treatment of
linkonce_odr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194158 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
58b6db76adab8dee2e64fbc300360f9b46c561ba 06-Nov-2013 Timur Iskhodzhanov <timurrrr@google.com> Fix PR17738 - add support for vtordisp thunks when using -cxx-abi microsoft

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194132 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
icrosoftCXXABI.cpp
bf3bc5d37eff88b578d5990f507a87db33f30a6e 06-Nov-2013 Jiangning Liu <jiangning.liu@arm.com> Implement AArch64 Neon instruction set Perm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194124 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
9f2b0f8bb6fa976c5da9a62d8e69f35ccac7a42e 06-Nov-2013 Jiangning Liu <jiangning.liu@arm.com> Implement AArch64 Neon instruction set Bitwise Extract.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194119 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
61a0a7519ee0d26334d30a001501b8c443d36975 05-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Produce direct calls instead of alias to linkonce_odr functions.

This is a small optimization on linux, but should help more on windows
where msvc only outputs one destructor if there would be two identical ones.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194095 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
25009d468a0221f4e2a4d9c789720dde6167d4b7 05-Nov-2013 Jiangning Liu <jiangning.liu@arm.com> Implement AArch64 Neon Crypto instruction classes AES, SHA, and 3 SHA.


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194082 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDebugInfo.cpp
GRTTI.cpp
GVTT.cpp
GVTables.cpp
GVTables.h
odeGenModule.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
icrosoftVBTables.cpp
3cebc73895daccea85984d8881b5b45c8f8df9c6 05-Nov-2013 Richard Smith <richard-llvm@metafoo.co.uk> C++1y sized deallocation: if we have a use, but not a definition, of a sized
deallocation function (and the corresponding unsized deallocation function has
been declared), emit a weak discardable definition of the function that
forwards to the corresponding unsized deallocation.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194055 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
583f6de423aa42c8a4894cc64e72036484e6343b 05-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert "Produce direct calls instead of alias to linkonce_odr functions."

This reverts commit r194046.
Debugging a bootstrap issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194047 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
0f0f6f1d2994b6da9c347ffb9740c4eea81ff6bc 05-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Produce direct calls instead of alias to linkonce_odr functions.

This is a small optimization on linux, but should help more on windows
where msvc only outputs one destructor if there would be two identical ones.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194046 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
22229d6822324a42913d25f256045dbf348a53e9 05-Nov-2013 Kevin Qin <Kevin.Qin@arm.com> Implemented aarch64 neon intrinsic vcopy_lane with float type.

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

With this patch we produce alias for cases like

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194000 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVTables.cpp
odeGenModule.h
cbefd402338f6de100acf2d05ede553a0d009d3c 04-Nov-2013 Justin Bogner <mail@justinbogner.com> CodeGen: Use EmitBranchOnBool when generating For and CXXForRange

A while ago EmitForStmt was changed to explicitly evaluate the
condition expression and create a branch instead of using
EmitBranchOnBool, so that the condition expression could be used for
some cleanup logic. The cleanup stuff has since been reorganized, and
this is no longer necessary.

In EmitCXXForRange, the evaluated condition was never used for
anything else. The logic was presumably modeled on EmitForStmt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193994 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
fd93e4a31b1c1a2c0ec8891e4560b61fcdc0d926 04-Nov-2013 Justin Bogner <mail@justinbogner.com> CodeGen: Move an initialization away from an unrelated comment

An initialization somehow found its way in between a comment and the
block of code the comment is about. Moving the initialization makes
this less confusing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193993 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
6d61978fa2c07cb1311bb29f45481cf3f4dbb887 31-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar fixed-point convert to floating-point instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193817 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
f42727215f9fa38175d2e84a938c84122cd1e811 31-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar shift immediate instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193791 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
723ceadd234bc55964c5981c9de5e4cd29bd7902 31-Oct-2013 Rui Ueyama <ruiu@google.com> Use StringRef::endswith_lower. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193788 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
cdd7a96a8ee9664873492daf05e1db5e42dcf976 31-Oct-2013 Mark Lacey <mark.lacey@apple.com> Fix Windows build by including CGFunctionInfo.h.

CodeGenTypes.h instantiates llvm::FoldingSet<> with CGFunctionInfo,
and VC++ doesn't like the static_cast from FoldingSetImpl::Node* to
CGFunctionInfo* since it hasn't seen the definition of CGFunctionInfo
and that it inherits from FoldingSetImpl::Node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193722 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTypes.h
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
BIInfo.h
GAtomic.cpp
GBuiltin.cpp
GCall.cpp
GCall.h
GClass.cpp
GDecl.cpp
GExprCXX.cpp
GObjC.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GVTables.cpp
MakeLists.txt
odeGenABITypes.cpp
odeGenFunction.cpp
odeGenTypes.cpp
argetInfo.cpp
564020954e9eb01293d90802c89a02f87301e095 30-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar floating-point compare instructions.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193679 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GVTables.cpp
taniumCXXABI.cpp
icrosoftCXXABI.cpp
58656de61dd044410ad2e9f36b20dfd988400120 30-Oct-2013 Warren Hunt <whunt@google.com> Minor efficiency refactor related to 193661. No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193665 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
1f600171fdd68568507a77291637dd5173dd0885 30-Oct-2013 Warren Hunt <whunt@google.com> Fixing code gen to handle microsoft layouts for which size % alignment
!= 0



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193661 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
550ed2077e11ac183380478769c8ddc932ce3168 29-Oct-2013 Akira Hatanaka <ahatanaka@mips.com> [mips] Align the stack to 16-bytes for -mfp64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193640 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
7ebd9538729c38e2b8ed71a38614cbc2be941f3d 29-Oct-2013 Akira Hatanaka <ahatanaka@mips.com> [mips] Use the distance between the current argument's starting address and
the previous argument's ending address to compute the type of the padding
argument.

No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193638 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
0e4f5598fedc333a05c0611fe3ad46266f5e1b5f 27-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> Fix the inconsistent order of parameters in the GetVBaseOffsetFromVBPtr definition and declaration

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193505 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.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
odeGenTypes.cpp
odeGenTypes.h
3da9a8ff0ec906d25f93a9dadf046533d0d8d5de 24-Oct-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC IRGen. Replace _objc_empty_vtable pointer in Objective-C
class metadata for certain deployment targets. // rdar://14802916


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193359 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
69170e6e41e72c84fe5303540c1aa7ca9944ff18 23-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> Split -fsanitize=bounds to -fsanitize=array-bounds (for the frontend-inserted
check using the ubsan runtime) and -fsanitize=local-bounds (for the middle-end
check which inserts traps).

Remove -fsanitize=local-bounds from -fsanitize=undefined. It does not produce
useful diagnostics and has false positives (PR17635), and is not a good
compromise position between UBSan's checks and ASan's checks.

Map -fbounds-checking to -fsanitize=local-bounds to restore Clang's historical
behavior for that flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193205 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
GExpr.cpp
GExprScalar.cpp
d205498c83c1bba1004ae41299ad7138881b9480 22-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> New fix for pr17535.

This is a fixed version of r193161. In order to handle

void foo() __attribute__((alias("bar")));
void bar() {}
void zed() __attribute__((alias("foo")));

it is not enough to delay aliases to the end of the TU, we have to do two
passes over them to find if they are defined or not.

This can be implemented by producing alias as we go and just doing the second
pass at the end. This has the advantage that other parts of clang that were
expecting alias to be processed in order don't have to be changed.

This patch also handles cyclic aliases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193188 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
6d87e65b8fd01b36c7d3dd121462cb95f94404d6 22-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> Use GEPs correctly when adjusting this in MicrosoftCXXABI

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193176 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
87017a781f9e2d70a0478abaae26ba486f6e717e 22-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert "This patch causes clang to reject alias attributes that point to undefined names. For example, with this patch we now reject"

This reverts commit r193161.

It broke

void foo() __attribute__((alias("bar")));
void bar() {}
void zed() __attribute__((alias("foo")));

Looks like we have to fix pr17639 first :-(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193162 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
odeGenModule.cpp
odeGenModule.h
e37bf44c8012f36f900955d8513e03791803045e 22-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> This patch causes clang to reject alias attributes that point to undefined
names. For example, with this patch we now reject

void f1(void) __attribute__((alias("g1")));

This patch is implemented in CodeGen. It is quiet a bit simpler and more
compatible with gcc than implementing it in Sema. The downside is that the
errors only fire during -emit-llvm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193161 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
odeGenModule.cpp
odeGenModule.h
921ac4d6dfab47090b167dc092133d747a18c71a 21-Oct-2013 Yaron Keren <yaron.keren@gmail.com> Fix string assignment, David Blaikie suggestion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193116 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b914e87377fd4d7642f544000a79f8648c6f06c9 20-Oct-2013 Peter Collingbourne <peter@pcc.me.uk> Implement function type checker for the undefined behavior sanitizer.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193058 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCUDARuntime.cpp
GExpr.cpp
GExprCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
argetInfo.cpp
argetInfo.h
4553a858e46299955333babfa052a512682869fd 18-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar extract narrow instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192971 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
fa2264aab19329fb3023daa046d15e749556024a 17-Oct-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Error out on virtual function memptrs

These are uncommon and this is better than miscompiling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192923 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
d867422c86914e055b8772ec1f22b349e15de94b 17-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar three register different instruction
class. The instruction class includes the signed saturating doubling
multiply-add long, signed saturating doubling multiply-subtract long, and
the signed saturating doubling multiply long instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192909 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
bc6509175e1ce5cc1b48d1b97ac8d23d8b74167c 17-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Rename some functions for consistency.

Every other function in Redeclarable.h was using Decl instead of Declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192900 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a7c8b10c35671a19f01241c1d8aff07260597dbf 17-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> Follow-up to r192822: fix Clang assertion when building with -fexceptions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192875 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
2e3fd942b6ba3539f53512a005270f97e09f1824 17-Oct-2013 Eric Christopher <echristo@gmail.com> Add the context that a function was created in as the context for the
function, not the context of the context.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192862 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
cced97c345843a41ff68c9536bf54a0dfb772846 16-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar negate instruction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192845 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
567fd23e1e108c8b3441ea01dd3e7453ea04acff 16-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar absolute value instruction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192844 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
9686f1234e1b9a44270452477e6690ccadcd204a 16-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Emit a .ident saying that clang produced this file.

Patch by Katya Romanova.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192832 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
82552742a1002cf1408d6f371efc9cc6a9f2d7cc 16-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> [-cxx-abi microsoft] Fix this argument/parameter offsets for virtual destructors in the presence of virtual bases

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192822 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
icrosoftCXXABI.cpp
b563488fb55611a1889762907e1f66cc72eb7b5c 16-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> Update comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192807 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
a48c4a87034a9478b73c25dada9921d1aa16d318 16-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar signed saturating accumulated of unsigned
value and unsigned saturating accumulate of signed value instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192801 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
89fecb519558eed4cf9e8375af62c10367ed18ba 15-Oct-2013 Eric Christopher <echristo@gmail.com> Reflow slightly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192736 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
03c8276825ee44d29475023455a6888b73225ea4 15-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar signed saturating absolute value and
scalar signed saturating negate instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192734 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
42090d6d786accb3551097f0ef1f15d44713982c 15-Oct-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Fix assert in unspecified inheritance memptr emission

If a class is using the unspecified inheritance model for member
pointers and later we find the class is defined to use single
inheritance, zero out the vbptr offset field of the member pointer when
it is formed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192664 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
ad40008ed9e5f4d23972d09386997da5d1a835ee 14-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar integer compare instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192597 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
ed9967eb7eff00f5ce61945540c5869559669408 14-Oct-2013 Andy Gibbs <andyg1001@hotmail.co.uk> Fixed "ArgSize may be used uninitialised" error when compiling with gcc.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192496 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
b2969b1e50580344891a98f5b241f8351fe371cf 11-Oct-2013 Warren Hunt <whunt@google.com> Adds Microsoft compatiable C++ record layout code to clang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192494 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
icrosoftVBTables.cpp
d6b52974a74b1819f62a034a6a4939e8d00a04bd 11-Oct-2013 Eric Christopher <echristo@gmail.com> Remove extra braces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192473 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
645e6fd1ba47f57b523d10c04045c142195a276e 11-Oct-2013 Robert Lytton <robert@xmos.com> XCore : Fix bug in XCoreABIInfo::EmitVAArg()

Incorrect handling of 'double' and 'long long int'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192436 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
2102a1dba460c99f97a0fdf1e5aee8c685e29ff8 11-Oct-2013 Kevin Qin <Kevin.Qin@arm.com> Implemented aarch64 SIMD copy related ACLE intrinsic :
vget_lane, vset_lane, vcopy_lane, vcreate, vdup_n, vdup_lane, vmov_n.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192411 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
c3f7fd67c8431ab1494f2d14725f5da03554365b 10-Oct-2013 Mark Lacey <mark.lacey@apple.com> Make CodeGenTypes data members private.

No functionality differences.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192390 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenTypes.h
5610fbdb9c257b0b0c9589f6d6cedb58ec397a30 10-Oct-2013 Hao Liu <Hao.Liu@arm.com> Implement AArch64 vector load/store multiple N-element structure class SIMD(lselem).
Including following 14 instructions:
4 ld1 insts: load multiple 1-element structure to sequential 1/2/3/4 registers.
ld2/ld3/ld4: load multiple N-element structure to sequential N registers (N=2,3,4).
4 st1 insts: store multiple 1-element structure from sequential 1/2/3/4 registers.
st2/st3/st4: store multiple N-element structure from sequential N registers (N = 2,3,4).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192362 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
db5cb0fa68313a43b12e9ad0285e430706fc8328 10-Oct-2013 Tim Northover <tnorthover@apple.com> Revert "Implement AArch64 vector load/store multiple N-element structure class SIMD(lselem). "

This reverts commit r192351. The LLVM side broke the build and the Clang tests
will inevitably fail without it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192356 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
dbd0900ac3de45ac86fe87453a946096f2f8ef2b 10-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert "Use aliases for more constructors and destructors."

This reverts commit r192300.

The change itself looks correct, but it found issues on how we handle aliases
in llvm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192353 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
58b6ccfc8ef7be28bf081c1fd701e60b1f12fe17 10-Oct-2013 Hao Liu <Hao.Liu@arm.com> Implement AArch64 vector load/store multiple N-element structure class SIMD(lselem).
Including following 14 instructions:
4 ld1 insts: load multiple 1-element structure to sequential 1/2/3/4 registers.
ld2/ld3/ld4: load multiple N-element structure to sequential N registers (N=2,3,4).
4 st1 insts: store multiple 1-element structure from sequential 1/2/3/4 registers.
st2/st3/st4: store multiple N-element structure from sequential N registers (N = 2,3,4).

E.g. ld1(3 registers version) will load 32-bit elements {A, B, C, D, E, F} sequentially into the three 64-bit vectors list {BA, DC, FE}.
E.g. ld3 will load 32-bit elements {A, B, C, D, E, F} into the three 64-bit vectors list {DA, EB, FC}.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192351 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
5bd0d44c8da50f3a629c90fee92ce5cf1e31c9ff 09-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> Initialize vtorDisp in class constructors and destructors

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192312 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GClass.cpp
icrosoftCXXABI.cpp
5720858b1b0dec103022ef1c6c39eacf9be0435f 09-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Use aliases for more constructors and destructors.

With this patch we produce alias for cases like

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

It is safe to use aliases to weak symbols, as long and the alias itself is also
weak.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192285 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GVTables.cpp
GVTables.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
3cb333070d35c9a6843e4211c9a74322f6c126ec 09-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar floating-point reciprocal estimate,
reciprocal exponent, and reciprocal square root estimate instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192243 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
6d048e1a9768b594513e2ec7a6d3579787eb2505 08-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar signed/unsigned integer to floating-point
convert instructions.

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192220 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GVTables.cpp
GVTables.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
feba9f2bdc5711894e452dfc67c9679482fbf897 08-Oct-2013 Manman Ren <manman.ren@gmail.com> TBAA: use the same format for scalar TBAA and struct-path aware TBAA.

An updated version of r191586 with bug fix.

Struct-path aware TBAA generates tags to specify the access path,
while scalar TBAA only generates tags to scalar types.

We should not generate a TBAA tag with null being the first field. When
a TBAA type node is null, the tag should be null too. Make sure we
don't decorate an instruction with a null TBAA tag.

Added a testing case for the bug reported by Richard with -relaxed-aliasing
and -fsanitizer=thread.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192145 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenModule.cpp
odeGenTBAA.cpp
8dd4baacf584b1fc7b0e2c79a0b8b197a4fb5fab 07-Oct-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Fix objectsize tests after r192117

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192120 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
48f98fe7c1374bf416403bf82b29d4fc11011057 07-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar arithmetic instructions:
SQDMULH, SQRDMULH, FMULX, FRECPS, and FRSQRTS.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192112 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
9a6002a09bd0f920ee370360dfe231eba256b37a 06-Oct-2013 Sylvestre Ledru <sylvestre@debian.org> remove a dead assignment. The variables are set just right after. Found by scan-build http://buildd-clang.debian.net/scan-build/

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192061 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
2363072da26da25009bf61c3d9d056a028d4d720 06-Oct-2013 Mark Lacey <mark.lacey@apple.com> Pass CGCXXABIs around directly.

In functions that only need to use the CGCXXABI member of a CodeGenTypes
class, pass that reference around directly rather than a reference to
a CodeGenTypes class.

This makes the actual dependence on CGCXXABI clear at the call sites.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192052 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
argetInfo.cpp
0391691f86fd2a75ef2413d0272bfaf920d0e2b5 05-Oct-2013 Jiangning Liu <jiangning.liu@arm.com> Implement aarch64 neon instruction set AdvSIMD (Across).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192029 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
7f0ff70c391afeb7811b7ddcb06bfbbd5c6cf8f9 04-Oct-2013 Amaury de la Vieuville <amaury.dlv@gmail.com> Do not emit undefined lsrh/ashr for NEON shifts

These IR instructions are undefined when the amount is equal to operand
size, but NEON right shifts support such shifts. Work around that by
emitting a different IR in these cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191953 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
0aa1a88e19235574481e46e9e6e9ce66a9e6624f 04-Oct-2013 Jiangning Liu <jiangning.liu@arm.com> Implement aarch64 neon instruction set AdvSIMD (3V elem).


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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191878 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVTables.cpp
taniumCXXABI.cpp
icrosoftCXXABI.cpp
icrosoftVBTables.cpp
2529660fe6c9c40a69dd3d71c0a511e72579eaf2 02-Oct-2013 Mark Lacey <mark.lacey@apple.com> Use the CGCXXABI member on CodeGenTypes.

CodeGenTypes already has a reference to a CGCXXABI. Use this directly
rather than going through CodeGenModule to get to the same information.

This is consistent with other references to CGCXXABI in CodeGenTypes
functions defined in CGCall.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191854 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
argetInfo.cpp
9a3be4cfdf7858b2467f57448ab99f72a2926b35 02-Oct-2013 Timur Iskhodzhanov <timurrrr@google.com> Fix crashes when creating global instances of polymorphic classes without fields

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191839 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
594e193073fe36b9ecbce9a105c269e20f82b3c9 02-Oct-2013 Joey Gouly <joey.gouly@arm.com> [ARM] Add a builtin to allow you to use the 'sevl' instruction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191816 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
c53143cc5f4edbd0490eefa9ecc1de4f9c24d8dd 02-Oct-2013 Nick Lewycky <nicholas@mxc.ca> Fix build breakage, missed committing a chunk of a patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191809 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
4ee7dc2369c1f0257a73b2e83a7d38fdebdd9176 02-Oct-2013 Nick Lewycky <nicholas@mxc.ca> Thread a SourceLocation into the EmitCheck for "load_invalid_value". This occurs
when scalars are loaded / undergo lvalue-to-rvalue conversion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191808 91177308-0d34-0410-b5e6-96231b3b80d8
GAtomic.cpp
GBlocks.cpp
GCall.cpp
GClass.cpp
GDecl.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GStmt.cpp
GVTables.cpp
odeGenFunction.cpp
odeGenFunction.h
5d4a7559df106959dd721744c8971547f0f09097 01-Oct-2013 Nick Lewycky <nicholas@mxc.ca> No functionality change. Reflow lines that could fit on one line. Break lines
that had 80-column violations. Remove spurious emacs mode markers on .cpp files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191797 91177308-0d34-0410-b5e6-96231b3b80d8
GAtomic.cpp
GCXXABI.cpp
GCall.cpp
GExpr.cpp
GExprCXX.cpp
GObjC.cpp
GObjCGNU.cpp
64eac850a04e33f5b37a4b17ed7e3a18f6edad82 01-Oct-2013 Tim Northover <tnorthover@apple.com> Implement ARM GNU-style interrupt attribute

This attribute allows users to use a modified C or C++ function as an ARM
exception-handling function and, with care, to successfully return control to
user-space after the issue has been dealt with.

rdar://problem/14207019

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191769 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
1596e5b368ddbdc4b9c3ecab75115b179b6e5391 01-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> Revert r191586 and r191695. They cause crashes when building with
-relaxed-aliasing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191725 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenTBAA.cpp
d6992ab33b7113e1bd7af51c0c52d17c23706c01 29-Sep-2013 Faisal Vali <faisalv@yahoo.com> Implement conversion to function pointer for generic lambdas without captures.

The general strategy is to create template versions of the conversion function and static invoker and then during template argument deduction of the conversion function, create the corresponding call-operator and static invoker specializations, and when the conversion function is marked referenced generate the body of the conversion function using the corresponding static-invoker specialization. Similarly, Codegen does something similar - when asked to emit the IR for a specialized static invoker of a generic lambda, it forwards emission to the corresponding call operator.

This patch has been reviewed in person both by Doug and Richard. Richard gave me the LGTM.

A few minor changes:
- per Richard's request i added a simple check to gracefully inform that captures (init, explicit or default) have not been added to generic lambdas just yet (instead of the assertion violation).
- I removed a few lines of code that added the call operators instantiated parameters to the currentinstantiationscope. Not only did it not handle parameter packs, but it is more relevant in the patch for nested lambdas which will follow this one, and fix that problem more comprehensively.
- Doug had commented that the original implementation strategy of using the TypeSourceInfo of the call operator to create the static-invoker was flawed and allowed const as a member qualifier to creep into the type of the static-invoker. I currently kludge around it - but after my initial discussion with Doug, with a follow up session with Richard, I have added a FIXME so that a more elegant solution that involves the use of TrivialTypeSourceInfo call followed by the correct wiring of the template parameters to the functionprototypeloc is forthcoming.

Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191634 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
8a06d8fdefce6b4ed4438bb80f60cdd2e979a94f 28-Sep-2013 Manman Ren <manman.ren@gmail.com> TBAA: use the same format for scalar TBAA and struct-path aware TBAA.

Struct-path aware TBAA generates tags to specify the access path,
while scalar TBAA only generates tags to scalar types.


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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191523 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GClass.cpp
GDebugInfo.cpp
GExprConstant.cpp
GVTT.cpp
GVTables.cpp
GVTables.h
odeGenModule.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
fe16aa31fdfaad4c38aed443d853af293714f1c4 27-Sep-2013 David Majnemer <david.majnemer@gmail.com> AST: Handle qualified array types in typeid() expressions

The intent of getTypeOperand() was to yield an unqualified type.
However QualType::getUnqualifiedType() does not strip away qualifiers on
arrays.

N.B. This worked fine when typeid() was applied to an expression
because we would inject as implicit cast to the unqualified array type
in the AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191487 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
GExprConstant.cpp
35969ea5c5a117c1131edee1866e47e2a33f07bb 26-Sep-2013 Adrian Prantl <aprantl@apple.com> Debug info: Fix a crash when trying to construct a type with redundant
ownership qualifiers.
Fixes rdar://problem/14990656.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191463 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
fad9e13f3cb85198f0ee5af620ba81cd78574faa 26-Sep-2013 Faisal Vali <faisalv@yahoo.com> Implement a rudimentary form of generic lambdas.

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

As an example of what compiles through this commit:

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

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

Please see attached tests for more examples.

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



Some implementation notes:

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

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

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

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

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

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

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

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

Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191453 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
0cd6bd62f3f7ee42f08ad130395ac65564768990 26-Sep-2013 Benjamin Kramer <benny.kra@googlemail.com> Mark an impossible path as unreachable to pacify GCC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191436 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
146feb007d95d49d49da3490f29d434d9b504089 26-Sep-2013 Benjamin Kramer <benny.kra@googlemail.com> Remove tabs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191427 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
f7b9a5a37fc9d1f6356afa14865129fb4a617932 24-Sep-2013 NAKAMURA Takumi <geek4civic@gmail.com> CGBuiltin.cpp: Prune a stray default: label. [-Wcovered-switch-default]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191277 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
aee8e168112a3cbb6282ab4c6b5ae63933053ebf 24-Sep-2013 Jiangning Liu <jiangning.liu@arm.com> Initial support for Neon scalar instructions.

Patch by Ana Pazos.

1.Added support for v1ix and v1fx types.
2.Added Scalar Pairwise Reduce instructions.
3.Added initial implementation of Scalar Arithmetic instructions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191264 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
440a5f49133307745de7cc92a44d53088cf47c26 24-Sep-2013 Eli Friedman <eli.friedman@gmail.com> Add _mm_stream_si64 intrinsic.

While I'm here, also fix the alignment computation for the whole family of
intrinsics.

PR17298.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191243 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
39232cd098f94e9e5e850eb2adb3a97372c6cf38 19-Sep-2013 Adrian Prantl <aprantl@apple.com> get rid of extra parentheses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190962 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
95d3d1a9b2e5177d793f04cebfd1df01a435df44 19-Sep-2013 Adrian Prantl <aprantl@apple.com> Debug info: Explicitly set the DIVariable::isIndirect() flag for VLAs.
This allows us to get rid of an ugly hack in the backend.
Paired commit with LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190960 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
520ec1e553ffa955276462e4230c1b128fa433af 18-Sep-2013 Joey Gouly <joey.gouly@arm.com> [ARMv8] Add builtins for CRC instructions.

Patch by Bradley Smith!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190931 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
414a1bdbdaf250e0488589f12865c8961831b65d 18-Sep-2013 Hal Finkel <hfinkel@anl.gov> Add the intrinsic __builtin_convertvector

LLVM supports applying conversion instructions to vectors of the same number of
elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to
cause such instructions to be generated when using builtin vector types.

C-style casting on vectors is already defined in terms of bitcasts, and so
cannot be used for these conversions as well (without leading to a very
confusing set of semantics). As a result, this adds a __builtin_convertvector
intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is
intended to aid the creation of vector intrinsic headers that create generic IR
instead of target-dependent intrinsics (in other words, this is a generic
_mm_cvtepi32_ps). As noted in the documentation, the action of
__builtin_convertvector is defined in terms of the action of a C-style cast on
each vector element.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190915 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
98592d9c4dff79480fdc25b83988de03f912b647 16-Sep-2013 Reid Kleckner <reid@kleckner.net> Emit an error when attempting to generate IR for SEH __try

Currently we silently omit the code in the try and finally bodies, which
is pretty bad. This way we fail loudly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190809 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GStmt.cpp
odeGenFunction.h
57b1da1588a3f5785ad8bd5d9f2d795d685e1058 14-Sep-2013 Cameron Esfahani <dirty@apple.com> Clean up some Triple usage in clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190737 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
argetInfo.cpp
8b6aaa975fabb619e72c9b7be1de52f8e1d22e5c 13-Sep-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: omit debug info for friends

GCC ToT doesn't do this & it's worth about 3.2% on Clang's DWO file size
with Clang. Some or all of this may be due to things like r190715 which
could have source fixes/improvements, but it's not clear that's the case
and that doesn't help other source bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190716 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
ce4ad40100573008d013d2b9d3104c218ea34c2a 13-Sep-2013 Hal Finkel <hfinkel@anl.gov> Restore the sqrt -> llvm.sqrt mapping in fast-math mode

This restores the sqrt -> llvm.sqrt mapping, but only in fast-math mode
(specifically, when the UnsafeFPMath or NoNaNsFPMath CodeGen options are
enabled). The @llvm.sqrt* intrinsics have slightly different semantics from the
libm call, specifically, they are undefined when given a non-zero negative
number (the libm calls will always return NaN for any negative number).

This mapping was removed in r100613, and replaced with a TODO, but at that time
the fast-math flags were not yet implemented. Now that we have these, restoring
this mapping is important because it will enable autovectorization of sqrt
calls in loops (at least in fast-math mode).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190646 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
2bb6dad4a44569dd2f86e7500a5ba21680718736 11-Sep-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Fix 2 cases of uninitialized reads of an invalid PresumedLoc.

The code in CGExpr was added back in 2012 (r165536) but not exercised in tests
until recently.

Detected on the MemorySanitizer bootstrap bot.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190521 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
62a3bbaac79f6e1b242ae3914e3ed4615f09302d 11-Sep-2013 Nick Lewycky <nicholas@mxc.ca> Disable the bool and enum sanitizers when emitting the implicitly-defined copy
constructor, copy assignment operator and move assignment operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190481 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
c5c6fa78fd0e6a15c5611e8a059359054cfbf9d5 10-Sep-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Mangle dynamic initializer stubs the same way MSVC does

Summary: Dynamic initializers are mangled as ??__E <name> YAXXZ.

Reviewers: timurrrr

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190434 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
942f9fe11d3a9583eef6bc4ca2549b1f0d1694da 10-Sep-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Implement guard variables for static initialization

Static locals requiring initialization are not thread safe on Windows.
Unfortunately, it's possible to create static locals that are actually
externally visible with inline functions and templates. As a result, we
have to implement an initialization guard scheme that is compatible with
TUs built by MSVC, which makes thread safety prohibitively difficult.

MSVC's scheme is that every function that requires a guard gets an i32
bitfield. Each static local is assigned a bit that indicates if it has
been initialized, up to 32 bits, at which point a new bitfield is
created. MSVC rejects inline functions with more than 32 static locals,
and the externally visible mangling (?_B) only allows for one guard
variable per function.

On Eli's recommendation, I used MangleNumberingContext to track which
bit each static corresponds to.

Implements PR16888.

Reviewers: rjmccall, eli.friedman

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190427 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
GDeclCXX.cpp
taniumCXXABI.cpp
icrosoftCXXABI.cpp
7fda20777785ae0076aa9f1c49ff6639cb7299ef 10-Sep-2013 Nick Lewycky <nicholas@mxc.ca> Generate code for the move assignment operator using memcpy, the same as we do
for the copy assignment operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190385 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
8495379bd6127dac2c39a6dd7840d95bb3a9aaa3 09-Sep-2013 Benjamin Kramer <benny.kra@googlemail.com> CGDebugInfo: Hoist string allocation in a helper function. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190314 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
e575359c34a9248c55ec0c03a8fc945f1ee4cb01 09-Sep-2013 Benjamin Kramer <benny.kra@googlemail.com> Fix constructor-related typos.

Noticed by Roman Divacky.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190311 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDebugInfo.cpp
GDebugInfo.h
097a4b487897ca29f0f371c81b6a8b6c1ca599e4 09-Sep-2013 Jiangning Liu <jiangning.liu@arm.com> Implement aarch64 neon instruction set AdvSIMD (3V Diff), covering the following 26 instructions,

SADDL, UADDL, SADDW, UADDW, SSUBL, USUBL, SSUBW, USUBW, ADDHN, RADDHN, SABAL, UABAL, SUBHN, RSUBHN, SABDL, UABDL, SMLAL, UMLAL, SMLSL, UMLSL, SQDMLAL, SQDMLSL, SMULL, UMULL, SQDMULL, PMULL



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190289 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
c23b1db6268c8e7ce64026d57d1510c1aac200a0 08-Sep-2013 Manman Ren <manman.ren@gmail.com> Debug Info: pass in DIScope instead of DIDescriptor in createFieldType.

Improve readability. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190268 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
0c018357b8bbb1f96bbf622a5807421e626b4228 06-Sep-2013 Alexey Bataev <a.bataev@hotmail.com> OpenMP: Data-sharing attributes analysis and clause 'shared' (fixed test threadprivate_messages.cpp)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190183 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
74341d8fd49db382e83008ecea5c0d8ff9d8b6cb 06-Sep-2013 David Blaikie <dblaikie@gmail.com> PR17046, PR17092: Debug Info assert-on-valid due to member loss when context creation recreates the item the context is created for

By removing the possibility of strange partial definitions with no
members that older GCC's produced for the otherwise unreferenced outer
types of referenced inner types, we can simplify debug info generation
and correct this bug. Newer (4.8.1 and ToT) GCC's don't produce this
quirky debug info, and instead produce the full definition for the outer
type (except in the case where that type is dynamic and its vtable is
not emitted in this TU).

During the creation of the context for a type, we may revisit that type
(due to the need to visit template parameters, among other things) and
used to end up visiting it first there. Then when we would reach the
original code attempting to define that type, we would lose debug info
by overwriting its members.

By avoiding the possibility of latent "defined with no members" types,
we can be sure than whenever we already have a type in a cache (either a
definition or declaration), we can just return that. In the case of a
full definition, our work is done. In the case of a partial definition,
we must already be in the process of completing it. And in the case of a
declaration, the completed/vtable/etc callbacks can handle converting it
to a definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190122 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
29b8b68c93008317acca212970f2e2c37fa8e874 05-Sep-2013 David Blaikie <dblaikie@gmail.com> Reapply r189013 (reverted in r189906) now that the underlying issue is fixed and tested (in r189996)

Debug info emission was tripping over an IRGen bug (fixed in r189996)
that was resulting in duplicate emission of static data members of class
templates in namespaces.

We could add more test coverage to debug info for this issue
specifically, but I think the underlying IRGen test is more targeted and
sufficient for the issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190001 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
0d520f7d2efb471e568b3449f614ea90b48ad1db 04-Sep-2013 David Blaikie <dblaikie@gmail.com> Do not emit duplicate global initializers for template static data members inside namespaces

A quirk of AST representation leads to class template static data member
definitions being visited twice during Clang IRGen resulting in
duplicate (benign) initializers.

Discovered while investigating a possibly-related debug info bug tickled
by the duplicate emission of these members & their associated debug
info.

With thanks to Richard Smith for help investigating, understanding, and
helping with the fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189996 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
912502b4996b14db31b498cb1eef2b17d7d66d57 04-Sep-2013 Hao Liu <Hao.Liu@arm.com> Inplement aarch64 neon instructions in AdvSIMD(shift). About 24 shift instructions:
sshr,ushr,ssra,usra,srshr,urshr,srsra,ursra,sri,shl,sli,sqshlu,sqshl,uqshl,shrn,sqrshr$
and 4 convert instructions:
scvtf,ucvtf,fcvtzs,fcvtzu


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189926 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
2a7002ed1e56c2b5411d8fb4ed3b63b2f9a7cdf9 04-Sep-2013 David Blaikie <dblaikie@gmail.com> Revert "DebugInfo: Remove explicit declaration-emissiong handling now that we have a more principled approach (the 'requires complete type' callback)"

This reverts commit r189013.

This is causing a segfault crash in a test case I have. Reverting while
I investigate the issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189906 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
c47063e1e647c3749b1851e42c78ac52938d2fbb 04-Sep-2013 Reid Kleckner <reid@kleckner.net> Order initializers of static data members of explicit specializations

I tried to implement this properly in r189051, but I didn't have enough
test coverage. Richard kindly provided more test cases than I could
possibly imagine and now we should have the correct condition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189898 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
dc1ac5ecf0375e002de1b1be01ccc669e7576b25 03-Sep-2013 Reid Kleckner <reid@kleckner.net> Emit uuid globals as linkonce_odr

Patch by Nico Rieck!

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

This fixes pr13124.

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

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

This leaves us with a few unpleasant options:

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

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

and

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

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

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189852 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
4367829b41e89d2f3dfae94a97af40ffa01c56c9 03-Sep-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert "OpenMP: Data-sharing attributes analysis and clause 'shared'"

This reverts commit r189795.

threadprivate_messages.cpp is faling on windows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189811 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
8f1a2db8649eb151ee620273dcf34b700176430f 03-Sep-2013 Alexey Bataev <a.bataev@hotmail.com> OpenMP: Data-sharing attributes analysis and clause 'shared'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189795 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
3b8e0b7f96164e8c49d2a833da26edd960f5da1f 30-Aug-2013 Yunzhong Gao <Yunzhong_Gao@playstation.sony.com> Revert r189649 because it was breaking sanitizer bots.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189660 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GExpr.cpp
odeGenFunction.cpp
odeGenFunction.h
51a31e1da76cc0906e4708ae15e2f7ecf1ba5f13 30-Aug-2013 Yunzhong Gao <Yunzhong_Gao@playstation.sony.com> Fixing a bug where debug info for a local variable gets emitted at file scope.

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189649 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GExpr.cpp
odeGenFunction.cpp
odeGenFunction.h
e8519c31a6ef853b627d557702ac1890f18ce2c9 30-Aug-2013 Charles Davis <cdavis5x@gmail.com> Add ms_abi and sysv_abi attribute handling.

Based on a patch by Benno Rice!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189644 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
83369bf8f6244f20ae8bfa2fcb3a556f94da27de 30-Aug-2013 Manman Ren <manman.ren@gmail.com> Debug Info: generate a unique identifier for C++ struct, class, union, and enum.

We use CXX mangler to generate unique identifier for external C++ struct,
union, class and enum. Types with unique identifier are added to retained
types by DIBuilder.

Testing cases are updated to reflect the unique identifier generated for types.
The order of MDNodes is changed because of retained types and testing cases
are updated accordingly.

Testing case debug-info-uuid.cpp now emits error with Itanium mangler, since
uuid is not yet handled in Itanium mangler. And it will check for the error
message.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189622 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
18760453868e9b831b8575ae64119b07ab4dcdf5 29-Aug-2013 Manman Ren <manman.ren@gmail.com> Debug Info: this reverts commit r189600.

We had further discussions on how to retain types, whether to do it in front end
or in DIBuilder. And we agree to do it in DIBuilder so front ends
generating unique identifier do not need to worry about retaining them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189609 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f1acc31e4586dfec00a20e82094f7ad782d50cc3 29-Aug-2013 Manman Ren <manman.ren@gmail.com> Debug Info: generate a unique identifier for C++ struct, class, union, and enum.

We use CXX mangler to generate unique identifier for external C++ struct,
union, class and enum. Types with unique identifier are added to RetainedTypes
to make sure they are treated as used even when all uses are replaced with
the identifiers.

A single type can be added to RetainedTypes multiple times. For example, both
createForwardDecl and createLimitedType can add the same type to RetainedTypes.
A set is used to avoid duplication when updating AllRetainTypes in DIBuilder.

Testing cases are updated to reflect the unique identifier generated for types.
The order of MDNodes is changed because of retained types and testing cases
are updated accordingly.

Testing case debug-info-uuid.cpp now emits error with Itanium mangler, since
uuid is not yet handled in Itanium mangler.

We choose to update RetainedTypes in clang, then at finalize(), we update
AllRetainTypes in DIBuilder. The other choice is to update AllRetainTypes
in DIBuilder when creating a DICompositeType with unique identifier. This
option requires using ValueHandle for AllRetainTypes in DIBuilder since
the created DICompositeType can be modified later on by setContainingType etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189600 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ac7c25f0cab42a34d6e6acba7afff729caf0258e 29-Aug-2013 Eric Christopher <echristo@gmail.com> 80-col.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189531 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
11fa7518cb2cf92db977ccc15f0db97307eac58c 29-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Further fix/improvements to r189494 (and LLVM r189495).

Selfhosting was crashing with the same type of problem but involving
template specializations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189530 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0a0be741f21e75556f649e7e4fcd30e905fc6e2e 28-Aug-2013 Manman Ren <manman.ren@gmail.com> Format. Thanks David for pointing it out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189521 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f332733e141905ccefe43e7fe65f9a8a4263a2f6 28-Aug-2013 Manman Ren <manman.ren@gmail.com> Debug Info: update interface for CreateEnumType and getOrCreateRecordFwdDecl.

Both functions will take a Type pointer instead of a Decl pointer. This helps
with follow-up type uniquing patches, which need the Type pointer to call
CXX mangler to generate unique identifiers.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189519 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
dd65802b1cf30d892b82c8370b96e6c94d239510 28-Aug-2013 David Blaikie <dblaikie@gmail.com> More comments for r189494.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189516 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4a68491fa179572e6b2c1364e7ff24c05110324b 28-Aug-2013 David Blaikie <dblaikie@gmail.com> Comments for r189494

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189504 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
c5761271730ab929f19facef51903c9bdf5c5d0b 28-Aug-2013 David Blaikie <dblaikie@gmail.com> PR16995: Failing to associate static members with their enclosing class

In the transition from declaration (with some members) to definition, we
were overwriting the list of members with the empty list when attaching
template parameters.

The fix is in llvm::DICompositeType::addMember (along with asserts that
cause this bug to be covered by existing Clang test cases), including
adding some asserts to catch this sort of issue which found issues fixed
in this commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189494 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3b6b5dad09d314cb8055ed7500a03c3cf3daad0f 28-Aug-2013 Tim Northover <tnorthover@apple.com> ARM: comment on why vmull intrinsic has to exist for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189464 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
6bf1e8eadd36f077cf5403d23c664129d98eaf79 28-Aug-2013 Tim Northover <tnorthover@apple.com> ARM: Emit normal IR for vaddhn/vsubhn NEON intrinsics

These operations "vector add high-half narrow" actually correspond to the
sequence:

%sum = add <4 x i32> %lhs, %rhs
%high = lshr <4 x i32> %sum, <i32 16, i32 16, i32 16, i32 16>
%res = trunc <4 x i32> %high to <4 x i16>

Now that LLVM can spot this, Clang should emit the corresponding LLVM IR.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189463 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
b1c09b913e331824da29f8017452b6171f7eccbc 28-Aug-2013 Tim Northover <tnorthover@apple.com> ARM: use vqdmull and vqadds/vqsubs to implement vqdmlal/vqdmlsl

The NEON intrinsics vqdmlal and vqdmlsl are really just combinations of a
saturating-doubling-multiply (vqdmull) and a saturating add/sub, so now that
LLVM can spot those patterns Clang should emit them instead of specialised
intrinsics.

Feature already tested by existing ARM NEON intrinsics tests.

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

This reverts commit r189320.

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

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189421 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GDebugInfo.cpp
GDeclCXX.cpp
GExpr.cpp
GVTables.cpp
odeGenFunction.h
taniumCXXABI.cpp
ef072033876e295ec5d3402f8730a3ae358ad815 28-Aug-2013 Reid Kleckner <reid@kleckner.net> Delete CC_Default and use the target default CC everywhere

Summary:
Makes functions with implicit calling convention compatible with
function types with a matching explicit calling convention. This fixes
things like calls to qsort(), which has an explicit __cdecl attribute on
the comparator in Windows headers.

Clang will now infer the calling convention from the declarator. There
are two cases when the CC must be adjusted during redeclaration:
1. When defining a non-inline static method.
2. When redeclaring a function with an implicit or mismatched
convention.

Fixes PR13457, and allows clang to compile CommandLine.cpp for the
Microsoft C++ ABI.

Excellent test cases provided by Alexander Zinenko!

Reviewers: rsmith

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189412 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
argetInfo.cpp
1f71f393e2d01f73d237e04677a82d4e0e6139ef 27-Aug-2013 Timur Iskhodzhanov <timurrrr@google.com> [-cxx-abi microsoft] Change the vdtor implicit should_call_delete argument type to int

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

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

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

With thanks to Dinesh Dwivedi for work on this PR.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189320 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
c3030bc285d90a139fb74629daadef5617283203 26-Aug-2013 David Blaikie <dblaikie@gmail.com> Simplify/clean up debug info suppression in CodeGenFunction

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189277 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDeclCXX.cpp
GObjC.cpp
GStmt.cpp
GVTables.cpp
odeGenFunction.cpp
odeGenFunction.h
15b2674896371ac2a0fe707b538a1a29dec9d8e4 26-Aug-2013 Wei Pan <wei.pan@intel.com> Handle predefined expression for a captured statement

- __func__ or __FUNCTION__ returns captured statement's parent
function name, not the one compiler generated.

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

Reviewed by bkramer



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189219 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
9581ed07dee5376002620a0cfb363c6b9e5bdd3e 26-Aug-2013 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: Unify two implementations of canDevirtualizeMemberFunctionCall.

They were mostly copy&paste of each other, move it to CodeGenFunction. Of course
the two implementations have diverged over time; the one in CGExprCXX seems to
be the more modern one so I picked that one and moved it to CGClass which feels
like a better home for it. No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189203 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
odeGenFunction.h
5db8b3138f36e11bca835881e81cc56bbd7b4fa4 26-Aug-2013 David Majnemer <david.majnemer@gmail.com> DebugInfo: Emit info for casted decls in template args

Summary:
Previously the backend wouldn't get to see the underlying GlobalValue
that corresponds to the template argument because it would be hidden by
a cast at the IR level. Instead strip the pointer casts off of the
value until we see the underlying GlobalValue.

Reviewers: dblaikie, echristo, majnemer

Reviewed By: majnemer

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189200 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
87b1f6d1901036602bcbccaeea341d175e7f900d 24-Aug-2013 David Majnemer <david.majnemer@gmail.com> DebugInfo: Emit info for constant expressions in template arguments

Summary:
This allows us to handle the general case where a non-type template
argument evaluates to a constant expression which isn't integral or a
declaration.

This fixes PR16939.

Reviewers: dblaikie, rsmith

Reviewed By: dblaikie

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189165 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
344472ebeded2fca2ed5013b9e87f81d09bfa908 23-Aug-2013 Robert Wilhelm <robert.wilhelm@gmx.net> Use pop_back_val() instead of both back() and pop_back().
No functionality change intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189112 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
fae228bccb2cbb74131d5dfbf0b021d69cd0c6fd 22-Aug-2013 Bill Wendling <isanbard@gmail.com> Only add this attribute when it's set. If it's not there, the assumption is that it's off.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189064 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
b969e84ec398fde1bb6255a05babdc23e2841101 22-Aug-2013 Reid Kleckner <reid@kleckner.net> Add a separate llvm.global_ctors entry for linkonce_odr data initializers

Summary:
These typically come from static data members of class template
specializations. This accomplishes two things:

1. May expose GlobalOpt optimizations for Itanium C++ ABI code.
2. Works toward fixing double initialization in the Microsoft C++ ABI.

CC: cfe-commits

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189022 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
472519660a3b88f5bbde8e5ba13772c903a5034e 22-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Remove explicit declaration-emissiong handling now that we have a more principled approach (the 'requires complete type' callback)

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189013 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
152b4e4652baedfceba1cd8115515629225e713f 22-Aug-2013 Manuel Klimek <klimek@google.com> Revert "Implement a rudimentary form of generic lambdas."

This reverts commit 606f5d7a99b11957e057e4cd1f55f931f66a42c7.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189004 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
ecb5819a9e64fb654d46a3b270a286cc570c58ff 22-Aug-2013 Faisal Vali <faisalv@yahoo.com> Implement a rudimentary form of generic lambdas.

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


As an example of what compiles:

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

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

Please see attached tests for more examples.

Some implementation notes:

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

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

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

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

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

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

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

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

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

Thanks!




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188977 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
55a2b3dbffefceb82bc34b5c88699e9c0a0d0b8c 22-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Require only the declaration of types only used as parameter and return types

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188962 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
312c0b6a114929d14584d82e9159462021f79ea2 21-Aug-2013 Manman Ren <manman.ren@gmail.com> Don't use mangleCXXRTTIName in TBAA for C code.

With r185721, calling mangleCXXRTTIName on C code will cause crashes.
This commit fixes crashes on C testing cases when turning on struct-path TBAA.

For C code, we simply use the Decl name without the context. This can
cause two different structs having the same name, and may cause inaccurate but
conservative alias results.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188930 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
7f918f960101a83163f63bb1e1d42c3f0787887f 21-Aug-2013 Timur Iskhodzhanov <timurrrr@google.com> [CGF] Get rid of passing redundant VTable pointer around in CodeGenFunction::InitializeVTablePointer[s]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188909 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
28bdbf0861fefb33474fddbda1d3c66ee29be2af 21-Aug-2013 Benjamin Kramer <benny.kra@googlemail.com> Sema: Use the right type for PredefinedExpr when it's in a lambda.

1. We now print the return type of lambdas and return type deduced functions
as "auto". Trailing return types with decltype print the underlying type.
2. Use the lambda or block scope for the PredefinedExpr type instead of the
parent function. This fixes PR16946, a strange mismatch between type of the
expression and the actual result.
3. Verify the type in CodeGen.
4. The type for blocks is still wrong. They are numbered and the name is not
known until CodeGen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188900 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
8f189a9911a992a5c4118c3789485a85bd96e045 21-Aug-2013 Timur Iskhodzhanov <timurrrr@google.com> Abstract out virtual calls and virtual function prologue code generation; implement them for -cxx-abi microsoft

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188870 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GCall.cpp
GClass.cpp
GExprCXX.cpp
GVTables.h
odeGenFunction.h
odeGenModule.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
5e6937bf3513d3081d149f3c84c862ca9f49762c 20-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: comment/inlining based on feedback from Eric & Adrian

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188834 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
eaacc885deefea195c5cc29b5b4d01996b9a335d 20-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Simplify/clarify propagation of typemembers between declaration and definition

Based on code review feedback from Eric Christopher (on r188739) and
Adrian Prantl (r188642).

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

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188739 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GVTables.cpp
fe0af454943374758309a1066e3304b3a56af04e 20-Aug-2013 Juergen Ributzka <juergen@apple.com> Fix last commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188724 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
3fc779191ce87cddf603e0c5bdbd225611201ff4 20-Aug-2013 Juergen Ributzka <juergen@apple.com> Simplify code by using CreateMemTemp. No functional change intended.

Reviewer: Eli

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188722 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
0a1c862914664029e3b6693e134cf3ccbf423844 19-Aug-2013 David Blaikie <dblaikie@gmail.com> PR16933: Don't try to codegen things after we've seen errors.

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

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

This reverts commit r188642.

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

Sorry Dave =(.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188687 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GVTables.cpp
acfea84369810b7e0c9fca90918b22eded9e401e 19-Aug-2013 Alexey Samsonov <samsonov@google.com> Fix -Wcovered-switch-default warning from r188664

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188672 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
276c289061e7578ef819f66dec0f3442e997b293 19-Aug-2013 Robert Lytton <robert@xmos.com> XCore target: Add target specific EmitVAArg

This is so aggregates can be passed as var args too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188664 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
fc946271e008544b518321fdecc77ca076663c12 19-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Do not include line/file info for artificial parameters & parameters of artificial functions

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

This reverts commit r188600.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188642 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GVTables.cpp
c138ff58683565a0b7f29fd28ac8577710aa5751 18-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Avoid duplicating types that may be created during the process of creating their context

A partner to r188639, this is a somewhat heavy-handed fix to the general
issue, since even after that prior change the issue does still
unavoidably arise with template parameters (see test case).

There are other ways we could consider addressing this (see FIXME).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188640 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
498298d9d7b20fd67e270711b1a815dc6962d883 18-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Don't emit vbase 'containing types' for context chain limited types

Possible minor reduction in debug info & avoid some cases where creating
a context chain could lead to the type the context chain is being
created for, being created. (this is still possible with template
parameters - tests/fixes/improvements to follow)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188639 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
3de73f007b0ca4cf611d3929d8da73ea7d0c2b8a 18-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: don't require full definitions for friend classes

Fixes a crash-on-valid introduced by r188486 (which should've occurred
earlier but for a blatant bug where calling createFwdDecl from the
requireCompleteType callback was useless under -flimit-debug-info and we
were just getting lucky with other later callbacks requiring the type
anyway).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188622 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ced39ec4ab3935d70203a3f07a464f425b1137c7 17-Aug-2013 David Blaikie <dblaikie@gmail.com> PR16927: Don't assert (or, previously, skip) static data members of enumeration type

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188612 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2766deb114cc5d3420027764438cf683dda8a9f0 17-Aug-2013 Juergen Ributzka <juergen@apple.com> Fix the name and the type of the argument for intrinisc
_mm256_broadcastsi128_si256 to align with the Intel documentation.

This fixes bug PR 16581 and rdar:14747994.

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

This reverts commit r188576.

Reverting while I investigate a selfhosting buildbot failure on Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188600 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GVTables.cpp
8863e6baaa760c2a0f4541fc6c0ca7993979a4b3 17-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Canonicalize namespaces to avoid emitting multiple namespaces with the same name but different lines

Updated test case to not rely on line numbers in more cases (it's hard
to use the @ check syntax for debug info test cases (due to the
interesting ordering of metadata) and this case in particular (given the
hash-line directive)) - left a few in there to cover the line number
information for these.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188576 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GVTables.cpp
841fd110a3b8f35d57050fb7db962232ee8bf764 16-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Contrain the record type parameter for CollectRecordFields

This is the correct type (as is demonstrated by the fact that the caller
didn't need to change) & will be useful in a future patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188575 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
045a9f6762a567ccf6ba5aa8a534fed3d0fe518b 16-Aug-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Revert r188498.

This change broke release+asserts build with compiler-rt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188539 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
cbcb030ab33d23c5f7e2e76e2e36843cb5295d50 16-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: CollectRecordStaticField -> CreateRecordStaticField to return its result.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188501 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
fab829d611ed0ef6c93bd2ab1a28c10501beafcb 16-Aug-2013 David Blaikie <dblaikie@gmail.com> Remove unnecessary explicit cast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188500 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f1f5cc32f00ffb6c4d17757db3aa1c4b5d8d645c 16-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Split out the implementation of getStaticDataMemberDeclaration for future use

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188498 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
327a36aea71e109d1ebd9c6fc142b1c237dd3c96 16-Aug-2013 David Blaikie <dblaikie@gmail.com> Fix assert added in r188494

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188496 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
409ab5670cf10fa2b9af2814d6c9b0c2f96a3615 15-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Remove unused conditional

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188494 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
27ab0362bc030de340e25c72002c15f6b22fe683 15-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Make CGDebugInfo::getStaticDataMemberDeclaration's argument type match the semantics

Rather than having a cast immediately inside the function, push that
type requirement out to the callers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188492 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
492b1020a7f9e34591843768cdf89af0ad4a7024 15-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Add a FIXME, remove a FIXME.

(the removed FIXME no longer applies since we made this debug info
optimization not apply to C)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188491 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.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
GDebugInfo.cpp
GDebugInfo.h
odeGenTypes.cpp
oduleBuilder.cpp
c5cd1a712eb98852ae73f027414d06be85dafff6 15-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Revert change to the return type of createRecordFwdDecl

It still does only return DICompositeType, but I've no need to make that
change right now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188482 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
8effeda3d2cfd92abaebc5ac46fc3693c69f66f3 15-Aug-2013 David Majnemer <david.majnemer@gmail.com> CodeGen: __uuidof should work even with an incomplete _GUID type

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

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

This fixes PR16856.

Reviewers: rsmith, rnk, thakis

Reviewed By: rnk

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188481 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenModule.cpp
b94887e70fc83bacd106bfe3a5438e5310c672d5 15-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: remove unnecessary type registration

This happens in the caller a few frames up anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188475 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
951094baa05a72f2623b7e25df609796ad97d908 15-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Don't create duplicate forward declaration metadata unnecessarily.

No functionality change, at best a slight (questionable) optimization,
but necessary for correctness of future work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188474 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
79690a0c488bab19dc778e43a6845b2652fe4f79 15-Aug-2013 Hao Liu <Hao.Liu@arm.com> Fix the build failure of Realease version

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188456 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
12cd6a83f280bcab0e80230e8c7b1f989f3b4889 15-Aug-2013 Hao Liu <Hao.Liu@arm.com> Clang and AArch64 backend patches to support shll/shl and vmovl instructions and ACLE functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188452 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
5d27a512882225297aa8fb55e9cc33a02d23f4b7 14-Aug-2013 Peter Collingbourne <peter@pcc.me.uk> Add support for -fsanitize-blacklist and default blacklists for DFSan.
Also add some documentation.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188403 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
5f15f4daf0e225ea8463fe2ef522c009c95ffc9c 13-Aug-2013 Robert Lytton <robert@xmos.com> Add XCore target

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188258 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
c80eb46a0f37bee9597f1b466013a0f6271f9318 13-Aug-2013 David Majnemer <david.majnemer@gmail.com> [-cxx-abi microsoft] Mangle __uuidof correctly into template parameters

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

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

This fixes PR16836.
Depends on D1356.

Reviewers: rnk, cdavis5x, rsmith

Reviewed By: rnk

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188252 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
00383088ac262a998b83892056090622275d1992 13-Aug-2013 David Blaikie <dblaikie@gmail.com> Drive by cleanup

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188251 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b3c2377422e820ab9d95145ab67a2fb9f9f4bf3f 13-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Simplify declaration building code - relying on the limit debug info checking already in CreateType(RecordType)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188222 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4a0771680ee2fa8e76e1c0d54eaf69f459daf424 13-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: simplify some limited/declaration creation APIs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188214 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
6a4c5dc29eb95561e34333ed1fbe826347a464ba 12-Aug-2013 Alexey Samsonov <samsonov@google.com> Use new llvm::SpecialCaseList API in CodeGenModule

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188170 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
a902511dd22624b15cc61e36d167d1cf3549bc74 08-Aug-2013 Stephen Hines <srhines@google.com> Update Clang for merge to r187914.

Fixups related to OptParser.td moving into LLVM (from Clang).

Add libLLVMOption dependency.

Android.mk changes:
- Arg.cpp
- ArgList.cpp
- Option.cpp
- OptTable.cpp
- OptParserEmitter.cpp
- LambdaMangleContext.cpp
+ ASTTypeTraits.cpp
+ MangleNumberingContext.cpp
+ MicrosoftVBTables.cpp

Change-Id: I0aef80d90be9297cd1d5b5a08134cb6de2af4d2e
ndroid.mk
d6d5d69f61fba69fdbc5aae72b88a5b367a210ec 09-Aug-2013 David Blaikie <dblaikie@gmail.com> Only emit debug info for implicit members that actually get codegen, not just ODR use.

This includes special members (copy/default ctor, copy assign, default
ctor) and template specializations for member function templates.

Good for a 5% decrease (1.80 to 1.71 GB) in size on Clang+LLVM's .dwo
files (when using fission).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188085 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
c8fe011b7e00a20018c8627e0dddd26882ca4499 09-Aug-2013 David Majnemer <david.majnemer@gmail.com> [-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the proper section

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188060 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
17ffbd03695a590d1c513010b7d4e96b9d5fe7d9 09-Aug-2013 David Majnemer <david.majnemer@gmail.com> Revert "[-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the proper section"

This commit reverts r188053.

It is breaking the build bots.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188055 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ea3db97495b4a657bff505cd06b71e53ced46805 09-Aug-2013 David Majnemer <david.majnemer@gmail.com> [-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the proper section

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

We should've mangled them like:
__GUID_12345678_1234_1234_1234_123456789abc

Furthermore, they are external symbols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188053 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4ac73c7514f9e836b4d9781738f333c5cb91cb63 08-Aug-2013 Stephen Hines <srhines@google.com> Merge commit '51e75aecf4fb303b91c9e54fd88e3509e5acc7a6' into merge-20130807

Conflicts:
lib/Basic/Targets.cpp
lib/Sema/SemaDeclAttr.cpp

Change-Id: If457223ecbee9e43c73d15333bf10d36590d05c4
8593e7821c02bd429964d2daf7a6acccb8040fb2 08-Aug-2013 Filipe Cabecinhas <me@filcab.net> UBSan: Fix alignment checks emitted in downcasts.

Summary:
UBSan was checking for alignment of the derived class on the pointer to
the base class, before converting. With some class hierarchies, this could
generate false positives.

Added test-case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187948 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
b3574796d7cc0113e54b6516fc16e17ca09459fb 08-Aug-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Support the run-time selection options (/MD, /MT et al.)

These flags set some preprocessor macros and injects a dependency
on the runtime library into the object file, which later is picked up
by the linker.

This also adds a new CC1 flag for adding a dependent library.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187945 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
2eeed711beec49dfad5d3a3f16fdfca4b2f3acf0 08-Aug-2013 Peter Collingbourne <peter@pcc.me.uk> DataFlowSanitizer; Clang changes.

DataFlowSanitizer is a generalised dynamic data flow analysis.

Unlike other Sanitizer tools, this tool is not designed to detect a
specific class of bugs on its own. Instead, it provides a generic
dynamic data flow analysis framework to be used by clients to help
detect application-specific issues within their own code.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187925 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
a7b879723d3989d85b9492fd8218e7d745367fe3 07-Aug-2013 Jordan Rose <jordan_rose@apple.com> Eliminate CXXConstructorDecl::IsImplicitlyDefined.

This field is just IsDefaulted && !IsDeleted; in all places it's used,
a simple check for isDefaulted() is superior anyway, and we were forgetting
to set it in a few cases.

Also eliminate CXXDestructorDecl::IsImplicitlyDefined, for the same reasons.

No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187891 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
ef4579cda09b73e3d4d98af48201da25adc29326 06-Aug-2013 Larisse Voufo <lvoufo@google.com> Started implementing variable templates. Top level declarations should be fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187762 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
bb1b797d2e432293563747bd9704b22cf0787061 04-Aug-2013 Timur Iskhodzhanov <timurrrr@google.com> Emit the constructor for abstract classes when using -cxx-abi microsoft, fixes PR16735

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187709 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
6f4f8083931a92f9959168d4430da7ddf9183100 03-Aug-2013 Craig Topper <craig.topper@gmail.com> Add support for passing -1 to __builtin_shufflevector to signify an undefined element value to match IR capabilities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187694 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1cf9ab8ab8cf0fc72819d8aa68ba6cc328e33d05 01-Aug-2013 Bill Wendling <isanbard@gmail.com> Use function attributes to indicate if we don't want to realign the stack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187617 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
GCall.cpp
ac00b79047318f917c5c49c487d5b8b3196e4d93 01-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Don't prefer declarations over definitions in -flimit-debug-info in C

Without an ODR, the -flimit-debug-info debug info size optimization of
emitting declarations for fully defined types when only a declaration is
needed by the TU, is incorrect. Emit the full definition whenever it's
available in non-C++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187611 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
8058833e12dd9cd38107f6dde3d5a17021ad3a5d 01-Aug-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Emit template arguments for limited types used for context.

We emit definitions with no members when a nested type is
referenced/required (GCC does the same, to be fair) but failed to attach
the template arguments in such a case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187608 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
841b37c346380d051f827a874a4f1d97cbbe52cf 01-Aug-2013 David Blaikie <dblaikie@gmail.com> Reduce a variable's scope (no functionality change)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187594 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b793f0d3448a15277cd6b6cc4ba558ded39a8084 01-Aug-2013 Tim Northover <tnorthover@apple.com> AArch64: initial NEON support

Patch by Ana Pazos

- Completed implementation of instruction formats:
AdvSIMD three same
AdvSIMD modified immediate
AdvSIMD scalar pairwise

- Completed implementation of instruction classes
(some of the instructions in these classes
belong to yet unfinished instruction formats):
Vector Arithmetic
Vector Immediate
Vector Pairwise Arithmetic

- Initial implementation of instruction formats:
AdvSIMD scalar two-reg misc
AdvSIMD scalar three same

- Intial implementation of instruction class:
Scalar Arithmetic

- Initial clang changes to support arm v8 intrinsics.
Note: no clang changes for scalar intrinsics function name mangling yet.

- Comprehensive test cases for added instructions
To verify auto codegen, encoding, decoding, diagnosis, intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187568 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
e1791d80d5c8e26cd7727524b2bf028e00998558 01-Aug-2013 Craig Topper <craig.topper@gmail.com> Remove more odd code that tries to account for an off by 1 problem in vec3 shuffles that doesn't really exist.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187561 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
2f66512a110844268c0f230ceea2c2ec1006858f 01-Aug-2013 Craig Topper <craig.topper@gmail.com> Fix to handle all non-power-of-2 vector sizes in the mask form of _builtin_shuffle_vector.

Previously a 2-bit mask was used to mask each element of a vec6 mask before doing the extracts instead of 3-bit mask necessary to cover 0-5. vec3 was the only non-power-of-2 that worked correctly because a +1 conditionally added before calculating floor(log2(elements)).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187560 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
72c422cc2b27c87b4a217ab01a9d8bfd836a30be 01-Aug-2013 Craig Topper <craig.topper@gmail.com> Remove broken and unnecessary vec3 handling from VisitShuffleVectorExpr.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187409 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
GVTables.h
icrosoftCXXABI.cpp
060cb4a28c9d0cb15c7a9bd5de2164685629ad9c 29-Jul-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR16715: Fix assert in verifier: only mark call to 'operator new' as 'builtin' if
corresponding 'operator new' was actually emitted as a function marked 'nobuiltin'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187374 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
34d55e1a315e6a4c132f463640af4ae6f8aed8e3 27-Jul-2013 Craig Topper <craig.topper@gmail.com> Fix formatting. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187294 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
52d08fee6521aa1cea214f5d979f4d70b7b3c5d6 26-Jul-2013 Bill Wendling <isanbard@gmail.com> Use the new boolean to StringRef function to generate the proper StringRefs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187251 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
b0e603c63813c8378e35a75408ab4cefe71e93e2 26-Jul-2013 Adrian Prantl <aprantl@apple.com> Debug Info / EmitCallArgs: arguments may modify the debug location.
Restore it after each argument is emitted. This fixes the scope info for
inlined subroutines inside of function argument expressions. (E.g.,
anything STL).

rdar://problem/12592135

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187240 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
d10e5c2e5c1f74620c0a0e312389855ce82df1a5 26-Jul-2013 Craig Topper <craig.topper@gmail.com> Remove trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187190 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1cc87df9747f31d1b300a29920aa8b62144b7bb2 26-Jul-2013 Craig Topper <craig.topper@gmail.com> Remove trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187189 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
ea7fb0ce25acc04664a2e7c2b24af03cef2c0d1f 26-Jul-2013 Bill Schmidt <wschmidt@linux.vnet.ibm.com> [PowerPC] Support powerpc64le as a syntax-checking target.

This patch provides basic support for powerpc64le as an LLVM target.
However, use of this target will not actually generate little-endian
code. Instead, use of the target will cause the correct little-endian
built-in defines to be generated, so that code that tests for
__LITTLE_ENDIAN__, for example, will be correctly parsed for
syntax-only testing. Code generation will otherwise be the same as
powerpc64 (big-endian), for now.

The patch leaves open the possibility of creating a little-endian
PowerPC64 back end, but there is no immediate intent to create such a
thing.

The new test case variant ensures that correct built-in defines for
little-endian code are generated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187180 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
argetInfo.cpp
11311eaf6093a5374f94047df354d4c62d68c611 26-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Fix GNU ObjC ABI for a message returning a struct.

This allows the ObjFW runtime to correctly implement message forwarding
for messages which return a struct.

Patch by Jonathan Schleifer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187174 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
7185d6272b8dc75d5492a6ea0ed43d7631554b61 25-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove the mblaze backend from clang.

Approval in here http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/064169.html

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187143 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
cab4a09d69e7cc5c2c64ec1c3d126c4d825d2b83 25-Jul-2013 Bill Wendling <isanbard@gmail.com> Replace the "NoFramePointerElimNonLeaf" target option with a function attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187092 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
GCall.cpp
3b477597fa1184b223ad5ad9dfe1c870b8aa1ac5 25-Jul-2013 Adrian Prantl <aprantl@apple.com> Debug Info: Fine-tune the simple return expression location handling to
only affect functions without a separate return block. This fixes the
linetable for void functions with cleanups and multiple returns.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187090 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
09ade336e928e8b3e325fc46a53cd5f4d1d46252 25-Jul-2013 Adrian Prantl <aprantl@apple.com> typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187089 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.h
0323a7887b26f727080d2aa38f1a325dd23a1ee9 24-Jul-2013 Eli Bendersky <eliben@google.com> Partial revert of r185568.

r186899 and r187061 added a preferred way for some architectures not to get
intrinsic generation for math builtins. So the code changes in r185568 can
now be undone (the test remains).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187079 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
argetInfo.cpp
argetInfo.h
b6cdc96e7679f0344a36395a87c249930fac8a9f 24-Jul-2013 Adrian Prantl <aprantl@apple.com> Debug Info: Fix an oversight of r186553. Ensure that the function prologue
of an artificial function gets an artificial location as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187074 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDebugInfo.cpp
GDebugInfo.h
21fe45076c371e9a9f27e15c4e068e77a185fe62 24-Jul-2013 Mark Seaborn <mseaborn@chromium.org> Use ARM-style representation for C++ method pointers under PNaCl/Emscripten

Before this change, Clang uses the x86 representation for C++ method
pointers when generating code for PNaCl. However, the resulting code
will assume that function pointers are 0 mod 2. This assumption is
not safe for PNaCl, where function pointers could have any value
(especially in future sandboxing models).

So, switch to using the ARM representation for PNaCl code, which makes
no assumptions about the alignment of function pointers.

Since we're changing the "le32" target, this change also applies to
Emscripten. The change is beneficial for Emscripten too. Emscripten
has a workaround to make function pointers 0 mod 2. This change would
allow the workaround to be removed.

See: https://code.google.com/p/nativeclient/issues/detail?id=3450

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187051 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
b199310f56d6695780b146baf2b823b8676e4525 24-Jul-2013 Bill Schmidt <wschmidt@linux.vnet.ibm.com> [PowerPC64] Fix passing of single-vector-member structs to match ABI.

The 64-bit PowerPC ELF ABI requires a struct that contains a single
vector member to be passed in a vector register as though the wrapping
struct were not present. Instead we were passing this as a byval
struct.

The same logic was already present for floating-point arguments, so
this patch just extends the logic to handle vector types. The new
test case verifies that clang coerces the parameter and annotates it
as inreg.

Thanks,
Bill



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186993 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
1f4379184ee07217183d11acf142ea6fe0d487a0 23-Jul-2013 Adrian Prantl <aprantl@apple.com> Implement a better fix for r186894 by setting the appropriate type for __byref_variable_layout.

rdar://problem/14386148

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186898 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
334ded9f4933b4e4891b3fae11c31ca3d259e98d 23-Jul-2013 Adrian Prantl <aprantl@apple.com> Debug Info: Acknowledge the alignment when locating byref block variables.
Fixes rdar://problem/14386148

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186894 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
45ccf286af684ab40c2e4d6dd667e2c2e26946bf 22-Jul-2013 Bill Wendling <isanbard@gmail.com> Use the updated name for the attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186864 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
a4130baad9d10b7feabb7e003da53424e986d269 22-Jul-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Emit linkonce complete dtors in TUs that need them

Based on Peter Collingbourne's destructor patches.

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

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

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

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

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

Reviewers: rjmccall

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186828 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GClass.cpp
GExprCXX.cpp
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
73701ea646d067e5d26e83a95ae0e610f0e665ca 22-Jul-2013 Reid Kleckner <reid@kleckner.net> Rename D to GD to match the type, which is GlobalDecl

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186826 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ddcff1b310b80b63f1a9ba88f2befeab40c3648f 22-Jul-2013 Richard Smith <richard-llvm@metafoo.co.uk> Tighten up the set of operator new/operator delete calls we're permitted to
optimize, to follow the permissions granted in N3664. Under those rules, only
calls generated by new-expressions and delete-expressions are permitted to be
optimized, and direct calls to ::operator new and ::operator delete must be
treated as normal calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186799 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
odeGenModule.cpp
a5e660188a3c654cf0c88ed1093b28207e870b2b 20-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Make IgnoreParens() look through ChooseExprs.

This is the same way GenericSelectionExpr works, and it's generally a
more consistent approach.

A large part of this patch is devoted to caching the value of the condition
of a ChooseExpr; it's needed to avoid threading an ASTContext into
IgnoreParens().

Fixes <rdar://problem/14438917>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186738 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
6e007f9fa0b9ebe5898025010c5ebc7d82decfa7 19-Jul-2013 Timur Iskhodzhanov <timurrrr@google.com> Simplify the CodeGenFunction::Build*Virtual*Call family of functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186657 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
4fa7eab771ab8212e1058bd1a91061ff120c8fbb 19-Jul-2013 Alexey Bataev <a.bataev@hotmail.com> OpenMP: basic support for #pragma omp parallel


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186647 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
8fed3f487962b284aecbed65662fec6bbe31b016 19-Jul-2013 Eric Christopher <echristo@gmail.com> Update createCompileUnit call for llvm changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186638 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b061ce2c7af5bb19294e16dbaf19a6b37ed2f716 18-Jul-2013 Adrian Prantl <aprantl@apple.com> s/BuiltinLocation/ArtificialLocation/

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186557 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDebugInfo.cpp
GDebugInfo.h
b2d139257d8e6d546622627b6d0b48ef7953230f 18-Jul-2013 Eric Christopher <echristo@gmail.com> Instead of checking against some version of "isType()" go ahead and
use the conversion to bool to check if we've managed to get a type
that isn't default constructed - as we meant to in the first place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186556 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0a10323b338b432c806bcc03f247fbb501421d62 18-Jul-2013 Adrian Prantl <aprantl@apple.com> Fix a compile error caught by bb-chapuni.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186555 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
6e73edfdea30afa2da8055c3d05180b01630092a 18-Jul-2013 Adrian Prantl <aprantl@apple.com> Fix a compile error caught by bb-chapuni.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186554 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b3f111bf631b2a306a4bd6eefce314418ad61e1c 18-Jul-2013 Adrian Prantl <aprantl@apple.com> Don't generate bogus line table entries for __copy_helper_block_ and
__destroy_helper_block_, but do generate scope information.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186553 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
ed6bbe4ab8d06cd09fdfd294e2b2f8ab3808f84a 18-Jul-2013 Adrian Prantl <aprantl@apple.com> Replace llvm::DIBuilder::DisableDebugLocations() with two RAII interfaces
inspired by CodegenFunction::LexicalScope.
- NoLocation temporarily turns off debug locations altogether.
This is useful for emitting instructions that should be
counted towards the function prologue.
- BuiltinLocation temporarily switches to an artificial debug location
that has a valid scope, but no line information. This is useful when
emitting compiler-generated helper functions that have no source
location associated with them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186552 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDebugInfo.cpp
GDebugInfo.h
18a0cd5ef787db1b6849b962f67a5a8ed3c49be3 18-Jul-2013 Adrian Prantl <aprantl@apple.com> Clarified documentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186551 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5f4554f8c8f07c90048705f165fe1ed44413eaa2 18-Jul-2013 Adrian Prantl <aprantl@apple.com> Simplify logic by using the appropriate function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186550 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7dab97b5af44556453c13cf877e02b8ea4c6c1cf 18-Jul-2013 Eric Christopher <echristo@gmail.com> 80-column fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186542 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ab96e565d6a5aa770ad31e7cb8100cd6a9b3d8a2 17-Jul-2013 JF Bastien <jfb@google.com> Propagate alignment for _Complex

_Complex load/store didn't have their alignment set properly, which was visible when GCC's torture tests use volatile _Complex.

Update some existing tests to check for alignment, and add a new test which also has over-aligned volatile _Complex (since the imaginary part shouldn't be overaligned, only the real part).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186490 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
21cde050b64eefbb5094af67985752eee42d00e2 17-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Make Expr::isConstantInitializer match IRGen.

Sema needs to be able to accurately determine what will be
emitted as a constant initializer and what will not, so
we get accurate errors in C and accurate -Wglobal-constructors
warnings in C++. This makes Expr::isConstantInitializer match
CGExprConstant as closely as possible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186464 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GExprScalar.cpp
be6d9130585c33aaea3ee152f365031999d8debe 16-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Fix crash on complex constant zero.

Fixes <rdar://problem/14442543>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186452 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
09df2b066221d869f17f4b5762405f111a65f983 16-Jul-2013 Tim Northover <tnorthover@apple.com> ARM: implement low-level intrinsics for the atomic exclusive operations.

This adds three overloaded intrinsics to Clang:
T __builtin_arm_ldrex(const volatile T *addr)
int __builtin_arm_strex(T val, volatile T *addr)
void __builtin_arm_clrex()

The intent is that these do what users would expect when given most sensible
types. Currently, "sensible" translates to ints, floats and pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186394 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
b960232518a1cd79c5f64ab5ef54c88e34660191 15-Jul-2013 Craig Topper <craig.topper@gmail.com> Use llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186300 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
0f855a9c2517fc80803ab81a4aa0bb015918cf21 14-Jul-2013 Eric Christopher <echristo@gmail.com> Reformat line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186294 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.h
688cf5b05713055d27bf53460f7c20a776440767 14-Jul-2013 Eric Christopher <echristo@gmail.com> Move BlockLiteralGeneric earlier in CGDebugInfo and remove
BlockLiteralGenericSet and replace with a call to isType() on the
BlockLiteralGeneric.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186293 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
d3003dc68535e94fe2501265d68a10aec429d7d0 14-Jul-2013 Eric Christopher <echristo@gmail.com> Update a few comments and reformat a decl for clarity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186292 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ad5b69da4774a4eec09af96af23a2fe793fd00f8 14-Jul-2013 Craig Topper <craig.topper@gmail.com> Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186284 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
658cd2c287b1a0b419f51cd18e5a48d4560d1c56 13-Jul-2013 David Blaikie <dblaikie@gmail.com> PR16214, PR14467: DebugInfo: use "RequireCompleteType" to decide when to emit the full definition of a type in -flimit-debug-info

This simplifies the core benefit of -flimit-debug-info by taking a more
systematic approach to avoid emitting debug info definitions for types
that only require declarations. The previous ad-hoc approach (3 cases
removed in this patch) had many holes.

The general approach (adding a bit to TagDecl and callback through
ASTConsumer) has been discussed with Richard Smith - though always open
to revision.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186262 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDebugInfo.cpp
GExprCXX.cpp
GExprScalar.cpp
odeGenAction.cpp
oduleBuilder.cpp
226399ce18cdcbb1e83af7c5e644bdabb9d4f2f8 13-Jul-2013 David Blaikie <dblaikie@gmail.com> Correctly classify pack expansions as NON_CANONICAL_UNLESS_DEPENDENT

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

Reviewed by Richard Smith & Eli Friedman.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186261 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
odeGenFunction.cpp
c250192494e0fa63be50269d2c1eb7786f8ab7a0 13-Jul-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Changes so that a few tests do not fail when running under guarded malloc.

Guarded malloc emits some messages at the beginning in stderr when enabled.
These messages caused a few tests to fail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186219 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
8d230b454fa3a0d4fd87453e24c88219ef5ad14a 13-Jul-2013 Bill Wendling <isanbard@gmail.com> Use function attributes to pass along the stack protector buffer size instead of making it a target option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186218 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
GCall.cpp
c1b8d095c18c3f55d662c49e59f7a934ae7e9440 13-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Compute 'this' correctly for block in lambda.

Using CurFuncDecl is both correct and simple compared to crawling
the DeclContexts of the block.

Fixes <rdar://problem/14415072>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186210 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
eb1f276b10c8705e4282442aa61ab9033302b2be 11-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Fix build.

Sorry about that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186054 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
5154dce6388e3aaa445467030df7a45ed1211abe 11-Jul-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add a __builtin_addressof that performs the same functionality as the built-in
& operator (ignoring any overloaded operator& for the type). The purpose of
this builtin is for use in std::addressof, to allow it to be made constexpr;
the existing implementation technique (reinterpret_cast to some reference type,
take address, reinterpert_cast back) does not permit this because
reinterpret_cast between reference types is not permitted in a constant
expression in C++11 onwards.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186053 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
336d9df5e628279425344d754dc68047fa5b00a7 11-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Simplify atomic load/store IRGen.

Also fixes a couple minor bugs along the way; see testcases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186049 91177308-0d34-0410-b5e6-96231b3b80d8
GAtomic.cpp
GExpr.cpp
GExprAgg.cpp
GValue.h
7b309b0107093d0d2b4df2ce1deddd9bd4698cff 10-Jul-2013 Eric Christopher <echristo@gmail.com> Use a LexicalScope here since it is one and it will encapsulate
the two sets of debug scope and cleanup scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186030 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
e5798893b1fb2468a11e8374d340e6fa2f82a9a5 10-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Get rid of dead/useless code for block mangling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185989 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a967935303e6b36dcc0490073e47fdd5a5eff93e 10-Jul-2013 Peter Collingbourne <peter@pcc.me.uk> Apply BlackList -> SpecialCaseList rename in Clang.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185979 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
4b87382ab9610a06145b5b162edb7165159c58e6 09-Jul-2013 Adrian Prantl <aprantl@apple.com> Reapply an improved version of r180816/180817.

Do not generate VLAs as complex variables any more, as they are now
correctly represented as breg+0 locations in the backend.

(Paired commit with LLVM: r185966)

rdar://problem/13658587

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185967 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b9bad79ca821a59a75557b30613588681c4f793e 08-Jul-2013 Craig Topper <craig.topper@gmail.com> Simplify code. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185792 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
1847c718fe61f8e99d77c60ab77c9bf2ad4d77aa 05-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Don't use mangleCXXRTTIName in TBAA for C code.

This changes the TBAA code so it doesn't use mangleCXXRTTIName in C,
because it doesn't really make sense there. Also, as sort of a
defense-in-depth change, fix the mangler so it handles C RecordDecls
correctly.

No tests because I don't know the TBAA code well enough to write a test,
and I don't know how else to trigger mangling a local struct in C.

Fixes a crash with r185450 reported by Joerg Sonnenberger.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185721 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
6b9240e058bf3451685df73fc8ce181b3046e92b 05-Jul-2013 Craig Topper <craig.topper@gmail.com> Use SmallVectorImpl& for function arguments instead of SmallVector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185715 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
odeGenFunction.h
argetInfo.cpp
64b22d8351a83593220803ed702e036c73bb8710 03-Jul-2013 Eli Bendersky <eliben@google.com> Add target hook CodeGen queries when generating builtin pow*.

Without fmath-errno, Clang currently generates calls to @llvm.pow.* intrinsics
when it sees pow*(). This may not be suitable for all targets (for
example le32/PNaCl), so the attached patch adds a target hook that CodeGen
queries. The target can state its preference for having or not having the
intrinsic generated. Non-PNaCl behavior remains unchanged;
PNaCl-specific test added.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185568 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
argetInfo.cpp
argetInfo.h
b6b0a711e4996a43e1932c20d0fd235bb711ad36 02-Jul-2013 Manman Ren <mren@apple.com> Debug Info: clean up usage of Verify.

No functionality change. It should suffice to check the type of a debug info
metadata, instead of calling Verify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185463 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7a36a5913f045bfaf6d26ed874e39a3e7c1ad9ae 01-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Simplify linkage code for static local vars.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185381 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
odeGenModule.h
07369dde9d72213bf8a48288cd8b29999af9a40c 01-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Fix mangling for block literals.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185372 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
odeGenModule.h
3b50e8d78c34fc57e25781015a2cb0536ca54f89 30-Jun-2013 Stephen Lin <stephenwlin@gmail.com> Restore r184205 and associated commits (after commit of r185290)

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185291 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GCall.cpp
GClass.cpp
GExprCXX.cpp
GVTables.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
taniumCXXABI.cpp
icrosoftCXXABI.cpp
2e430153afacf9e406d0a6024ccc578fa5d3439f 29-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185231 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
e1e35f761970fd662696b803a839c1f4a56f61b2 28-Jun-2013 Peter Collingbourne <peter@pcc.me.uk> [ms-cxxabi] Move CodeGenVTables::needsVTTParameter to ItaniumCXXABI.

This function only makes sense there. Eventually it should no longer
be part of the CGCXXABI interface, as it is an Itanium-specific detail.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185213 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
GClass.cpp
GVTT.cpp
GVTables.h
taniumCXXABI.cpp
1d7bb6c8b5b8f98fe79607718441f6543de598f1 28-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Delete dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185119 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
24118f5d62f68b18a75db4eb570a0aaf7f4dda97 28-Jun-2013 Peter Collingbourne <peter@pcc.me.uk> Use the zero-argument DIBuilder::createNullPtrType in Clang.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185115 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
02a01faadb2771f4ca5174ed3e798bec0afb96c4 28-Jun-2013 John McCall <rjmccall@apple.com> Ensure that debugger calls to signature-less functions default to
passing arguments in the fixed style.

We have an abstraction for deciding this, but it's (1) deep in
IR-generation, (2) necessarily tied to exact argument lists, and
(3) triggered by unprototyped function types, which we can't
legitimately make in C++ mode. So this solution, wherein Sema
rewrites the function type to an exact prototype but leaves the
variadic bit enabled so as to request x86-64-like platforms to
pass the extra variadic info, is very much a hack, but it's one
that works in practice on the platforms that LLDB will support
in the medium term --- the only place we know of where it's a
problem is instance methods in Windows, where variadic functions
are implicitly cdecl. We may have a more abstracted base on which
to build a solution by then.

rdar://13731520

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185112 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.h
cd06f26835033e879a9278941f4f6e6a4086976d 26-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Rewrite record layout for ms_struct structs.

The old implementation of ms_struct in RecordLayoutBuilder was a
complete mess: it depended on complicated conditionals which didn't
really reflect the underlying logic, and placed a burden on users of
the resulting RecordLayout. This commit rips out almost all of the
old code, and replaces it with simple checks in
RecordLayoutBuilder::LayoutBitField.

This commit also fixes <rdar://problem/14252115>, a bug where class
inheritance would cause us to lay out bitfields incorrectly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185018 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GExprConstant.cpp
GRecordLayoutBuilder.cpp
odeGenTBAA.cpp
a7732c74995acb12ac334367a620c25508f9f667 25-Jun-2013 Eli Bendersky <eliben@google.com> Remove misplaced comment


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184862 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
fdf137b9073aa52423183fe886d072bc3b7d3889 25-Jun-2013 Nick Lewycky <nicholas@mxc.ca> Make -vectorize-... proper cc1 flags instead of abusing -backend-option. Fixes
usage of clang as a library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184812 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
12df246d6dea2ee1f92c186f922f1afcf499647a 24-Jun-2013 Reid Kleckner <reid@kleckner.net> [AST] Introduce a new DecayedType sugar node

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

Reviewers: rsmith

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184763 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
odeGenFunction.cpp
ac8f43c9cb71880ed3fa7f56a2a2429eafbd4625 24-Jun-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: ensure negative enumerators are emitted as such

There's still a problem here - since we're not appropriately using the
signedness/range of the enum to chooset the encoding and emission of
enumerators, but GCC has some bugs around this too so I assume that's
not /such/ a high priority though I may get to it soon out of
completeness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184695 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
35178dc09d97bb2e0612813def09833866e3ad82 22-Jun-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Support (using GNU extensions) for template template parameters and parameter packs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184644 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
23e66db769a708f4f5eed34779548d99d5665abd 22-Jun-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Random tidying up/simplification

No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184614 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
373ac0ab90a2d61fad7dd991712b8cec30c14604 22-Jun-2013 Tim Northover <tnorthover@apple.com> Teach ARM va_arg to ignore empty structs.

Empty structs are ignored for parameter passing purposes, but va_arg was
incrementing the pointer anyway which could lead to va_list getting out of
sync.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184605 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
f5c3a2521972e9d70d0ec5450cc65472d63ec89f 22-Jun-2013 Tim Northover <tnorthover@apple.com> Check for trivial constructibility before emptiness in ARM ABI.

According to the Itanium ABI (3.1.1), types with non-trivial copy constructors
passed by value should be passed indirectly, with the caller creating a
temporary.

We got this mostly correct, but forgot that empty structs can have non-trivial
constructors too and passed them incorrectly. This simply reverses the order of
the check.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184603 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
73b8d4bdd68372bff9eddc5a02675ee345a8a94f 21-Jun-2013 Nick Lewycky <nicholas@mxc.ca> Fix a leak of TargetMachine in clang. We'll continue to leak it on purpose if
given -disable-free. (Reviewed by John McCall over IRC.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184595 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
f0c31d98d3db8ed76077999d10ac45ed23f7e75e 21-Jun-2013 David Blaikie <dblaikie@gmail.com> PR16214: Debug info for types first used via pointers or qualified types & later require definitions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184594 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9b60195ad4843c9e2e231673a0dbc0d5c8c6eb2b 21-Jun-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Destroy temporary record arguments in the callee

Itanium destroys them in the caller at the end of the full expression,
but MSVC destroys them in the callee. This is further complicated by
the need to emit EH-only destructor cleanups in the caller.

This should help clang compile MSVC's debug iterators more correctly.
There is still an outstanding issue in PR5064 of a memcpy emitted by the
LLVM backend, which is not correct for C++ records.

Fixes PR16226.

Reviewers: rjmccall

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184543 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
GDecl.cpp
icrosoftCXXABI.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
GDebugInfo.cpp
GDebugInfo.h
odeGenTypes.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
GDebugInfo.cpp
GDebugInfo.h
odeGenTypes.cpp
98d1ec1e99625176626b0bcd44cef7df6e89b289 21-Jun-2013 Michael Gottesman <mgottesman@apple.com> [checked-arithmetic builtins] Added builtins to enable users to perform checked-arithmetic in c.

This will enable users in security critical applications to perform
checked-arithmetic in a fast safe manner that is amenable to c.

Tests/an update to Language Extensions is included as well.

rdar://13421498.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184497 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
14b0e4b4d55111e2b00db0072d20f4a8209fa5a4 21-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Fix typo in comment. Patch by Matthew Dempsky!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184495 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
45ff3807ef06bca715afb9eb7e16c4c89880e40e 20-Jun-2013 John McCall <rjmccall@apple.com> Call __cxa_begin_catch before std::terminate() in a noexcept trap.

r174939-40 caused us to do this in the canonical terminate lpad,
but when the EH stack has other cleanups on it we use the
terminate handler block, which wasn't doing this.

Fixes the rest of rdar://11904428 given appropriate stdlib support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184475 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
6bb110292c4e33a6ee2856cf91e0774107aa7d9c 20-Jun-2013 Adrian Prantl <aprantl@apple.com> Debug Info: Attempt to resolve forward declarations if we are not emitting
limited debug info.

This is another small addendum to r184252.

rdar://problem/14101097

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184473 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
381c9b7b55639c0a6652d60a6c931d65d7cae1f1 20-Jun-2013 Meador Inge <meadori@codesourcery.com> CodeGen: Don't set 'PMBuilder.DisableSimplifyLibCalls'

The simplify-libcalls pass has been removed from LLVM. Thus
'PMBuilder.DisableSimplifyLibCalls' does not exist anymore.
The disabling/enabling of library call simplifications is
done through the TargetLibraryInfo which is already wired
up in Clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184458 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
3258abc2bad74e8bb1799d124bc4113c7234fa42 20-Jun-2013 Stephen Lin <stephenwlin@gmail.com> Revert r184205 and associated patches while investigating issue with broken buildbot (possible interaction with LTO)

<rdar://problem/14209661>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184384 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GCall.cpp
GClass.cpp
GExprCXX.cpp
GVTables.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
taniumCXXABI.cpp
icrosoftCXXABI.cpp
41c9baed95a1e7974e6cccf7b4120fd1866ff125 19-Jun-2013 David Blaikie <dblaikie@gmail.com> Debug Info: PR14763/r183329 - specify that non-trivial pass-by-value parameters are stored indirectly

This is to fix the location information for such parameters to refer to
the object accessible through the pointer rather than to the pointer
parameter itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184367 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4444dbbb96ba55ff8a05a1918627f609a387db9f 19-Jun-2013 Stephen Lin <stephenwlin@gmail.com> Corrections to r184205 ('this'-return optimization) due to the wrong version of the patch being committed originally.
1) Removed useless return value of CGCXXABI::EmitConstructorCall and CGCXXABI::EmitVirtualDestructorCall and implementations
2) Corrected last portion of CodeGenCXX/constructor-destructor-return-this to correctly test for non-'this'-return of virtual destructor calls


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184330 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GClass.cpp
GExprCXX.cpp
taniumCXXABI.cpp
icrosoftCXXABI.cpp
43a75fcbe4b592d7bea1fe262117114bcebc003c 19-Jun-2013 Reid Kleckner <reid@kleckner.net> [CodeGen] Move EHScopeStack into its own header

CGCleanup.h isn't meant to be included by all of CodeGen according to
John.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184321 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.h
odeGenFunction.h
HScopeStack.h
9063302a82423cb83f002257a416741850739a70 19-Jun-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Emit and install appropriately mangled vbtables

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

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

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

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

Reviewers: rjmccall

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184309 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
GClass.cpp
GVTables.cpp
MakeLists.txt
taniumCXXABI.cpp
icrosoftCXXABI.cpp
icrosoftVBTables.cpp
icrosoftVBTables.h
1fea06d6116249aadcd8d02127e506dd85d4e659 19-Jun-2013 NAKAMURA Takumi <geek4civic@gmail.com> Fix a warning. [-Wunused-variable]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184284 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
fc0f91cf0673775ce4b8b174dbb05ad2e4e6cd01 19-Jun-2013 Manman Ren <mren@apple.com> Debug Info: support for gdwarf-2 gdwarf-3 gdwarf-4

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184276 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
776bfa16c96d501c7fd51beb14f929fa4736caac 19-Jun-2013 Adrian Prantl <aprantl@apple.com> Add some comments to r184252.

rdar://problem/14101097

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184259 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
14c1a13e64808ccd2c39155793194ce499d82ca3 19-Jun-2013 Adrian Prantl <aprantl@apple.com> Emit forward decls for structs with declarations only when we are
limiting debug info.

FIXME: There is still work left to do here, the testcase should work even with -flimit-debug-info.

rdar://problem/14101097

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184252 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ee76e7215d27c25bb053b71ae0a59119c08ccef9 18-Jun-2013 Michael Gottesman <mgottesman@apple.com> [multiprecision-builtins] Added missing builtin __builtin_{add,sub}cb for {add,sub} with carry for bytes.

I have had several people ask me about why this builtin was not available in
clang (since it seems like a logical conclusion). This patch implements said
builtins.

Relevant tests are included as well. I also updated the Clang language extension reference.

rdar://14192664.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184227 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
d4c0cd07641681de6ed12164aa7a4495ab4b18e5 18-Jun-2013 Stephen Lin <stephenwlin@gmail.com> CodeGen: Have 'this'-returning constructors and destructors to take advantage of the new backend 'returned' attribute.

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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184205 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GCall.cpp
GClass.cpp
GVTables.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
taniumCXXABI.cpp
icrosoftCXXABI.cpp
b8b52972c72b2ba6fe171c522e5d3d7d69503021 18-Jun-2013 John McCall <rjmccall@apple.com> Add support for -fpcc-struct-return. Patch by Arthur O'Dwyer!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184166 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
2736f2eca78b498dd75c739a76f833ed43cdb43b 18-Jun-2013 Adrian Prantl <aprantl@apple.com> Remove an ugly hack that was meant to eliminate the breakpoint ambiguity
between a block assignment and the entry of the block function. In reality
this wouldn't work anyway because blocks are predominantly created
on-the-fly inside of an ObjC method invocation.
The proper fix for the ambiguity is to use -gcolumn-info to differentiate
the breakpoints.

This is expected to break some block-related darwin-gdb tests.

rdar://problem/14039866

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184157 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
93cc515d3b99dca18d287d200e19355a2e9c02b2 17-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Compute the visibility of static local variables consistently. Fixes PR16208.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184137 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
9610d77508bdca13e0475783ff404428611c9683 17-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Cleanup linkage computation for static locals.

With this patch we assign VisibleNoLinkage to static locals in inline functions.
This lets us simplify CodeGen a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184114 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
3282b84296dba58e811741b63e4429980a98df8b 14-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Emit initializers for static-storage-duration temporaries as constants where
possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183967 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenModule.cpp
3a936caf79bc7448ac5ec60c14faeb87c74e5392 13-Jun-2013 Stephen Hines <srhines@google.com> Update clang for merge to r183849.

Add missing libLLVMObject to clang dependencies.

Add AttrExprArgs.inc build rule to clang-tblgen-rules.mk
Add AttrExprArgs.inc to Parse dependencies

Add DiagnosticSemaKinds.inc to CodeGen dependencies.

Android.mk updates:
Add TypeLocBuilder.cpp

Change-Id: I034b209e82e02062860752f17b2eb0dd1081f6b0
ndroid.mk
678eca456bc62900dc7407bdbc9fa282da9d2f8f 13-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Fix the linkage of static locals inside a CapturedStmt. (Found in the
process of trying to fix the related issue for block literals.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183951 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
odeGenModule.h
d4ec562b3aaf50ea9015f82c96ebfd05a35fc7ef 13-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Simplify: we don't need any special-case lifetime extension when initializing
declarations of reference type; they're handled by the general case handling of
MaterializeTemporaryExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183875 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDecl.cpp
GDeclCXX.cpp
GExpr.cpp
GExprAgg.cpp
GStmt.cpp
odeGenFunction.h
7c3e615f01e8f9f587315800fdaf2305ed824568 13-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR12086, PR15117

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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183872 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprConstant.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
8a07cd3f59a0ede54906bdc8ed21724815db27ad 12-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Reapply r183721, reverted in r183776, with a fix for a bug in the former (we
were lacking ExprWithCleanups nodes in some cases where the new approach to
lifetime extension needed them).

Original commit message:

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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183859 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
GCleanup.h
GDecl.cpp
GExpr.cpp
odeGenFunction.cpp
odeGenFunction.h
2049840b0ffe8ee4bf39051cfa8ca08440c8f667 12-Jun-2013 Stephen Hines <srhines@google.com> Merge commit '1342a4ef62dd7b839c6f09348b246a4f00282f29' into merge_20130612
eba7d2fe3aa97e9203f82714c66f321ff7416bcf 12-Jun-2013 Aaron Ballman <aaron@aaronballman.com> Silencing a signed vs unsigned comparison mismatch in MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183837 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
0934e18b620ecaa6c7ec18ba5c4286b6122d6fb8 12-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Add support for complex compound assignments where the LHS is a scalar.

Fixes <rdar://problem/11224126> and PR12790.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183821 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
7a1b586a383622e3287a5f3d82736ec513032744 12-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Make va_arg and argument passing to varargs functions work correctly with
AVX vectors when AVX is turned on.

Fixes <rdar://problem/10513611>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183813 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
a57be5617a0735a654d4c8145be1fd752f776772 11-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Revert r183721. It caused cleanups to be delayed too long in some cases.
Testcase to follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183776 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
GCleanup.h
GDecl.cpp
GExpr.cpp
odeGenFunction.h
b6f521aeb4defc018aef5c80f7c571fc413ba16b 11-Jun-2013 Benjamin Kramer <benny.kra@googlemail.com> Silence GCC warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183742 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
85af7cecadbf5d4b905d6b3b4b1b6fa684183aff 11-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Rework IR emission for lifetime-extended temporaries. Instead of trying to walk
into the expression and dig out a single lifetime-extended entity and manually
pull its cleanup outside the expression, instead keep a list of the cleanups
which we'll need to emit when we get to the end of the full-expression. Also
emit those cleanups early, as EH-only cleanups, to cover the case that the
full-expression does not terminate normally. This allows IR generation to
properly model temporary lifetime when multiple temporaries are extended by the
same declaration.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183721 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
GCleanup.h
GDecl.cpp
GExpr.cpp
odeGenFunction.h
939d83efba53994af07c7dc82b88873132a18c0d 11-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Fix a very silly mistake in r183590.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183720 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
d39083deac93d6580a42ccd5d213aba2bb89cc76 11-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Fix a FIXME in a testcase about packed structs and calls I left around
while fixing a related bug. The fix here was simpler than I thought it
would be.

Fixes <rdar://problem/10530444>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183718 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
2ac2fa7726eb2f6fe445e098489e92931c31f7ca 11-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Make sure we don't emit invalid IR for StmtExprs with complex cleanups.

Fixes <rdar://problem/14074868>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183699 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
GExprScalar.cpp
GStmt.cpp
odeGenFunction.h
875e739473026f71e30aa24f3a98a25ae9ac67e9 09-Jun-2013 Reid Kleckner <reid@kleckner.net> [CodeGen] Make CGCleanup.h include what it now uses

Also move CGCleanup.h to the top of CGCleanup.cpp to verify that
CGCleanup.h really includes what it needs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183632 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
GCleanup.h
6fe91e448f948b78a36dd7f978125e0a882c623f 09-Jun-2013 Reid Kleckner <reid@kleckner.net> [CodeGen] Move EHScopeStack to CGCleanup.h from CodeGenFunction.h

No functionality change. CGCleanup.cpp provides the implementation for
EHScopeStack, so it seems more consistent to place the class definition
in CGCleanup.h.

This should also help solve a header ordering problem that I have.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183631 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.h
odeGenFunction.h
9aaee92faa84a54a78cc298b1d281c4bce39c122 08-Jun-2013 Michael Gottesman <mgottesman@apple.com> Fixed comment typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183598 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.h
8d378585f66c0562a818f60d3b003a6f55054dbe 08-Jun-2013 Adrian Prantl <aprantl@apple.com> Debug info: An if condition now creates a lexical scope of its own.
Two variables with the same name declared in two if conditions in the same
scope are no longer coalesced into one.

rdar://problem/14024005

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183597 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
eeb00624413d4a4856e66809b84c558d2cdce17f 08-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Fix va_arg on x86-64 for a struct containing a single int128_t. PR16248

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183590 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
56b108ad2b44659b3b4c3815145d226e8540c8e2 08-Jun-2013 Eric Christopher <echristo@gmail.com> 80-column fixup after recent change to getOrCreateType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183586 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
572ac32bd09e0b0400bdcc2ca872febf70cc3d7d 08-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Fix line endings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183583 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
80e8ea92d6dcaa05165dcb4730485db82dcd4629 08-Jun-2013 Adrian Prantl <aprantl@apple.com> address some comments on r183474:
- factor the name construction part out from constructSetterName
- rename constructSetterName to the more appropriate constructSetterSelector

no functionality change intended.
rdar://problem/14035789

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183582 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4f97f853357e2769db3d7999424e346ac5adb297 07-Jun-2013 Adrian Prantl <aprantl@apple.com> documentation: remove confusing reference to properties.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183475 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5ae17a17709acaf005e0c22839ef83c5e21f7db5 07-Jun-2013 Adrian Prantl <aprantl@apple.com> ObjC Debug Info: Emit the names of accessors whenever they diverge from
the default names, not just when the isImplicit flag is set.

rdar://problem/14035789

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183474 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b5a50075d810002c718711675aae067f92b80670 07-Jun-2013 Adrian Prantl <aprantl@apple.com> Improve documentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183473 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1bea653e0d0f0182ed6e0deb5c18ad1123bb3bbd 07-Jun-2013 Tim Northover <tnorthover@apple.com> Diagnose malformed x86 inline asm using 'y' constraint.

X86's 'y' inline assembly constraint represents an MMX register, this change
prevents Clang from hitting an assertion when passed an incompatible type to
deal with.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183467 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
argetInfo.cpp
argetInfo.h
993b39f4cd0fcc6007d6f65b6d82db3e0242c1a2 05-Jun-2013 David Blaikie <dblaikie@gmail.com> PR14763: Debug info for non-trivial record parameters

There seems to have been some erroneous code attempting to describe the
ABI of parameters (non-trivial record parameters are passed by
reference). This would break the type of the function (especially when
it caused a mismatch between the type of a declaration & a definition)
causing PR14763 and PR14645.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183329 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
144a31f53b0a97a2c46bfcb1e2a40fa8327b8e89 05-Jun-2013 Peter Collingbourne <peter@pcc.me.uk> [ms-cxxabi] Thread GlobalDecls through to CodeGenModule::getFunctionLinkage.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183324 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVTables.cpp
odeGenModule.cpp
odeGenModule.h
a06d585468ae9371eb46a69d6180c2a85e0f456e 05-Jun-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Fix vbptr offsets in memptrs when the vbptr is in an nvbase

Also addresses a review comment from John from on r180985 by removing
the "== -1" check, since it's now reusing the correct code which has the
comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183318 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
5f6e2f4010e1ebbc07231eff7c92e474e8912350 05-Jun-2013 David Blaikie <dblaikie@gmail.com> PR16214: Debug Info: -flimit-debug-info doesn't omit definitions for types used via typedefs

In an effort to make -flimit-debug-info more consistent I over-shot the
mark & made types used via typedefs never produce definitions in the
debug info (even if the type was used in a way that would require a
definition).

The fix for this is to do exactly what I was hoping to do at some point
- plumb the declaration/definition choice through the various layers of
"CreateType" in CGDebugInfo. In this way we can produce declarations
whenever they are sufficient & definitions otherwise - including when
qualifiers are used, for example (discovered in PR14467). This may not
be complete (there may be other types/situations where we need to
propagate the "declaration/definition" choice) but it lays the basic
foundation which we can enhance in future iterations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183296 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
a4b56d30389753cbde96ad410e86db4b4b86ac16 05-Jun-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Implement SparcV9ABIInfo::EmitVAArg.

This could actually be implemented with the LLVM IR va_arg instruction,
but it doesn't seem to offer any advantages over accessing the va_list
pointer directly.

Using the va_list pointer directly makes it possible to perform type
coercion directly from the argument array, and the va_list updates are
exposed to the optimizers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183292 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
7e9f52f1faacf5505476418411127c5b16e07533 05-Jun-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Fix CoerceIntOrPtrToIntOrPtr on big-endian targets.

Type coercion for argument passing is equivalent to storing the source
type and loading the destination type from the same pointer. On
big-endian targets, this means that the high bits of integers are
preserved.

This patch fixes the CoerceIntOrPtrToIntOrPtr() function on big-endian
targets by inserting the required shift instructions to preserve the
high bits instead of the low bits.

This is used by SparcABIInfo when passing small structs in the high bits
of registers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183291 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
90f9ec0dff7592c635e719909d288b5de04d224b 05-Jun-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Heed ABIArgInfo::getInReg() for return values.

The 'inreg' attribute can also be applied to function return values in
LLVM IR. The SPARC v9 backend is using the flag when returning structs
containing 32-bit floats.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183290 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
211c8ddb5b500ed84833751363d0cfe1115f4dd3 05-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Model temporary lifetime-extension explicitly in the AST. Use this model to
handle temporaries which have been lifetime-extended to static storage duration
within constant expressions. This correctly handles nested lifetime extension
(through reference members of aggregates in aggregate initializers) but
non-constant-expression emission hasn't yet been updated to do the same.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183283 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
odeGenModule.cpp
odeGenModule.h
8c47432b747d51e40a1e23a99403e78c2c864bd1 04-Jun-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Factor out some loops into helpers for readability

No functionality change, covered by the existing virtual base adjustment
tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183251 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
785f1e7e0631f34d5bbbed9d10e90d56d838f722 04-Jun-2013 Benjamin Kramer <benny.kra@googlemail.com> Fix typo in comment. Found by -Wdocumentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183217 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
34f94f93dc20e08c9327441e4b5bcbce9ba23e9c 04-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Remove some unreachable (and wrong) code and replace it with an assertion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183206 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
a7ff62f9443efa3b13a28a1e566d4625b15b8553 04-Jun-2013 Aaron Ballman <aaron@aaronballman.com> Adding support for MSVC #pragma detect_mismatch functionality by emitting a FAILIFMISMATCH linker command into the object file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183178 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenAction.cpp
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
argetInfo.cpp
argetInfo.h
4e43dec4df9d7dd8e07b47bb15967f1b733a9bc6 03-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Fix handling of pointers-to-members and comma expressions when
lifetime-extending temporaries in reference bindings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183089 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
e67ca5803ac9e39cc31ed1ad9576e1626c8141eb 02-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR12848: When emitting a local variable declared 'constexpr', always initialize it with a store or a memcpy, not by emitting the initializer expression. This is not required for correctness, but more closely aligns with people's expectations, and is cheap (since we've already evaluated the initializer).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183082 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
c59cf0de99622b946d38b6fdbae658d425910b72 31-May-2013 Ed Schouten <ed@80386.nl> Fix style bug introduced in r183033.

I renamed the function at one point in time, but forgot to fix the
layout of the arguments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183036 91177308-0d34-0410-b5e6-96231b3b80d8
GAtomic.cpp
e469249726840b8baa2df008ca891e213cc5c661 31-May-2013 Ed Schouten <ed@80386.nl> Add support for optimized (non-generic) atomic libcalls.

For integer types of sizes 1, 2, 4 and 8, libcompiler-rt (and libgcc)
provide atomic functions that pass parameters by value and return
results directly.

libgcc and libcompiler-rt only provide optimized libcalls for
__atomic_fetch_*, as generic libcalls on non-integer types would make
little sense. This means that we can finally make __atomic_fetch_* work
on architectures for which we don't provide these operations as builtins
(e.g. ARM).

This should fix the dreaded "cannot compile this atomic library call
yet" error that would pop up once every while.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183033 91177308-0d34-0410-b5e6-96231b3b80d8
GAtomic.cpp
7c731f5ac7b995fe57c4bda87ed5f59c58a33eb5 30-May-2013 Adrian Prantl <aprantl@apple.com> Do not reuse the debug location of the return value's store if there is autorelease code to be emitted between store and return instructions. This is analoguous to what we do for lexical scope cleanups.

rdar://problem/13977888

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182947 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ece7ebd2f2d03dc58fa1937a6d53e2a9f8c410f1 30-May-2013 Adrian Prantl <aprantl@apple.com> fix formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182946 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
b0f533e716ae5a21ca5682ea235a68082fd5ed28 29-May-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Implement MSVC virtual base adjustment

While we can't yet emit vbtables, this allows us to find virtual bases
of objects constructed in other TUs.

This make iostream hello world work, since basic_ostream virtually
inherits from basic_ios.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182870 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GClass.cpp
odeGenFunction.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
5baefa84bc33a46bcf2d3ff636da1a88a38f975d 29-May-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Fix bad indentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182821 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
fc782fbeb25ad880ec667f34997bd45d530aef86 28-May-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Build correct coercion types in SparcV9ABIInfo.

The coercion type serves two purposes:

1. Pad structs to a multiple of 64 bits, so they are passed
'left-aligned' in registers.

2. Expose aligned floating point elements as first-level elements, so
the code generator knows to pass them in floating point registers.

We also compute the InReg flag which indicates that the struct contains
aligned 32-bit floats. This flag is used by the code generator to pick
the right registers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182753 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
107196cb219128bfddde53f4718e5c9aa3a41ba6 27-May-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Add a SparcV9ABIInfo class for handling the standard SPARC v9 ABI.

- All integer arguments smaller than 64 bits are extended.
- Large structs are passed indirectly, not using 'byval'.
- Structs up to 32 bytes in size are returned in registers.

Some things are not implemented yet:

- EmitVAArg can be implemented in terms of the va_arg instruction.
- When structs are passed in registers, float members require special
handling because they are passed in the floating point registers.
- Structs are left-aligned when passed in registers. This may require
padding.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182745 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
a99ecbcc4c431d52df0b01539035ab5281d54656 25-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Fix linkage computation for derived types in inline functions.

John noticed that the fix for pr15930 (r181981) didn't handle indirect
uses of local types. For example, a pointer to local struct, or a
function that returns it.

One way to implement this would be to recursively look for local
types. This would look a lot like the linkage computation itself for
types.

To avoid code duplication and utilize the existing linkage cache, this
patch just makes the computation of "type with no linkage but
externally visible because it is from an inline function" part of the
linkage computation itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182711 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
b0f77b065761670921fdf9c56029856cb5d9c306 24-May-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Rename CreatePointerType to getOrCreateTypeDeclaration

To make this more consistent with 'getOrCreateType' & clarify the
distinction between the two. The only thing I couldn't quite communicate
in the name is that getOrCreateTypeDeclaration may actually produce a
full definition (in -fno-limit-debug-info) but the point is to call it
whenever only a declaration is needed & the implementation can choose
whether to provide a declaration or definition.

(also, unfortunately, getOrCreateType can produce declarations too - we
should sure this up by making it not do that - any caller that can
tolerate a declaration should be calling getOrCreateTypeDeclaration
instead)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182674 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
912964863c344dd84976ee281bd213d0485645ba 24-May-2013 David Blaikie <dblaikie@gmail.com> PR16091: Error when attempting to emit debug info for undeduced auto return types

Perhaps we should just suppress this, rather than erroring, but since we
have the infrastructure for it I figured I'd use it - if this is
determined to be not the right thing we should probably remove that
infrastructure entirely. I guess it's lying around from the early days
of implementing debug info support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182673 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d27e5cbff3c98fa3f623c75dce7165176c1f98a5 24-May-2013 Diego Novillo <dnovillo@google.com> [PATCH] Generate cold attribute for functions marked __atribute__((cold))

This removes a FIXME in CodeGenModule::SetLLVMFunctionAttributesForDefinition.
When a function is declared cold we can now generate the IR attribute in
addition to marking the function to be optimized for size.

I tried adding a separate CHECK in the existing test, but it was
failing. I suppose CHECK matches one line exactly once? This would be
a problem if the attributes are listed in a different order, though they
seem to be sorted.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182666 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
89735b9516b1a378c6d33620a6c3a0d5705f9d04 24-May-2013 Aaron Ballman <aaron@aaronballman.com> Suffixing #pragma comment(lib) library names with .lib if necessary. This matches MSVC behavior, as well as allows us to properly link libraries such as the ones provided by the MSDN examples.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182647 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
e69fb2043519d8f36314dd5dd78bb7638c6140f6 23-May-2013 Richard Smith <richard-llvm@metafoo.co.uk> Fix assert on temporary std::initializer_list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182615 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
9a84529ed075d8047bb93f278a9da5e417fd71f3 23-May-2013 David Blaikie <dblaikie@gmail.com> Debug Info: Handle function/method types using the most specific type

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182533 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
0cb0002332dff5b7bc957c6746a20b78ab3ab0c2 22-May-2013 Adrian Prantl <aprantl@apple.com> Comment and cleanup.

rdar://problem/13359718

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182524 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
c32a21747251f49a793900dc816bd6d16706612b 22-May-2013 Adrian Prantl <aprantl@apple.com> Bugfix for r181629:
- The return type should be a pointer to the class type.
- Make the condition more specific.

rdar://problem/13359718

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182504 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e2eb89a8fb8644bf9d89575f9cf2227699ed2fa7 21-May-2013 David Blaikie <dblaikie@gmail.com> Debug Info: Simplify the code changed in r182403 to reduce indent & avoid a duplicate lookup in the insertion case

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182404 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
297dee826f8979a2b910e46b96d59c5308f638f6 21-May-2013 David Blaikie <dblaikie@gmail.com> Debug Info: don't bother reinserting elements into maps we just retrieved them from

(no intended behavior change)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182403 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1e97c1e978cd71cb1fda14d7954045dd3da4924d 21-May-2013 David Blaikie <dblaikie@gmail.com> Fix whitespace

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182400 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
fc46ebc2b1345723a894ae352cfb206c1d930295 21-May-2013 David Blaikie <dblaikie@gmail.com> PR14606: Debug Info for namespace aliases/DW_TAG_imported_module

This resolves the last of the PR14606 failures in the GDB 7.5 test
suite. (but there are still unresolved issues in the imported_decl case
- we need to implement optional/lazy decls for functions & variables
like we already do for types)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182329 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
odeGenModule.cpp
3a7d82c4852dfd1e78f7ce7bdd94cc5eb1e4a0bc 20-May-2013 Eric Christopher <echristo@gmail.com> Make this const since it never changes (and should never change).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182309 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.h
a722534711fd93b5685e1a00f37a62f6a578dacd 20-May-2013 Reid Kleckner <reid@kleckner.net> Implement __declspec(selectany) under -fms-extensions

selectany only applies to externally visible global variables. It has
the effect of making the data weak_odr.

The MSDN docs suggest that unused definitions can only be dropped at
linktime, so Clang uses weak instead of linkonce. MSVC optimizes away
references to constant selectany data, so it must assume that there is
only one definition, hence weak_odr.

Reviewers: espindola

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182266 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
9faebd23fd69ac1591520e811dfa5b25f73012f3 20-May-2013 David Blaikie <dblaikie@gmail.com> Revert "Revert "Debug Info: Using declarations/DW_TAG_imported_declaration of variables, types, and functions.""

This reverts commit r181947 (git d2990ce56a16050cac0d7937ec9919ff54c6df62 )

This addresses one of the two issues identified in r181947, ensuring
that types imported via using declarations only result in a declaration
being emitted for the type, not a definition. The second issue (emitting
using declarations that are unused) is hopefully an acceptable increase
as the real fix for this would be a bit difficult (probably at best we
could record which using directives were involved in lookups - but may
not have been the result of the lookup).

This also ensures that DW_TAG_imported_declarations (& directives) are
not emitted in line-tables-only mode as well as ensuring that typedefs
only require/emit declarations (rather than definitions) for referenced
types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182231 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
b509224b28bf7ddb2e4ff1d52855df5b56b44bf4 18-May-2013 Adrian Prantl <aprantl@apple.com> Drop the const from the isa test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182178 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
687ecae11966c3cf098dda03d229770b14de53ed 18-May-2013 Adrian Prantl <aprantl@apple.com> ObjC Debug Info: Emit the correct method names for accessors for
properties declared in a protocol.

rdar://problem/13798000

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182176 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
713e3f25636736fe798c8603ebca56ae8d5372e8 16-May-2013 Enea Zaffanella <zaffanella@cs.unipr.it> Let CodeGenFunction::EmitVarDecl query the semantic storage class info.
Added testcase corresponding to PR15991.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181998 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
7c811dc4874124ea083a2f812d227cf53027290b 16-May-2013 Eric Christopher <echristo@gmail.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181966 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.h
f0890c420bd9c4a614160882d4d163cddf77ed26 16-May-2013 Eric Christopher <echristo@gmail.com> 80-columns.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181965 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
13c976710415041fca5aba25cc02d3813c74b990 16-May-2013 Eric Christopher <echristo@gmail.com> Replace a pile of calls with an instance variable that's set
once. Should be no functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181964 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
6537f083555f9606c495d05c562878aa49bae987 16-May-2013 Eric Christopher <echristo@gmail.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181960 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3081c6fe13fbefc398e685a34fe7ba644c209ecd 16-May-2013 Adrian Prantl <aprantl@apple.com> Clarify comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181959 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
59f0a5a5481a6dcfafd092dd944e6cfb7d146d4c 16-May-2013 Adrian Prantl <aprantl@apple.com> Set the debug location for landing pad code to the canonical EH location.
It used to point to the first call that caused the landing pad to
be generated.

rdar://problem/13888152

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181958 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.h
GException.cpp
1c3db769249a633108dc320da87c48a432e2bcc1 16-May-2013 Adrian Prantl <aprantl@apple.com> Cleanup: Use a member variable to store the SourceLocation for EH code.
rdar://problem/13888152

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181957 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
odeGenFunction.cpp
odeGenFunction.h
214c3d6c64674427e3eaa8e8fefac8c684302010 16-May-2013 David Blaikie <dblaikie@gmail.com> Revert "Debug Info: Using declarations/DW_TAG_imported_declaration of variables, types, and functions."

This reverts commit r181393 (git 3923d6a87fe7b2c91cc4a7dbd90c4ec7e2316bcd).

This seems to be emitting too much extra debug info for two (known)
reasons:
* full class definitions are emitted when only declarations are expected
* unused using declarations still produce DW_TAG_imported_declarations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181947 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
7247c88d1e41514a41085f83ebf03dd5220e054a 15-May-2013 David Blaikie <dblaikie@gmail.com> Use only explicit bool conversion operator

The most common (non-buggy) case are where such objects are used as
return expressions in bool-returning functions or as boolean function
arguments. In those cases I've used (& added if necessary) a named
function to provide the equivalent (or sometimes negative, depending on
convenient wording) test.

DiagnosticBuilder kept its implicit conversion operator owing to the
prevalent use of it in return statements.

One bug was found in ExprConstant.cpp involving a comparison of two
PointerUnions (PointerUnion did not previously have an operator==, so
instead both operands were converted to bool & then compared). A test
is included in test/SemaCXX/constant-expression-cxx1y.cpp for the fix
(adding operator== to PointerUnion in LLVM).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181869 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
4537d6e0f9baf2e011a4260e0d7872789b01c3f2 14-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Fix __clear_cache on ARM.

Current gcc's produce an error if __clear_cache is anything but

__clear_cache(char *a, char *b);

It looks like we had just implemented a gcc bug that is now fixed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181784 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
b71757b2e02b83c18b736729a747016f0b1e1353 14-May-2013 Benjamin Kramer <benny.kra@googlemail.com> Revert accidental commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181782 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
9d126fb59cf4aacc8e5058c830f23ba7be1db0fe 14-May-2013 Benjamin Kramer <benny.kra@googlemail.com> Take a stab at trying to unbreak the makefile build.

There is no clangRewrite.a.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181781 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
7be62a87abf60d4c13ab60ee8fb896aebac188a8 14-May-2013 David Blaikie <dblaikie@gmail.com> PR15956: Debug Info: Include the appropriate file location in types created due to using declarations

We might benefit from API refactoring here (why pass in a value that's
derived from another parameter?) but this is the immediate issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181747 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f8aa155e40bc98844f46ecbfdbe430696c36ce24 13-May-2013 David Blaikie <dblaikie@gmail.com> Debug Info: PR14992: Support values for non-type template parameters of function type

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

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181677 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
odeGenModule.cpp
odeGenTBAA.cpp
87360f2acd4e2fa706707135b95c64e5e2b63435 12-May-2013 David Blaikie <dblaikie@gmail.com> Debug Info: Comment changes in r181393 by request of echristo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181672 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
06a9d0431fefb41d46e43dfac4770c5bb6156b02 11-May-2013 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: Refactor SetLLVMFunctionAttributesForDefinition to use an AttrBuilder.

Adding attributes to a uniqued set has become expensive, don't do it more often
than necessary. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181662 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
e8065128777e13322aa2b4de86a362326e0c7686 11-May-2013 David Blaikie <dblaikie@gmail.com> Debug Info: correct comment

Eric's code review feedback to r181644

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181650 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
776a36453a48f3d1f305b83fbdf1632dde808ab5 11-May-2013 David Blaikie <dblaikie@gmail.com> Debug Info: Silently accept template argument packs

We could support the GCC extension DW_TAG_GNU_template_parameter_pack if
we're feeling adventurous, at some point - but I don't think GDB's doing
anything useful with it yet anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181644 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9dfd24324c079b564dda936c6ae46898b82121e2 10-May-2013 David Blaikie <dblaikie@gmail.com> PR14992: Debug Info: Support more non-type template parameters

* Provide DW_TAG_template_value_parameter for pointers, function
pointers, member pointers, and member function pointers (still missing
support for template template parameters which GCC encodes as a
DW_TAG_GNU_template_template_param)
* Provide values for all but the (member & non-member) function pointer case.
Simple constant integer values for member pointers (offset within the
object) and address for the value pointer case. GCC doesn't provide a
value for the member function pointer case so I'm not sure how, if at
all, GDB supports encoding that. & non-member function pointers should
follow shortly in a subsequent patch.
* Null pointer value encodings of all of these types, including
correctly encoding null data member pointers as -1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181634 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
566a9c3680d9960bb0eb6acf33507251cc13a8d8 10-May-2013 Adrian Prantl <aprantl@apple.com> ObjC debug info: Substitute the class type for methods that return
a related type (e.g., if they use the instancetype keyword).

rdar://problem/13359718

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181629 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0a050f7d56039bab7556e08b359e06d329977b6b 10-May-2013 Adrian Prantl <aprantl@apple.com> Debug Info: Fix a problem that resulted in missing DW_AT_specifications
for C++ constructors.

If the DIType for a class was generated by
CGDebugInfo::createContextChain(), the cache contains only a
limited DIType wihtout any declarations. Since EmitFunctionStart()
needs to find the canonical declaration for each method, we
construct the complete type before emitting any method.

rdar://problem/13116508

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181561 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
f632730ffb0b8ca531a35e737b29cc9f9774ca1d 09-May-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Implement member pointer conversions

Summary:
This only supports converting along non-virtual inheritance paths by
changing the field offset or the non-virtual base adjustment.

This implements three kinds of conversions:
- codegen for Value conversions
- Constant emission for APValue
- Constant folding for CastExprs

In almost all constant initialization settings
EmitMemberPointer(APValue) is called, except when the expression
contains a reinterpret cast.

reinterpret casts end up being a big corner case because the null value
changes between different kinds of member pointers.

Reviewers: rsmith

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181543 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
089db2e3af0b6166a8e2253c453eccf551ddfbd8 09-May-2013 David Blaikie <dblaikie@gmail.com> Debug Info: Remove unnecessary check for dependent array types

This was added, untested (though the relevant crash was tested), in
r128725/PR9600. Removing it doesn't cause failures & nothing I can
imagine could cause this check to ever return 'true' (we should never be
dealing with dependent types here). The subsequent change to check
"isIncompleteType" (r128855/PR9608) makes a lot more sense.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181542 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
524387ae3dfc0c4cf2b095f83f9e47aa549b7e55 09-May-2013 Ben Langmuir <ben.langmuir@intel.com> CodeGen for CapturedStmts

EmitCapturedStmt creates a captured struct containing all of the captured
variables, and then emits a call to the outlined function. This is similar in
principle to EmitBlockLiteral.

GenerateCapturedFunction actually produces the outlined function. It is based
on GenerateBlockFunction, but is much simpler. The function type is determined
by the parameters that are in the CapturedDecl.

Some changes have been added to this patch that were reviewed as part of the
serialization patch and moving the parameters to the captured decl.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181536 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
f06989b9f360e2b43cb1d94c317cc6e1826f7611 09-May-2013 Adrian Prantl <aprantl@apple.com> typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181485 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
41487f37d3174dcf827761d7c95a7e9d4ffdf56d 09-May-2013 Dmitri Gribenko <gribozavr@gmail.com> Comment: use \code...\endcode for code examples


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181481 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
5b382770ec07ee1b4b0ad14e7be39ab7b30ba1eb 09-May-2013 Fariborz Jahanian <fjahanian@apple.com> unbreak buildbot.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181479 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
3190ca922d3743137e15fe0c525c04b177b9983b 08-May-2013 Reid Kleckner <reid@kleckner.net> Forward #pragma comment(lib/linker) through as flags metadata

Summary:
Most of this change is wiring the pragma all the way through from the
lexer, parser, and sema to codegen. I considered adding a Decl AST node
for this, but it seemed too heavyweight.

Mach-O already uses a metadata flag called "Linker Options" to do this
kind of auto-linking. This change follows that pattern.

LLVM knows how to forward the "Linker Options" metadata into the COFF
.drectve section where these flags belong. ELF support is not
implemented, but possible.

This is related to auto-linking, which is http://llvm.org/PR13016.

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181426 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenAction.cpp
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
argetInfo.cpp
argetInfo.h
3923d6a87fe7b2c91cc4a7dbd90c4ec7e2316bcd 08-May-2013 David Blaikie <dblaikie@gmail.com> Debug Info: Using declarations/DW_TAG_imported_declaration of variables, types, and functions.

Basic support is implemented here - it still doesn't account for
declared-but-not-defined variables or functions. It cannot handle out of
order (declared, 'using', then defined) cases for variables, but can
handle that for functions (& can handle declared, 'using'd, and not
defined at all cases for types).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181393 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
ddb379ef3aaba9f1b77e9db6704a2d7d3378d69b 08-May-2013 Adrian Prantl <aprantl@apple.com> The style guide prefers preincrement expressions :-)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181373 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
4008088b002ba98ecbafdcc2d1f2ef1f41236b09 08-May-2013 Adrian Prantl <aprantl@apple.com> remove commented out code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181372 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
4c71b8cded575b0cfc133c5da4502ca613982094 07-May-2013 Richard Smith <richard-llvm@metafoo.co.uk> Don't crash in IRGen if a conditional with 'throw' in one of its branches is
used as a branch condition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181368 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.cpp
odeGenFunction.h
402cd22c598b39a272f2b31b52b19d4830954e1a 07-May-2013 John McCall <rjmccall@apple.com> Weaken an assertion in memcpyization to account for
unnamed bitfields.

Unnamed bitfields won't have an explicit copy operation
in the AST, which breaks the strong form of the invariant.

rdar://13816940

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181289 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
c2fc4ab28c13ebc1da5828e12e638514d4d777dc 07-May-2013 David Blaikie <dblaikie@gmail.com> DebugInfo: Support imported modules (using directives) within lexical blocks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181272 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b8409215523e5478b8b0aa9cdcd10038cf7651fe 06-May-2013 Ulrich Weigand <ulrich.weigand@de.ibm.com> Add SystemZ support

This patch then adds all the usual platform-specific pieces for SystemZ:
driver support, basic target info, register names and constraints,
ABI info and vararg support. It also adds new tests to verify pre-defined
macros and inline asm, and updates a test for the minimum alignment change.

This version of the patch incorporates feedback from reviews by
Eric Christopher and John McCall. Thanks to all reviewers!

Patch by Richard Sandiford.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181211 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
6b20351a1d6178addfaa86716aaba36f2e9ea188 06-May-2013 Ulrich Weigand <ulrich.weigand@de.ibm.com> Allow targets to define minimum alignment for global variables

This patch adds a new common code feature that allows platform code to
request minimum alignment of global symbols. The background for this is
that on SystemZ, the most efficient way to load addresses of global symbol
is the LOAD ADDRESS RELATIVE LONG (LARL) instruction. This instruction
provides PC-relative addressing, but only to *even* addresses. For this
reason, existing compilers will guarantee that global symbols are always
aligned to at least 2. [ Since symbols would otherwise already use a
default alignment based on their type, this will usually only affect global
objects of character type or character arrays. ] GCC also allows creating
symbols without that extra alignment by using explicit "aligned" attributes
(which then need to be used on both definition and each use of the symbol).

To enable support for this with Clang, this patch adds a
TargetInfo::MinGlobalAlign variable that provides a global minimum for the
alignment of every global object (unless overridden via explicit alignment
attribute), and adds code to respect this setting. Within this patch, no
platform actually sets the value to anything but the default 1, resulting
in no change in behaviour on any existing target.

This version of the patch incorporates feedback from reviews by
Eric Christopher and John McCall. Thanks to all reviewers!

Patch by Richard Sandiford.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181210 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
d8ffd0b7b61566f15a67192883a607f7703bcece 05-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Make all 'is in extern "C"' tests use the lexical context.

I was not able to find a case (other than the fix in r181163) where this
makes a difference, but it is a more obviously correct API to have.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181165 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5543169296beeb183b9c9392debc774fcf493eeb 05-May-2013 Dmitri Gribenko <gribozavr@gmail.com> Replace ArrayRef<T>() with None, now that we have an implicit ArrayRef constructor from None

Patch by Robert Wilhelm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181139 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenModule.h
dc17384581e37436582a007be4d9185bcf7003ec 04-May-2013 Enea Zaffanella <zaffanella@cs.unipr.it> In VarDecl nodes, store the thread storage class specifier as written.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181113 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ff920eec4d449bee560d8d99636ad0eb50cd9d8d 04-May-2013 Tim Northover <Tim.Northover@arm.com> AArch64: teach Clang about __clear_cache intrinsic

libgcc provides a __clear_cache intrinsic on AArch64, much like it
does on 32-bit ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181111 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
83eba02c2ea333015335e2f74c4d11c5315b655d 03-May-2013 Stephen Hines <srhines@google.com> Merge remote-tracking branch 'upstream/master' into merge-20130502
d072e59eb6b5e32f93be25f08f212b0ec21d6c5d 03-May-2013 Adrian Prantl <aprantl@apple.com> Reapply r180982 with repaired logic and an additional testcase.

Un-break the gdb buildbot.
- Use the debug location of the return expression for the cleanup code
if the return expression is trivially evaluatable, regardless of the
number of stop points in the function.
- Ensure that any EH code in the cleanup still gets the line number of
the closing } of the lexical scope.
- Added a testcase with EH in the cleanup.

rdar://problem/13442648

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181056 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
f5ebf9bf1df10ac15ba32a4b24dfe171b7848c58 03-May-2013 John McCall <rjmccall@apple.com> Correctly emit certain implicit references to 'self' even within
a lambda.

Bug #1 is that CGF's CurFuncDecl was "stuck" at lambda invocation
functions. Fix that by generally improving getNonClosureContext
to look through lambdas and captured statements but only report
code contexts, which is generally what's wanted. Audit uses of
CurFuncDecl and getNonClosureAncestor for correctness.

Bug #2 is that lambdas weren't specially mapping 'self' when inside
an ObjC method. Fix that by removing the requirement for that
and using the normal EmitDeclRefLValue path in LoadObjCSelf.

rdar://13800041

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181000 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCall.cpp
GClass.cpp
GExpr.cpp
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
bb09f7b1d9312471b701f2683a9d955b4e954630 03-May-2013 Adrian Prantl <aprantl@apple.com> Revert "Attempt to un-break the gdb buildbot."

This reverts commit 180982.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180990 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
79e0291be71adb4c38431e27a683faa40bbedc61 03-May-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Emit non-virtual member function pointers

Without any conversion, this is pretty straightforward. Most of the
fields can be zeros. The order is:

- field offset or pointer
- nonvirtual adjustment (for MI functions)
- vbptr offset (for unspecified)
- virtual adjustment offset (for virtual inheritance)

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180985 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
30c0d27b61e38ad6038eeb8650f0dac83056c75b 03-May-2013 Adrian Prantl <aprantl@apple.com> Attempt to un-break the gdb buildbot.
- Use the debug location of the return expression for the cleanup code
if the return expression is trivially evaluatable, regardless of the
number of stop points in the function.
- Ensure that any EH code in the cleanup still gets the line number of
the closing } of the lexical scope.
- Added a testcase with EH in the cleanup.

rdar://problem/13442648

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180982 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
aeeacf725c9e0ddd64ea9764bd008e5b6873ce51 03-May-2013 John McCall <rjmccall@apple.com> Move parsing of identifiers in MS-style inline assembly into
the actual parser and support arbitrary id-expressions.

We're actually basically set up to do arbitrary expressions here
if we wanted to.

Assembly operands permit things like A::x to be written regardless
of language mode, which forces us to embellish the evaluation
context logic somewhat. The logic here under template instantiation
is incorrect; we need to preserve the fact that an expression was
unevaluated. Of course, template instantiation in general is fishy
here because we have no way of delaying semantic analysis in the
MC parser. It's all just fishy.

I've also fixed the serialization of MS asm statements.

This commit depends on an LLVM commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180976 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
4e3b54b4acb4dd926ca50d7f06c8265d1d24ba79 02-May-2013 Bill Wendling <isanbard@gmail.com> Use the Itanium ABI for thread_local on Darwin.

After some discussion, it was decided to use the Itanium ABI for thread_local on
Darwin OS X platforms. This involved a couple of changes. First, we use
"_tlv_atexit" instead of "__cxa_thread_atexit". Secondly, the global variables
are marked with 'internal' linkage, because we want all access to be calls to
the Itanium-specific entry point, which has normal linkage.
<rdar://problem/13733006>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180941 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
taniumCXXABI.cpp
fa6b079b1231366696f6a497c6a084c73a35c85d 02-May-2013 Adrian Prantl <aprantl@apple.com> Ensure that the line table for functions with cleanups is sequential.

If there is cleanup code, the cleanup code gets the debug location of
the closing '}'. The subsequent ret IR-instruction does not get a
debug location. The return _expression_ will get the debug location
of the return statement.

If the function contains only a single, simple return statement,
the cleanup code may become the first breakpoint in the function.
In this case we set the debug location for the cleanup code
to the location of the return statement.

rdar://problem/13442648

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180932 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
d4147c4b2d4eba0327658f36c5a2c63f2d234991 02-May-2013 Adrian Prantl <aprantl@apple.com> Use a more idiomatic way to disable debug locations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180931 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
230ea4179a4684ec0d89954b7a93731b176546e9 01-May-2013 Adrian Prantl <aprantl@apple.com> Revert 180817 because 180816 was reverted.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180823 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
826374a4de73088a8abfaa5f031ba54f1d9fbee0 01-May-2013 Adrian Prantl <aprantl@apple.com> Do not generate VLAs as complex variables any more, as they are now
correctly represented as breg+0 locations in the backend.

(Paired commit with LLVM: r180815)

rdar://problem/13658587

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180817 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
8f4bdc0e37b4b24a58a15ecf41d1355a3b3fdcbb 30-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Revert r180739 and r180748: they broke C++11 thread_local on non-Darwin systems and did not do the right thing on Darwin.

Original commit message:

Emit the TLS intialization functions into a list.

Add the TLS initialization functions to a list of initialization functions. The
back-end takes this list and places the function pointers into the correct
section. This way they're called before `main().'

<rdar://problem/13733006>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180809 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenModule.cpp
odeGenModule.h
3d2f000df9311bfccb6d2ac350be3d3efa5a412b 30-Apr-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Implement member pointer comparisons

Summary:
Like Itanium, comparisons are basically bitwise comparisons of the two
values, with an exception for null member function pointers. If two
function pointers are null, only the function pointer field matters for
comparison purposes. The rest of the bits can be arbitrary. We take
advantage of this in isZeroInitializable(), and it may matter once we
start emitting conversions.

Reviewers: rjmccall

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180800 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
c7d77b25a37acad689ae5c318fdf80fde92983f0 30-Apr-2013 Manman Ren <mren@apple.com> Struct-path aware TBAA: enable struct-path aware TBAA for classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180795 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.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
GRTTI.cpp
odeGenFunction.cpp
odeGenTypes.cpp
7c6b7ba5f5410d4b552ee53c60d0690522c99959 30-Apr-2013 Bill Wendling <isanbard@gmail.com> Emit the TLS intialization functions into a list.

Add the TLS initialization functions to a list of initialization functions. The
back-end takes this list and places the function pointers into the correct
section. This way they're called before `main().'

<rdar://problem/13733006>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180739 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenModule.cpp
odeGenModule.h
975d83c291821de340eef3c3498104172b375f79 27-Apr-2013 Manman Ren <mren@apple.com> Struct-path aware TBAA: fix handling of may_alias attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180656 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
50be9041fcca4d77c09f120e720d75be703b6ea0 27-Apr-2013 Manman Ren <mren@apple.com> Struct-path aware TBAA: change the format of TBAAStructType node.

We switch the order of offset and field type to make TBAAStructType node
(name, parent node, offset) similar to scalar TBAA node (name, parent node).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180653 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
c7b5f381ed41a238aa4c243f99170909f64a3414 26-Apr-2013 Benjamin Kramer <benny.kra@googlemail.com> ArrayRefize code. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180632 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenFunction.h
1601a4a5da8b895fa598efc9e0e736aae5bf00c5 26-Apr-2013 David Blaikie <dblaikie@gmail.com> Support debug info for using directives at global/namespace scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180594 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
c7f2bfb4a2dcda757619356a28cb633711a6548c 22-Apr-2013 Manman Ren <mren@apple.com> TBAA: make sure zero-length bitfield works for tbaa.struct and path-aware tbaa

For ms structs, zero-length bitfields following non-bitfield members are
completely ignored, we should not increase the field index.
Before the fix, we will have an assertion failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180038 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
23bde7df2cb1fc7029a6338bd109c078d09d13c2 22-Apr-2013 Benjamin Kramer <benny.kra@googlemail.com> Use the ugly PRIx64 macro to make format string portable.

This is debugging code so functionality isn't a concern, but mingw32 warns
because it doesn't understand the %llx format specifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180024 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
db4f61f9fb0edc16b5568af0bf6a6729718b349f 22-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Don't emit _ZTW wrappers for TLS variables which don't use the C++ thread_local keyword.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180004 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
957dac5b6d826bc0c10011c8b5c3f1b8007fda41 22-Apr-2013 David Blaikie <dblaikie@gmail.com> Revert "Revert "PR14606: Debug info for using directives/DW_TAG_imported_module""

This reverts commit 179839 now that the corresponding LLVM patch has been fixed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179997 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
c3bf52ced9652f555aa0767bb822ec4c64546212 21-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> C++1y: Allow aggregates to have default initializers.

Add a CXXDefaultInitExpr, analogous to CXXDefaultArgExpr, and use it both in
CXXCtorInitializers and in InitListExprs to represent a default initializer.

There's an additional complication here: because the default initializer can
refer to the initialized object via its 'this' pointer, we need to make sure
that 'this' points to the right thing within the evaluation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179958 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
59d6a71d681adfdc7d976492eeb3deae84e8f2e2 19-Apr-2013 Adrian Prantl <aprantl@apple.com> Emit the underlying type in the debug info for all kinds of fixed enums
instead of only C++11-scoped-with-class-tag enums.

rdar://problem/13463793

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179879 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b80a16eadd0dacabfc1c32412e243ccb99dd664d 19-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Implement CodeGen for C++11 thread_local, following the Itanium ABI specification as discussed on cxx-abi-dev.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179858 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
GDeclCXX.cpp
GExpr.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
c3e81e78e8b1d5ba3df2d5801841b4fbc53c1bd8 19-Apr-2013 Eric Christopher <echristo@gmail.com> Revert "PR14606: Debug info for using directives/DW_TAG_imported_module"

This reverts commit r179837 as it seems to be causing test failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179839 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
cec39845823bb051de7ae86bb9528c57547ec4cf 19-Apr-2013 David Blaikie <dblaikie@gmail.com> PR14606: Debug info for using directives/DW_TAG_imported_module

More changes later for using declarations/DW_TAG_imported_declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179837 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
bb00079d2ca77815efa0ab50cb10f302d1ae69e4 19-Apr-2013 David Blaikie <dblaikie@gmail.com> Give CGDebugInfo::getContextDescriptor a more specific return type

Not that the DI* hierarchy is terribly type safe, but this makes the contract a
little clearer I think.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179835 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
ed23bdf69dd63e4fd01c02b12a13d1e6cbff9c2f 17-Apr-2013 Timur Iskhodzhanov <timurrrr@google.com> Set SRet flags properly in '-cxx-abi microsoft'.

Also,
- abstract out the indirect/in memory/in registers decisions into the CGCXXABI
- fix handling of empty struct arguments for '-cxx-abi microsoft'
- add/fix tests



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179681 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
argetInfo.cpp
3abae0995b5d4faa3d8cfb1f06118d71a60c7dab 17-Apr-2013 John McCall <rjmccall@apple.com> Don't propagate around TargetOptions in IR-gen; we don't use it.

Patch by Stephen Lin!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179639 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
oduleBuilder.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
BIInfo.h
GAtomic.cpp
GBlocks.cpp
GBuiltin.cpp
GCall.cpp
GClass.cpp
GDebugInfo.cpp
GDecl.cpp
GDeclCXX.cpp
GExprAgg.cpp
GExprScalar.cpp
GObjC.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GRecordLayoutBuilder.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
taniumCXXABI.cpp
argetInfo.cpp
b57f6b3d8f84e9241fd978e2739d6a9da0870546 16-Apr-2013 John McCall <rjmccall@apple.com> objc_autoreleasePoolPop() can throw if a -dealloc does.
Model it as throwing so that the exception can be caught.

This is generally not expected to have significant code-size
impact because the contents of the @autoreleasepool block
are very likely to contain a call, very likely at the same
cleanup level as the @autoreleasepool itself.

rdar://13660038

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179630 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
6afcf8875d4e447645cd7bf3733dd8e2eb8455dc 16-Apr-2013 Tareq A. Siraj <tareq.a.sriaj@intel.com> Sema for Captured Statements

Add CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic
analysis. Currently captures all variables by reference.

TODO: templates

Author: Ben Langmuir <ben.langmuir@intel.com>

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179618 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
051303ce09291dfbed537fa33b0d8a4d92c82b75 16-Apr-2013 Tareq A. Siraj <tareq.a.sriaj@intel.com> Implement CapturedStmt AST

CapturedStmt can be used to implement generic function outlining as described in
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html.

CapturedStmt is not exposed to the C api.

Serialization and template support are pending.

Author: Wei Pan <wei.pan@intel.com>

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179615 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
f4910132078b4b8852fc46657f3150ed472f4654 16-Apr-2013 Daniel Dunbar <daniel@zuster.org> [Modules] Convert module specific -fno-modules-autolink into -fno-autolink.

- There is no reason to have a modules specific flag for disabling
autolinking. Instead, convert the existing flag into -fno-autolink (which
should cover other autolinking code generation paths like #pragmas if and
when we support them).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179612 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
428edb7f7599b4ee44eaad00bb3c330495fc1ad6 16-Apr-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C IRGen. Use llvm::WeakVH
for caching couple of global symbols used
for generation of CF/NS string meta-data
so they are not released prematuely in certain
corner cases. // rdar:// 13598026.
Reviewed by John M.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179599 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
76da55d3a49e1805f51b1ced7c5da5bcd7f759d8 16-Apr-2013 John McCall <rjmccall@apple.com> Basic support for Microsoft property declarations and
references thereto.

Patch by Tong Shen!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179585 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
04e517650569598e847c2ab609672e6df93effe5 15-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> CodeGen support for function-local static thread_local variables with
non-constant constructors or non-trivial destructors. Plus bugfixes for
thread_local references bound to temporaries (the temporaries themselves are
lifetime-extended to become thread_local), and the corresponding case for
std::initializer_list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179496 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
GDeclCXX.cpp
GExpr.cpp
odeGenModule.cpp
taniumCXXABI.cpp
icrosoftCXXABI.cpp
f6b4a6868cd292d211474abce98a7d9b541acf1b 15-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Removed #if 0 code that doesn't compiled if uncommented.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179495 91177308-0d34-0410-b5e6-96231b3b80d8
GAtomic.cpp
38afbc7361d861968232defaeaf8e302af75b5ee 13-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Annotate flavor of TLS variable (statically or dynamically initialized) onto the AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179447 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GDeclCXX.cpp
GExpr.cpp
odeGenModule.cpp
84083b74abc4a2d1a9013ce4c75d63ee7d6d1da3 13-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Use MapVector rather than simulating it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179438 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
ca835180412eb4382fe4cc97e9374489b9ad3946 12-Apr-2013 Manman Ren <mren@apple.com> Struct-path aware TBAA: uniformize scalar tag and path tag.

For struct-path aware TBAA, we used to use scalar type node as the scalar tag,
which has an incompatible format with the struct path tag. We now use the same
format: base type, access type and offset.

We also uniformize the scalar type node and the struct type node: name, a list
of pairs (offset + pointer to MDNode). For scalar type, we have a single pair.
These are to make implementaiton of aliasing rules easier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179335 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenModule.cpp
odeGenModule.h
odeGenTBAA.cpp
odeGenTBAA.h
a3609b0c7685346308ed2c8022f94949bbfe7cdf 11-Apr-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Implement member pointer emission and dereferencing

Summary:
Handles all inheritance models for both data and function member
pointers.

Also implements isZeroInitializable() and refactors some of the null
member pointer code.

MSVC supports converting member pointers through virtual bases, which
clang does not (yet?) support. Implementing that extension is covered
by http://llvm.org/15713

Reviewers: rjmccall

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179305 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
1fd1e288d0f45b86d191d8f53f569e5143f3a18a 11-Apr-2013 Jordan Rose <jordan_rose@apple.com> Force a load when creating a reference to a temporary copied from a bitfield.

For this source:
const int &ref = someStruct.bitfield;

We used to generate this AST:

DeclStmt [...]
`-VarDecl [...] ref 'const int &'
`-MaterializeTemporaryExpr [...] 'const int' lvalue
`-ImplicitCastExpr [...] 'const int' lvalue <NoOp>
`-MemberExpr [...] 'int' lvalue bitfield .bitfield [...]
`-DeclRefExpr [...] 'struct X' lvalue ParmVar [...] 'someStruct' 'struct X'

Notice the lvalue inside the MaterializeTemporaryExpr, which is very
confusing (and caused an assertion to fire in the analyzer - PR15694).

We now generate this:

DeclStmt [...]
`-VarDecl [...] ref 'const int &'
`-MaterializeTemporaryExpr [...] 'const int' lvalue
`-ImplicitCastExpr [...] 'int' <LValueToRValue>
`-MemberExpr [...] 'int' lvalue bitfield .bitfield [...]
`-DeclRefExpr [...] 'struct X' lvalue ParmVar [...] 'someStruct' 'struct X'

Which makes a lot more sense. This allows us to remove code in both
CodeGen and AST that hacked around this special case.

The commit also makes Clang accept this (legal) C++11 code:

int &&ref = std::move(someStruct).bitfield

PR15694 / <rdar://problem/13600396>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179250 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4b9bcd667776932e9b4c84144a9e7e8d581ffa63 09-Apr-2013 John McCall <rjmccall@apple.com> Don't copy just to capture a strong block pointer under ARC.
It turns out that the optimizer can't eliminate this without extra
information, for which there's a separate bug.

rdar://13588325

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179069 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
c0783dc18a78b55e9486b72fa0b193dbf1b65fbb 08-Apr-2013 Eli Bendersky <eliben@google.com> The PNaCl target no longer permits __attribute__((regparm)).

Remove the custom lowering code dealing with it, disallow it in PNaclTargetInfo
and adjust tests accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179059 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
d83cdd61341ec95c0954687ad387f1175cc2d7bd 08-Apr-2013 Adrian Prantl <aprantl@apple.com> fix indentation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179052 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
6797204b89c0edb9496249fba557b45d8cc9ec76 06-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Remove nondeterminism introduced in r178950.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178952 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
0024937dbb23752f606846f4a12aafc712bcde33 06-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> When an internal-linkage function or variable is declared within an extern "C"
linkage specification, and is marked as __attribute__((used)), try to also give
it the unmangled name (by emitting an internal linkage alias) if nothing else
within the translation unit would use that name. This allows inline asm in that
translation unit to use the entity via its unmangled name, which people
apparently rely on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178950 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
29a11f45849aa87959e780abb0014a1876e0b39e 06-Apr-2013 Douglas Gregor <dgregor@apple.com> <rdar://problem/13325066> Destroy std::initializer_list temporaries whose lifetime has been extended by reference binding.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178939 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
732029500ccda392c75024057f875d7b75f6e735 05-Apr-2013 Eli Bendersky <eliben@google.com> Proper prefix for doxygen comments


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178878 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
50f9de5d893694a7e46ba655ec9fce5dfeae9362 05-Apr-2013 Alexey Samsonov <samsonov@google.com> Allow EmitConstantInit() to emit constant initializers for objects with trivial constructors and non-trivial destructors. Test that such objects are ignored by init-order checker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178856 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
e45dfd15d9d821b0f2066bc0cad525eef2e307c3 05-Apr-2013 Eli Bendersky <eliben@google.com> Add some documentation for PNaClABIInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178802 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
b37a73d5c6a0c8bb1f6e363d3b53980e4fa0cead 04-Apr-2013 Manman Ren <mren@apple.com> Initial support for struct-path aware TBAA.

Added TBAABaseType and TBAAOffset in LValue. These two fields are initialized to
the actual type and 0, and are updated in EmitLValueForField.
Path-aware TBAA tags are enabled for EmitLoadOfScalar and EmitStoreOfScalar.
Added command line option -struct-path-tbaa.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178797 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTBAA.cpp
odeGenTBAA.h
7cc0a110bcf3fe9c4d1269ea2ae7e72aa7f37531 04-Apr-2013 Manman Ren <mren@apple.com> revert r178784 since it does not have a commit message

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178796 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTBAA.cpp
odeGenTBAA.h
ab4ffe242935ae0dd66fbe0dcc792c1ad38b00c1 04-Apr-2013 Manman Ren <mren@apple.com> Index: include/clang/Driver/CC1Options.td
===================================================================
--- include/clang/Driver/CC1Options.td (revision 178718)
+++ include/clang/Driver/CC1Options.td (working copy)
@@ -161,6 +161,8 @@
HelpText<"Use register sized accesses to bit-fields, when possible.">;
def relaxed_aliasing : Flag<["-"], "relaxed-aliasing">,
HelpText<"Turn off Type Based Alias Analysis">;
+def struct_path_tbaa : Flag<["-"], "struct-path-tbaa">,
+ HelpText<"Turn on struct-path aware Type Based Alias Analysis">;
def masm_verbose : Flag<["-"], "masm-verbose">,
HelpText<"Generate verbose assembly output">;
def mcode_model : Separate<["-"], "mcode-model">,
Index: include/clang/Driver/Options.td
===================================================================
--- include/clang/Driver/Options.td (revision 178718)
+++ include/clang/Driver/Options.td (working copy)
@@ -587,6 +587,7 @@
Flags<[CC1Option]>, HelpText<"Disable spell-checking">;
def fno_stack_protector : Flag<["-"], "fno-stack-protector">, Group<f_Group>;
def fno_strict_aliasing : Flag<["-"], "fno-strict-aliasing">, Group<f_Group>;
+def fstruct_path_tbaa : Flag<["-"], "fstruct-path-tbaa">, Group<f_Group>;
def fno_strict_enums : Flag<["-"], "fno-strict-enums">, Group<f_Group>;
def fno_strict_overflow : Flag<["-"], "fno-strict-overflow">, Group<f_Group>;
def fno_threadsafe_statics : Flag<["-"], "fno-threadsafe-statics">, Group<f_Group>,
Index: include/clang/Frontend/CodeGenOptions.def
===================================================================
--- include/clang/Frontend/CodeGenOptions.def (revision 178718)
+++ include/clang/Frontend/CodeGenOptions.def (working copy)
@@ -85,6 +85,7 @@
VALUE_CODEGENOPT(OptimizeSize, 2, 0) ///< If -Os (==1) or -Oz (==2) is specified.
CODEGENOPT(RelaxAll , 1, 0) ///< Relax all machine code instructions.
CODEGENOPT(RelaxedAliasing , 1, 0) ///< Set when -fno-strict-aliasing is enabled.
+CODEGENOPT(StructPathTBAA , 1, 0) ///< Whether or not to use struct-path TBAA.
CODEGENOPT(SaveTempLabels , 1, 0) ///< Save temporary labels.
CODEGENOPT(SanitizeAddressZeroBaseShadow , 1, 0) ///< Map shadow memory at zero
///< offset in AddressSanitizer.
Index: lib/CodeGen/CGExpr.cpp
===================================================================
--- lib/CodeGen/CGExpr.cpp (revision 178718)
+++ lib/CodeGen/CGExpr.cpp (working copy)
@@ -1044,7 +1044,8 @@
llvm::Value *CodeGenFunction::EmitLoadOfScalar(LValue lvalue) {
return EmitLoadOfScalar(lvalue.getAddress(), lvalue.isVolatile(),
lvalue.getAlignment().getQuantity(),
- lvalue.getType(), lvalue.getTBAAInfo());
+ lvalue.getType(), lvalue.getTBAAInfo(),
+ lvalue.getTBAABaseType(), lvalue.getTBAAOffset());
}

static bool hasBooleanRepresentation(QualType Ty) {
@@ -1106,7 +1107,9 @@

llvm::Value *CodeGenFunction::EmitLoadOfScalar(llvm::Value *Addr, bool Volatile,
unsigned Alignment, QualType Ty,
- llvm::MDNode *TBAAInfo) {
+ llvm::MDNode *TBAAInfo,
+ QualType TBAABaseType,
+ uint64_t TBAAOffset) {
// For better performance, handle vector loads differently.
if (Ty->isVectorType()) {
llvm::Value *V;
@@ -1158,8 +1161,11 @@
Load->setVolatile(true);
if (Alignment)
Load->setAlignment(Alignment);
- if (TBAAInfo)
- CGM.DecorateInstruction(Load, TBAAInfo);
+ if (TBAAInfo) {
+ llvm::MDNode *TBAAPath = CGM.getTBAAStructTagInfo(TBAABaseType, TBAAInfo,
+ TBAAOffset);
+ CGM.DecorateInstruction(Load, TBAAPath);
+ }

if ((SanOpts->Bool && hasBooleanRepresentation(Ty)) ||
(SanOpts->Enum && Ty->getAs<EnumType>())) {
@@ -1217,7 +1223,8 @@
bool Volatile, unsigned Alignment,
QualType Ty,
llvm::MDNode *TBAAInfo,
- bool isInit) {
+ bool isInit, QualType TBAABaseType,
+ uint64_t TBAAOffset) {

// Handle vectors differently to get better performance.
if (Ty->isVectorType()) {
@@ -1268,15 +1275,19 @@
llvm::StoreInst *Store = Builder.CreateStore(Value, Addr, Volatile);
if (Alignment)
Store->setAlignment(Alignment);
- if (TBAAInfo)
- CGM.DecorateInstruction(Store, TBAAInfo);
+ if (TBAAInfo) {
+ llvm::MDNode *TBAAPath = CGM.getTBAAStructTagInfo(TBAABaseType, TBAAInfo,
+ TBAAOffset);
+ CGM.DecorateInstruction(Store, TBAAPath);
+ }
}

void CodeGenFunction::EmitStoreOfScalar(llvm::Value *value, LValue lvalue,
bool isInit) {
EmitStoreOfScalar(value, lvalue.getAddress(), lvalue.isVolatile(),
lvalue.getAlignment().getQuantity(), lvalue.getType(),
- lvalue.getTBAAInfo(), isInit);
+ lvalue.getTBAAInfo(), isInit, lvalue.getTBAABaseType(),
+ lvalue.getTBAAOffset());
}

/// EmitLoadOfLValue - Given an expression that represents a value lvalue, this
@@ -2494,9 +2505,12 @@

llvm::Value *addr = base.getAddress();
unsigned cvr = base.getVRQualifiers();
+ bool TBAAPath = CGM.getCodeGenOpts().StructPathTBAA;
if (rec->isUnion()) {
// For unions, there is no pointer adjustment.
assert(!type->isReferenceType() && "union has reference member");
+ // TODO: handle path-aware TBAA for union.
+ TBAAPath = false;
} else {
// For structs, we GEP to the field that the record layout suggests.
unsigned idx = CGM.getTypes().getCGRecordLayout(rec).getLLVMFieldNo(field);
@@ -2508,6 +2522,8 @@
if (cvr & Qualifiers::Volatile) load->setVolatile(true);
load->setAlignment(alignment.getQuantity());

+ // Loading the reference will disable path-aware TBAA.
+ TBAAPath = false;
if (CGM.shouldUseTBAA()) {
llvm::MDNode *tbaa;
if (mayAlias)
@@ -2541,6 +2557,16 @@

LValue LV = MakeAddrLValue(addr, type, alignment);
LV.getQuals().addCVRQualifiers(cvr);
+ if (TBAAPath) {
+ const ASTRecordLayout &Layout =
+ getContext().getASTRecordLayout(field->getParent());
+ // Set the base type to be the base type of the base LValue and
+ // update offset to be relative to the base type.
+ LV.setTBAABaseType(base.getTBAABaseType());
+ LV.setTBAAOffset(base.getTBAAOffset() +
+ Layout.getFieldOffset(field->getFieldIndex()) /
+ getContext().getCharWidth());
+ }

// __weak attribute on a field is ignored.
if (LV.getQuals().getObjCGCAttr() == Qualifiers::Weak)
Index: lib/CodeGen/CGValue.h
===================================================================
--- lib/CodeGen/CGValue.h (revision 178718)
+++ lib/CodeGen/CGValue.h (working copy)
@@ -157,6 +157,11 @@

Expr *BaseIvarExp;

+ /// Used by struct-path-aware TBAA.
+ QualType TBAABaseType;
+ /// Offset relative to the base type.
+ uint64_t TBAAOffset;
+
/// TBAAInfo - TBAA information to attach to dereferences of this LValue.
llvm::MDNode *TBAAInfo;

@@ -175,6 +180,10 @@
this->ImpreciseLifetime = false;
this->ThreadLocalRef = false;
this->BaseIvarExp = 0;
+
+ // Initialize fields for TBAA.
+ this->TBAABaseType = Type;
+ this->TBAAOffset = 0;
this->TBAAInfo = TBAAInfo;
}

@@ -232,6 +241,12 @@
Expr *getBaseIvarExp() const { return BaseIvarExp; }
void setBaseIvarExp(Expr *V) { BaseIvarExp = V; }

+ QualType getTBAABaseType() const { return TBAABaseType; }
+ void setTBAABaseType(QualType T) { TBAABaseType = T; }
+
+ uint64_t getTBAAOffset() const { return TBAAOffset; }
+ void setTBAAOffset(uint64_t O) { TBAAOffset = O; }
+
llvm::MDNode *getTBAAInfo() const { return TBAAInfo; }
void setTBAAInfo(llvm::MDNode *N) { TBAAInfo = N; }

Index: lib/CodeGen/CodeGenFunction.h
===================================================================
--- lib/CodeGen/CodeGenFunction.h (revision 178718)
+++ lib/CodeGen/CodeGenFunction.h (working copy)
@@ -2211,7 +2211,9 @@
/// the LLVM value representation.
llvm::Value *EmitLoadOfScalar(llvm::Value *Addr, bool Volatile,
unsigned Alignment, QualType Ty,
- llvm::MDNode *TBAAInfo = 0);
+ llvm::MDNode *TBAAInfo = 0,
+ QualType TBAABaseTy = QualType(),
+ uint64_t TBAAOffset = 0);

/// EmitLoadOfScalar - Load a scalar value from an address, taking
/// care to appropriately convert from the memory representation to
@@ -2224,7 +2226,9 @@
/// the LLVM value representation.
void EmitStoreOfScalar(llvm::Value *Value, llvm::Value *Addr,
bool Volatile, unsigned Alignment, QualType Ty,
- llvm::MDNode *TBAAInfo = 0, bool isInit=false);
+ llvm::MDNode *TBAAInfo = 0, bool isInit = false,
+ QualType TBAABaseTy = QualType(),
+ uint64_t TBAAOffset = 0);

/// EmitStoreOfScalar - Store a scalar value to an address, taking
/// care to appropriately convert from the memory representation to
Index: lib/CodeGen/CodeGenModule.cpp
===================================================================
--- lib/CodeGen/CodeGenModule.cpp (revision 178718)
+++ lib/CodeGen/CodeGenModule.cpp (working copy)
@@ -227,6 +227,20 @@
return TBAA->getTBAAStructInfo(QTy);
}

+llvm::MDNode *CodeGenModule::getTBAAStructTypeInfo(QualType QTy) {
+ if (!TBAA)
+ return 0;
+ return TBAA->getTBAAStructTypeInfo(QTy);
+}
+
+llvm::MDNode *CodeGenModule::getTBAAStructTagInfo(QualType BaseTy,
+ llvm::MDNode *AccessN,
+ uint64_t O) {
+ if (!TBAA)
+ return 0;
+ return TBAA->getTBAAStructTagInfo(BaseTy, AccessN, O);
+}
+
void CodeGenModule::DecorateInstruction(llvm::Instruction *Inst,
llvm::MDNode *TBAAInfo) {
Inst->setMetadata(llvm::LLVMContext::MD_tbaa, TBAAInfo);
Index: lib/CodeGen/CodeGenModule.h
===================================================================
--- lib/CodeGen/CodeGenModule.h (revision 178718)
+++ lib/CodeGen/CodeGenModule.h (working copy)
@@ -501,6 +501,11 @@
llvm::MDNode *getTBAAInfo(QualType QTy);
llvm::MDNode *getTBAAInfoForVTablePtr();
llvm::MDNode *getTBAAStructInfo(QualType QTy);
+ /// Return the MDNode in the type DAG for the given struct type.
+ llvm::MDNode *getTBAAStructTypeInfo(QualType QTy);
+ /// Return the path-aware tag for given base type, access node and offset.
+ llvm::MDNode *getTBAAStructTagInfo(QualType BaseTy, llvm::MDNode *AccessN,
+ uint64_t O);

bool isTypeConstant(QualType QTy, bool ExcludeCtorDtor);

Index: lib/CodeGen/CodeGenTBAA.cpp
===================================================================
--- lib/CodeGen/CodeGenTBAA.cpp (revision 178718)
+++ lib/CodeGen/CodeGenTBAA.cpp (working copy)
@@ -21,6 +21,7 @@
#include "clang/AST/Mangle.h"
#include "clang/AST/RecordLayout.h"
#include "clang/Frontend/CodeGenOptions.h"
+#include "llvm/ADT/SmallSet.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Metadata.h"
@@ -225,3 +226,87 @@
// For now, handle any other kind of type conservatively.
return StructMetadataCache[Ty] = NULL;
}
+
+/// Check if the given type can be handled by path-aware TBAA.
+static bool isTBAAPathStruct(QualType QTy) {
+ if (const RecordType *TTy = QTy->getAs<RecordType>()) {
+ const RecordDecl *RD = TTy->getDecl()->getDefinition();
+ // RD can be struct, union, class, interface or enum.
+ // For now, we only handle struct.
+ if (RD->isStruct() && !RD->hasFlexibleArrayMember())
+ return true;
+ }
+ return false;
+}
+
+llvm::MDNode *
+CodeGenTBAA::getTBAAStructTypeInfo(QualType QTy) {
+ const Type *Ty = Context.getCanonicalType(QTy).getTypePtr();
+ assert(isTBAAPathStruct(QTy));
+
+ if (llvm::MDNode *N = StructTypeMetadataCache[Ty])
+ return N;
+
+ if (const RecordType *TTy = QTy->getAs<RecordType>()) {
+ const RecordDecl *RD = TTy->getDecl()->getDefinition();
+
+ const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD);
+ SmallVector <std::pair<uint64_t, llvm::MDNode*>, 4> Fields;
+ // To reduce the size of MDNode for a given struct type, we only output
+ // once for all the fields with the same scalar types.
+ // Offsets for scalar fields in the type DAG are not used.
+ llvm::SmallSet <llvm::MDNode*, 4> ScalarFieldTypes;
+ unsigned idx = 0;
+ for (RecordDecl::field_iterator i = RD->field_begin(),
+ e = RD->field_end(); i != e; ++i, ++idx) {
+ QualType FieldQTy = i->getType();
+ llvm::MDNode *FieldNode;
+ if (isTBAAPathStruct(FieldQTy))
+ FieldNode = getTBAAStructTypeInfo(FieldQTy);
+ else {
+ FieldNode = getTBAAInfo(FieldQTy);
+ // Ignore this field if the type already exists.
+ if (ScalarFieldTypes.count(FieldNode))
+ continue;
+ ScalarFieldTypes.insert(FieldNode);
+ }
+ if (!FieldNode)
+ return StructTypeMetadataCache[Ty] = NULL;
+ Fields.push_back(std::make_pair(
+ Layout.getFieldOffset(idx) / Context.getCharWidth(), FieldNode));
+ }
+
+ // TODO: This is using the RTTI name. Is there a better way to get
+ // a unique string for a type?
+ SmallString<256> OutName;
+ llvm::raw_svector_ostream Out(OutName);
+ MContext.mangleCXXRTTIName(QualType(Ty, 0), Out);
+ Out.flush();
+ // Create the struct type node with a vector of pairs (offset, type).
+ return StructTypeMetadataCache[Ty] =
+ MDHelper.createTBAAStructTypeNode(OutName, Fields);
+ }
+
+ return StructMetadataCache[Ty] = NULL;
+}
+
+llvm::MDNode *
+CodeGenTBAA::getTBAAStructTagInfo(QualType BaseQTy, llvm::MDNode *AccessNode,
+ uint64_t Offset) {
+ if (!CodeGenOpts.StructPathTBAA)
+ return AccessNode;
+
+ const Type *BTy = Context.getCanonicalType(BaseQTy).getTypePtr();
+ TBAAPathTag PathTag = TBAAPathTag(BTy, AccessNode, Offset);
+ if (llvm::MDNode *N = StructTagMetadataCache[PathTag])
+ return N;
+
+ llvm::MDNode *BNode = 0;
+ if (isTBAAPathStruct(BaseQTy))
+ BNode = getTBAAStructTypeInfo(BaseQTy);
+ if (!BNode)
+ return StructTagMetadataCache[PathTag] = AccessNode;
+
+ return StructTagMetadataCache[PathTag] =
+ MDHelper.createTBAAStructTagNode(BNode, AccessNode, Offset);
+}
Index: lib/CodeGen/CodeGenTBAA.h
===================================================================
--- lib/CodeGen/CodeGenTBAA.h (revision 178718)
+++ lib/CodeGen/CodeGenTBAA.h (working copy)
@@ -35,6 +35,14 @@
namespace CodeGen {
class CGRecordLayout;

+ struct TBAAPathTag {
+ TBAAPathTag(const Type *B, const llvm::MDNode *A, uint64_t O)
+ : BaseT(B), AccessN(A), Offset(O) {}
+ const Type *BaseT;
+ const llvm::MDNode *AccessN;
+ uint64_t Offset;
+ };
+
/// CodeGenTBAA - This class organizes the cross-module state that is used
/// while lowering AST types to LLVM types.
class CodeGenTBAA {
@@ -46,8 +54,13 @@
// MDHelper - Helper for creating metadata.
llvm::MDBuilder MDHelper;

- /// MetadataCache - This maps clang::Types to llvm::MDNodes describing them.
+ /// MetadataCache - This maps clang::Types to scalar llvm::MDNodes describing
+ /// them.
llvm::DenseMap<const Type *, llvm::MDNode *> MetadataCache;
+ /// This maps clang::Types to a struct node in the type DAG.
+ llvm::DenseMap<const Type *, llvm::MDNode *> StructTypeMetadataCache;
+ /// This maps TBAAPathTags to a tag node.
+ llvm::DenseMap<TBAAPathTag, llvm::MDNode *> StructTagMetadataCache;

/// StructMetadataCache - This maps clang::Types to llvm::MDNodes describing
/// them for struct assignments.
@@ -89,9 +102,49 @@
/// getTBAAStructInfo - Get the TBAAStruct MDNode to be used for a memcpy of
/// the given type.
llvm::MDNode *getTBAAStructInfo(QualType QTy);
+
+ /// Get the MDNode in the type DAG for given struct type QType.
+ llvm::MDNode *getTBAAStructTypeInfo(QualType QType);
+ /// Get the tag MDNode for a given base type, the actual sclar access MDNode
+ /// and offset into the base type.
+ llvm::MDNode *getTBAAStructTagInfo(QualType BaseQType,
+ llvm::MDNode *AccessNode, uint64_t Offset);
};

} // end namespace CodeGen
} // end namespace clang

+namespace llvm {
+
+template<> struct DenseMapInfo<clang::CodeGen::TBAAPathTag> {
+ static clang::CodeGen::TBAAPathTag getEmptyKey() {
+ return clang::CodeGen::TBAAPathTag(
+ DenseMapInfo<const clang::Type *>::getEmptyKey(),
+ DenseMapInfo<const MDNode *>::getEmptyKey(),
+ DenseMapInfo<uint64_t>::getEmptyKey());
+ }
+
+ static clang::CodeGen::TBAAPathTag getTombstoneKey() {
+ return clang::CodeGen::TBAAPathTag(
+ DenseMapInfo<const clang::Type *>::getTombstoneKey(),
+ DenseMapInfo<const MDNode *>::getTombstoneKey(),
+ DenseMapInfo<uint64_t>::getTombstoneKey());
+ }
+
+ static unsigned getHashValue(const clang::CodeGen::TBAAPathTag &Val) {
+ return DenseMapInfo<const clang::Type *>::getHashValue(Val.BaseT) ^
+ DenseMapInfo<const MDNode *>::getHashValue(Val.AccessN) ^
+ DenseMapInfo<uint64_t>::getHashValue(Val.Offset);
+ }
+
+ static bool isEqual(const clang::CodeGen::TBAAPathTag &LHS,
+ const clang::CodeGen::TBAAPathTag &RHS) {
+ return LHS.BaseT == RHS.BaseT &&
+ LHS.AccessN == RHS.AccessN &&
+ LHS.Offset == RHS.Offset;
+ }
+};
+
+} // end namespace llvm
+
#endif
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp (revision 178718)
+++ lib/Driver/Tools.cpp (working copy)
@@ -2105,6 +2105,8 @@
options::OPT_fno_strict_aliasing,
getToolChain().IsStrictAliasingDefault()))
CmdArgs.push_back("-relaxed-aliasing");
+ if (Args.hasArg(options::OPT_fstruct_path_tbaa))
+ CmdArgs.push_back("-struct-path-tbaa");
if (Args.hasFlag(options::OPT_fstrict_enums, options::OPT_fno_strict_enums,
false))
CmdArgs.push_back("-fstrict-enums");
Index: lib/Frontend/CompilerInvocation.cpp
===================================================================
--- lib/Frontend/CompilerInvocation.cpp (revision 178718)
+++ lib/Frontend/CompilerInvocation.cpp (working copy)
@@ -324,6 +324,7 @@
Opts.UseRegisterSizedBitfieldAccess = Args.hasArg(
OPT_fuse_register_sized_bitfield_access);
Opts.RelaxedAliasing = Args.hasArg(OPT_relaxed_aliasing);
+ Opts.StructPathTBAA = Args.hasArg(OPT_struct_path_tbaa);
Opts.DwarfDebugFlags = Args.getLastArgValue(OPT_dwarf_debug_flags);
Opts.MergeAllConstants = !Args.hasArg(OPT_fno_merge_all_constants);
Opts.NoCommon = Args.hasArg(OPT_fno_common);
Index: test/CodeGen/tbaa.cpp
===================================================================
--- test/CodeGen/tbaa.cpp (revision 0)
+++ test/CodeGen/tbaa.cpp (working copy)
@@ -0,0 +1,217 @@
+// RUN: %clang_cc1 -O1 -disable-llvm-optzns %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -O1 -struct-path-tbaa -disable-llvm-optzns %s -emit-llvm -o - | FileCheck %s -check-prefix=PATH
+// Test TBAA metadata generated by front-end.
+
+#include <stdint.h>
+typedef struct
+{
+ uint16_t f16;
+ uint32_t f32;
+ uint16_t f16_2;
+ uint32_t f32_2;
+} StructA;
+typedef struct
+{
+ uint16_t f16;
+ StructA a;
+ uint32_t f32;
+} StructB;
+typedef struct
+{
+ uint16_t f16;
+ StructB b;
+ uint32_t f32;
+} StructC;
+typedef struct
+{
+ uint16_t f16;
+ StructB b;
+ uint32_t f32;
+ uint8_t f8;
+} StructD;
+
+typedef struct
+{
+ uint16_t f16;
+ uint32_t f32;
+} StructS;
+typedef struct
+{
+ uint16_t f16;
+ uint32_t f32;
+} StructS2;
+
+uint32_t g(uint32_t *s, StructA *A, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !5
+ *s = 1;
+ A->f32 = 4;
+ return *s;
+}
+
+uint32_t g2(uint32_t *s, StructA *A, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i16 4, i16* %{{.*}}, align 2, !tbaa !5
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// PATH: store i16 4, i16* %{{.*}}, align 2, !tbaa !8
+ *s = 1;
+ A->f16 = 4;
+ return *s;
+}
+
+uint32_t g3(StructA *A, StructB *B, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !5
+// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !9
+ A->f32 = 1;
+ B->a.f32 = 4;
+ return A->f32;
+}
+
+uint32_t g4(StructA *A, StructB *B, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i16 4, i16* %{{.*}}, align 2, !tbaa !5
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !5
+// PATH: store i16 4, i16* %{{.*}}, align 2, !tbaa !11
+ A->f32 = 1;
+ B->a.f16 = 4;
+ return A->f32;
+}
+
+uint32_t g5(StructA *A, StructB *B, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !5
+// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !12
+ A->f32 = 1;
+ B->f32 = 4;
+ return A->f32;
+}
+
+uint32_t g6(StructA *A, StructB *B, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !5
+// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !13
+ A->f32 = 1;
+ B->a.f32_2 = 4;
+ return A->f32;
+}
+
+uint32_t g7(StructA *A, StructS *S, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !5
+// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !14
+ A->f32 = 1;
+ S->f32 = 4;
+ return A->f32;
+}
+
+uint32_t g8(StructA *A, StructS *S, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i16 4, i16* %{{.*}}, align 2, !tbaa !5
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !5
+// PATH: store i16 4, i16* %{{.*}}, align 2, !tbaa !16
+ A->f32 = 1;
+ S->f16 = 4;
+ return A->f32;
+}
+
+uint32_t g9(StructS *S, StructS2 *S2, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !14
+// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !17
+ S->f32 = 1;
+ S2->f32 = 4;
+ return S->f32;
+}
+
+uint32_t g10(StructS *S, StructS2 *S2, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i16 4, i16* %{{.*}}, align 2, !tbaa !5
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !14
+// PATH: store i16 4, i16* %{{.*}}, align 2, !tbaa !19
+ S->f32 = 1;
+ S2->f16 = 4;
+ return S->f32;
+}
+
+uint32_t g11(StructC *C, StructD *D, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !20
+// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !22
+ C->b.a.f32 = 1;
+ D->b.a.f32 = 4;
+ return C->b.a.f32;
+}
+
+uint32_t g12(StructC *C, StructD *D, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4
+// TODO: differentiate the two accesses.
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !9
+// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !9
+ StructB *b1 = &(C->b);
+ StructB *b2 = &(D->b);
+ // b1, b2 have different context.
+ b1->a.f32 = 1;
+ b2->a.f32 = 4;
+ return b1->a.f32;
+}
+
+// CHECK: !1 = metadata !{metadata !"omnipotent char", metadata !2}
+// CHECK: !2 = metadata !{metadata !"Simple C/C++ TBAA"}
+// CHECK: !4 = metadata !{metadata !"int", metadata !1}
+// CHECK: !5 = metadata !{metadata !"short", metadata !1}
+
+// PATH: !1 = metadata !{metadata !"omnipotent char", metadata !2}
+// PATH: !4 = metadata !{metadata !"int", metadata !1}
+// PATH: !5 = metadata !{metadata !6, metadata !4, i64 4}
+// PATH: !6 = metadata !{metadata !"_ZTS7StructA", i64 0, metadata !7, i64 4, metadata !4}
+// PATH: !7 = metadata !{metadata !"short", metadata !1}
+// PATH: !8 = metadata !{metadata !6, metadata !7, i64 0}
+// PATH: !9 = metadata !{metadata !10, metadata !4, i64 8}
+// PATH: !10 = metadata !{metadata !"_ZTS7StructB", i64 0, metadata !7, i64 4, metadata !6, i64 20, metadata !4}
+// PATH: !11 = metadata !{metadata !10, metadata !7, i64 4}
+// PATH: !12 = metadata !{metadata !10, metadata !4, i64 20}
+// PATH: !13 = metadata !{metadata !10, metadata !4, i64 16}
+// PATH: !14 = metadata !{metadata !15, metadata !4, i64 4}
+// PATH: !15 = metadata !{metadata !"_ZTS7StructS", i64 0, metadata !7, i64 4, metadata !4}
+// PATH: !16 = metadata !{metadata !15, metadata !7, i64 0}
+// PATH: !17 = metadata !{metadata !18, metadata !4, i64 4}
+// PATH: !18 = metadata !{metadata !"_ZTS8StructS2", i64 0, metadata !7, i64 4, metadata !4}
+// PATH: !19 = metadata !{metadata !18, metadata !7, i64 0}
+// PATH: !20 = metadata !{metadata !21, metadata !4, i64 12}
+// PATH: !21 = metadata !{metadata !"_ZTS7StructC", i64 0, metadata !7, i64 4, metadata !10, i64 28, metadata !4}
+// PATH: !22 = metadata !{metadata !23, metadata !4, i64 12}
+// PATH: !23 = metadata !{metadata !"_ZTS7StructD", i64 0, metadata !7, i64 4, metadata !10, i64 28, metadata !4, i64 32, metadata !1}


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178784 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTBAA.cpp
odeGenTBAA.h
3105627bd76d6a0cc5ee305c99f4c96519bac9ac 04-Apr-2013 Eric Christopher <echristo@gmail.com> Plumb through the -fsplit-stack option using the existing backend
support.

Caveat: Other than the existing segmented stacks support, no
claims are made of this working.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178744 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
527842f97b684831de2b1a455649131ed381ece4 04-Apr-2013 John McCall <rjmccall@apple.com> Protect the values of array and dictionary literals from the
ARC optimizer while they're held in local unsafe buffers.

Based on a patch by Jesse Rusak!

rdar://13573224

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178721 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
d2615cc53b916e8aae45783ca7113b93de515ce3 03-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Add 178663 back.

http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb went back green
before it processed the reverted 178663, so it could not have been the culprit.

Revert "Revert 178663."

This reverts commit 4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178682 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GObjC.cpp
odeGenModule.cpp
4f8a3eb2ce5d4ba422483439e20c8cbb4d953a41 03-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert 178663.

Looks like it broke http://lab.llvm.org:8011/builders/clang-x86_64-darwin10-gdb

Revert "Don't compute a patched/semantic storage class."

This reverts commit 8f187f62cb0487d31bc4afdfcd47e11fe9a51d05.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178681 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GObjC.cpp
odeGenModule.cpp
8f187f62cb0487d31bc4afdfcd47e11fe9a51d05 03-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't compute a patched/semantic storage class.

For variables and functions clang used to store two storage classes. The one
"as written" in the code and a patched one, which, for example, propagates
static to the following decls.

This apparently is from the days clang lacked linkage computation. It is now
redundant and this patch removes it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178663 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GObjC.cpp
odeGenModule.cpp
73c56bb0c8e722f4f0c0a044f13064d381f1ec8d 03-Apr-2013 John McCall <rjmccall@apple.com> In ObjC++ on legacy runtimes, push an EH cleanup as well as
a normal cleanup when entering a @try or @synchronized to
ensure that we clean that up if an exception is triggered.

Apparently GCC did this, so it's hard to argue that we shouldn't
do at least as much.

rdar://12364847

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178599 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f068c92f22cc5c42433f5bd37b000a714a56670f 03-Apr-2013 Eric Christopher <echristo@gmail.com> Revert "Revert r178079, it caused PR15637."

This reverts commit r178497 since the backend has been fixed.

Also add a test to ensure that we're emitting template information for unions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178587 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
0c70181854a95fca0e0d56dfa1203eb2216052ea 02-Apr-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C: Provide fixit hints when warning
about 'isa' ivar being explicitely accessed
when base is a user class object reference.
// rdar://13503456


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178562 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
4f01ed4205a7189520f6a481fe2113856833421f 02-Apr-2013 Alexey Samsonov <samsonov@google.com> [ASan] Emit lifetime markers for local variables in -fsanitize=use-after-scope mode

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178538 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
7959194fded7b2b1d37ead268d42c8ae6b10fe25 02-Apr-2013 Adrian Prantl <aprantl@apple.com> un-break remaining gdb buildbot testcases.
Make sure we do not generate line info for debugging-related frame setup.
Follow-up to r178361 / rdar://problem/12767564

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178517 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
bd0152fb251e84c6f335c66322b83a9af09fed0c 01-Apr-2013 Nico Weber <nicolasweber@gmx.de> Revert r178079, it caused PR15637.

Also add a test for PR15637.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178497 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
efb72adbae0c253fc2fd9127fb3e1c36cb1b8d93 01-Apr-2013 Adrian Prantl <aprantl@apple.com> * Attempt to un-break gdb buildbot by emitting a lexical block end only
when we actually end a lexical block.
* Added new test for line table / block cleanup.
* Follow-up to r177819 / rdar://problem/13115369

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178490 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
dca8f336e6da2b50eb965535d81d603e39294f9c 30-Mar-2013 Justin Holewinski <jholewinski@nvidia.com> Use kernel metadata to differentiate between kernel and device
functions for the NVPTX target.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178418 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
9b97adfb770c3b55c1a45049d53b624bbc6f62e1 29-Mar-2013 Adrian Prantl <aprantl@apple.com> Bugfix/Followup for r177086.
* Store the .block_descriptor (instead of self) in the alloca so we
can guarantee that all captured variables are available at -O0.
* Add the missing OpDeref for the alloca.
rdar://problem/12767564

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178361 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDebugInfo.cpp
GDecl.cpp
e86fcc46f560b8e0e13e13a7a1854658b231b2ea 29-Mar-2013 Adrian Prantl <aprantl@apple.com> Improvement on r177086.
* Let DIType for block-captured self to point to the completed cached
interface type.
rdar://problem/12767564

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178360 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
1bfc28c48c1b86a05d2e07b403107ef3da5a0f8e 29-Mar-2013 Michael Liao <michael.liao@intel.com> Add RDSEED intrinsic support defined in AVX2 extension



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178331 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
508764518dd54eb7be82b0474cb42ef8dbe9ebd3 28-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> UBSan: Don't diagnose inf/nan conversions between floating-point types. It's far from clear whether these have undefined behavior, and these checks are helping no-one. Keep the double->float overflow warnings, though, since those are useful in practice, even though it's unclear whether such operations have defined behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178194 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
a03fc6e249e1662f879467f66c49a3c866850773 27-Mar-2013 Chad Rosier <mcrosier@apple.com> If we're unable to create the TargetMachine, then just quit producing the
backend output; there's no need to report a fatal error. This reverts r178042.
Part of rdar://13295753 and rdar://13401547


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178102 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
2fcadbeecbbc0b48dc92b9ce778e5c7a53292505 27-Mar-2013 David Blaikie <dblaikie@gmail.com> Remove magic number usage from CGDebugInfo with new DICompositeType::setContainingType

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178092 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d74505e985976c3ef0170360174d863821c6165c 26-Mar-2013 David Blaikie <dblaikie@gmail.com> Debug Info: remove use of magic numbers to tweak specific debug info metadata fields

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178079 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
6c82fc65e45c668a36b06536e66563fe937a3096 26-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove useGlobalsForAutomaticVariables.

It is unused since pic support went away.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178055 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GStmt.cpp
94d46b55103bf7ba0dc5425baf1eb7e4adcaa7ea 26-Mar-2013 Manman Ren <mren@apple.com> Fix uninitialized read of CalleeWithThisReturn.

Initialize CalleeWithThisReturn to 0 in the constructor.
Also revert r170815 since checking CalleeWithThisReturn is faster.

PR15598


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178053 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.cpp
e2359e21320f39b167b31afb0c281419361faa51 26-Mar-2013 Chad Rosier <mcrosier@apple.com> Fix a crasher by reporting a fatal error if we're unable to create the target
machine and one is required.
Part of rdar://13295753


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178042 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
76ed61788e88ab1f6345fd3611e1a618f1c334e3 26-Mar-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Fix uninitialized read of CalleeWithThisReturn.

CalleeWithThisReturn can be left initialized if HasThisReturn() is false.
This change reverses the order of checks in EmitFunctionEpilog such that
CalleeWithThisReturn is only examined when it has a meaningful value.

Found with MemorySanitizer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178015 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
9cc935b6993460956d0d46ee268e9858743d5129 26-Mar-2013 Chandler Carruth <chandlerc@gmail.com> The IRReader header is now part of its own library. Update the include
line and the library dependencies to reflect this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177972 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
odeGenAction.cpp
1f1df1f48e4c804d80d996fa6e38dee9de633dea 25-Mar-2013 Chad Rosier <mcrosier@apple.com> IR-gen should not generate an MMX types unless the code is explicitly using MMX
intrinsics.
rdar://13213542


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177911 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
f4492448a201c352be3d2e1e76220cf7cd499c55 24-Mar-2013 Benjamin Kramer <benny.kra@googlemail.com> Simplify code. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177842 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
1db7040604154f71c54cf1329ae384fbef196668 24-Mar-2013 Guy Benyei <guy.benyei@intel.com> Generate metadata to implement the -cl-kernel-arg-info option.
OpenCL 1.2 spec. 5.7.3.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177839 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
495cfa46300979642acde8d93a1f21c9291dac98 23-Mar-2013 Nadav Rotem <nrotem@apple.com> Make clang to mark static stack allocations with lifetime markers to enable a more aggressive stack coloring.
Patch by John McCall with help by Shuxin Yang.
rdar://13115369



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177819 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
b6a6079449a5275c283982e19b0c38e165833bb2 23-Mar-2013 John McCall <rjmccall@apple.com> Under ARC, when we're passing the address of a strong variable
to an out-parameter using the indirect-writeback conversion,
and we copied the current value of the variable to the temporary,
make sure that we register an intrinsic use of that value with
the optimizer so that the value won't get released until we have
a chance to retain it.

rdar://13195034

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177813 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
GObjC.cpp
odeGenFunction.h
odeGenModule.h
a8a0f769ff4113a7f98c232fb0fc773a65371559 22-Mar-2013 Reid Kleckner <reid@kleckner.net> [ms-cxxabi] Implement member data pointers for non-dynamic classes

Summary:
For non-dynamic classes (no virtual bases), member data pointers are
simple offsets from the base of the record. Dynamic classes use an
aggregate for member data pointers and are therefore currently
unsupported.

Unlike Itanium, the ms ABI uses 0 to represent null for polymorphic
classes. Non-polymorphic classes use -1 like Itanium, since 0 is a
valid field offset.

Reviewers: rjmccall

CC: timurrrr, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177753 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
icrosoftCXXABI.cpp
92e44d911c748f2ef0d578bbf7b0703fb2ed4d9c 22-Mar-2013 Reid Kleckner <reid@kleckner.net> [cxxabi] Get ptrdiff_t from the CodeGenModule instead of caching it

As the comment says, it's a little silly to cache it in the ABI code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177738 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
c640058aa7f224a71ce3b1d2601d84e1b57f82d3 22-Mar-2013 Alexey Bataev <a.bataev@hotmail.com> OpenMP threadprivate directive parsing and semantic analysis

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177705 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
bf8487a3c290203ae54fd81d35a94be0ff211235 22-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> ubsan: Pass floating-point arguments to the runtime by value if they fit the
value argument. If not, be sure we don't accidentally use a dynamic alloca.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177690 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
63fd408a61ae9b94e8d8a986832f526f7cdbfa84 20-Mar-2013 Manman Ren <mren@apple.com> Exploit this-return of a callsite in a this-return function.

For constructors/desctructors that return 'this', if there exists a callsite
that returns 'this' and is immediately before the return instruction, make
sure we are using the return value from the callsite.

We don't need to keep 'this' alive through the callsite. It also enables
optimizations in the backend, such as tail call optimization.

Updated from r177211.
rdar://12818789


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177541 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GCall.cpp
GClass.cpp
odeGenFunction.cpp
odeGenFunction.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
83c546afef39d6b7be69f3f399804ebf037c4022 20-Mar-2013 Nick Lewycky <nicholas@mxc.ca> The flag "-coverage-function-names-in-data" is actually backwards -- we do
emit function names in .gcda files by default, and the flag turns that off!
Rename the flag to make it match what it actually does. This keeps the default
format compatible with gcc 4.2.

Also add a test for this flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177475 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
f2b5e0707229e1149828ebc8d01d9308a997d6df 20-Mar-2013 Nick Lewycky <nicholas@mxc.ca> Make clang emit linkage names in debug info for subprograms when coverage info
is enabled. Also add a new -test-coverage cc1 flag which makes testing coverage
possible and add our first clang-side coverage test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177470 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
GDebugInfo.cpp
9a2f5d70dfb0eb739076d5bad1a779de9b201930 19-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't try to set attributes in alias, they have none.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177402 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d8e6d6da90fd5a715c9e5cb676abbb8c3878c85a 19-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert r177329.

If this should not happen, we should have an assert.
If it should happen, we should have a test and remove the comment.

In no case should we have this self inconsistent code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177399 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
af42246bdafd7145ef0f0daaddda7e8c41baf265 19-Mar-2013 Stephen Hines <srhines@google.com> Update Clang for merge to r177345.

Change-Id: I375c37904c0ca05b7bad8fc0fec0e21cc497cafc
ndroid.mk
15d68882f5fa4afae8333e75b2bfd5e2834c8aaf 19-Mar-2013 Stephen Hines <srhines@google.com> Merge branch 'upstream' into merge_2013_03_18

Conflicts:
lib/Sema/SemaDeclAttr.cpp

Change-Id: I05e70941163ec5a461eba43ef78f6738cd5a1e69
aa624954c50a741528752b85d3a3bf11ef9771db 19-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR15383: When -fsanitize=float-cast-overflow checks a float-to-int conversion,
it wasn't taking into account that the float should be truncated *before* the
range check happens. Thus (unsigned)-0.99 and (unsigned char)255.9 have defined
behavior and should not be trapped.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177362 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
4882fe02d8d453084da563b9c18eb5545f0783d4 18-Mar-2013 Reed Kotler <rkotler@mips.com> This code works around what appears to be a bug in another part of clang.
I have filed http://llvm.org/bugs/show_bug.cgi?id=15538 against clang.
This code is safer anyway because "cast" assumes you really know that
it's okay to make the cast. In this case isa should not be false and
dyn_cast should not return null as far as I understand. But everything
else is valid so I did not want to revert my previous patch for attributes
mips16/nomips16 or use an llvm_unreachable here which would make a number
of our tests fail for mips.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177329 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
7cd84baa533ae337e3eb6b7951d94ce94093d521 16-Mar-2013 Manman Ren <mren@apple.com> revert r177211 due to its potential issues

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177222 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GCall.cpp
GClass.cpp
odeGenFunction.cpp
odeGenFunction.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
2710ed8fd997be04ff447b8be2190f8fb34ac22b 16-Mar-2013 Manman Ren <mren@apple.com> Exploit this-return of a callsite in a this-return function.

For constructors/desctructors that return 'this', if there exists a callsite
that returns 'this' and is immediately before the return instruction, make
sure we are using the return value from the callsite.

We don't need to keep 'this' alive through the callsite. It also enables
optimizations in the backend, such as tail call optimization.

rdar://12818789


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177211 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GCall.cpp
GClass.cpp
odeGenFunction.cpp
odeGenFunction.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
6b6a9b3f7b54e1df0976027ab623bafa3d769638 15-Mar-2013 Adrian Prantl <aprantl@apple.com> Force column info only for direct inlined functions. This should strike
the balance between expected behavior and compatibility with the gdb
testsuite.
(GDB gets confused if we break an expression into multiple debug
stmts so we enable this behavior only for inlined functions. For the
full experience people can still use -gcolumn-info.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177164 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
bea407c92780ded6ef9aabc9d8ebbe60d233f381 14-Mar-2013 Adrian Prantl <aprantl@apple.com> Always declare the .block_descriptor parameter, not just the local copy.
Un-breaks gdb's invoke-block behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177118 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
836e7c9357b312fd1ee5c90898ce2c81bb384997 14-Mar-2013 Adrian Prantl <aprantl@apple.com> Allocate stack storage for .block_descriptor and captured self at -O0.
This way the register allocator will not optimize away the debug info
for captured variables.

Fixes rdar://problem/12767564

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177086 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
c3ae583a9a2e0e5c862a94b678c7cdfaab46a981 14-Mar-2013 Nick Lewycky <nicholas@mxc.ca> Update GCOVProfiling pass creation for API change in r177002. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177004 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
4159f05999914fc1d342131f64c1c37f00059288 13-Mar-2013 Bill Wendling <isanbard@gmail.com> Have these attriubtes set to 'true' or 'false'.

The back-end cannot differentiate between functions that are from a .ll file and
those generated from the front-end. We cannot then take the non-precense of
these attributes as a "false" value. Have the front-end explicitly set the value
to 'true' or 'false' depending upon what is actually set.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176985 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ad4b8b43e66ebc2838fb314358017079665f058f 13-Mar-2013 Reed Kotler <rkotler@mips.com> Cause the mips16/nomips16 attribute to be passed to LLVM from Clang
in the LLVM assembly language output.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176971 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
99c6418e37380abbc7042ea82634bb4f7f674e15 13-Mar-2013 John McCall <rjmccall@apple.com> Remove trailing comma in enum list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176926 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
5b07e8077a20b80fee90bd76c43c6150c676e4a8 13-Mar-2013 John McCall <rjmccall@apple.com> Tighten up the rules for precise lifetime and document
the requirements on the ARC optimizer.

rdar://13407451

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176924 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GExpr.cpp
GExprCXX.cpp
GObjC.cpp
GObjCMac.cpp
GValue.h
odeGenFunction.h
00df5eaa9f4f7cc0809fd47c95311b532fbe63c6 12-Mar-2013 Adrian Prantl <aprantl@apple.com> Force column info to be generated for call expressions so we can
differentiate multiple inlined call sites on the same line
in the debug info.

Fixes rdar://problem/13036237

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176895 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GExpr.cpp
ebbd7e07aa0f22722da6ed8dd3a55beed9699171 11-Mar-2013 Adrian Prantl <aprantl@apple.com> Improve the caching of debuginfo Objective C interface types.
Generate forward declarations that are RAUW'd by finalize().
We thus avoid outputting the same type several times in multiple
stages of completion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176820 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
d436c99c47f7fca4e60077aa7e38cab7c1323f08 10-Mar-2013 Guy Benyei <guy.benyei@intel.com> Fix indirect byval passing of records in address spaced memory. Allocate memory on stack, and memcpy the actual value before the call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176786 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
2c39b0605fff0600714532d348d24aa42a55477f 09-Mar-2013 Benjamin Kramer <benny.kra@googlemail.com> Make helper function static.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176767 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
bea522ff43a3f11c7a2bc7949119dbb9fce19e39 08-Mar-2013 Jordan Rose <jordan_rose@apple.com> ArrayRef-ize ASTContext::getFunctionType and Sema::BuildFunctionType.

No (intended) functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176726 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
37453b9580e293eef3bd60bd36047a93ac4515b1 08-Mar-2013 Joey Gouly <joey.gouly@arm.com> Add support for the OpenCL attribute 'vec_type_hint'.

Patch by Murat Bolat!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176686 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
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
GAtomic.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GValue.h
odeGenFunction.h
odeGenModule.h
odeGenTypes.cpp
fafaaef243322b1e598a72d7dbfaf2ca0c139174 07-Mar-2013 John McCall <rjmccall@apple.com> Move the atomics code into its own file.

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

Also, normalize the API for loading and storing complexes.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176656 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCall.cpp
GClass.cpp
GCleanup.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GStmt.cpp
GVTables.cpp
GValue.h
odeGenFunction.cpp
odeGenFunction.h
argetInfo.cpp
1723f6398ea8aa8d602a478f47695bf3b0374d35 07-Mar-2013 John McCall <rjmccall@apple.com> Evaluate compound literals directly into the result aggregate
when that aggregate isn't potentially aliased.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176654 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
76ecdfc53778a8468b7177c556fdbfe797fdbb29 07-Mar-2013 Benjamin Kramer <benny.kra@googlemail.com> Remove temporary std::vectors that ca be replaced with ArrayRef's magic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176653 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
9789d0d247d0bc1a06d1ea82c0630b427aa209c3 07-Mar-2013 Nick Lewycky <nicholas@mxc.ca> Fix build with clang, this was supposed to be part of r176617.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176619 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
4919de6a53a007487c6d6b173921b5e7152a2004 06-Mar-2013 Adrian Prantl <aprantl@apple.com> Ensure that DIType is regenerated after we visit an implementation
that adds ivars to an interface.

Fixes rdar://13175234

This is an update to r176116 that performs a smart caching of interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176584 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
7e73f94c104070cf03c6f711a10f1928a550193f 06-Mar-2013 Alexey Samsonov <samsonov@google.com> [Sanitize] Don't emit function attribute sanitize_address/thread/memory if the function is blacklisted.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176550 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
bd3aca04d304b9f31240b94af0aad818f6f932ab 06-Mar-2013 Stephen Hines <srhines@google.com> Update build rules for Clang merge to version 176138.

Change-Id: Ib028329a591e6175998d969f11b5404bf3f19e81
ndroid.mk
450b86c0c9ff8307f5145ced621914600196c500 06-Mar-2013 Stephen Hines <srhines@google.com> Merge commit 'b58f810669d9c17bcc025b7560de01d162856f34' into merge_20130226

Conflicts:
include/clang/Basic/LangOptions.def
lib/Sema/SemaDeclAttr.cpp

Change-Id: Ia10b4d3b2c949a72d328cb58b113f90237d4a5d5
23742cd8c6416c6c777904fb837b2021361c4f38 05-Mar-2013 Lang Hames <lhames@gmail.com> Use ASTContext::getDeclAlign(<Field Decl>) to get the alignment of the first
field to be memcpy'd, rather instead of ASTContext::getTypeAlign(<Field Type>).
For packed structs the alignment of a field may be less than the alignment of
the field's type.

<rdar://problem/13338585>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176512 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
3c5cd15da59d084ee441ac1512907a73f0e1f2bd 05-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> Don't emit calls to virtual [[noreturn]] functions as noreturn; overrides of a
[[noreturn]] function are not required to also be [[noreturn]]. We still emit
calls to virtual __attribute__((noreturn)) functions as noreturn; unlike GCC,
we do require overriders to also be noreturn for that attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176476 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
41f3f3a4792f46787632fdb94f952f6b3ce3f4ae 05-Mar-2013 Jordan Rose <jordan_rose@apple.com> Silence a number of static analyzer warnings with assertions and such.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176469 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
0353a7b2df9dc36784f9ec354c266f9c603053e1 04-Mar-2013 John McCall <rjmccall@apple.com> Fix the emission of the copy-initialization of a block capture
from a lambda capture when the capture is not trivially-copyable.

rdar://13295759

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176431 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
72c1dba494b02960284bc6618c1b640c950c3785 03-Mar-2013 David Chisnall <csdavec@swan.ac.uk> Improve C11 atomics support:

- Generate atomicrmw operations in most of the cases when it's sensible to do
so.
- Don't crash in several common cases (and hopefully don't crash in more of
them).
- Add some better tests.

We now generate significantly better code for things like:
_Atomic(int) x;
...
x++;

On MIPS, this now generates a 4-instruction ll/sc loop, where previously it
generated about 30 instructions in two nested loops. On x86-64, we generate a
single lock incl, instead of a lock cmpxchgl loop (one instruction instead of
ten).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176420 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
15e05e932ccf9ba2621394834b62684b42d6fd40 02-Mar-2013 Peter Collingbourne <peter@pcc.me.uk> LLVM API changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176398 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
4a68c7bc86bcaf44f6aee5a470c743b47c11716e 01-Mar-2013 John McCall <rjmccall@apple.com> Restore order to placate test. I had no real reason to switch them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176328 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
ed383135bcffdb8849418896b742fbca7fa2b787 01-Mar-2013 John McCall <rjmccall@apple.com> Re-use bit from superclass and extract stuff into a local
function. Serves a patch we're kicking around out-of-tree.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176327 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
be9e8bfef6ee7f81ea30e9d358101b4f8d560c6b 28-Feb-2013 Bill Wendling <isanbard@gmail.com> Add more of the command line options as attribute flags.

These can be easily queried by the back-end.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176304 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
bd7370a78604e9a20d698bfe328c1e43f12a0613 28-Feb-2013 John McCall <rjmccall@apple.com> Use the actual ABI-determined C calling convention for runtime
calls and declarations.

LLVM has a default CC determined by the target triple. This is
not always the actual default CC for the ABI we've been asked to
target, and so we sometimes find ourselves annotating all user
functions with an explicit calling convention. Since these
calling conventions usually agree for the simple set of argument
types passed to most runtime functions, using the LLVM-default CC
in principle has no effect. However, the LLVM optimizer goes
into histrionics if it sees this kind of formal CC mismatch,
since it has no concept of CC compatibility. Therefore, if this
module happens to define the "runtime" function, or got LTO'ed
with such a definition, we can miscompile; so it's quite
important to get this right.

Defining runtime functions locally is quite common in embedded
applications.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176286 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GBlocks.cpp
GBuiltin.cpp
GCUDANV.cpp
GCall.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprCXX.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GObjCRuntime.h
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
argetInfo.cpp
de38cb1fc8429e7adbd59308d19628cfda5aeee6 28-Feb-2013 David Chisnall <csdavec@swan.ac.uk> Improve property metadata generation with the GNUstep runtime.



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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176186 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.cpp
GCXXABI.h
GClass.cpp
GVTables.cpp
odeGenFunction.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
f4086ebb09be67124e80cc1640090e39322a89cd 27-Feb-2013 Nick Lewycky <nicholas@mxc.ca> Update clang for LLVM API change. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176174 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
5e8577ece79b5ed07b0ab4dcb284a26076efdf65 27-Feb-2013 Lang Hames <lhames@gmail.com> Use the correct alignment for POD-member memcpys where the first field is a
bitfield. CGBitField::StorageAlignment holds the alignment in chars, but
emitMemcpy had been treating it as if it were held in bits, leading to
underaligned memcpys.

Related to PR15348.

Thanks very much to Chandler for the diagnosis.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176163 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
f127eb8aeb3ce861f3dbc1adbb3362bfd98461e1 27-Feb-2013 Rafael Espindola <rafael.espindola@gmail.com> Rename methods to comply with the LLVM Coding Standards.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176159 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2beda12c3fbaa9125831b7f818680978c596b205 27-Feb-2013 Rafael Espindola <rafael.espindola@gmail.com> Move LinkageInfo out of NamedDecl so that it can be used in Type.h.

Everything that cares about visibility also cares about linkage, so I just
moved it to Visibility.h instead of creating a new .h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176155 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
10b4df7ff21076c21ca764f8ca38ccaff7888f25 27-Feb-2013 Adrian Prantl <aprantl@apple.com> Temporarily revert r176116 for compile-time performance regression.

This reverts commit ea95e4587fd13606fbf63b10a07a7d02026aa39c.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176151 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
899245792776dd219a3c36eb19b42272e270bc0c 27-Feb-2013 Bill Wendling <isanbard@gmail.com> Reapply r176133 with testcase fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176145 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
d9365d2d71d591024c420b52afdfc8b4ed0c55db 27-Feb-2013 Bill Wendling <isanbard@gmail.com> Temporarily revert r176133 until testcases are modified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176137 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
2693c323c0cf146da439719d6d31f321ac70add0 27-Feb-2013 Bill Wendling <isanbard@gmail.com> Don't set the -target-cpu and -target-features attributes just now.

This is causing some problems with some of the builders. It's non-trivial to
reset the target's features.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176133 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
58c79037256c77ffdbaa0da12205777e239fe096 26-Feb-2013 Adrian Prantl <aprantl@apple.com> Ensure that DIType is regenerated after we visited an implementation that adds ivars to an interface. Fixes rdar://13175234

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176116 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
85aee96c62a99069ea60cb47d5ae69150ca44746 26-Feb-2013 Kostya Serebryany <kcc@google.com> Unify clang/llvm attributes for asan/tsan/msan (Clang part)

These are two related changes (one in llvm, one in clang).
LLVM:
- rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode)
- rename thread_safety => sanitize_thread
- rename no_uninitialized_checks -> sanitize_memory

CLANG:
- add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis))
- add __attribute__((no_sanitize_thread))
- add __attribute__((no_sanitize_memory))

for S in address thread memory
If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not
set llvm attribute sanitize_S


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176076 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenModule.cpp
bb60fc6a71f280f8e19e7f1a784ef05c40f5aa39 25-Feb-2013 Will Dietz <wdietz2@illinois.edu> [ubsan] Emit single check for left shift.

Avoids warning twice on same shift.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176056 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
c2833111020d7a672bb4b547799fcd87ea4f8fb5 25-Feb-2013 Anna Zaks <ganna@apple.com> Revert "Add more attributes from the command line to functions."

This reverts commit 176009.

The commit is a likely cause of several buildbot failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176044 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
d620e09c13b1ca32434ce440abf5bb0f3d0979c5 25-Feb-2013 Bill Wendling <isanbard@gmail.com> Add more attributes from the command line to functions.

This is an ongoing process. Any command line option which a back-end cares about
should be added here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176009 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
c1d0af1f550fdd59e6ce36f25bae6c735de90071 25-Feb-2013 David Blaikie <dblaikie@gmail.com> Update Clang for a minor DIBuilder breaking change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176003 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5956bcc31ad0b1f570e04f7e19e817112f7274c5 24-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> PR15338: Don't assert if -fsanitize=bounds sees array indexing on an incomplete
array type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175982 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
afda905e60151f0bc34c187d51a798b4265f69af 24-Feb-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> In Sema::InstantiateStaticDataMemberDefinition, pass the var decl to the consumer
just using ASTConsumer::HandleCXXStaticMemberVarInstantiation(), don't pass it with
ASTConsumer::HandleTopLevelDecl.

ASTConsumer::HandleTopLevelDecl is intended for user-written top-level decls;
a consumer can treat an instantiated static data member however it wants of course.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175976 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
c5139a9f0c9d4f835e4ab0b51e78d2f74fb488d9 23-Feb-2013 David Blaikie <dblaikie@gmail.com> Prefer 'and' over '&' in comments.

Post commit code review feedback from Matt Beaumont-Gay on r174248.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175969 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.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
odeGenTypes.cpp
a0a628f839cf50844cc0f226bd9cb72485f98f91 23-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> ubsan: Emit bounds checks for array indexing, vector indexing, and (in really simple cases) pointer arithmetic. This augments the existing bounds checking with language-level array bounds information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175949 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
7728cddd7866fadd07f1191eee40985e3cdbc6bf 23-Feb-2013 Peter Collingbourne <peter@pcc.me.uk> Revert r175912, "Add support for coldcc to clang" at John's request.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175936 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ff971d7973aaa00c286b788d30f6919c7b1f4de2 23-Feb-2013 Eric Christopher <echristo@gmail.com> Propagate the split dwarf file information through into the backend
and through to the debug info in the module. In order to make the
testcase a bit more efficient allow the filename to go through
compilation for compile and not assemble jobs and turn off the
extract for cases where we don't create an object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175935 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
93e4bff1a30d2ac37461943599efd59f04a5c00f 22-Feb-2013 Bill Wendling <isanbard@gmail.com> Make sure we apply attributes to correct places.

Some attributes make sense only on the function or on the call site, but not
both. Make this distinction here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175918 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
4c67aa96401b67b5200e701cff87485067ab0792 22-Feb-2013 Peter Collingbourne <peter@pcc.me.uk> Add support for coldcc to clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175912 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
684aa73192d92850a926870be62a1787eb5b7ed9 22-Feb-2013 Michael Han <fragmentshaders@gmail.com> [Sema] Semantic analysis for empty-declaration and attribute-declaration.

Introduce a new AST Decl node "EmptyDecl" to model empty-declaration. Have attributes from attribute-declaration appertain
to the EmptyDecl node by creating the AST representations of these attributes and attach them to the EmptyDecl node so these
attributes can be sema checked just as attributes attached to "normal" declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175900 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
5eada844fa70b6e2bc941dd7306f7a4fb1e8529d 22-Feb-2013 Benjamin Kramer <benny.kra@googlemail.com> Streamify getNameForDiagnostic and remove the string versions of PrintTemplateArgumentList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175894 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
94236e7393d5cd4acbc5f0b503d23bbe78d9aeec 22-Feb-2013 Bill Wendling <isanbard@gmail.com> Apply the 'nobuiltin' attribute to call sites when the user specifies `-fno-builtin' on the command line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175836 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenModule.cpp
odeGenModule.h
be5f1be4cf8bab6b571d54a2e18cb9e83d7be2fc 21-Feb-2013 Eric Christopher <echristo@gmail.com> Fix formatting and tabs in file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175815 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
05f8ff134d5f270bd7bfe4aaef491bd3febddea1 21-Feb-2013 Fariborz Jahanian <fjahanian@apple.com> Patch for debug info of qualified-id types is 'id'
By Adrian Pranti.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175793 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
52e933b0c3a1d552ab0e4d629ee15cff99a94447 21-Feb-2013 Joey Gouly <joey.gouly@arm.com> Add support to Sema and CodeGen for floating point vector types in OpenCL.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175734 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
41a6a3e064192e98a48f5fabccf262412fe37d10 21-Feb-2013 Fariborz Jahanian <fjahanian@apple.com> objective-C arc IR-gen. Retaining of strong
arguments in function prologue is done
with objc_StoreStrong to pair it with
similar objc_StoreStrong for release in function
epilogue. This is done with -O0 only.
// rdar://13145317


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

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

The type_visibility work is rdar://11880378

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175587 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
odeGenModule.cpp
0b5a483c8f5d8563ebc6ad5e311f2fadb734058d 19-Feb-2013 John McCall <rjmccall@apple.com> Use the actual class visibility for the ObjC EHTYPE global,
not the global visibility mode.

Noticed by inspection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175479 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3f5fcd2d584ef5cfbb4328466c0812754a2e1e7a 19-Feb-2013 Bill Wendling <isanbard@gmail.com> Temporarily revert r175471 for more review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175477 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ea9cde636fa182a1a132db9d3749f288e78d86eb 19-Feb-2013 Bill Wendling <isanbard@gmail.com> Add a 'no-builtin' attribute if we do not want to simplify calls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175471 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
3b1a40fedc489e8ad90476d9966ce39e93b86b44 18-Feb-2013 Douglas Gregor <dgregor@apple.com> CodeGenFunction::CurFuncDecl can be NULL; fix crash introduced in r175386.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175448 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
56c00c4868831c9a137ca7b0e16d063cf986d110 17-Feb-2013 Lang Hames <lhames@gmail.com> Re-apply r174919 - smarter copy/move assignment/construction, with fixes for
bitfield related issues.

The original commit broke Takumi's builder. The bug was caused by bitfield sizes
being determined by their underlying type, rather than the field info. A similar
issue with bitfield alignments showed up on closer testing. Both have been fixed
in this patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175389 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.cpp
odeGenFunction.h
961f5708782bfd1d24f720546ea8017e986b8521 17-Feb-2013 Saleem Abdulrasool <compnerd@compnerd.org> [CodeGen] tighten objc ivar invariant.load attribution

An ivar ofset cannot be marked as invariant load in all cases. The ivar offset
is a lazily initialised constant, which is dependent on an objc_msgSend
invocation to perform a fixup of the offset. If the load is being performed on
a method implemented by the class then this load can safely be marked as an
inviarant because a message must have been passed to the class at some point,
forcing the ivar offset to be resolved.

An additional heuristic that can be used to identify an invariant load would be
if the ivar offset base is a parameter to an objc method. However, without the
parameters available at hand, this is currently not possible.

Reviewed-by: John McCall <rjmccall@apple.com>
Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175330 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
c0dcc2d7beaeb6a80c0c7d69086b4c8894b662a0 15-Feb-2013 Bill Wendling <isanbard@gmail.com> Add the 'target-cpu' and 'target-features' attributes to functions.

The back-end will use these values to reconfigure code generation for different
features.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175308 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
0f9827f5d6248d7008063768eb5f2c3e6ba83e94 15-Feb-2013 Timur Iskhodzhanov <timurrrr@google.com> Abstract out emitting the vdtor calls and do it properly when using -cxx-abi microsoft; also fix vdtor calls for the ARM ABI

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175271 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GExprCXX.cpp
taniumCXXABI.cpp
icrosoftCXXABI.cpp
b9316b3829372c71f2f54d54a9748285f7ffe3fd 14-Feb-2013 Bill Wendling <isanbard@gmail.com> Revert accidental commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175143 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
e1092dfee2bbcc2243421c553bca488880324280 14-Feb-2013 Bill Wendling <isanbard@gmail.com> Pass the target options through to code generation.

The code generation stuff is going to set attributes on the functions it
generates. To do that it needs the target options. Pass them through.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175141 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenAction.cpp
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
c764830bdb6de82baed068889096bd3e52d4cbda 13-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> ubsan: Add checking for invalid downcasts. Per [expr.static.cast]p2 and p11,
base-to-derived casts have undefined behavior if the object is not actually an
instance of the derived type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175078 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
59660c21178b6af518bd4b564e032d5c9cc218cb 13-Feb-2013 Timur Iskhodzhanov <timurrrr@google.com> Emit virtual/deleting destructors properly with -cxx-abi microsoft, PR15058

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175045 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GClass.cpp
GExprCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
icrosoftCXXABI.cpp
06098586f1de7ec5e12ccc3a2291782dee99cd1e 12-Feb-2013 John McCall <rjmccall@apple.com> Properly assemble PHIs after a null-checked invoke of objc_msgSend.
rdar://12046763

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174946 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
66b22771fc0a1dba598e50469f2961048e7edd55 12-Feb-2013 John McCall <rjmccall@apple.com> Call __cxa_begin_catch with the current exception before
calling std::terminate(). rdar://11904428

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174940 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
629df0196eb305221d2c8aa9ab72293d05846f0b 12-Feb-2013 John McCall <rjmccall@apple.com> Change some CGF parameters to CGMs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174939 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
c2808e705eb8a1a825a5807cabc16d55052c31bd 12-Feb-2013 Lang Hames <lhames@gmail.com> Backing out r174919 while I investigate a self-host bug on Takumi's builder.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174925 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.cpp
odeGenFunction.h
72dcecc8c2f9cdd4f0faacc62676d3bb6dba4d02 12-Feb-2013 John McCall <rjmccall@apple.com> In ARC, emit non-peepholed +1s within the full-expression instead
of immediately afterwards.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174922 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
5310859d0dcec2f3efbeb155ae1cfee14bdd2836 12-Feb-2013 Lang Hames <lhames@gmail.com> When generating IR for default copy-constructors, copy-assignment operators,
move-constructors and move-assignment operators, use memcpy to copy adjacent
POD members.

Previously, classes with one or more Non-POD members would fall back on
element-wise copies for all members, including POD members. This often
generated a lot of IR. Without padding metadata, it wasn't often possible
for the LLVM optimizers to turn the element-wise copies into a memcpy.

This code hasn't yet received any serious tuning. I didn't see any serious
regressions on a self-hosted clang build, or any of the nightly tests, but
I think it's important to get this out in the wild to get more testing.
Insights, feedback and comments welcome.

Many thanks to David Blaikie, Richard Smith, and especially John McCall for
their help and feedback on this work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174919 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.cpp
odeGenFunction.h
3f6f51e28231f65de9c2dd150a2d757b2162cfa3 08-Feb-2013 Jordan Rose <jordan_rose@apple.com> Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.

Nearly all of these changes are one-to-one replacements; the few that
aren't have to do with custom identifier validation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174768 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.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
GDebugInfo.cpp
GOpenCLRuntime.cpp
GRTTI.cpp
odeGenTypes.cpp
8f98bf94072fcd41f7da1f8e58b7171adc878d51 06-Feb-2013 Michael Gottesman <mgottesman@apple.com> Changed CGObjCMac.cpp to add the marker externally_initialized to SELECTOR_REFERENCES in both the fragile and non-fragile API.

This is to ensure that GlobalOpt in LLVM does not attempt to look through a
selector reference to a method var name at compile time.

I also added a test/updated old tests that need to recognize the new keyword.

rdar://12580965.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174461 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
8fcbb8dfbc28b6279d22144e10ade401a6c03e9e 05-Feb-2013 Arnaud A. de Grandmaison <arnaud.adegm@gmail.com> Fix typo in comment

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174359 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
ae3f7608756eb90d8dd5d014238437fcbf1c7de7 03-Feb-2013 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: Implement hint values for dynamic_cast as described in the Itanium C++ ABI.

This can yield dramatic speedups of dynamic_cast for simple inheritance trees,
at least with libsupc++. Neither libcxxabi nor libcxxrt make use of this
hint currently, it was never implemented because clang didn't support it.

There was some concern about the number of class hierarchy walks this change
introduces. If it turns out to be an issue we can add caching either at the cast
pair level or even deeper, but we also do a lot of walks in Sema so this
codepath is probably fairly optimized already.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174293 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
21f6b39cca88f0a027c6f5cde24575165c2d5e40 03-Feb-2013 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: Mark the runtime function __dynamic_cast as readonly & nounwind.

This allows the optimizer to CSE dynamic_casts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174289 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
802e22682c17c4a9df3f747abd224db38e382e39 02-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> Don't forget to run destructors when we create an array temporary of class type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174257 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
cfe18a195128002c5861e362db1f11ee1bebbea6 02-Feb-2013 Michael Gottesman <mgottesman@apple.com> Fixed another whitespace issue... *sigh*.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174255 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
db99e8b72ae2b66d3c2f8d896f49513b8d8e2633 02-Feb-2013 Michael Gottesman <mgottesman@apple.com> Fixed whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174254 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
554b07d30484185a313dbe2c5e2fd5798ac3f998 02-Feb-2013 Michael Gottesman <mgottesman@apple.com> On platforms which do not support ARC natively, do not mark objc_retain/objc_release as "nonlazybind".

rdar://13108298.
rdar://13129783.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174253 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
c8c24277a8cce39db95b0e05b79cbdf7e7558355 02-Feb-2013 David Blaikie <dblaikie@gmail.com> Revert r174246, accidentally committed.

This reverts commit 1513eb9284c23acfd19cf742b95996fbb11ca741.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174249 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
odeGenFunction.cpp
9ceca75892202e1791fb002be6418c8720d74912 02-Feb-2013 David Blaikie <dblaikie@gmail.com> Sentenc-ify comment added in r174206.

Based on post-commit review by Paul Robinson.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174248 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
1513eb9284c23acfd19cf742b95996fbb11ca741 02-Feb-2013 David Blaikie <dblaikie@gmail.com> Basics

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174246 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
odeGenFunction.cpp
0a0f93c90fd397a1aa9f97283c55f8ba0062bf55 01-Feb-2013 David Blaikie <dblaikie@gmail.com> Fix exception handling line table problems introduced by r173593

r173593 made us a little too eager to associate all code at the end of a
function with the user-written 'return' line. This caused problems with
breakpoints as they'd be set in exception handling code preceeding the
actual non-exception return handling code, leading to the breakpoint never
being hit in non-exceptional execution.

This change restores the pre-r173593 exception handling line information where
the cleanup code is associated with the '}' not the return line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174206 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
odeGenFunction.cpp
odeGenFunction.h
074cae0861a87bf96d8ea56d02e34839d9ccbd0a 01-Feb-2013 John McCall <rjmccall@apple.com> Destroy arrays and ARC fields when throwing out of ctors.

Previously we were only handling non-array fields of class type.

Testcases derived from a patch by WenHan Gu.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174146 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDecl.cpp
odeGenFunction.h
c264e16a42b3f6c36521857a29ea0949d9781c22 31-Jan-2013 Tim Northover <Tim.Northover@arm.com> Add support for AArch64 target.

In cooperation with the LLVM patch, this should implement all scalar front-end
parts of the C and C++ ABIs for AArch64.

This patch excludes the NEON support also reviewed due to an outbreak of
batshit insanity in our legal department. That will be committed soon bringing
the changes to precisely what has been approved.

Further reviews would be gratefully received.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174055 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
odeGenModule.cpp
taniumCXXABI.cpp
argetInfo.cpp
a8d3904ffa613406ffacec5662c782c9269e5241 31-Jan-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> [msan] Run more optimizations after MemorySanitizer pass.

MSan instrumentation is driven by the original code. We take every
incoming instruction and emit another instruction (or ten) next to
it, operating on the shadow values (but sometimes on the real values,
too). Two programs in one, essentially. There can be any kinds of
redundancies in the second one, so we just run whatever is normally
run at -O2, and then exclude some passes that do not help much with
benchmarks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174049 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
378e1e739aed97e9b278beeb20e9f5bbe34c0232 31-Jan-2013 Douglas Gregor <dgregor@apple.com> When we're emitting a constructor or destructor call from a delegating
constructor, retrieve our VTT parameter directly. Fixes PR14588 /
<rdar://problem/12867962>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174042 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDecl.cpp
GExprCXX.cpp
odeGenFunction.h
c4c62fd78a4728c9e4d4df14911a2ced9bdd2031 31-Jan-2013 Bill Wendling <isanbard@gmail.com> Make sure that the Attribute object represents one attribute only.

Several places were still treating the Attribute object as respresenting
multiple attributes. Those places now use the AttributeSet to represent
multiple attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174004 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
cb5620c9b213f4bd323912159fdddda35e258a14 30-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Move UTF conversion routines from clang/lib/Basic to llvm/lib/Support

This is required to use them in TableGen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173924 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenModule.cpp
7586a6e6b7d79d4be031d2d0d6a35d5996cd0db9 30-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Semantic analysis and CodeGen support for C11's _Noreturn. This is modeled as
an attribute for consistency with our other noreturn mechanisms.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173898 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
78d85b1c5830a881c0a20a1b3fea99ee73149590 30-Jan-2013 Chad Rosier <mcrosier@apple.com> [ubsan] Implement the -fcatch-undefined-behavior flag using a trapping
implementation; this is much more inline with the original implementation
(i.e., pre-ubsan) and does not require run-time library support.

The trapping implementation can be invoked using either '-fcatch-undefined-behavior'
or '-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error', with the latter
being preferred. Eventually, the -fcatch-undefined-behavior' flag will be removed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173848 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
23d5b090cb11078714139bdb5a30d814e3443c4c 28-Jan-2013 Michael Gottesman <mgottesman@apple.com> Since ObjCARC has been refactored into its own library with its own declaration header, we need to include the declaration header alongside Scalar.h in BackendUtil.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173648 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
b263bdf2954953cc7cca5d667eb01319ea0f72ec 27-Jan-2013 Bill Wendling <isanbard@gmail.com> Use the AttributeSet instead of AttributeWithIndex.

In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the
internals of the AttributeSet to outside users, which isn't goodness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173605 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
odeGenModule.cpp
a6504853d297c30cfa271f4710af5a3d5db59449 26-Jan-2013 David Blaikie <dblaikie@gmail.com> PR14566: Debug Info: avoid top level lexical blocks in functions

One of the gotchas (see changes to CodeGenFunction) was due to the fix in
r139416 (for PR10829). This only worked previously because the top level
lexical block would set the location to the end of the function, the debug
location would be updated (as per r139416), the location would be set to
the end of the function again (but that would no-op, since it was the same
as the previous location), then the return instruction would be emitted using
the debug location.

Once the top level lexical block was no longer emitted, the end-of-function
location change was causing the debug loc to be updated, regressing that bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173593 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
3ac83d69c61238cd0d38e90fcdd03390530ab2fb 26-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> patch for PR9027 and // rdar://11861085
Title: [PR9027] volatile struct bug: member is not loaded at -O;
This is caused by last flag passed to @llvm.memcpy being false,
not honoring that aggregate has at least one 'volatile' data member
(even though aggregate itself has not been qualified as 'volatile'.
As a result, optimization optimizes away the memcpy altogether.
Patch review by John MaCall (I still need to fix up a test though).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173535 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GValue.h
odeGenFunction.h
f3bbb155beb69cdad1c6b0472bc0ca20cece6c50 26-Jan-2013 John McCall <rjmccall@apple.com> ARM says that the array cookie should always be eight bytes.
ARM is not thinking about over-aligned structures.
Overrule ARM in both our generic-ARM and iOS ABI implementations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173531 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
96fcde0b8ed8bdf99d326312ca7be6447b0fe5fc 26-Jan-2013 John McCall <rjmccall@apple.com> Move the decision about the kind of CGCXXABI to make inside
the family-specific files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173530 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
odeGenModule.cpp
taniumCXXABI.cpp
d5617eeafc93209a26b9f88276c88cf997c3a0a7 25-Jan-2013 John McCall <rjmccall@apple.com> The standard ARM C++ ABI dictates that inline functions are
never key functions. We did not implement that rule for the
iOS ABI, which was driven by what was implemented in gcc-4.2.
However, implement it now for other ARM-based platforms.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173515 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GRTTI.cpp
GVTables.cpp
GVTables.h
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
b8b2c9da87e7d70a1679db026f40548b3192b705 25-Jan-2013 John McCall <rjmccall@apple.com> First pass at abstracting out a class for the target C++ ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173514 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GRecordLayoutBuilder.cpp
odeGenModule.cpp
4055cfc46a5beb13d0daeace53ac3fe56a1f4ad1 24-Jan-2013 Akira Hatanaka <ahatanaka@mips.com> [mips] Do not emit i32 padding if target ABI is O32. This was causing backend
to pass floating point arguments to be passed in integer registers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173375 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.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
GExprConstant.cpp
GExprScalar.cpp
odeGenTypes.cpp
89530e45729d300b39c7332d2ad20c3ea476ab94 23-Jan-2013 Bill Wendling <isanbard@gmail.com> Remove the last of uses that use the Attribute object as a collection of attributes.

Collections of attributes are handled via the AttributeSet class now. This
finally frees us up to make significant changes to how attributes are structured.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173229 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenModule.cpp
909b6ded6be68a5740d98b478454fa55ea817ad6 23-Jan-2013 Bill Wendling <isanbard@gmail.com> Use the AttributeSet when adding multiple attributes and an Attribute::AttrKind
when adding a single attribute to the function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173211 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
argetInfo.cpp
b62faef5ec86c1931785ffa805ece9b491735894 22-Jan-2013 John McCall <rjmccall@apple.com> Use the correct field to copy/dispose a __block variable.

We were previously hard-coding a particular field index. This was
fine before (because we were obviously guaranteed the presence
of a copy/dispose member) except for (1) alignment padding and
(2) future extensions adding extra members to the header, such
as the extended-layout pointer.

Note that we only introduce the extended-layout pointer in the
presence of structs. (We also seem to be introducing it even
in the presence of an all-non-object layout, but that's a
different potential issue.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173122 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
ed01f84d20a1586b2d639b47463cf1f22418f0f6 21-Jan-2013 Bill Wendling <isanbard@gmail.com> Have AttributeSet::getRetAttributes() return an AttributeSet instead of Attribute.

This further restricts the use of the Attribute class to the Attribute family of
classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173099 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a37ce617af7300eee3ceab435021c342e62c5661 21-Jan-2013 Bill Wendling <isanbard@gmail.com> Make AttributeSet::getFnAttributes() return an AttributeSet instead of an Attribute.

This is more code to isolate the use of the Attribute class to that of just
holding one attribute instead of a collection of attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173095 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
c3c9d17eab67d51d9990f7c57ab6f92856071191 16-Jan-2013 Stephen Hines <srhines@google.com> Revert to prior ARM ABI behavior on Android.

Change-Id: I66bab71382189842861348af4efb8dad206c693e
argetInfo.cpp
15bb58edc9d053aa49c28167deb41ff0409ddabc 21-Jan-2013 Stephen Hines <srhines@google.com> Merge commit 'd130fd2e141f1fef412c2d58e7385370801bd718' into merge-llvm

Conflicts:
lib/Basic/Targets.cpp

Change-Id: I90a669a33ffe4de8b32c8459016fd0b2a55da0ad
649c7316aa29181df7270732722fe5d07ab3c7ad 21-Jan-2013 Timur Iskhodzhanov <timurrrr@google.com> First step towards vftable generation with -cxx-abi microsoft PR13231

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173035 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
d24c9ab90b42370bb417f44e001a0347ee1ca87e 21-Jan-2013 NAKAMURA Takumi <geek4civic@gmail.com> CGDebugInfo.cpp: Fix a warning. [-Wunused-variable]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173022 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4b12be6a354fcad670ed440ce6c1c0583ee28186 21-Jan-2013 David Blaikie <dblaikie@gmail.com> PR14472: Preserve qualifiers while unwrapping types for debug info

Looks like r161368 fixed this for one case but not all. This change generalizes
the solution over all the unwrapping cases. Now that preserving the qualifiers
is done independent of the particular type being unwrapped I won't bother
adding test cases for each one but at least demonstrate that this change was
necessary & sufficient to fix the bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173002 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4bdc60434c79126b75aee2bb391275f3bb746364 20-Jan-2013 Alexey Samsonov <samsonov@google.com> Add top-level Clang flag -f(no-)sanitize-address-zero-base-shadow that makes AddressSanitizer use bottom of the address space for the shadow memory. On Linux it can be used with -fPIE/-pie to improve performance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172974 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.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
GDebugInfo.cpp
GDebugInfo.h
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GOpenCLRuntime.cpp
GRTTI.cpp
odeGenTypes.cpp
a89701bb49601235b8dabafccf10ca4b2efed0e2 20-Jan-2013 David Blaikie <dblaikie@gmail.com> The last of PR14471: Debug info support for inline in-class initializer for float static members

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172942 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e8d7514d6adc149126d5cd47df95600389f0cb70 19-Jan-2013 David Blaikie <dblaikie@gmail.com> Emit the function type of member function pointer types the same as member functions.

Adding the pseudo first parameter to a member function pointer's function type
and mark it as artificial.

Combined with a fix to GDB ( http://sourceware.org/bugzilla/show_bug.cgi?id=14998 )
this fixes gdb.cp/member-ptr.exp with Clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172911 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b1ba0efc3d1dc1daa5d82c40bc504e1f368c4fa0 19-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Re-sort all the headers. Lots of regressions have crept in here.
Manually fix the order of UnwrappedLineParser.cpp as that one didn't
have its associated header as the first header.

This also uncovered a subtle inclusion order dependency as CLog.h didn't
include LLVM.h to pick up using declarations it relied upon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172892 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
e67e4c93dfc9d68bff094c61b588f87456917f6f 18-Jan-2013 Bill Wendling <isanbard@gmail.com> Use the AttributeSet query method instead of the Attribute method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172849 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4f45bc099f2665bc6e4bcbb169aa452390dbf3fe 18-Jan-2013 Will Dietz <wdietz2@illinois.edu> [ubsan] Add support for -fsanitize-blacklist

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172808 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
GBuiltin.cpp
GDeclCXX.cpp
GExpr.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
f9d03c15e8642d4bd3686b8c8e8269242a0f37c6 17-Jan-2013 Daniel Dunbar <daniel@zuster.org> [IRgen] Update modules autolink metadata to use module flags (as now specified
in the LangRef).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172692 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
cd8ab51a44e80625d84126780b0d85a7732e25af 17-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Implement C++11 semantics for [[noreturn]] attribute. This required splitting
it apart from [[gnu::noreturn]] / __attribute__((noreturn)), since their
semantics are not equivalent (for instance, we treat [[gnu::noreturn]] as
affecting the function type, whereas [[noreturn]] does not).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172691 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
90a2d39d3082518566d5a22409a7bbba0d42f054 17-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> objC block layout: Patch reorders block layout to
produce more inline layout metadata. // rdar://12752901


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172683 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
c4a04010f676ce9ff0049b0fc5d1f96a2dbe81be 16-Jan-2013 Tim Northover <Tim.Northover@arm.com> Correct order of operands forwarding NEON vfma to LLVM fma

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172650 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
7dfd18275259df609f8574a25302fc73a000aa64 16-Jan-2013 Reed Kotler <rkotler@mips.com> First step in implementation of mips16 and nomips16 attributes.
Waiting for new llvm attribute code for the next step.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172626 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
f43b7214e812ddca74a6213608c69c960e067956 16-Jan-2013 Douglas Gregor <dgregor@apple.com> Add -fmodules-autolink/-fno-modules-autolink (defaults to on) so that
users can explicitly enable/disable modules autolinking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172592 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
0395de36004a718e265cc256b1bbee3bd3a791dc 16-Jan-2013 Eric Christopher <echristo@gmail.com> Collect both normal and static data members of a class in source
order. Describe static data members to metadata using new interfaces.

Part of PR14471.

Patch by Paul Robinson!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172591 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
ed6355d56cbeb1cd1a77cc46e0a519af25523ccb 16-Jan-2013 David Greene <greened@obbligato.org> Fix signed/unsigned Compare

Do some casting to avoid a signed/unsigned compare.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172571 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
cc41a94688615b551505e0e7c287e1c444f53a3f 16-Jan-2013 David Greene <greened@obbligato.org> Avoid unsigned Compare to int

Cast arithmetic results to avoid comparison of an unsigned to an int.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172570 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
5ba58a1b3cbe79497380e7ccecbe45c8bdd498c1 15-Jan-2013 David Greene <greened@obbligato.org> Fix Const Cast

Do proper casting to avoid a cast-away-const error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172559 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7c9dbb76f6847fb30527c8e74ef9a25a3d4eb731 14-Jan-2013 Michael Gottesman <mgottesman@apple.com> Multiprecision subtraction builtins.

We lower these into 2x chained usub.with.overflow intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172476 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
858afb3c22144027bcd8ba75e27262eede093a60 14-Jan-2013 Douglas Gregor <dgregor@apple.com> Topologically sort the link options generated for modules based on
module-import dependencies, so we'll get the link order correct for
those silly linkers that need it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172459 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
3baad29d4413e1409fc69a472d374cf5de1d78ec 14-Jan-2013 Douglas Gregor <dgregor@apple.com> When forming the link options for an imported module, also include the
link options for the modules it imports.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172448 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5d75ea72d6eee3df0c6acdb282145dc4cc3a9a1b 14-Jan-2013 Douglas Gregor <dgregor@apple.com> Switch autolinking metadata format over to actual linker options, e.g.,

!0 = metadata !{metadata !"-lautolink"}
!1 = metadata !{metadata !"-framework", metadata !"autolink_framework"}

referenced from llvm.module.linkoptions, e.g.,

!llvm.module.linkoptions = !{!0, !1, !2, !3}

This conceptually moves the logic for figuring out the syntax the
linker will accept from LLVM into Clang. Moreover, it makes it easier
to support MSVC's

#pragma comment(linker, "some option")

in the future, should anyone care to do so.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172441 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
19f8e85d2e0ba2b97ad848b5f879ec96ebc1660e 14-Jan-2013 Bill Schmidt <wschmidt@linux.vnet.ibm.com> This patch addresses varargs processing for small complex types under
the 64-bit PowerPC ELF ABI.

The ABI requires that the real and imaginary parts of a complex argument
each occupy their own doubleword. Arguments smaller than 8 bytes are
right-adjusted within the doubleword.

Clang expects EmitVAARG() to return a pointer to a structure in which
the real and imaginary parts are packed adjacently in memory. To accomplish
this, we generate code to load the code appropriately from the varargs
location and pack the values into a temporary variable in the form Clang
expects, returning a pointer to that structure.

The test case demonstrates correct code generation for all "small" complex
types on PPC64: int, short, char, and float.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172438 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
b6cbe517237c3c223beb064d60d5b49e56d65c06 14-Jan-2013 Douglas Gregor <dgregor@apple.com> Implement parsing, AST, (de-)serialization, and placeholder global
metadata for linking against the libraries/frameworks for imported
modules.

The module map language is extended with a new "link" directive that
specifies what library or framework to link against when a module is
imported, e.g.,

link "clangAST"

or

link framework "MyFramework"

Importing the corresponding module (or any of its submodules) will
eventually link against the named library/framework.

For now, I've added some placeholder global metadata that encodes the
imported libraries/frameworks, so that we can test that this
information gets through to the IR. The format of the data is still
under discussion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172437 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
563fb903fab15972e2d9c66b0ae046a94be86a71 13-Jan-2013 NAKAMURA Takumi <geek4civic@gmail.com> CGBuiltin.cpp: Fix abuse of ArrayRef in EmitOverflowIntrinsic().

In ArrayRef<T>(X), X should not be temporary value. It could be rewritten more redundantly;

llvm::Type *XTy = X->getType();
ArrayRef<llvm::Type *> Ty(XTy);
llvm::Value *Callee = CGF.CGM.getIntrinsic(IntrinsicID, Ty);

Since it is safe if both XTy and Ty are temporary value in one statement, it could be shorten;

llvm::Value *Callee = CGF.CGM.getIntrinsic(IntrinsicID, ArrayRef<llvm::Type*>(X->getType()));

ArrayRef<T> has an implicit constructor to create uni-entry of T;

llvm::Value *Callee = CGF.CGM.getIntrinsic(IntrinsicID, X->getType());

MSVC-generated clang.exe crashed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172352 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
0cf07bcc6c53f1df421d4c40ce52d43e8d8adcd3 13-Jan-2013 Michael Gottesman <mgottesman@apple.com> Added builtins for multiprecision adds.

We lower all of these intrinsics into a 2x chained usage of
uadd.with.overflow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172341 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
cfa88f893915ceb8ae4ce2f17c46c24a4d67502f 12-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.h
GBuiltin.cpp
GCUDANV.cpp
GCall.h
GException.cpp
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenAction.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
65bd4ac6ffbf6de30cd6f36735539ff8172a904a 11-Jan-2013 David Chisnall <csdavec@swan.ac.uk> Enable the new (more C++-like, less broken) EH model when targeting the GNUstep
Objective-C runtime 1.7 or greater.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172207 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCGNU.cpp
c2316db5decd9cb7f8768ca67fad41fd8cffc110 11-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> c++ IRGen. In trivial cases that object is going into static
storage and thus is implicitly zero-initialized, no need to
do C++11 memory model. This patch unconditionally detects
such condition and zeroinitializer's the variable.
Patch has been commented on and OKed by Doug off-line.
// rdar://12897704


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172144 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
6a3c70ec59804347c99e96aa13934f63f4fed573 10-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> objectiveC++: When throwing c++ exception of
an objectiveC object, use objc_exception_throw
to raise the exception. // rdar://12605907


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172091 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
f20318f9e27a064bdd9a3fbb51d2c3a4a4f3ac2e 10-Jan-2013 David Tweed <david.tweed@arm.com> Testing with a full OpenCL compiler (based on clang) reveals r71734 missed
difference between type widths of a vector and the width of one of its elements
in the case of vector shifts. Use correct witdth in the vector case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172047 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
f91cbd54c97fceaf84539e7234b27ad54bba735b 10-Jan-2013 Nick Lewycky <nicholas@mxc.ca> Don't assert in codegen on static data members which have NoLinkage. Fixes
PR14825!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172031 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4a5984cc6d176d8356529e7e5aee4856088d79f0 09-Jan-2013 Will Dietz <wdietz2@illinois.edu> [ubsan] Make static check data non-const so it can be used for deduplication.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171947 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
9c78f9bddc42dbdeb05a7183b4770d33b0bda7d3 08-Jan-2013 David Blaikie <dblaikie@gmail.com> Extract the instance-method case for debug info out into a separate function.

This is in preparation for using this to construct the function type for
pointers to member functions to include the implicit/artificial 'this'
parameter in that case as well. (feedback from GDB indicates that this might be
all that's necessary to get it to behave well with Clang's pointer-to-member
function debug output)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171809 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
822023a5531cfa66bc2735d434032c9bf403a490 07-Jan-2013 Will Dietz <wdietz2@illinois.edu> [ubsan] Use correct type for compound assignment ops.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171801 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
67f8b5ef212eee155f69b6f90968fe18c8052122 07-Jan-2013 David Blaikie <dblaikie@gmail.com> Simplify computing debug info type for static member functions.

No (intended) functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171800 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7a83421776416d6a9044fb03b5b02208b47646c1 07-Jan-2013 David Tweed <david.tweed@arm.com> Scalar shifts in the OpenCL specification (as of v. 1.2) are defined to be
with respect to the lower "left-hand-side bitwidth" bits, even when negative);
see OpenCL spec 6.3j. This patch both implements this behaviour in the code
generator and "constant folding" bits of Sema, and also prevents tests
to detect undefinedness in terms of the weaker C99 or C++ specifications
from being applied.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171755 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
0028ee3dd32c5e3b089c0ef176b97ebcdd2c4cf6 07-Jan-2013 David Blaikie <dblaikie@gmail.com> PR14759: Improve/correct support for debug info for C++ member pointers.

Using added LLVM functionality in r171698. This works in GDB for member
variable pointers but not member function pointers. See the LLVM commit and
GDB bug 14998 for details.

Un-xfailing cases in the GDB 7.5 test suite will follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171699 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d938e87458f18ffe4314936c5ab985b6b232c31f 07-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Switch to asking the target machine to add any relevant analysis passses
rather than doing it ourselves. This reflects the API changes in r171681.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171683 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
d8180cf9877cd793949ae94edbf2ee84341041c5 05-Jan-2013 David Blaikie <dblaikie@gmail.com> PR14573: Unnamed parameters in debug info, Part 2

Catch some cases I'd missed in r171605 related to unnamed parameters of record
type. This resolves all remaining cases of PR14573 suppression in the GDB 7.5
test suite. Fix to the test suite to follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171633 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d826f11d2cc16993a5bdfa9d4bb2763882392ac6 05-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Companion patch to r171621 which changed the interface for creating TTI
passes to a create-pass function instead of a direct constructor call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171622 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
436653be0ca4eb696b31315a83a44390cc8bc0b3 05-Jan-2013 David Blaikie <dblaikie@gmail.com> Emit debug info for unnamed parameters.

LLVM ignores this data for now - patch for that to follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171605 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ba3c9ca16b3992248ec654ce9ec8c841c1c6d1e9 05-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> In my last patch initialize the destination to null (with a simple store) before doing a storeStrong to it.
// rdar://12530881


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171572 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
7a77f1994bdbe67db361b851a0907cf49fddfd91 05-Jan-2013 Fariborz Jahanian <fjahanian@apple.com> objective-C arc: in copy helper function for
__strong __block variables, perform objc_storeStrong on
source and destination instead of direct move. This
is done with -O0 and to improve some analysis.
// rdar://12530881


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171555 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
3c7a0e1a75ebe13366a646a9eb8c4aa61e4728d3 04-Jan-2013 Manman Ren <mren@apple.com> Debug Info: fix the line location for cleanup code of a block function

The line information was changed when emitting debug information for all the
DeclRefExprs and we should change it back to get ready for PopClenupBlocks
called from FinishFunction.

rdar://11562117


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171493 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
fd5ac0d75abd6ead8dd39bf526b34eeaff81cef6 04-Jan-2013 Eric Christopher <echristo@gmail.com> Fix fieldNo usage for lambdas. No behavior change since the
field number was 0 anyhow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171472 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
89e19b43b81a6b5d092a81d2ebf6ec9a4097a48d 03-Jan-2013 Eli Friedman <eli.friedman@gmail.com> Don't assert/crash on reference variables in lambdas bound to a
static local variable from the parent scope. PR14773.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171433 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
odeGenFunction.h
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
BIInfo.h
ackendUtil.cpp
GBlocks.cpp
GBlocks.h
GBuilder.h
GBuiltin.cpp
GCUDANV.cpp
GCall.cpp
GCall.h
GDebugInfo.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GOpenCLRuntime.cpp
GOpenCLRuntime.h
GRecordLayout.h
GRecordLayoutBuilder.cpp
GStmt.cpp
GVTables.h
GValue.h
odeGenAction.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
odeGenTBAA.cpp
odeGenTBAA.h
odeGenTypes.cpp
odeGenTypes.h
taniumCXXABI.cpp
oduleBuilder.cpp
argetInfo.cpp
b99083e60325a28063fb588f458a871151971fdc 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Re-sort #include lines using the llvm/utils/sort_includes.py script.

Removes a duplicate #include as well as cleaning up some sort order
regressions since I last ran the script over Clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171364 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
GOpenCLRuntime.cpp
0b2270892387bfeaf61aeca0ddfe5fc97b7fa652 01-Jan-2013 Benjamin Kramer <benny.kra@googlemail.com> Simplify vector splat code. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171350 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
01ad954459c9bdd21e55290859643e334e9c70f4 30-Dec-2012 Bill Wendling <isanbard@gmail.com> Remove the Function::getFnAttributes method in favor of using the AttributeSet
directly.

This is in preparation for removing the use of the 'Attribute' class as a
collection of attributes. That will shift to the AttributeSet class instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171254 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenModule.cpp
e8c0322701ce6ece0c24ab1391915676dd2eba1c 28-Dec-2012 Alexey Samsonov <samsonov@google.com> Add proper support for -fsanitize-blacklist= flag for TSan and MSan. Clang part.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171184 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
38980086c0f791e8c23cc882574f18e5b4a87db6 25-Dec-2012 Guy Benyei <guy.benyei@intel.com> Add intel_ocl_bicc calling convention as a function attribute to clang. The calling convention is already implemented in LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171056 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
34ef11be9d09ebf916ab02a521e37be6e9e102d3 24-Dec-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Support -fsanitize-memory-track-origins.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171020 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
cc6456c07a64ba4db7ab972d2519ad985e328289 24-Dec-2012 NAKAMURA Takumi <geek4civic@gmail.com> CGClass.cpp: [PR14335] Remove comma-separated \param, for now. [-Wdocumentation]

/// \param argBegin,argEnd the arguments to evaluate and pass to the constructor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171015 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
0a6b708add17894e355201d1e4fb9110beb608e5 24-Dec-2012 NAKAMURA Takumi <geek4civic@gmail.com> CGDecl.cpp: Prune three descriptions in two methods, CodeGenFunction::pushIrregularPartialArrayCleanup() and CodeGenFunction::pushRegularPartialArrayCleanup(). [-Wdocumentation]

/// \param array - a value of type elementType*
/// \param destructionKind - the kind of destruction required
/// \param initializedElementCount - a value of type size_t* holding the number of successfully-constructed elements

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171013 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
0481e54c1a181049d306224161bf43d1976a47e9 24-Dec-2012 NAKAMURA Takumi <geek4civic@gmail.com> CGValue.h: Update one \param to Addr in MakeBitfield(). [-Wdocumentation]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171011 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
0dbe2fb7758fe64568206b5bc0f1c5b106b9c806 21-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> Reinstate r170806, reverted in r170835, with a fix use i1 instead of i8 for a value-initialized bool!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170837 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprScalar.cpp
98ab776a8a9e19c7bf1bd04d610ec2b2c37aef7a 21-Dec-2012 NAKAMURA Takumi <geek4civic@gmail.com> Revert r170806, "Fix some bugs where we would sometimes use 0, not -1, when emitting a null constant of type pointer-to-data-member."

It broke stage2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170835 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprScalar.cpp
0db661e67f613f49d047cdf53da29b9741234ad8 21-Dec-2012 Rafael Espindola <rafael.espindola@gmail.com> Don't eagerly emit a global static merged with a local extern.

When we are visiting the extern declaration of 'i' in

static int i = 99;
int foo() {
extern int i;
return i;
}

We should not try to handle it as if it was an function static. That is, we
must consider the written storage class.

Fixing this then exposes that the assert in EmitGlobalVarDeclLValue and the
if leading to its call are not completely accurate. They were passing before
because the second decl was marked as having external storage. I changed them
to check the linkage, which I find easier to understand.

Last but not least, there is something strange going on with cuda and opencl.
My guess is that the linkage computation for these languages needs to be
audited, but I didn't want to change that in this patch so I just updated
the storage classes to keep the current behavior.

Thanks to Reed Kotler for reporting this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170827 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
d8af340e27a1ecabec925a1090a3e4984688b5b1 21-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix some bugs where we would sometimes use 0, not -1, when emitting a null constant of type pointer-to-data-member.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170806 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprScalar.cpp
72390b39c545426023ec104afe8706395d732bad 20-Dec-2012 Bill Wendling <isanbard@gmail.com> Rename llvm::Attributes to llvm::Attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170722 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GClass.cpp
GDeclCXX.cpp
GExpr.cpp
GObjC.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
argetInfo.cpp
ad017fa7a4df7389d245d02a49b3c79ed70bedb9 20-Dec-2012 Bill Wendling <isanbard@gmail.com> Revert r170500. It over-zealously converted *ALL* things named Attributes, which is wrong here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170721 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GClass.cpp
GDeclCXX.cpp
GExpr.cpp
GObjC.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
argetInfo.cpp
094dbf917127a1228147587076d59ca45b7c258d 19-Dec-2012 Bill Wendling <isanbard@gmail.com> Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170500 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GClass.cpp
GDeclCXX.cpp
GExpr.cpp
GObjC.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
argetInfo.cpp
3bc93e3124ad5e7191c4a12dc981c8ee53578193 19-Dec-2012 David Blaikie <dblaikie@gmail.com> Change DeclContextLookup(Const)Result to (Mutable)ArrayRef<NamedDecl*>, as per review discussion in r170365

This does limit these typedefs to being sequences, but no current usage
requires them to be contiguous (we could expand this to a more general
iterator pair range concept at some point).

Also, it'd be nice if SmallVector were constructible directly from an ArrayRef
but this is a bit tricky since ArrayRef depends on SmallVectorBaseImpl for the
inverse conversion. (& generalizing over all range-like things, while nice,
would require some nontrivial SFINAE I haven't thought about yet)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170482 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
e538d48957b10bfaac46bc6138b78cfcc28ee89e 19-Dec-2012 Eli Friedman <eli.friedman@gmail.com> Make sure CodeGen uses a value of the correct type as the result of
of assignment to a bool bitfield. PR14638.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170480 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
e77372ac818cf202571dcbf8ab656c8f47ba3423 18-Dec-2012 Eli Bendersky <eliben@google.com> Similar to 170440 - fix build warning with gcc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170461 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
08cc03fcd97c3886b004d861aadbc28de70092c5 18-Dec-2012 Meador Inge <meadori@codesourcery.com> CodeGen: Expand creal and cimag into complex field loads

PR 14529 was opened because neither Clang or LLVM was expanding
calls to creal* or cimag* into instructions that just load the
respective complex field. After some discussion, it was not
considered realistic to do this in LLVM because of the platform
specific way complex types are expanded. Thus a way to solve
this in Clang was pursued. GCC does a similar expansion.

This patch adds the feature to Clang by making the creal* and
cimag* functions library builtins and modifying the builtin code
generator to look for the new builtin types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170455 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
6bd120387a0d36bb5a748d4100b3eaa399eb53c5 18-Dec-2012 Eli Bendersky <eliben@google.com> Fix a compilation warning with gcc 4.6


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170440 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.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
GDebugInfo.cpp
GDebugInfo.h
GOpenCLRuntime.cpp
GOpenCLRuntime.h
GRTTI.cpp
odeGenTypes.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
GDebugInfo.cpp
GDebugInfo.h
GOpenCLRuntime.cpp
GOpenCLRuntime.h
GRTTI.cpp
odeGenTypes.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
GDebugInfo.cpp
GDebugInfo.h
GOpenCLRuntime.cpp
GOpenCLRuntime.h
GRTTI.cpp
odeGenTypes.cpp
15cc355526cdd898f5e528c38c3e385c45746e06 18-Dec-2012 David Chisnall <csdavec@swan.ac.uk> Remove obsolete FIXMEs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170425 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
90f692611bd486198ffa67a0e097013a2e6e3d2e 18-Dec-2012 Rafael Espindola <rafael.espindola@gmail.com> Inline hasAtomicCopyHelperAPI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170408 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
c92384f871597902b8d5ffc33a662e8ac0d25db0 18-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix typo (thanks to Jordan for spotting it!).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170403 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
073fec91b73f08ba86ad46573141be14c7a0d262 18-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> Rein ubsan's vptr sanitizer back a bit. Per core issue 453, binding a reference
to an object outside its lifetime does not have undefined behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170387 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
d397cfef01d49a41554309d67ea26340c39e1e94 17-Dec-2012 David Chisnall <csdavec@swan.ac.uk> Reapply r170344, this time without forgetting to commit the header changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170354 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
e315cb3b30a0461ae501f8942f9d012bbeee3f90 17-Dec-2012 Benjamin Kramer <benny.kra@googlemail.com> Revert "Added support for new property helpers (GNUstep runtime)."

This reverts commit r170344. Doesn't even compile.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170351 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
648dd82196b09953c029d15679e32a799a1b1eb6 17-Dec-2012 David Chisnall <csdavec@swan.ac.uk> Added support for new property helpers (GNUstep runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170344 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
9e6111ad10d29802d8eff99c941d262979e99084 17-Dec-2012 Bill Schmidt <wschmidt@linux.vnet.ibm.com> This patch fixes PR13624, which notes a 64-bit PowerPC ELF ABI
incompatibility with how complex values are returned. It is sufficient
to flag all complex types as direct rather than indirect.

A new test case is provided that checks correct IR generation for the
various supported flavors of _Complex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170302 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
1bdbe4d23ed90f601772edd4aa00b8d757c6d6ca 15-Dec-2012 Will Dietz <wdietz2@illinois.edu> [ubsan] Emit branch weight metadata to hint towards common case.

Results in better block placement that helps close the
performance gap when making ubsan checks recoverable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170263 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
50f089a6e1837cb81f8d1830bda6db619e422a2e 14-Dec-2012 Eli Friedman <eli.friedman@gmail.com> Make sure the __invoke function for lambdas returns properly. Per bug report on IRC>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170160 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
c9a9177e699897a71670ae211fa053240f41460e 13-Dec-2012 David Blaikie <dblaikie@gmail.com> Debug Info: Emit vtables pointer members as artificial.

I wasn't sure where to put the test case for this, but this seemed like as good
a place as any. I had to reorder the tests here to make them legible while
still matching the order of metadata output in the IR file (for some reason
making it virtual changed the ordering).

Relevant commit to fix up LLVM to actually respect 'artificial' member
variables is coming once I write up a test case for it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170154 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
463b48ba7eab6d7c96d23b59caea7f25de548293 13-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> ubsan: Add -fsanitize=bool and -fsanitize=enum, which check for loads of
bit-patterns which are not valid values for enumerated or boolean types.
These checks are the ubsan analogue of !range metadata.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170108 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
cdc2e82c317163693c99a8cbef76685e86420395 13-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> Simplify. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170100 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
a923c9783e8bd8edd26e56df9eaacd872c43e20e 12-Dec-2012 John McCall <rjmccall@apple.com> Rewrite calls to bitcast unprototyped functions when emitting a definition.

My variadics patch, r169588, changed these calls to typically be
bitcasts rather than calls to a supposedly variadic function.
This totally subverted a hack where we intentionally dropped
excess arguments from such calls in order to appease the inliner
and a "warning" from the optimizer. This patch extends the hack
to also work with bitcasts, as well as teaching it to rewrite
invokes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170034 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
df76f1ea801a60a422812b20bd0bfa6ab51cecf8 12-Dec-2012 Chad Rosier <mcrosier@apple.com> Marking the objc_autoreleaseReturnValue and objc_retainAutoreleaseReturnValue
call sites as tail calls unconditionally. While it's theoretically true that
this is just an optimization, it's an optimization that we very much want to
happen even at -O0, or else ARC applications become substantially harder to
debug. See r169796 for the llvm/fast-isel side of things.
rdar://12553082

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169996 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
007c44ccbd048472469514284697f23a58475f35 11-Dec-2012 NAKAMURA Takumi <geek4civic@gmail.com> BackendUtil.cpp: Add #include "llvm/TargetTransformInfo.h"

llvm/Target/TargetMachine.h will not provide "llvm/TargetTransformInfo.h" any more.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169816 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
44f4a2d8a95e7f12c61530a9b57854be009aef38 10-Dec-2012 Bill Wendling <isanbard@gmail.com> Specify if `-mno-red-zone' was used when creating the GCOV instrucmentation pass.

This prevents the functions generated by that pass from using the red zone.
<rdar://problem/12843084>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169755 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
29573b0a825b888c233d7859a257e866ffc5276e 09-Dec-2012 Benjamin Kramer <benny.kra@googlemail.com> Unbreak the clang build after r169712.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169713 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
b50d7a35c2f55be382d462a02fd4e21d6b582162 09-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Cleanup and fix an assert that was mis-firing.

Note that there is no test suite update. This was found by a couple of
tests failing when the test suite was run on a powerpc64 host (thanks
Roman!). The tests don't specify a triple, which might seem surprising
for a codegen test. But in fact, these tests don't even inspect their
output. Not at all. I could add a bunch of triples to these tests so
that we'd get the test coverage for normal builds, but really someone
needs to go through and add actual *tests* to these tests. =[ The ones
in question are:

test/CodeGen/bitfield-init.c
test/CodeGen/union.c

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169694 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
ef8d516e7e015a905ca72ce99590803ca7c7e8f3 09-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Fix the bitfield record layout in codegen for big endian targets.

This was an egregious bug due to the several iterations of refactorings
that took place. Size no longer meant what it original did by the time
I finished, but this line of code never got updated. Unfortunately we
had essentially zero tests for this in the regression test suite. =[

I've added a PPC64 run over the bitfield test case I've been primarily
using. I'm still looking at adding more tests and making sure this is
the *correct* bitfield access code on PPC64 linux, but it looks pretty
close to me, and it is *worlds* better than before this patch as it no
longer asserts! =] More commits to follow with at least additional tests
and maybe more fixes.

Sorry for the long breakage due to this....

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169691 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
785b778203a474c6e4b9e17ae91cd2a358868877 08-Dec-2012 Bill Wendling <isanbard@gmail.com> s/AttrListPtr/AttributeSet/g to better label what this class is going to be in the near future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169652 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GStmt.cpp
odeGenModule.cpp
argetInfo.cpp
e56bb36e8eea89bae7dfe6eb6ea0455af126bf4a 07-Dec-2012 John McCall <rjmccall@apple.com> Fix the required args count for variadic blocks.

We were emitting calls to blocks as if all arguments were
required --- i.e. with signature (A,B,C,D,...) rather than
(A,B,...). This patch fixes that and accounts for the
implicit block-context argument as a required argument.
In addition, this patch changes the function type under which
we call unprototyped functions on platforms like x86-64 that
guarantee compatibility of variadic functions with unprototyped
function types; previously we would always call such functions
under the LLVM type T (...)*, but now we will call them under
the type T (A,B,C,D,...)*. This last change should have no
material effect except for making the type conventions more
explicit; it was a side-effect of the most convenient implementation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169588 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCall.cpp
GCall.h
GExpr.cpp
odeGenTypes.h
argetInfo.h
72d2dab6058467036df73a5f668036a519043e5b 06-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Rework the bitfield access IR generation to address PR13619 and
generally support the C++11 memory model requirements for bitfield
accesses by relying more heavily on LLVM's memory model.

The primary change this introduces is to move from a manually aligned
and strided access pattern across the bits of the bitfield to a much
simpler lump access of all bits in the bitfield followed by math to
extract the bits relevant for the particular field.

This simplifies the code significantly, but relies on LLVM to
intelligently lowering these integers.

I have tested LLVM's lowering both synthetically and in benchmarks. The
lowering appears to be functional, and there are no really significant
performance regressions. Different code patterns accessing bitfields
will vary in how this impacts them. The only real regressions I'm seeing
are a few patterns where the LLVM code generation for loads that feed
directly into a mask operation don't take advantage of the x86 ability
to do a smaller load and a cheap zero-extension. This doesn't regress
any benchmark in the nightly test suite on my box past the noise
threshold, but my box is quite noisy. I'll be watching the LNT numbers,
and will look into further improvements to the LLVM lowering as needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169489 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCRuntime.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
GValue.h
9d05986cc590a0df3fcd38565068be554910ab31 04-Dec-2012 Bill Wendling <isanbard@gmail.com> Use the 'count' attribute to calculate the upper bound of an array.

The count attribute is more accurate with regards to the size of an array. It
also obviates the upper bound attribute in the subrange. We can also better
handle an unbound array by setting the count to -1 instead of the lower bound to
1 and upper bound to 0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169311 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
441d9f7a36d3289eed0299823f05f70f810364ee 04-Dec-2012 Eli Bendersky <eliben@google.com> Adapt to LLVM commit 169291 which streamlines the usage of NaCl/NativeClient
in the triple.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169292 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
ff685c562c8fd5dfc6effec17377fde9dad6f271 04-Dec-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c blocks: Consider padding due to alignment
after the fixed size block header when generating
captured block variable info. // rdar://12773256


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169285 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GObjCMac.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
ackendUtil.cpp
GBlocks.cpp
GBlocks.h
GBuiltin.cpp
GCUDANV.cpp
GCUDARuntime.cpp
GCXX.cpp
GCXXABI.h
GCall.cpp
GCall.h
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
GDeclCXX.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GObjCRuntime.h
GRTTI.cpp
GRecordLayoutBuilder.cpp
GStmt.cpp
GVTables.cpp
GVTables.h
GValue.h
odeGenAction.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTBAA.h
odeGenTypes.cpp
odeGenTypes.h
taniumCXXABI.cpp
oduleBuilder.cpp
argetInfo.cpp
argetInfo.h
003ec237adbabe93d5f87d8c23b4d148b4767617 04-Dec-2012 Bill Wendling <isanbard@gmail.com> Add a 'count' field to the DWARF subrange.

The count field is necessary because there isn't a difference between the 'lo'
and 'hi' attributes for a one-element array and a zero-element array. When the
count is '0', we know that this is a zero-element array. When it's >=1, then
it's a normal constant sized array. When it's -1, then the array is unbounded.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169219 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
cdeb7d57a4867c28e3e6a8c391cba6f13c781fa6 04-Dec-2012 Michael Ilseman <milseman@apple.com> Have clang use LLVM IR's fast-math flags when in FastMath or FiniteMathOnly modes. Test cases included.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169191 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
9dce4b3d9d14ba2be2aad5bd7fd8d381a0263c36 04-Dec-2012 Michael Ilseman <milseman@apple.com> remove trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169187 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
73593eb5c68e28e0eaa4f2b6251dae167eef3a83 03-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix test failure when building Clang with g++4.7 -- don't use a Twine temporary
after its lifetime has ended!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169170 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
91ecfa6af51836d3ccc90beddab1193b0c060739 03-Dec-2012 Alexey Samsonov <samsonov@google.com> Add Clang flags -fsanitize-blacklist and -fno-sanitize-blacklist. Make this flag usable for ASan. Blacklisting can be used to disable sanitizer checks for particular file/function/object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169144 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
96a66392649f23e19bb9b2d512f2779b9dd420d0 03-Dec-2012 Alexey Samsonov <samsonov@google.com> Fix PR14474: don't emit debug info for interface types in -gline-tables-only mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169138 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
09ccf39c13cfca102deea2986f45cb908bc232fd 03-Dec-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Add -fsanitize=memory.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169124 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
ad95481b2769ad61f23afc5e2c31f11c66090657 02-Dec-2012 Will Dietz <wdietz2@illinois.edu> [ubsan] Add flag to enable recovery from checks when possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169114 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
2fa67efeaf66a9332c30a026dc1c21bef6c33a6c 01-Dec-2012 Benjamin Kramer <benny.kra@googlemail.com> Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't pull in all the generated Attr code.

Required to pull some functions out of line, but this shouldn't have a perf impact.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169092 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
bbe89d5670b458fc1e2fff49e96e119ffb1622c8 30-Nov-2012 Aaron Ballman <aaron@aaronballman.com> Fixing a precedence issue with my previous commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169041 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
99ecd9f50dc28cd8db90ddaab39e2c8843dc3500 30-Nov-2012 Aaron Ballman <aaron@aaronballman.com> Fixing an MSVC warning about an unsafe mixture of Boolean and unsigned types in a logical operator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169037 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
db748a380ab89b1c0b6e751e55291f57605cccce 30-Nov-2012 Eli Friedman <eli.friedman@gmail.com> Fix a small calling-convention bug for x86-32. PR14453.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168959 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
4d1a6e41e1eaeaf5a4672c802519f15c8fb91e91 29-Nov-2012 Alexey Samsonov <samsonov@google.com> This patch exposes to Clang users three more sanitizers are experimental features of ASan:
1) init-order sanitizer: initialization-order checker.
Status: usable, but may produce false positives w/o proper blacklisting.
2) use-after-return sanitizer
Status: implemented, but heavily understed.
Should be optional, as it significanlty slows program down.
3) use-after-scope sanitizer
Status: in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168950 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
8b8a09e496fbed361d4c8e9e8cc259454a094258 29-Nov-2012 Rafael Espindola <rafael.espindola@gmail.com> Merge function types in C.

Among other differences, GCC accepts

typedef int IA[];
typedef int A10[10];
static A10 *f(void);
static IA *f(void);
void g(void) {
(void)sizeof(*f());
}

but clang used to reject it with:

invalid application of 'sizeof' to an incomplete type 'IA' (aka 'int []')

The intention of c99's 6.2.7 seems to be that we should use the composite type
and accept as gcc does.

Doing the type merging required some extra fixes:
* Use the type from the function type in initializations, even if an parameter
is available.
* Fix the merging of the noreturn attribute in function types.
* Make CodeGen handle the fact that an parameter type can be different from
the corresponding type in the function type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168895 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
b15c8984ea300624fbbde385d3907667ce1043fa 29-Nov-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C blocks: Make sure that identical logic is used
in deciding a copy/dispose field is needed in a byref structure
and when generating the copy/dispose helpers. In certain
cases, these fields were being added but no copy/dispose was
being generated. This was uncovered in ARC, but not in MRR.
// rdar://12759433


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168825 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDebugInfo.cpp
GDebugInfo.h
060f34d6d12a851faa9463da522f7dff1104d0e1 28-Nov-2012 Manman Ren <mren@apple.com> ABI: comments from Eli on r168820.

rdar://12723368


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168821 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
f51c61c78e8487061b6a434286488fa3e5b919e5 28-Nov-2012 Manman Ren <mren@apple.com> ABI: modify CreateCoercedLoad and CreateCoercedStore to not use load or store of
the original parameter or return type.

Since we do not accurately represent the data fields of a union, we should not
directly load or store a union type.

As an exmple, if we have i8,i8, i32, i32 as one field type and i32,i32 as
another field type, the first field type will be chosen to represent the union.
If we load with the union's type, the 3rd byte and the 4th byte will be skipped.

rdar://12723368


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168820 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
11c9a6e8cb078da45ee73e6771864576b207ac8b 28-Nov-2012 Kostya Serebryany <kcc@google.com> [asan] Split AddressSanitizer into two passes (FunctionPass, ModulePass), Clang part.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168782 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
82c458ea76bf8f0981e3d1b5070c0b0e5878d784 28-Nov-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C arc: load of a __weak object happens via call to
objc_loadWeak. This retains and autorelease the weakly-refereced
object. This hidden autorelease sometimes makes __weak variable alive even
after the weak reference is erased, because the object is still referenced
by an autorelease pool. This patch overcomes this behavior by loading a
weak object via call to objc_loadWeakRetained(), followng it by objc_release
at appropriate place, thereby removing the hidden autorelease. // rdar://10849570


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168740 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
b85403658a77e9c19c391c8f02bc7767544a25d9 27-Nov-2012 Will Dietz <wdietz2@illinois.edu> Add -fsanitize=integer for reporting suspicious integer behaviors.

Introduces new sanitizer "unsigned-integer-overflow".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168701 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
c9715fc7c329c85e0b7aa0884c9209fa1fe5b819 27-Nov-2012 Bill Schmidt <wschmidt@linux.vnet.ibm.com> This patch addresses an incompatibility relative to the 64-bit PowerPC
ELF ABI.

Complex values are to be passed in registers as though the real and
imaginary parts were passed as separate parameters. Prior to this
patch, complex values were passed as byval aggregates. It turns out
that specifying getDirect() for all complex types when classifying the
argument type results in the desired behavior.

The new Clang test case verifies that the correct LLVM IR is generated
for caller and callee for each of the underlying types for _Complex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168673 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
f419a856b56354781141a2a37f6190918be548ed 26-Nov-2012 Anton Korobeynikov <asl@math.spbu.ru> MSPGCC renamed ISR vectors from vector_<address> to __isr_<number>. This patch makes Clang reflect this scheme.
Patch by Job Noorman!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168598 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
85489080807b47b70d26611ba543801e16bec4cd 23-Nov-2012 Joey Gouly <joey.gouly@arm.com> PR14306: Move -fbounds-checking to -fsanitize=bounds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168510 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
dd851595cb9123558c9029efdadb1b4be9881a3d 20-Nov-2012 Bill Wendling <isanbard@gmail.com> Update method calls to the new interface re r168354.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168355 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenModule.cpp
7baa711e61258a762db42e449e424bd0928318a6 17-Nov-2012 Benjamin Kramer <benny.kra@googlemail.com> Enable inlining of 4 byte atomic ops on ppc32, 8 byte atomic ops on ppc64.

Also fixes a bit/byte mismatch when checking if a target supports atomic ops of a certain size.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168260 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
426391cd51af86f9d59eceb0fb1c42153eccbb9a 16-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> A step towards sorting out handling of triviality of special members in C++11.

Separate out the notions of 'has a trivial special member' and 'has a
non-trivial special member', and use them appropriately. These are not
opposites of one another (there might be no special member, or in C++11 there
might be a trivial one and a non-trivial one). The CXXRecordDecl predicates
continue to produce incorrect results, but do so in fewer cases now, and
they document the cases where they might be wrong.

No functionality changes are intended here (they will come when the predicates
start producing the right answers...).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168119 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDebugInfo.cpp
GExprAgg.cpp
argetInfo.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
odeGenTypes.cpp
8fd8ee9b718a7d6ebbcc382c1de39ed1260fe2d3 15-Nov-2012 Benjamin Kramer <benny.kra@googlemail.com> Simplify code. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168047 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
c4a77906c259cba58c147d8468c406a430ecdcbb 15-Nov-2012 Dmitri Gribenko <gribozavr@gmail.com> Use empty parens for empty function parameter list instead of '(void)'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168041 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GObjCGNU.cpp
odeGenModule.h
931c0833811c030884fa50b2ccbd3c34f0f4c4ee 15-Nov-2012 Lang Hames <lhames@gmail.com> Make -ffp-contract a codegen option, rather than a laguage option. This makes
more sense anyway - it determines how expressions are codegen'd. It also ensures
that -ffp-contract=fast has the intended effect when compiling LLVM IR.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168027 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
GExprScalar.cpp
f5bf912767ba19832bba7694fc679a5ec3c055ff 14-Nov-2012 Eli Friedman <eli.friedman@gmail.com> When evaluating variably modified types for function parameters, dig out the
type as written from the ParmVarDecl; it's unclear whether the standard
(C99 6.9.1p10) requires this, but we're following the precedent set by gcc,
and hopefully nobody will ever ask about this again.

PR9559 / <rdar://problem/12621983>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167985 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
70cd619e74306b1599d5579e6fd6a14bd9592281 14-Nov-2012 John McCall <rjmccall@apple.com> The ObjC++-to-C++ personality trick is only necessary on NeXT runtimes,
which is not coincidentally the only place it works, either (because
of how it tests for EH_TYPE symbols).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167935 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
7d4b9fabf3778ca90aa45392a49cb9c082709929 14-Nov-2012 Fariborz Jahanian <fjahanian@apple.com> fixes a buildbot failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167934 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
ccf57eab4ed02fca61e6996c8aebb5e04f46c0e7 14-Nov-2012 Fariborz Jahanian <fjahanian@apple.com> Fix 80-column violation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167932 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3ca23d7dc6cb61e6f363a58d9256d548199d120c 14-Nov-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C blocks: Provide layout map for byref
variables captured in a block. // rdar://12184410



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167931 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDebugInfo.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
2b07dd350a0d0b132ed529cb449fe2a5a56103b8 14-Nov-2012 John McCall <rjmccall@apple.com> Move some GNUStep-specific code out of CGObjCGNU.

Patch by Jonathan Schleifer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167925 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
0c949efad533330eee234d613712510db7376e44 14-Nov-2012 Eric Christopher <echristo@gmail.com> Revert "Use the 'count' attribute instead of the 'upper_bound' attribute."
temporarily since it breaks the gdb bots.

This reverts commit r167807/30305bec25cac981c6d4a3b8be004401310a82a7.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167887 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
30305bec25cac981c6d4a3b8be004401310a82a7 13-Nov-2012 Bill Wendling <isanbard@gmail.com> Use the 'count' attribute instead of the 'upper_bound' attribute.

If we have a type 'int a[1]' and a type 'int b[0]', the generated DWARF is the
same for both of them because we use the 'upper_bound' attribute. Instead use
the 'count' attrbute, which gives the correct number of elements in the array.
<rdar://problem/12566646>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167807 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
8187c7e488837698c5fb7a84107e3347d276f73f 13-Nov-2012 Eli Friedman <eli.friedman@gmail.com> Fix IR generation for bool on PPC (and any other target where bool is not 8 bits in memory).

PR11777.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167802 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
a97d2ecca779bf1e12ea46481973b348d395b06e 10-Nov-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C blocks: Change BLOCK_HAS_EXTENDED_LAYOUT to be 1<<31.
lower 24bit is currently being used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167678 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.h
8616f9af65b9a3662f2c9dfed38eeabc509f8446 09-Nov-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Turn FrontendInputFile into an immutable class and have it also accept
a memory buffer instead of only a filename.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167627 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenAction.cpp
485577dcac0b0877cfb5395b365490a0189c66f5 09-Nov-2012 Chad Rosier <mcrosier@apple.com> Implement -mstrict-align using '-backend-option -arm-strict-align' as this saves
us from having to make any backend changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167623 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
7e293276281bd5bf8526c064d298082b08f0bd8b 09-Nov-2012 Chad Rosier <mcrosier@apple.com> [driver] Add a -mstrict-align compiler option for ARM targets.
rdar://12340498

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167619 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
e9385363069388d8e3536052a138f17332e00620 08-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> When deciding whether to convert an array construction loop into a memcpy, look
at whether the *selected* constructor would be trivial rather than considering
whether the array's element type has *any* non-trivial constructors of the
relevant kind.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167562 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
1da01d6908de90c6856e7c93460b67bf3bb28dd9 07-Nov-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C blocks: bring back the CharUnit patch for
captured block variable layout meta-data. No intended change
in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167549 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c686004145b1f4dbeb38173a0886ba7040ae0089 07-Nov-2012 David Chisnall <csdavec@swan.ac.uk> Fix the Objective-C exception rethrow from cleanups (GNU runtimes). Note that
a bug in the inliner still causes the wrong thing to happen at -O2 and above
(PR14116).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167534 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCGNU.cpp
odeGenFunction.h
7745786044f159cf9ddf4a8a0f7be8fe2bebfa80 07-Nov-2012 Eli Friedman <eli.friedman@gmail.com> Put something sane in the DWARF offset field for bitfield ObjC ivars.
This is useful because unnamed bitfields can have effects on the
offsets which are not otherwise reflected in the DWARF information.

<rdar://problem/12629719>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167503 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GObjCRuntime.cpp
GObjCRuntime.h
4179ddd5752ec5a252ca1e1eb77a5c34b5835d3b 06-Nov-2012 Anton Korobeynikov <asl@math.spbu.ru> Implement codegen for init_priority attribute properly - make sure it
works between the modules.
No functionality change on Darwin/Windows.
This fixes PR11480.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167496 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenModule.h
e5b4666d9b86ea30b90b599691e75d380f84ddd6 06-Nov-2012 Eli Friedman <eli.friedman@gmail.com> Back out 167431+167437+167487; I didn't realize how incomplete our test
coverage of this code is.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167495 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GObjCRuntime.h
1307120129bd084378f1c22611402ae24c7bebb2 06-Nov-2012 Eli Friedman <eli.friedman@gmail.com> Fix a silly mistake in r167437.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167487 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
cb489dde66331865281e007b21f8f94da01f8d1e 06-Nov-2012 Manman Ren <mren@apple.com> Cleanup: 80-column violation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167476 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
885ad6928f8aca8e9f66eeece53e00364e14ea75 06-Nov-2012 Manman Ren <mren@apple.com> ARM byval: when type alignment is bigger than ABI alignment, instead of
disabling byval, we set realign to true.

It will perform an aligned alloca, and call memcpy to copy the byval
argument to the local variable.
Change the size threshold back to 64 bytes.

rdar://12596507


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167440 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
8cb809a488bafb7386335bcc21bde47948600c8a 06-Nov-2012 Eli Friedman <eli.friedman@gmail.com> Propagate CharUnits through CGObjCMac.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167437 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a2f9d214adb85a7d6d36add7460ce2115382ddc5 06-Nov-2012 Eli Friedman <eli.friedman@gmail.com> Minor fix to ObjC layout bitmap metadata. Found while I was trying to
refactor the code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167436 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c54e25f9450d927dcd41270639523c1b4c0d5868 06-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Classify the INT_MIN/-1 check as -fsanitize=signed-integer-overflow, not as -fsanitize=divide-by-zero.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167433 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
38ad4f40aa0ddc691d9b5ecbb4e9ca6ce95f3a05 06-Nov-2012 Eli Friedman <eli.friedman@gmail.com> Propagate CharUnits into ObjC CodeGen. No intended functional change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167431 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GObjCRuntime.h
c7be10245e78bf38694b26f289880edefb9f16e9 06-Nov-2012 Douglas Gregor <dgregor@apple.com> Have the parser initialize Sema before it consumes the first
token. This is important because the first token could actually be
after an #include that triggers a module import, which might use
either Sema or the AST consumer before it would have been initialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167423 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenAction.cpp
fd1ba91e009ff7775744627f2855ffbfe713333e 05-Nov-2012 Manman Ren <mren@apple.com> ARM byval: when type alignment is bigger than ABI alignment, we can't guarantee
the type alignment of the byval argument. This patch will disable byval in this case,
it also increases the size threshold for turning on byval.

A backend fix will be attempted.

rdar://12596507


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167416 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
d6396a681c9acbe56bc41bbc2bed2db45755bcd7 05-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Use the individual -fsanitize=<...> arguments to control which of the UBSan
checks to enable. Remove frontend support for -fcatch-undefined-behavior,
-faddress-sanitizer and -fthread-sanitizer now that they don't do anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167413 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
ca1b62a33cacee20d3bd756210d3211dd663209e 05-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Rename LangOptions members for address sanitizer and thread sanitizer from
*Sanitizer to Sanitize* in preparation for later patches.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167405 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
GDeclCXX.cpp
odeGenModule.cpp
71c0dcc129262e565069fbfc0b5239a05c94b86c 05-Nov-2012 Ulrich Weigand <ulrich.weigand@de.ibm.com> On PowerPC64, integer arguments and return values need to be sign- or
zero-extended to 64 bits. This information is currently provided to
the back end by setting "signext" or "zeroext" attributes. However,
this is done only for integer types *smaller* than i32, not for i32
itself. This causes clang to generate code violating the ABI, which
results in a failure of the tramp3d-v4 test case (due to calling a
system library routine without ABI-required extension).

This patch implements custom versions of classifyArgumentType and
classifyReturnType for PPC64_SVR4_ABIInfo, which are the same as the
default versions except that they also classify "int" and "unsigned int"
as types needing extending. This fixed tramp3d-v4 on PowerPC64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167393 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
c441cd347014bd3fe1915333c992a9a68bd725f9 04-Nov-2012 Fariborz Jahanian <fjahanian@apple.com> Fixes liftime of captured block variables in mrr mode, per John's feedback, as
well as couple of tests which were not being excercised because of TYPOs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167374 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
70ae1226d9a479e56ac716396bdf97dc970ac840 03-Nov-2012 David Blaikie <dblaikie@gmail.com> Emit debug info for C++ struct definitions as DW_TAG_structure_type (instead of class_type).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167336 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
44fcff9ff40f400403dae57096040496a5ab3227 02-Nov-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C mrr block. Block variable layout metadata in
mrr mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167331 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9417b05ef982bd3dbcae2fa24083b5be00d6c4f1 02-Nov-2012 David Blaikie <dblaikie@gmail.com> Fix debug tag type of forward declarations of struct/class in C++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167308 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
aee56faf90c04a75d9c432a92a8fdd2c875559a7 02-Nov-2012 Quentin Colombet <qcolombet@apple.com> Update the front end to use minsize attribute

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167266 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7edf9e38b91917b661277601c0e448eef0eb2b56 01-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Simplify: replace getContext().getLangOpts() with just getLangOpts().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167261 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GClass.cpp
GDebugInfo.cpp
GDecl.cpp
GDeclCXX.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjCGNU.cpp
GRTTI.cpp
odeGenFunction.cpp
taniumCXXABI.cpp
da082f12c2633e9b45046fdce81e8b5847b9a26b 01-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Clean up misapplication of diff.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167260 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
cc305617e952f8c3a06b63d9225d0dd7769341b7 01-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Split emission of -ftrapv checks and -fcatch-undefined-behavior checks into
separate functions, since they share essentially no code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167259 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
bb12243a487e70c0e65bcebdaa12ad754f92e022 01-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Remove divison-by-zero checks from -ftrapv. These checks were incompatible with
g++'s -ftrapv, failed to call the -ftrapv overflow handler, and are still
available under -fcatch-undefined-behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167258 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
00a8541416df6e2ca8b298759267bea479b6adfb 01-Nov-2012 Matt Beaumont-Gay <matthewbg@google.com> Silence -Wformat on platforms where uint64_t is unsigned long.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167249 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f22ae6512dec60d9e526fe55b988f8d42ced5b57 01-Nov-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C block meta-data. This patch completes meta-data
generation for captured block variables in arc mode. This includes
inlined version of the meta-data when it can be done. It also includes
severat tests. This is wip. // rdar://12184410.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167241 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GObjCMac.cpp
292d67bb69e878104d2cdc1a1f72264e4fc2852a 01-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: Start checking loads and stores for null pointers.
We want the diagnostic, and if the load is optimized away, we still want to
trap it. Stop checking non-default address spaces; that doesn't work in
general.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167219 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
710c517431954cfffba519fc7814cfbd8412a9aa 31-Oct-2012 Manman Ren <mren@apple.com> ARM AAPCS-VFP: fix tracking of allocated VFP registers.

According to the spec, we can backfill VFP registers that were skipped due
to alignment constraints.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167159 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
b3fa55f18d7b3759b3a6547719cf5b3418370a96 31-Oct-2012 Manman Ren <mren@apple.com> ARM AAPCS-VFP: fix handling of homogeneous aggreate.

If HA can only partially fit into VFP registers, we add padding to make sure
HA will be on stack and later VFP CPRCs will be on stack as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167058 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
c6abe9e0d94d82d566c716a1ab3c0fe6daadfb9c 30-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C arc/mrr: Another patch for the new captured block variable
layout meta-data. It is currently off (so no tests). This is wip.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167047 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
356d9cccd7fa455fc609d4c9eac330e380d832d7 30-Oct-2012 Quentin Colombet <qcolombet@apple.com> Change ForceSizeOpt attribute into MinSize attribute

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167021 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ee1ea80a9091050c6d0a21be9d06a5f97d3ea715 30-Oct-2012 Eli Friedman <eli.friedman@gmail.com> Don't crash on bad atomic operations. PR14176.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166992 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
8e68ef0e4c3892b80d9fec77b5d477cd54e90db9 29-Oct-2012 Quentin Colombet <qcolombet@apple.com> Revert commit r166946

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166957 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ba927d9b26ead2ad535c7761b8862d8e82c41b13 29-Oct-2012 Quentin Colombet <qcolombet@apple.com> Make forcesizeopt attribute available to the end user

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166946 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
e6b3dbae38f62164cab3989380cd940242d80120 29-Oct-2012 Ulrich Weigand <ulrich.weigand@de.ibm.com> Handle '*' and '#' asm constraint modifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166924 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
c46b43517a18c8f41934a38a3580bd477ab54265 27-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C arc/mrr: Patch for the new block variable layout meta-data.
It is currently off (so no tests). This is wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166892 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
0a7dd835184343ec9149277b668ecdc5d49fe8b0 27-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Move two helper functions to AST so that sema can use them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166853 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
034653c867d2369c05a286fffe3182190a999f7b 27-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Refactor some code into a new findMaterializedTemporary function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166849 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
582e185a5a9dc5fb9c347f370f530499d1fe5181 27-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Refactor some code into a new skipRValueSubobjectAdjustments function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166848 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
ecccc1e286b56330c75b443a3a14b93e1d3bdedd 27-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Delay codegen to after collecting all SubobjectAdjustment so that the collection
can be refactored and used in Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166847 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
3d7c780d93ebcb84a1224de8c44835ea43e82b15 27-Oct-2012 Eli Friedman <eli.friedman@gmail.com> Add missing safety check to an optimization for do-while loops. PR14191.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166832 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
aa014664a6083de28e255cfd304cae4605cf5e4f 27-Oct-2012 Eli Friedman <eli.friedman@gmail.com> Don't crash synthesizing an ObjC property with an empty struct type. <rdar://problem/12547611>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166825 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
107dae4c7afca73e97d2689d6f644c13ac3048a4 27-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> Add comment for my patch in r166809.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166823 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7b5209cdcbaedf5775d59d46cb3118c8215ba628 26-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> Remove BLOCK_BYREF_LAYOUT_BYREF flags from list of
flags for __block variable meta-data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166811 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.h
c1868e533e63a1b7dad7a22714fc593c045382ae 26-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C IRGen: for @implementation nested in
extern "C", its method definitions must be IRGen'ed
before meta-data for class is generated. Otherwise,
IRGen crashes (to say the least).
// rdar://12581683


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166809 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
485717e8e43034d653ccd7f35f4546773e016e27 26-Oct-2012 Bill Schmidt <wschmidt@linux.vnet.ibm.com> This patch addresses a 64-bit PowerPC ELF ABI compatibility issue with
varargs parameter passing.

A strict reading of the ABI indicates that any argument with alignment greater
than 8 may require skipping doublewords in the parameter save area to align
the argument, and hence require skipping GPRs. In practice, this is not done
by GCC. The alignment restriction is used for internal alignment of a
structure, but a structure with 16-byte alignment, for example, is not
itself 16-byte aligned in the parameter save area. Although this is messy,
it has become the de facto standard used in building existing libraries.

My initial varargs support followed the ABI language, but not the de facto
standard. Running the GCC compatibility test suite exposed this issue, and
indeed showed that LLVM didn't pass parameters self-consistently with my
original logic. Removing the additional alignment logic allows the affected
tests to now pass.

I modified the ppc64-varargs-struct.c test case to remove the existing test
for generation of alignment code, which is no longer appropriate.

Built and tested on powerpc64-unknown-linux-gnu with no new regressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166805 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
3dac20a58de62443db0f657870bd62b9c05835e8 26-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> Declare type of flags to be used in a __block (byref)
variable descriptor captured by a block.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166746 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.h
9046768d2c7e21a7933c8158664550a866fcdd74 26-Oct-2012 Quentin Colombet <qcolombet@apple.com> Oz optimization level sets ForceSizeOpt attribute for each function

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166744 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
40effbb836d3b7cd136d7f6955096cefc6b8d84e 26-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> Changing name of enum for block literal flags to represent
what it is meant for.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166734 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.h
e11dba83d35b861e3a6c0d73ea84f89394cb9bad 25-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> Add some new types in preparation of encoding of captured block variable
layout meta-data work. wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166717 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
af879c0222791b5e026653a834df1c5c1fb41552 25-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> Provide comment describing what buildBlockDescriptor does.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166703 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
956a5a17713deb1b5b27893303c4f308a1bd2a62 25-Oct-2012 Micah Villmow <villmow@gmail.com> Cleanup some clang code to use new type functions instead of using cast<>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166684 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCXXABI.cpp
GExprCXX.cpp
odeGenFunction.cpp
taniumCXXABI.cpp
icrosoftCXXABI.cpp
b16abb1bd8ed94c7994836de24915703e6a4e81a 25-Oct-2012 David Tweed <david.tweed@arm.com> Modify the targets to set appropriate calling convention defaults and C variables when using a gnueabihf or aapcs-vfp target.

Tested by me and Wei-Ren Chen.



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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166676 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDebugInfo.cpp
GDeclCXX.cpp
GVTables.cpp
8e1cee6f23e2552b96b81e5ef419ab3f69c5b5c2 25-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior checking for appropriate vptr value: Clang CodeGen side.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166661 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprCXX.cpp
odeGenFunction.h
465e89e094004a2ff53ba930ca0c4b41e51299ba 25-Oct-2012 Eli Friedman <eli.friedman@gmail.com> When we're devirtualizing a method call, make sure the method has the correct IR type.

Reported in the thread "devirtualisation appears to crash clang on covariant functions on ARM" on cfe-dev.



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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166561 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
odeGenModule.cpp
129369dae809264afb2b81174593c155e369930b 24-Oct-2012 Nadav Rotem <nrotem@apple.com> Clang now attempts to create a TargetMachine whenever a triple is given.
Many of our tests specify triples that are not built into clang.
In this commit we allow clang to fail loading the triple if we are only
using clang to emit llvm ir.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166543 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
e4aeeaae8ee93ad5e07c646046c650d594f2775e 24-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Add padding inreg registers to cause llvm to skip ecx when needed with
the x86_fastcallcc calling convention.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166538 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetInfo.cpp
b6932692234eba2472ef85a38434496e9342fd38 24-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Add inreg markers with the x86_fastcallcc calling convention.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166537 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
fa60be028105ded3c05d9fcc6cb0974500a5a011 24-Oct-2012 Nadav Rotem <nrotem@apple.com> Change EmitAssemblyHelper to create the target machine early
and use it to initialize the TargetTransformInfo analysis pass.
We need the TTI information for the loop vectorizer.

rdar://12464901



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166532 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
4cdad3151bfb2075c6bdbfe89fbb08f31a90a45b 23-Oct-2012 Douglas Gregor <dgregor@apple.com> Switch CodeGenOptions over to a .def file, like we do with LangOptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166497 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
GBlocks.cpp
GClass.cpp
GDebugInfo.cpp
GDecl.cpp
GExprCXX.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenModule.cpp
5f14fcbd45870585a136ae735d29d0e085c0d7f8 23-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Don't try to use inreg with 0 sized structs. Thanks to Eli for reporting the
regression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166461 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
c6f84cf73e0bc04faacd1a9b7845e014e7fac21e 20-Oct-2012 Benjamin Kramer <benny.kra@googlemail.com> Move private classes into anonymous namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166377 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
5016a70c183a50845a0421802d161093dd0643f6 20-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> DR1472: A reference isn't odr-used if it has preceding initialization,
initialized by a reference constant expression.

Our odr-use modeling still needs work here: we don't yet implement the 'set of
potential results of an expression' DR.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166361 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
cbbe2c0fc0d28184d996ce29ae9f0fb36b4cf72f 19-Oct-2012 Daniel Dunbar <daniel@zuster.org> IRgen: Initialize TargetLoweringInfo with a triple.

- We create two TargetLoweringInfo instances for different pass managers, and
they weren't consistent (the one for codegen didn't have the right info). I'm
not sure this mattered anywhere in practice.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166299 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
0b4cc950c54c8dd2de51587ef48446de670fa012 19-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix handling of the regparm attribute in the presence of classes with copy
constructors.

When I first moved regparm support to TargetInfo.cpp I tried to isolate it
in classifyArgumentTypeWithReg, but it is actually a lot easier to flip the
code around and check for regparm at the end of the decision tree.

Without this refactoring classifyArgumentTypeWithReg would have to duplicate
the logic about when to use non-byval indirect arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166266 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetInfo.cpp
25030c46223f117f5d77936d3e5d0502a5c42e63 19-Oct-2012 Nadav Rotem <nrotem@apple.com> Reintroduce the TargetTransformInfo to the clang pass manager.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166263 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
25dfaacde51df0834f10e3ab1646e6de9e229788 19-Oct-2012 Eric Christopher <echristo@gmail.com> Fix up comment and invert order. Most simple check first.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166240 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
da3301eec823fe770bfa49a1cb19649506caa698 18-Oct-2012 Eric Christopher <echristo@gmail.com> Add a new option for and disable column number information as there
are no known current users of column info. Robustify and fix up
a few tests in the process. Reduces the size of debug information
by a small amount.

Part of PR14106

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166236 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7c008813e17ddc2bb3953e925a86db3e1bf30198 18-Oct-2012 Bob Wilson <bob.wilson@apple.com> Revert svn r165741 "Add TargetTransformInfo to the clang driver."

Nadav's llvm change r165665 caused problems with an LTO bootstrap of clang,
so I'm reverting it for now, along with follow-on patches like this one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166164 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
9556b391091d8a4fa82a9d171f44ef0b3c1ab3f7 17-Oct-2012 Eric Christopher <echristo@gmail.com> Revert r158009 since there are some uses of artificial functions in
debug info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166109 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b03527a9a395168762ad8e25e59a7a272dd74561 17-Oct-2012 John McCall <rjmccall@apple.com> Set a special flag in class metadata when an Objective-C class
has ivars that require destruction, but none that require anything
except zero-initialization. This is common in ARC and (when true
throughout a class hierarchy) permits the elimination of an
unnecessary message-send during allocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166088 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenModule.cpp
621915c7a454307ad06ed2363379d52e2695a870 17-Oct-2012 John McCall <rjmccall@apple.com> Organize and rename the magic constants for class flags.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166087 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
015f33b6741ffceba3a71ee2d71d46418a7dc34c 17-Oct-2012 John McCall <rjmccall@apple.com> At -O0, prefer objc_storeStrong with a null new value to the
combination of a load+objc_release; this is generally better
for tools that try to track why values are retained and
released. Also use objc_storeStrong when copying a block
(again, only at -O0), which requires us to do a preliminary
store of null in order to compensate for objc_storeStrong's
assign semantics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166085 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GObjC.cpp
odeGenFunction.h
193646f16d90f004123965606ec3fae180beafe1 17-Oct-2012 Nico Weber <nicolasweber@gmx.de> "'Might as well make it static const.' -- John McCall" -- Michael Scott



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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166069 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GVTables.cpp
taniumCXXABI.cpp
icrosoftCXXABI.cpp
263366f9241366f29ba65b703120f302490c39ff 17-Oct-2012 Derek Schuff <dschuff@google.com> Add pnaclcall convention to Native Client targets.

Because PNaCl bitcode must be target-independent, it uses some
different bitcode representations from other targets (e.g. byval and
sret for structures). This means that without additional type
information, it cannot meet some native ABI requirements for some
targets (e.g. passing structures containing unions by value on
x86-64). To allow generation of code which uses the correct native
ABIs, we also support triples such as x86_64-nacl, which uses
target-dependent IR (as opposed to le32-nacl, which uses byval and
sret).

To allow interoperation between the two types of code, this patch adds
a calling convention attribute to be used in code compiled with the
target-dependent triple, which will generate code using the le32-style
bitcode. This calling convention does not need to be explicitly
supported in the backend because it determines bitcode representation
rather than native conventions (the backend just needs to undersand
how to handle byval and sret for the Native Client OS).

This patch implements __attribute__((pnaclcall)) to generate calls in
bitcode according to the le32 bitcode conventions, an attribute which
is accepted by any Native Client target, but issues a warning
otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166065 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
argetInfo.cpp
933710242edc66da21e865948d4c8e3a6badf2df 16-Oct-2012 Manman Ren <mren@apple.com> ARM ABI: fix ABI alignment issues in varargs.

We generalize r166040 to handle ABI alignment issues for all types.

rdar://12439123


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166052 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
97f81573636068fb9536436188caadf030584e58 16-Oct-2012 Manman Ren <mren@apple.com> ARM ABI: passing illegal vector types as varargs.

We expand varargs in clang and the call site is handled in the back end, it is
hard to match exactly how illegal vectors are handled in the backend. Therefore,
we legalize the illegal vector types in clang:
if (Size <= 32), legalize to i32.
if (Size == 64), legalize to v2i32.
if (Size == 128), legalize to v4i32.
if (Size > 128), use indirect.

rdar://12439123


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166043 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
d105e73368e677e65af724947be85ec87a0fa45e 16-Oct-2012 Manman Ren <mren@apple.com> ARM ABI: fix ABI alignment issues when passing legal vector types as varargs.

We create an aligned temporary space and copy the content over from ap.cur to
the temporary space. This is necessary if the natural alignment of the type is
greater than the ABI alignment.

rdar://12439123


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166040 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
4695f91f4302a90ae462cd64dda59b34c3dad821 16-Oct-2012 Joerg Sonnenberger <joerg@bec.de> When using a symbol with attribute weakref, search for it first and
don't try the normal GetOrCreateLLVM. The latter could drop the weak
atrtibute on the second reference, if there is no explicit declaration
of the aliasee.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166032 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
891dac73bdb090ff845982e4334f5b4c18353dbe 16-Oct-2012 David Chisnall <csdavec@swan.ac.uk> GNUstep runtime version default to 1.6, generate correct property attribute
metadata.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166023 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
a240df2ec1b374b3e9e7f760875ffb17cd64506f 16-Oct-2012 Alexey Samsonov <samsonov@google.com> Transform pattern:
if (CGM.getModuleDebugInfo())
DebugInfo = CGM.getModuleDebugInfo()
into a call:
maybeInitializeDebugInfo();

This is a simplification for a possible future fix of PR13942.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166019 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDeclCXX.cpp
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
a6375560645177168099f1a1d96be8fa4718aa8e 16-Oct-2012 Bill Wendling <isanbard@gmail.com> Use the Attributes::get method which takes an AttrVal value directly to simplify the code a bit. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166010 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GObjCMac.cpp
GStmt.cpp
taniumCXXABI.cpp
7a0c064770355a4918df69f95de8dea6338a59a2 16-Oct-2012 Daniel Dunbar <daniel@zuster.org> Un-revert r164907 and r164902 (+ follow-ups), 10.6 build fix to follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165988 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
dc0d4e251b4c41b75c5d93f1866a8a0952b1c6ae 15-Oct-2012 Nico Weber <nicolasweber@gmx.de> Revert r164907 and r164902 (+ follow-ups). They broke building on 10.6.

See PR14013.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165962 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
0d5833921cc728bc1d2e45fbaf7b3e11cddbf99d 15-Oct-2012 Bill Wendling <isanbard@gmail.com> Move the Attributes::Builder outside of the Attributes class and into its own class named AttrBuilder. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165961 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
GObjCMac.cpp
GStmt.cpp
taniumCXXABI.cpp
argetInfo.cpp
ba1f04007baf376c5f5ccf7ef23588399942de7b 15-Oct-2012 Kostya Serebryany <kcc@google.com> [asan] make AddressSanitizer to be a FunctionPass instead of ModulePass. clang part: for FunctionPass we need to run asan at a different point, otherwise it will run before inlining

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165937 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
75d37b493e2282f993a19a166bd573b03a7535af 15-Oct-2012 Bill Wendling <isanbard@gmail.com> Use enum values instead of magic numbers for indexing into the attribute list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165925 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GStmt.cpp
odeGenModule.cpp
argetInfo.cpp
50e6b18f99c45b31e6216ab221f6b3911b24fa1f 15-Oct-2012 Bill Wendling <isanbard@gmail.com> Attributes Rewrite

Convert the uses of the Attributes class over to the new format. The
Attributes::get method call now takes an LLVM context so that the attributes
object can be uniquified and stored.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165918 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
GObjCMac.cpp
GStmt.cpp
odeGenModule.cpp
taniumCXXABI.cpp
argetInfo.cpp
802cd5b1974bab2038b9d3c969d9beb0ab34f435 15-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> At -O0, emit an @llvm.trap() call at the end of a value-returning function which
fails to return a value, to make debugging this issue easier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165914 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
4d68ed5f03ad1235946377eb32b5c4d0412f2e48 14-Oct-2012 Bill Wendling <isanbard@gmail.com> Remove operator cast method in favor of querying with the correct method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165900 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
e91e9ecf2f6ef18ed9d9642915e5e1abb63e150a 14-Oct-2012 Bill Wendling <isanbard@gmail.com> Use the Builder to create the stack alignment attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165888 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
27844533aad5c165523a5926424097699610d3f0 14-Oct-2012 Nico Weber <nicolasweber@gmx.de> "Implement" codegen support for __noop().

Eli discovered that __noop's sema behavior also needs some love. I filed
PR14081 for that and intend to improve it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165886 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
43085815b1b377dc30176afab2b96d6b807d42de 13-Oct-2012 Nico Weber <nicolasweber@gmx.de> Simplify. Suggestion by Sean Silva.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165885 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5f608aedb6c5d32d2f7c51f9354a75b21f1eeaee 13-Oct-2012 Eli Friedman <eli.friedman@gmail.com> Make -mms-bitfields behave consistently.

Patch by Jeremiah Zanin.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165849 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GExprConstant.cpp
GRecordLayoutBuilder.cpp
b2aa66c0f5ad4e2c67b7d02af6a644432ca189cf 13-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: Trap undefined behavior due to conversions to or
from a floating-point type where the source value is not in the range of
representable values of the destination type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165843 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
b1f5fe017a596e0c7749dee10c9d3ff1c0f2788c 12-Oct-2012 Bill Schmidt <wschmidt@linux.vnet.ibm.com> This patch addresses PR13948.

For 64-bit PowerPC SVR4, an aggregate containing only one
floating-point field (float, double, or long double) must be passed in
a register as though just that field were present. This patch
addresses the issue during Clang code generation by specifying in the
ABIArgInfo for the argument that the underlying type is passed
directly in a register. The included test case verifies flat and
nested structs for the three data types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165816 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
29168318a8b1bc1c6b109975298c120b7b29b03d 11-Oct-2012 Nadav Rotem <nrotem@apple.com> Add TargetTransformInfo to the clang driver.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165741 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
90da80c869eebc5a73bf031af5bedb6f281214fb 11-Oct-2012 Derek Schuff <dschuff@google.com> Fix build failure from r165722

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165731 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
cadaf4b16a8425849c5de418b63af97728f93d5d 11-Oct-2012 Micah Villmow <villmow@gmail.com> Add in the first iteration of support for llvm/clang/lldb to allow variable per address space pointer sizes to be optimized correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165726 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7da46f949f6ec63d7c7dcda5f49588261c669ffb 11-Oct-2012 Derek Schuff <dschuff@google.com> Properly factor Native Client defines to support NaCl as an OS
with x86/ARM architecture

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165722 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
babaf31d401310464db93627ef6b195a7ffb1029 11-Oct-2012 Derek Schuff <dschuff@google.com> Make X86_64ABIInfo clean for ABIs with 32 bit pointers, such as X32
and Native Client

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165715 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
c5f804636e367ef744fd24cf88f7c956a5af0434 11-Oct-2012 Nico Weber <nicolasweber@gmx.de> Add codegen support for __uuidof().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165710 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
b9966bd81878c6627d702368d6c4a8bc62bc01ac 11-Oct-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C IRgen: When sending a method to 'super'
in a category class method, don't read 'isa' pointer. Instead,
save the desired OBJC_METACLASS_$_ClassName in
__DATA,__objc_superrefs and read that without reading any
isa pointers. // rdar://12459358


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165674 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1e4691b9d8e1bdcc8ef62b323969d702c51b3c08 10-Oct-2012 Jordan Rose <jordan_rose@apple.com> Rename ObjCMethodDecl::isSynthesized to isPropertyAccessor.

This more accurately reflects its use: this flag is set when a method
matches the getter or setter name for a property in the same class,
and does not actually specify whether or not the definition of the method
will be synthesized (either implicitly or explicitly with @synthesize).

This renames the setter and backing field as well, and changes the
(soon-to-be-obsolete?) XML dump format to use 'property_accessor'
instead of 'synthesized'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165626 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f82232c8b73851337b83b954ba1292cf6475c7c5 10-Oct-2012 Chandler Carruth <chandlerc@gmail.com> Apply the same fundamental fix for PR14048 as was applied for PR11905.

The issue arises when coercing to/from types of different sizes. We need
to be certain that the allocation on either end has sufficient room for
the coerced type. When it doesn't, we need to make room, copy across,
and then proceed. PR11905 handled the case of storing function arguments
back into allocas in the function prolog, this patch handles the case of
setting up the function arguments in a call expression.

This is actually significantly simpler than the fix for PR11905. It ends
up being a trivial change to create a temporary alloca when the source
is too small and memcpy across. This should preserve the compile-time
fast-isel benefits of doing gep+load sequences and avoiding FCAs.

Reviewed by Benjamin and Evgeniy (who fixed PR11905).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165615 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
603571a2d6daca43162bf1d9469baf919697c00a 10-Oct-2012 Bill Wendling <isanbard@gmail.com> Remove the final bits of Attributes being declared in the Attribute
namespace. Use the attribute's enum value instead. No functionality change
intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165611 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
GObjCMac.cpp
GStmt.cpp
odeGenModule.h
taniumCXXABI.cpp
fac631052809b59c1b66f687c08a743de7fb50e9 10-Oct-2012 Bill Wendling <isanbard@gmail.com> Have 'addFnAttr' take the attribute enum value. Then have it build the attribute object and add it appropriately. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165596 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDeclCXX.cpp
GObjC.cpp
odeGenFunction.cpp
odeGenModule.cpp
argetInfo.cpp
bf43f2fdfbd7c4f8cd1f1403765eca9e5dc6c8ae 10-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> Tidy up formatting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165584 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
930c05c32eac171ef1a94fabf80aecb4e6e2c840 10-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: catch a VLA bound which evalutes to a non-positive value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165583 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
dc47bdc43c62bf2ff01bc71c811a66cb5376d318 10-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: store the type name directly at the end of a type descriptor. 5% binary size reduction due to fewer relocations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165572 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4def70d3040e73707c738f7c366737a986135edf 09-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: emit calls to the runtime library whenever one of the checks fails.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165536 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GClass.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
5c3e4ca581faa27c74443d17e5f740a686b62884 09-Oct-2012 Bill Wendling <isanbard@gmail.com> We use the enums to query whether an Attributes object has that attribute. The
opaque layer is responsible for knowing where that specific attribute is stored.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165489 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.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
BIInfo.h
ackendUtil.cpp
GBlocks.cpp
GBlocks.h
GBuiltin.cpp
GCall.cpp
GDebugInfo.cpp
GDecl.cpp
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GRecordLayoutBuilder.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
taniumCXXABI.cpp
oduleBuilder.cpp
argetInfo.cpp
d190057934331390ff67ebf51d66186dd5e392f0 06-Oct-2012 Benjamin Kramer <benny.kra@googlemail.com> Expose __builtin_bswap16.

GCC has always supported this on PowerPC and 4.8 supports it on all platforms,
so it's a good idea to expose it in clang too. LLVM supports this on all targets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165362 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
c857ce8b08397ed778928b8a000732ca90da2a8c 06-Oct-2012 Alex Rosenberg <alexr@leftfield.org> Propagate calling convention for aliases and weakrefs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165343 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
e6b39bcee047bb31af1cbca80aa13e3a287edfc6 05-Oct-2012 Eli Friedman <eli.friedman@gmail.com> Make sure to generate the right kind of MDNode for enum forward declarations.
PR14029, clang part.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165289 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
36ef0d54cfddf31cd48816e78ab4db73b31a6c1d 05-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> If we flow off the end of a value-returning function:
- outside C++, return undef (behavior is not undefined unless the value is used)
- in C++, with -fcatch-undefined-behavior, perform an appropriate trap
- in C++, produce an 'unreachable' (behavior is undefined immediately)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165273 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
ff4ae6d4031962a7c4fdd344f40a91f0fcd26a64 04-Oct-2012 Lang Hames <lhames@gmail.com> Fail early with a clear assert if an operation with multiple uses somehow ends
up being contracted during codegen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165197 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
ddc57332cdc86ed2db28a3b3761b774944937191 03-Oct-2012 Benjamin Kramer <benny.kra@googlemail.com> Always initialize FPContractable.

false is used as a baseline here, we may want to allow contraction in some of
the cases. Found by valgrind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165156 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
2fc107f5652a526d9c2972dc3b386e5d86769e44 03-Oct-2012 Bill Schmidt <wschmidt@linux.vnet.ibm.com> This patch enables general varargs support for the 64-bit PPC SVR4 ABI.

Most of the pieces for this were already in place, but a proper EmitVAArg
is needed for aggregates and complex numbers to be handled. Although the
va_list for 64-bit PowerPC SVR4 consists of GPRs 3 through 10 together with
the overflow portion of the parameter save area, we can treat va_list as
pointing to contiguous memory for all parameters, since the back end forces
the parameter GPRs to memory for varargs functions.

There is no need at this time to model parameters and return values beyond
what the DefaultABIInfo provides.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165143 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
041ce8e00afd1185549a25d5c2b97d219ae032d9 03-Oct-2012 Jordan Rose <jordan_rose@apple.com> Teach getCXXRecordDeclForPointerType about references.

Then, rename it getPointeeCXXRecordDecl and give it a nice doc comment,
and actually use it.

No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165077 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
be9af1288881110e406b87914162eaa59f1e5918 02-Oct-2012 Lang Hames <lhames@gmail.com> Add FP_CONTRACT support for clang.

Clang will now honor the FP_CONTRACT pragma and emit LLVM
fmuladd intrinsics for expressions of the form A * B + C (when they occur in a
single statement).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164989 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjC.cpp
6cacae8bf9597b8124cd40aedc189c04484e1990 30-Sep-2012 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: Copy tail padding when we're not dealing with a trivial copy assign or move assign operator.

This fixes a regression from r162254, the optimizer has problems reasoning
about the smaller memcpy as it's often not safe to widen a store but making it
smaller is.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164917 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprCXX.cpp
odeGenFunction.h
f2f3ce54fc1235bec2d0d0b0ef3b53bdff6d9655 30-Sep-2012 Bob Wilson <bob.wilson@apple.com> Add Clang support for iOS6.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164907 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
02262662b4550d0227038470f2d7b3db7ada2b87 30-Sep-2012 Bob Wilson <bob.wilson@apple.com> Add an FMA intrinsic for ARM Neon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164904 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
ef4d5ced04bf0b3d987e6b0e931f43125492f50c 29-Sep-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR13941: Mark all virtual functions as unnamed_addr. It's not possible to
observe their addresses (taking their address gives the vtable slot) so we are
free to merge their definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164864 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b22c7dc707cf3770ff3b5e5f11f11fd0aaa06d9b 28-Sep-2012 Dan Gohman <gohman@apple.com> Add basic support for adding !tbaa.struct metadata on llvm.memcpy calls for
struct assignment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164853 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenModule.cpp
odeGenModule.h
odeGenTBAA.cpp
odeGenTBAA.h
f3477c13eeaf11b32a41f181398fb5deffd0dd73 27-Sep-2012 Sylvestre Ledru <sylvestre@debian.org> Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164766

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164769 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDecl.cpp
GObjCMac.cpp
GRTTI.cpp
GVTables.h
odeGenFunction.h
odeGenModule.h
odeGenTBAA.cpp
argetInfo.cpp
94ff8e1f57c6382d91d0de981a4f311509d83e37 27-Sep-2012 Sylvestre Ledru <sylvestre@debian.org> Fix a typo 'iff' => 'if'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164766 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDecl.cpp
GObjCMac.cpp
GRTTI.cpp
GVTables.h
odeGenFunction.h
odeGenModule.h
odeGenTBAA.cpp
argetInfo.cpp
bc3a3a7469f6b93df6397dd9789006fec7b0ea44 26-Sep-2012 Bill Wendling <isanbard@gmail.com> Update to new function attribute querying syntax.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164726 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
385cc5f01b59af0183a825351d93695ca7185091 26-Sep-2012 Nico Weber <nicolasweber@gmx.de> Add codegen support for the __debugbreak intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164660 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
ecd03b447bb0e2ed1954c77441d49a4a17ca8138 25-Sep-2012 John McCall <rjmccall@apple.com> When performing a ::delete of an object with a virtual destructor,
be sure to delete the complete object pointer, not the original
pointer. This is necessary if the base being deleted is at a
non-zero offset in the complete object. This is only required
for objects with virtual destructors because deleting an object
via a base-class subobject when the base does not have a virtual
destructor is undefined behavior.

Noticed while reviewing the last four years of cxx-abi-dev
activity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164597 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GExprCXX.cpp
taniumCXXABI.cpp
icrosoftCXXABI.cpp
bd31574a0f01da2cb2abde004b36772eb8a048dc 25-Sep-2012 John McCall <rjmccall@apple.com> In the MS ABI, ctors return 'this'. Patch by Dmitry Sokolov.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164592 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
9f357de8d5823f9b13cf33ad1f6af1dd69b7669f 25-Sep-2012 John McCall <rjmccall@apple.com> During jump-scope checking, build an ExprWithCleanups immediately
into the enclosing scope; this is a more accurate model but is
(I believe) unnecessary in my test case due to other flaws.
However, one of those flaws is now intentional: blocks which
appear in return statements can be trivially observed to not
extend in lifetime past the return, and so we can allow a jump
past them. Do the necessary magic in IR-generation to make
this work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164589 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
245d5a31e54f4ec69cc45885dfb4d42576fb3e5f 22-Sep-2012 Eric Christopher <echristo@apple.com> Mark the passed in "self" for a block as an object pointer so
that the backend can mark it as the representative pointer for
the block.

rdar://12001329

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164411 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
db9eeb88d8e63a28f0b7d623011ec286a84f68a3 21-Sep-2012 Bill Wendling <isanbard@gmail.com> Update for encapsulating the "construct*AlignmentFromInt" methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164374 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
argetInfo.cpp
4c919eb0c022be30d6130446cb8d50a7e8da9f46 21-Sep-2012 Jim Grosbach <grosbach@apple.com> ARM: Use a dedicated intrinsic for vector bitwise select.

The expression based expansion too often results in IR level optimizations
splitting the intermediate values into separate basic blocks, preventing
the formation of the VBSL instruction as the code author intended. In
particular, LICM would often hoist part of the computation out of a loop.

rdar://11011471

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164342 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
258f930227c1a102c9c22eee88df65f748863425 21-Sep-2012 Jim Grosbach <grosbach@apple.com> Tidy up. Trailing whitespace and 80 columns.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164341 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
847665dc988266931b6aeab7aeb2d311caf05efc 20-Sep-2012 Eric Christopher <echristo@apple.com> Grammar.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164260 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
20ec2c4d14b148e293fb4117a1874846779b1d23 20-Sep-2012 Eric Christopher <echristo@apple.com> Update and expand comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164254 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
28e3c9982500b6abd9f419f7baa505bebc9065ba 19-Sep-2012 Eric Christopher <echristo@apple.com> Handle a captured this for the debug information as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164253 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
195ff58b91ea106931c04f9bbdcf312925e3440c 19-Sep-2012 Eric Christopher <echristo@apple.com> Fix awkward comment.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164218 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
f56faa01936b9cf909623d7f06e3c2569ca4a78e 15-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163983 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayout.h
odeGenFunction.h
odeGenModule.h
ba77cb9c82cc9d498e4d6474d128007249f07871 15-Sep-2012 Craig Topper <craig.topper@gmail.com> Fix includes of llvm and clang files that used angle brackets.

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



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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163865 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
d5a73dca6297a8bc5ab3fc41e2cc0e8474072616 13-Sep-2012 Eric Christopher <echristo@apple.com> Reapply:

Make clang emit a flag for DW_AT_object_pointer for the artificial
args where it should (implicit first arguments). FileCheck-ize a
test as well and update tests to take into account the object
pointer flag.

rdar://9797999

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163755 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
22b617fbfdd17e8cadd9c541857751ae1cb6cabb 12-Sep-2012 Eric Christopher <echristo@apple.com> Revert "Make clang emit a flag for DW_AT_object_pointer for the artificial"
this should be done on the subprogram, not the variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163733 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2b6eb9db86252ddde0e79a1d97054de6cbe1b284 12-Sep-2012 Eric Christopher <echristo@apple.com> Make clang emit a flag for DW_AT_object_pointer for the artificial
args where it should (implicit first arguments). FileCheck-ize a
test as well and update tests to take into account the object
pointer flag.

rdar://9797999

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163668 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1b5c336fc7b2013a619a50895d7a43f3f4334515 11-Sep-2012 Richard Smith <richard-llvm@metafoo.co.uk> Remove some redundancy from constant aggregate emission. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163595 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
85f90bd579ee83d3061715ad0dcb7575832e4fe9 11-Sep-2012 Eric Christopher <echristo@apple.com> Update comment and space.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163586 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3ed6b913781b2a754087764f5b3abdfc5e3cc495 11-Sep-2012 Eric Christopher <echristo@apple.com> The type of the self and cmd variables should be artificial. (Note
that the types aren't artificial the args are, but this is currently
represented by an artificial type.)

Found by inspection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163585 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9f0b1324a5352713337c75ef4a5acffd96609c6c 11-Sep-2012 Stephen Hines <srhines@google.com> Merge branch 'upstream' into merge-2012_09_10
1ad23d62007162df82b58bca31b4aa277a5f6586 10-Sep-2012 Dmitri Gribenko <gribozavr@gmail.com> Remove redundant semicolons which are null statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163546 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
e5f0588840b20897631cc8110344fd2745ef4caa 08-Sep-2012 Richard Smith <richard-llvm@metafoo.co.uk> When a bad UTF-8 encoding or bogus escape sequence is encountered in a
string literal, produce a diagnostic pointing at the erroneous character
range, not at the start of the literal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163459 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
7ac9ef1c82c779a5348ed11b3d10e01c58803b35 08-Sep-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: Factor emission of the creation of, and branch to,
the trap BB out of the individual checks and into a common function, to prepare
for making this code call into a runtime library. Rename the existing EmitCheck
to EmitTypeCheck to clarify it and to move it out of the way of the new
EmitCheck.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163451 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprScalar.cpp
odeGenFunction.h
f9fdcc0531ca53651c1d7d0877290e232cb5468d 08-Sep-2012 John McCall <rjmccall@apple.com> In ARC, if we're emitting assembly markers for calls to
objc_retainAutoreleasedReturnValue, we need to also be killing
them during return peepholing. Make sure we recognize an
intervening bitcast, but more importantly, assert if we can't
find the asm marker at all. rdar://problem/12133032

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163431 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
9ed63f8b87b1f7d074d21cc1210fd28d93291bea 06-Sep-2012 Derek Schuff <dschuff@google.com> Use custom ABIInfo for le32/PNaCl argument codegen

This patch uses a new ABIInfo implementation specific to the le32
target, rather than falling back to DefaultABIInfo. Its behavior is
basically the same, but it also allows the regparm argument attribute.
It also includes basic tests for argument codegen and attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163333 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
2d234d73f687428c89f8a99af94f123012f05551 06-Sep-2012 Aaron Ballman <aaron@aaronballman.com> Fixing the return type information for objc_sync_enter and objc_sync_exit. Patch thanks to Joe Ranieri!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163330 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
31ba6135375433b617a8587ea6cc836a014ebd86 06-Sep-2012 Roman Divacky <rdivacky@freebsd.org> Dont cast away const needlessly. Found by gcc48 -Wcast-qual.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163325 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GObjCMac.cpp
odeGenModule.cpp
fcf75a3d8c072eabbf25c9b33ccbb1b8bd042cfc 05-Sep-2012 Chad Rosier <mcrosier@apple.com> Update for r163231.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163232 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
45e4e086cf7b4552e806669825f5b2aa2368cc36 05-Sep-2012 Jin-Gu Kang <jaykang10@imrc.kist.re.kr> Changing of type checking order on InitListExpr
- UnionType is checked eariler than RecordType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163202 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
790cbd84d07f0dc9253ade9f67e6ed8c43f08a59 05-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Set the inline assembly dialect in CodeGen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163178 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
ef5c554a0c953c51e6876fa48544ace1c3e2872b 05-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove the Inline Asm Non-Standard Dialect attribute. This
implementation does not co-exist well with how the sideeffect and alignstack
attributes are handled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163173 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
2ab7d43e450333d52fdf087bf2558a74dbe3c9fd 04-Sep-2012 Chad Rosier <mcrosier@apple.com> Minor cleanup to improve code readability. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163161 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
568ba871bbac959029671b81f8e531edb7e0d7d6 04-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Revert r163083 per chandlerc's request.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163149 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
94a7142f74bb4a9daa53c22087b19d4568073109 02-Sep-2012 Logan Chien <tzuhsiang.chien@gmail.com> Rename ANDROIDEABI to Android.

Most of the code guarded with ANDROIDEABI are not
ARM-specific, and having no relation with arm-eabi.
Thus, it will be more natural to call this
environment "Android" instead of "ANDROIDEABI".

Note: We are not using ANDROID because several projects
are using "-DANDROID" as the conditional compilation
flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163088 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
5be92de217a1940d0e109abd0f401df4480c1a4b 02-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Implemented parsing and AST support for the MS __leave exception statement. Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163083 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
17d35c36fbae764fcd68fa8b31624078a033aabc 01-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Normalize line endings of r163013 (part 2).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163032 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
6666ed4ed2e2bc13da5ac5d0a4947019137d45be 31-Aug-2012 Joao Matos <ripzonetriton@gmail.com> Improved MSVC __interface support by adding first class support for it, instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163013 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a6c66cedc022c9e5d45a937d6b8cff491a6bf81b 31-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Change the representation of builtin functions in the AST
(__builtin_* etc.) so that it isn't possible to take their address.
Specifically, introduce a new type to represent a reference to a builtin
function, and a new cast kind to convert it to a function pointer in the
operand of a call. Fixes PR13195.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162962 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
a484fc73ec6331bcaad092270b4ab9c8d1df23c3 29-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Make alignment computation for pointer values for builtins handle
non-pointer types with a pointer representation correctly. PR13660.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162862 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
d1a8d2ef757ad880d48b2249a1619bf8209e9cf8 28-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Have MSAsmStmts use the generic EmitAsmStmt codegen function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162796 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
1aba7783ad8fe326f10f5aa494721db23bdd593e 28-Aug-2012 Peter Collingbourne <peter@pcc.me.uk> CUDA: give correct address space to globals declared in functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162787 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
a23b91d542e336be5051ac54f394e860fb756911 28-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Rename EmitGCCAsmStmt to EmitAsmStmt and have it accept
AsmStmts. This function is only used by GCCAsmStmts, however. Constraints need
to be properly computed before MSAsmStmts can use EmitAsmStmt. No functional
change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162776 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
36d5ceaab220422c24464c11b946488f0b075cd5 28-Aug-2012 Michael Liao <michael.liao@intel.com> Fix PR13704

- The increment needs to be signed value to preserve the original value when
its data type is larger than 64-bit integer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162766 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
33f0558f75f70061707d1388e305b8f92f4e55de 28-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add virtual function, getClobber, that returns a StringRef.
More work towards unifying asm stmt codegen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162712 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
5c7f59445ae68109c7ffee731aca2ce32db587c7 28-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Rename getClobber to getClobberStringLiteral. No functional
change intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162710 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
06d43684289bfcf3b2dbaf081aa861f76933d891 28-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: Hoist check from recursive function to its only callsite.

Suggested by Roman Divacky.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162702 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
cfa07e3519cff1c69cd39d02c80263fd6469c3db 27-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: When emitting stores for an initializer, only emit a GEP if we really need the store.

This avoids emitting many dead GEPs for large zero-initialized arrays.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162701 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
da083b2ce8db27ce6e508cb77cb12c0fc8b7cad9 27-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Rename GenerateAsmString to generateAsmString to conform with
coding standards. Also, add stub for MSAsmStmt class as part of unifying
codegen logic for AsmStmts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162696 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
b41ba1aa47a66979df578074de3c218d820c152d 25-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Fix a CodeGen bug where we would skip zero-initialization for
array new with a non-trivial constructor. Pointed out in PR13380.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162643 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
5b092ef9df6967bac9cf856e8c93dd959ebdb689 25-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Remove spurious string literal for bool argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162642 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
9d3e226acad5e23e562cde0a69362bb266f2a333 25-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: add the -ftrapv checks to the set of things caught
by this mode, and also check for signed left shift overflow. The rules for the
latter are a little subtle:

* neither C89 nor C++98 specify the behavior of a signed left shift at all
* in C99 and C11, shifting a 1 bit into the sign bit has undefined behavior
* in C++11, with core issue 1457, shifting a 1 bit *out* of the sign bit has
undefined behavior

As of this change, we use the C99 rules for all C language variants, and the
C++11 rules for all C++ language variants. Once we have individual
-fcatch-undefined-behavior= flags, this should be revisited.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162634 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
df5faf5e7ae6823d0af0b801c4ac26d47f2cee97 25-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] As part of a larger refactoring, rename AsmStmt to GCCAsmStmt.
No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162632 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
c831d8b977a09bf2907d03128b48b5c914a2fafd 25-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix integer unsigned behavior in clang due to signed left shift overflow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162626 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
56d7f2348a182002563700db2158da0c6fc115a5 24-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Change the -fenable-experimental-ms-inline-asm option from a
CodeGen option to a LangOpt option. In turn, hoist the guard into the parser
so that we avoid the new (and fairly unstable) Sema/AST/CodeGen logic. This
should restore the behavior of clang to that prior to r158325.
<rdar://problem/12163681>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162602 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
17083601193528a5d3770b688ffdf700f7df3c45 24-Aug-2012 Chad Rosier <mcrosier@apple.com> Fix 80-column violation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162575 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
be3ace834ee7438915e73d2115365d57d03ceb99 24-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Refactor code. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162568 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
3b6bef9a213249c6ab6d67c07b1ac6380961be3e 24-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Push ArrayRef through the Expr hierarchy.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162552 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenModule.cpp
80ea4bc944eb01c220eeaa004b21ad709ba928e1 24-Aug-2012 Stephen Hines <srhines@google.com> Merge branch 'upstream' into merge_2

Conflicts:
lib/Sema/SemaDeclAttr.cpp

Change-Id: If47d0d39459760017258502b4d9e859ac36a273b
2c9f87ca5cccbfdaad82762368af5b2323320653 24-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> New -fcatch-undefined-behavior features:
* when checking that a pointer or reference refers to appropriate storage for a type, also check the alignment and perform a null check
* check that references are bound to appropriate storage
* check that 'this' has appropriate storage in member accesses and member function calls


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162523 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprScalar.cpp
odeGenFunction.h
1ddbd89bb397988dd1a4e96d8d8c2c7705a2af75 24-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Fix a few -Wdocumentation warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162506 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
42b60551eff3a424e191b293bfd606559dc96bff 23-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove an unused argument. This logic can now be reused by the
ms-style inline asms.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162463 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
70517ca5c07c4b41ff8662b94ee22047b0299f8c 23-Aug-2012 Dmitri Gribenko <gribozavr@gmail.com> Fix a bunch of -Wdocumentation warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162452 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
a904e01839e8244d39b3d9bfc749ec93f1cbe1e1 23-Aug-2012 David Chisnall <csdavec@swan.ac.uk> Fix transposed optional / required in Objective-C metadata (GNUstep runtime)

Patch by Niels Grewe!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162441 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
8e4c189e6502cffb760b33f092e65effb1d10092 23-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Attempt to fix clang bootstrap (broken by r162425).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162440 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
ea93e40785ffeadfac66b948c95f9490ec26207a 23-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Use the alignment from lvalue emission to more accurately compute the alignment
of a pointer for builtin emission, instead of just depending on the type of the
pointee. <rdar://problem/11314941>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162425 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
2735df2eb16acfb92b8cd24e163e3a74a7a4d950 22-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Start sending non-simple inline asms to the AsmParser.

The parser still can't handle all cases, so fall back to emitting a simple
MSAsmStmt if we get into trouble.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162382 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
d48bcb2f4dedf8e7b654cb017968b3d7b6663a57 22-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Reduce duplicated hash map lookups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162361 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
odeGenModule.cpp
a7afeb040416c0eaac19b92db914913a788044f5 21-Aug-2012 Chad Rosier <mcrosier@apple.com> [driver] Add support for the --param ssp-buffer-size= driver option.
PR9673


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162285 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
05c5ebc9bafe5613204eefb59a47ab878e4fbd0b 21-Aug-2012 Kostya Serebryany <kcc@google.com> [asan] If we are compiling with ASan, add metadata indicating dynamically initialized globals. Patch by Reid Watson, reviewed by Richard Smith

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162259 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
929bbfb0b69165b55da3c56abf22aa10e20dadc6 21-Aug-2012 John McCall <rjmccall@apple.com> When performing a trivial copy of a C++ type, we must be careful not
to overwrite objects that might have been allocated into the type's
tail padding. This patch is missing some potential optimizations where
the destination is provably a complete object, but it's necessary for
correctness.

Patch by Jonathan Sauer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162254 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
0a7dd788dbef975f35f273c7ab913f480f7edd60 21-Aug-2012 John McCall <rjmccall@apple.com> Screw around with ObjCRuntime some more, changing the
diagnostics for bad deployment targets and adding a few
more predicates. Includes a patch by Jonathan Schleifer
to enable ARC for ObjFW.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162252 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
d64c2eb83d7ec86faa4f2554935a977a19573f59 21-Aug-2012 John McCall <rjmccall@apple.com> Fix a pair of bugs relating to properties in ARC.

First, when synthesizing an explicitly strong/retain/copy property
of Class type, don't pretend during compatibility checking that the
property is actually assign. Instead, resolve incompatibilities
by secretly changing the type of *implicitly* __unsafe_unretained
Class ivars to be strong. This is moderately evil but better than
what we were doing.

Second, when synthesizing the setter for a strong property of
non-retainable type, be sure to use objc_setProperty. This is
possible when the property is decorated with the NSObject
attribute. This is an ugly, ugly corner of the language, and
we probably ought to deprecate it.

The first is rdar://problem/12039404; the second was noticed by
inspection while fixing the first.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162244 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
bf3a96650c449a5f8dd1a818b3ce1afa8dddfc39 21-Aug-2012 Eric Christopher <echristo@apple.com> Reapply:

Author: Eric Christopher <echristo@apple.com>
Date: Thu Aug 16 23:50:46 2012 +0000

Add some caching here for the builtin types.

rdar://12117935

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162066 91177308-0d34-0410-b5e6-96231b3b80d8

after fixing a thinko.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162243 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
003e7569fd6f5d38aa0f411483ee5ffabddec50f 18-Aug-2012 Eric Christopher <echristo@apple.com> Reapply:

Make isa part of objc_object at metadata generation time.

Noticed on inspection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162145 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1dc7ab0bbe6ef1b179f450eaa536323b0c3ba034 17-Aug-2012 Eric Christopher <echristo@apple.com> Temporarily revert r162066 and r162062 to see if it brings the gdb
bots back.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162080 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
e7259aad3fc6db0c9add85d486cafa6eeb53585d 17-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix undefined behavior in debug info emission: operator* on WeakVH returns a
reference, so &* on an empty WeakVH binds a reference to a dereferenced null
pointer. So don't do that; we have a perfectly good implicit conversion to
Value*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162079 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
8bf4ab319e232f185e9965c5bb417dee62706c8f 17-Aug-2012 Eric Christopher <echristo@apple.com> Add some caching here for the builtin types.

rdar://12117935

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162066 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
c076ef6dd87d4507ac4f276ec4d7881fb6f2a7fd 17-Aug-2012 Eric Christopher <echristo@apple.com> Make isa part of objc_object at metadata generation time.

Noticed on inspection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162062 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
c58dcdc8facb646d88675bb6fbcb5c787166c4be 16-Aug-2012 Tanya Lattner <tonic@nondot.org> Convert loads and stores of vec3 to vec4 to achieve better code generation. Add test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162002 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
ac45293276030400195133225d54ddcb3644ea20 16-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Devirtualize calls on glvalues produced by class member access expressions.
Based on a patch by Yin Ma!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161998 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
9e4abb4aa90c9785dcbaf4e69a320e6a2983b526 15-Aug-2012 John Criswell <criswell@uiuc.edu> Fix for PR#13606: http://llvm.org/bugs/show_bug.cgi?id=13606
Changed the alignment of an LValue to be 64 bits so that we can handle
alignment values up to half of a 64-bit address space.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161971 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
5aad79f8d54bf4356b2c8b9e56ace9ac8c39adb0 15-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for clobbers in CodeGen.

This is a reapplication of r161914 now that the scoping issue has been resolved
in r161966.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161967 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
dece8b325821acaa5b91e97cf03baf610f264e01 15-Aug-2012 Eric Christopher <echristo@apple.com> Revert this to try to bring the i386 bots back.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161931 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
2f834a5f5a4df86a70958f418e9773cd7a0aea42 15-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for clobbers in CodeGen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161914 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
ce23bb7cdc51db26411d75da3b20818ac2cc1db6 14-Aug-2012 Fariborz Jahanian <fjahanian@apple.com> irgen: inline code for several of complex builtin
calls. // rdar://8315199


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161891 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
550a9d823a939366a9f776b58f18883acd905a93 14-Aug-2012 Bob Wilson <bob.wilson@apple.com> Avoid using i64 types for vld1q_lane/vst1q_lane intrinsics.

The backend has to legalize i64 types by splitting them into two 32-bit pieces,
which leads to poor quality code. If we produce code for these intrinsics that
uses one-element vector types, which can live in Neon vector registers without
getting split up, then the generated code is much better. Radar 11998303.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161879 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
634b3d26969f139a25b223074567ba5ab7ba7dd9 13-Aug-2012 Manman Ren <mren@apple.com> ARM: enable struct byval for AAPCS-VFP.

rdar://9877866


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161790 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
0d729105ecb50a7e3cbe6e57c29149edfa5cf05a 13-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Factor out computation of whether a typeid's expression is potentially
evaluated into a CXXTypeid member function. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161779 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
860de6b4223c789a149b7d042c44a66c3e021c52 13-Aug-2012 Eric Christopher <echristo@apple.com> This is always going to be true so the cast isn't necessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161744 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
60e25804d14a52c173548f0f6c66d3d831cb901c 10-Aug-2012 Manman Ren <mren@apple.com> Add comments for turning on byval

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161702 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
c972c92f757957bf414c6195b1f2ae25a2b4dd37 10-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Don't emit an invoke whose normal destination is a landingpad. Fixes test
regression on test/CodeGenObjC/2008-10-3-EhValue.m on non-Darwin targets.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161700 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
16ba7c8498933781cff103058612e76e8045c798 10-Aug-2012 Manman Ren <mren@apple.com> ARM: enable struct byval for AAPCS.

rdar://9877866
PR://13350


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161694 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
8ce9cca118b32604f481ad381eafab25b5798c9f 10-Aug-2012 Joerg Sonnenberger <joerg@bec.de> Decrementing std::string::end is not portable, use array access instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161659 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
74896e074856c3248d88ddddf45bfda7256ab022 10-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Use the new Inline Asm Non-Standard Dialect attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161642 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
79f30981fcd25c6ff88807372a2744af02a7690e 09-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Fix AAPCS ABI. I can't actually test this, but it restores the behavior from before r159168. PR13562.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161554 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
42f74f21ece01dc8573d5377859d327fbb23b26c 09-Aug-2012 Eli Friedman <eli.friedman@gmail.com> clang support for Bitrig (an OpenBSD fork); patch by David Hill.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161546 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
48a05b9e3a80b58a9089667ebb537b80af8c3263 08-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add basic codegen support for simple asm stmts. Currently,
only machine specific clobbers are modeled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161524 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
859c65cdbe730fd0e940b71ab4ba4884d44a8298 08-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Fix an assertion failure with a C++ constructor initializing a
member of reference type in an anonymous struct. PR13154.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161473 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
odeGenFunction.h
c343dd87a1b0784ee15ffd7634d0872bdb724646 07-Aug-2012 Fariborz Jahanian <fjahanian@apple.com> objc-arc: set nonlazybind attribute on objc_retain/
objc_release for performance for these most often
called APIs. // rdar://12040837


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161448 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
c7fb74806190220ba46bc175568f5c0edd49b810 07-Aug-2012 Eric Christopher <echristo@apple.com> If we don't have a complete type for the array type yet either then
just let the alignment be zero.

PR13531

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161379 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d0a97c49c28608a6f4471855de2941c40f11ae4e 07-Aug-2012 Eric Christopher <echristo@apple.com> Remove some unintended changes from my last patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161369 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
363e5acfd93aa62d94e02b674e753257389643b1 07-Aug-2012 Eric Christopher <echristo@apple.com> Make sure when we get the replacement type for a template argument
that we attach the lost qualifiers.

Fixes rdar://11882155

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161368 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a841c19f7860393d6319bf40e9d662284462771d 06-Aug-2012 Hal Finkel <hfinkel@anl.gov> Add __builtin_readcyclecounter() to produce the @llvm.readcyclecounter() intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161310 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
65263b4ec184212155c92740ab0bd363bb85c49e 04-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Simplify code, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161303 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
aa6eccce0cd6e15229cdee52177477371890d3c4 04-Aug-2012 Eric Christopher <echristo@apple.com> Fix the name of this variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161287 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3e07881cdb0acfad9fc7ce6c2b37ca1ca98e7c7d 04-Aug-2012 Eric Christopher <echristo@apple.com> Update comment to accurately reflect what should happen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161286 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ee959355b93c0648fea88dc986d196e3705407dc 03-Aug-2012 Shih-wei Liao <sliao@google.com> Apply changes to migrate to CLANG-160673-20120724.

Change-Id: I00d23ac9b893c62dca281ec771eeb5f911854bae
ndroid.mk
08fc8eb5a1cc9c01af67e016ab21c9b905711eb1 03-Aug-2012 Shih-wei Liao <sliao@google.com> Merge with Clang upstream r160673 (Jul 24th 2012)

Conflicts:
lib/Sema/SemaDeclAttr.cpp

Change-Id: I37f02f20642a037b9da8d35fefa01986cd250b14
ea66f9f9e17d619d617885e26adc1530cec7c0fd 02-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Make sure we don't emit IR for unused EH cleanups. PR13359.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161148 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
7916c997127fe616ba255ba4cade10e5de0c8812 01-Aug-2012 John McCall <rjmccall@apple.com> When devirtualizing the conversion to a virtual base subobject,
don't explode if the offset we get is zero. This can happen if
you have an empty virtual base class.

While I'm at it, remove an unnecessary block from the IR-generation
of the null-check, mark the eventual GEP as inbounds, and generally
prettify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161100 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
94be8ea90795d00fe2a97fea9a9a727911a70997 31-Jul-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove deprecated getNameAsCString methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161044 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1503f0ddab0057e33efa21393fc0577580d6287a 31-Jul-2012 John McCall <rjmccall@apple.com> Introduce new queries on ObjCRuntime for how to interpret subscripts
on object pointers and whether pointer arithmetic on object pointers
is supported. Make ObjFW interpret subscripts as pseudo-objects.
Based on a patch by Jonathan Schleifer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161028 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
b48280ba1790122cd3fa6e17c88ecd6a4571a4eb 31-Jul-2012 Rafael Espindola <rafael.espindola@gmail.com> Handle functions with struct arguments or return types and the regparm
attribute. It is a variation of the x86_64 ABI:

* A struct returned indirectly uses the first register argument to pass the
pointer.
* Floats, Doubles and structs containing only one of them are not passed in
registers.
* Other structs are split into registers if they fit on the remaining ones.
Otherwise they are passed in memory.
* When a struct doesn't fit it still consumes the registers.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161014 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GVTables.cpp
11abf2ad01f64ede7c0555167f41a1c5852f80c6 27-Jul-2012 NAKAMURA Takumi <geek4civic@gmail.com> clang/lib: [CMake] Update tblgen'd dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160851 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
57bc51cfec0f39376ad78c03432a12137cd26c2a 24-Jul-2012 Rafael Espindola <rafael.espindola@gmail.com> ABIArgInfo's constructor is private and only used by the static get* methods.
No need to abuse default arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160684 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
78d1a10e13a1abfd4830bccf2a97b2993da1ed5c 24-Jul-2012 Nick Lewycky <nicholas@mxc.ca> Emit debug info for dynamic initializers. Permit __attribute__((nodebug)) on
variables that have static storage duration, it removes debug info on the
emitted initializer function but not all debug info about this variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160659 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
aa9cf8d3abd8760d78b20e9194df169bbd8b0f01 24-Jul-2012 Rafael Espindola <rafael.espindola@gmail.com> move X86_32ABIInfo::computeInfo out of line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160652 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
b33a3c448ec669a7ef530ef8094cdfc9346468cf 24-Jul-2012 Rafael Espindola <rafael.espindola@gmail.com> Make classifyReturnType and classifyArgumentType private.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160648 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
e1ecdc168175719d74e112bcacd4aae5e12d4631 23-Jul-2012 Richard Trieu <rtrieu@google.com> Change APInt to APSInt in one instance. Also change a call to operator==() to
APSInt::isSameValue() when comparing different sized APSInt's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160641 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
bed28ac1d1463adca3ecf24fca5c30646fa9dbb2 23-Jul-2012 Sylvestre Ledru <sylvestre@debian.org> Fix a typo (the the => the)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160622 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
adfa45ffd67d1959cb1ff8cec88ad2ff3ffb7798 21-Jul-2012 Tim Northover <Tim.Northover@arm.com> Add "long double" to permitted list of ARM complex homogeneous aggregates.

Under AAPCS, long double is the same as double, which means it should be
allowed as part of a homogeneous aggregate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160586 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
89770e5640dd5039569ecdc64c61acd9aa22cff9 20-Jul-2012 Chad Rosier <mcrosier@apple.com> Add the mechanics for -fms-inline-asm. No easy way to test at this time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160580 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
ffb0c3adc27d257c8453886957b8d220d1ad14d8 20-Jul-2012 Eric Christopher <echristo@apple.com> Remove HasSynthBitfield and all callers/writers/etc. Also remove
previous ResetObjCLayout calls since this is now handled in Sema.

Part of rdar://11842763

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160527 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
1638f2e8263df93b9fa055a12cc3f0968b9682d8 18-Jul-2012 Joel Jones <joel_k_jones@apple.com> More replacing of target-dependent intrinsics with target-indepdent
intrinsics. The second instruction(s) to be handled are the vector versions
of count set bits (ctpop).

The changes here are to clang so that it generates a target independent
vector ctpop when it sees an ARM dependent vector bits set count. The changes
in llvm are to match the target independent vector ctpop and in
VMCore/AutoUpgrade.cpp to update any existing bc files containing ARM
dependent vector pop counts with target-independent ctpops. There are also
changes to an existing test case in llvm for ARM vector count instructions and
to a test for the bitcode upgrade.

<rdar://problem/11892519>

There is deliberately no test for the change to clang, as so far as I know, no
consensus has been reached regarding how to test neon instructions in clang;
q.v. <rdar://problem/8762292>


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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160373 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GVTables.cpp
taniumCXXABI.cpp
icrosoftCXXABI.cpp
e87f3f62bcbe8bc562c1623c9e8bb49cf31c0460 17-Jul-2012 Simon Atanasyan <satanasyan@mips.com> Revert commit r160308. We decide to move builtins selection to the backend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160353 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
d7bad053b048494db5f83b512a5169d01be96f81 16-Jul-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Implement __builtin_mips_shll_qb builtin function overloading.
This function has two versions. The first one is used for a register operand.
The second one is used for an immediate number.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160308 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
6bebe5aca3c45c741303dd0ae12d0225bddbe2e6 16-Jul-2012 Chandler Carruth <chandlerc@gmail.com> Update Clang to reflect the move of MDBuilder in r160237.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160238 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.cpp
odeGenTBAA.h
71bcc68ba44a87a516d84461bc68475e43134338 14-Jul-2012 Eric Christopher <echristo@apple.com> Capitalize comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160220 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
87d747b1fbf89aa0ba08cfc0e26655aa7739c77d 14-Jul-2012 Joel Jones <joel_k_jones@apple.com> This is one of the first steps at moving to replace target-dependent
intrinsics with target-indepdent intrinsics. The first instruction(s) to be
handled are the vector versions of count leading zeros (ctlz).

The changes here are to clang so that it generates a target independent
vector ctlz when it sees an ARM dependent vector ctlz. The changes in llvm
are to match the target independent vector ctlz and in VMCore/AutoUpgrade.cpp
to update any existing bc files containing ARM dependent vector ctlzs with
target-independent ctlzs. There are also changes to an existing test case in
llvm for ARM vector count instructions and a new test for the bitcode upgrade.

<rdar://problem/11831778>

There is deliberately no test for the change to clang, as so far as I know, no
consensus has been reached regarding how to test neon instructions in clang;
q.v. <rdar://problem/8762292>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160201 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
8f88a1dcc57cfe8580eb1558a783ad8499bfe8e0 12-Jul-2012 Timur Iskhodzhanov <timurrrr@google.com> [Windows] Use thiscall as the default calling convention for class methods. PR12785

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160121 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
9a50249cd35f3d9d4d2b194a3edd6815ccf746d7 12-Jul-2012 Benjamin Kramer <benny.kra@googlemail.com> Add _rdrand{16,32,64}_step intrinsics to immintrin.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160118 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
f7226fbe677a9c7578fa0613491ed15c6dc6a5e1 12-Jul-2012 John McCall <rjmccall@apple.com> Add the ObjFW runtime. Patch by Jonathan Schleifer!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160102 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
198871cc90375246d8692680467ff6e810edac36 12-Jul-2012 Tanya Lattner <tonic@nondot.org> Add OpenCL metadata for kernel arg names. This output is controlled via a flag as noted in the OpenCL Spec.
Includes a test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160092 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
c852e9ff06f7089405265c53af33cf06fdc36e52 11-Jul-2012 Eric Christopher <echristo@apple.com> Temporarily revert this to see if it brings the gdb bot back.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160049 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
odeGenFunction.h
3d40f96394fb30b70ba83bdfd10f3ed69530b0e5 11-Jul-2012 Eric Christopher <echristo@apple.com> The end of a block doesn't necessarily need a line table entry unless
there's something going on there. Remove the unconditional line entry
and only add one if we're emitting cleanups (any other statements
would be handled normally).

Fixes rdar://9199234

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160033 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
odeGenFunction.h
0df579ec000ffe52e0cddf1e7ee5e50a55256835 10-Jul-2012 Tanya Lattner <tonic@nondot.org> Patch by Anton Lokhmotov to add OpenCL work group size attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159965 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
34f60a4a7fb87e9f4dfd08f8751ce76db9981215 09-Jul-2012 Abramo Bagnara <abramo.bagnara@gmail.com> The delete argument should not be converted to void*.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159961 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.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
GBlocks.cpp
GBuiltin.cpp
GCall.cpp
GClass.cpp
GExpr.cpp
GExprCXX.cpp
GObjC.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GVTables.cpp
odeGenTypes.cpp
odeGenTypes.h
c9686716d2ceb5518178dca98670ec34c472a1be 06-Jul-2012 Lang Hames <lhames@gmail.com> Add -ffp-contract = { fast | on | off } command line option support.

This flag sets the 'fp-contract' mode, which controls the formation of fused
floating point operations. Available modes are:

- Fast: Form fused operations anywhere.
- On: Form fused operations where allowed by FP_CONTRACT. This is the default
mode.
- Off: Don't form fused operations (in future this may be relaxed to forming
fused operations where it can be proved that the result won't be
affected).

Currently clang doesn't support the FP_CONTRACT pragma, so the 'On' and 'Off'
modes are equivalent.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159794 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
8d3ba23f2d9e6c87794d059412a0808c9cbacb25 06-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Implement AST classes for comments, a real parser for Doxygen comments and a
very simple semantic analysis that just builds the AST; minor changes for lexer
to pick up source locations I didn't think about before.

Comments AST is modelled along the ideas of HTML AST: block and inline content.

* Block content is a paragraph or a command that has a paragraph as an argument
or verbatim command.
* Inline content is placed within some block. Inline content includes plain
text, inline commands and HTML as tag soup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159790 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
d4f5198ae07d9a4958d8191bac694ded12173ad9 04-Jul-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove get(V)BaseClassOffsetInBits, the CharUnit functions should be used instead.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159719 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDebugInfo.cpp
GExprConstant.cpp
GExprScalar.cpp
argetInfo.cpp
478851c3ed6bd784e7377dffd8e57b200c1b9ba9 04-Jul-2012 Benjamin Kramer <benny.kra@googlemail.com> Drop the ASTContext.h include from Stmt.h and fix up transitive users.

This required moving the ctors for IntegerLiteral and FloatingLiteral out of
line which shouldn't change anything as they are usually called through Create
methods that are already out of line.

ASTContext::Deallocate has been a nop for a long time, drop it from ASTVector
and make it independent from ASTContext.h

Pass the StorageAllocator directly to AccessedEntity so it doesn't need to
have a definition of ASTContext around.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159718 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.h
11d3f4cc27e6b923fc32481dc1bb5ec46c7d1f4b 03-Jul-2012 David Chisnall <csdavec@swan.ac.uk> Rename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstep
runtime to gnustep from gnu. Fix EH for the GCC runtime.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159684 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
c359f2029d19016560a422551704ccc2419be0b1 03-Jul-2012 Akira Hatanaka <ahatanaka@mips.com> Make the following changes in the way Mips handles vector arguments and return
values:

- Return integer vectors in integer registers.
- Pass vector arguments in integer registers.
- Set an upper bound for argument alignment. The largest alignment is 8-byte
for O32 and 16-byte for N32/64.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159676 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
402a6d5613b3df364ba252416d5a022dee95f0ba 03-Jul-2012 Matt Beaumont-Gay <matthewbg@google.com> Silence warning in -Asserts build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159635 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
941e47cef26fb6300a8d3e366f7c5694277e5849 03-Jul-2012 Nico Weber <nicolasweber@gmx.de> Share ConvertUTF8toWide() between Lex and CodeGen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159634 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
e0c1168ec7910a1a7ed08df4d4f0c58c2fa2ecd1 03-Jul-2012 John McCall <rjmccall@apple.com> Significantly simplify CGExprAgg's logic about ignored results:
if we want to ignore a result, the Dest will be null. Otherwise,
we must copy into it. This means we need to ensure a slot when
loading from a volatile l-value.

With all that in place, fix a bug with chained assignments into
__block variables of aggregate type where we were losing insight into
the actual source of the value during the second assignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159630 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GValue.h
odeGenFunction.h
b135f0f2d893121ed2cc46d4d6c5bd5ab87d872f 02-Jul-2012 Eli Friedman <eli.friedman@gmail.com> When we're looking for redeclarations which might provide a definition in CodeGen, make sure we examine all the redeclarations. PR13252.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159586 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
83122da713a81c8310bf97de8ff6320497d5f327 29-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Update Clang to reflect the new home of IRBuilder.h as of r159421.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159422 91177308-0d34-0410-b5e6-96231b3b80d8
GBuilder.h
7b7c973263678f04169bf54d25051ee2b4548bdf 29-Jun-2012 Bill Wendling <isanbard@gmail.com> Update based on move of DIBuilder.h to include/llvm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159415 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.h
c56b552ff209f9b5ccd81c078dbbadb948eb711e 29-Jun-2012 Timur Iskhodzhanov <timurrrr@google.com> Fix PR13234 - crash when trying to report an unsupported ABI feature

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159405 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
1d2b2ca97686b1ed16b1614e4700f9d2a0938a71 28-Jun-2012 Benjamin Kramer <benny.kra@googlemail.com> Dead code eliminate the massive hexagon builtin intrinsic supporting code.

The tablegen'd code does the same thing without this egregious duplication.
In my limited testing everything seems to work, however there can be
differences if the clang and llvm builtin definitions don't match.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159371 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
e327aa81e38d9d17702f95ad4df56f8e3e9b7e91 28-Jun-2012 Benjamin Kramer <benny.kra@googlemail.com> Now that we use the GCC builtin <-> llvm intrinsic, dead code eliminate the handwritten emitter.

The generated code uncovered an invalid prototype for __builtin_mips_shilo, fix it along the way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159368 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
fbf7005138d199bad238f0dd1ff509931a24ab10 28-Jun-2012 Simon Atanasyan <satanasyan@mips.com> Support MIPS DSP Rev1 intrinsics.
This patch was reviewed in the llvm-commits list by Jim Grosbach.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159366 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
80bc96e6aa9bc8331473385150cff5e0db305da6 28-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> Compare the canonical types and document why we give up on the covariant case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159360 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
4a889e47bd5a8d08a705a87962a35a504728d7f6 28-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> Disable devirtualization when we have covariant returns. I will open a bug
for tracking this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159351 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
ea01d7661751e062bb670cc1a0bdfee5789cb96f 28-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> Don't devirtualize calls when we don't have the correct type of the this pointer
handy. It can be done, but we would have to build a derived-to-base cast
during codegen to compute the correct this pointer.

I will handle covariant returns next.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159350 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
de981f3ff163bc9ec69e4c5e7316e94276412993 28-Jun-2012 Hans Wennborg <hans@hanshq.net> Add -ftls-model command-line flag.

This allows for setting the default TLS model. (PR9788)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159336 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
odeGenModule.h
632fbaa22fbed7c090eb83775731bfff786c2198 28-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix another issue with devirtualizing calls to final methods by passing them
the correct this pointer. There is some potential for sharing a bit more
code with canDevirtualizeMemberFunctionCalls, but that can be done in an
independent patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159326 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
da970d2fe086ed44198e1edd5d7d59ff19e747fe 28-Jun-2012 Eric Christopher <echristo@apple.com> Fix grammar.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159321 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2a5d644bcf8a49de392ed888fa0351c6db9175c5 28-Jun-2012 Bill Wendling <isanbard@gmail.com> Update the #include to find the DebugInfo.h in the correct place


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159315 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.h
f4bcfa1b1850711d5eb092f2b0639331ef9f09f1 27-Jun-2012 Eli Friedman <eli.friedman@gmail.com> Propagate lvalue alignment into bitfields. Per report on cfe-dev.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159295 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCRuntime.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
GValue.h
odeGenFunction.h
8d852e35adb46e0799538dfc9c80d44f27cd3597 27-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> Implement John McCall's review of r159212 other than the this pointer not
being updated. Will fix that in a second.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159280 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
12582bdc2e1fca260eb2437d87dab5302c37bab2 26-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix a bug in my previous patch: If we are not doing a virtual call because
the member expression is qualified, call the method specified in the code,
not the most derived one we can find.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159219 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
0b4fe503ef00d9f8ea330850d3e3b303e9c7c876 26-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> During codegen of a virtual call we would extract any casts in the expression
to see if we had an underlying final class or method, but we would then
use the cast type to do the call, resulting in a direct call to the wrong
method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159212 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
4904bf4e84cfb48080270ebaa9005327f18ab0e5 26-Jun-2012 Fariborz Jahanian <fjahanian@apple.com> block literal irgen: several improvements on naming block
literal helper functions. All helper functions (global
and locals) use block_invoke as their prefix. Local literal
helper names are prefixed by their enclosing mangled function
names. Blocks in non-local initializers (e.g. a global variable
or a C++11 field) are prefixed by their mangled variable name.
The descriminator number added to end of the name starts off
with blank (for first block) and _<N> (for the N+2-th block).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159206 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
b9d2b3b8edf7a0dc56e55acb1cf87338d5648daa 26-Jun-2012 Kostya Serebryany <kcc@google.com> [asan] add missing asan instrumentation in generated global init functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159191 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
78eb76e2eefdc381dd4a97bc8ee628ae975aff35 26-Jun-2012 Manman Ren <mren@apple.com> ARM: enable struct byval for APCS.

Revert r136662 which disables ARM byval.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159168 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
9ee494f98610dcd79441dce469d7bf609fcd7b92 24-Jun-2012 Charles Davis <cdavis@mines.edu> IRGen: Factor v-table generation into the CGCXXABI object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159091 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
odeGenModule.cpp
taniumCXXABI.cpp
icrosoftCXXABI.cpp
5e2d5dec7736f6f9292d4212dec67295909f1328 23-Jun-2012 Hans Wennborg <hans@hanshq.net> Support the tls_model attribute (PR9788)

This adds support for the tls_model attribute. This allows the user to
choose a TLS model that is better than what LLVM would select by
default. For example, a variable might be declared as:

__thread int x __attribute__((tls_model("initial-exec")));

if it will not be used in a shared library that is dlopen'ed.

This depends on LLVM r159077.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159078 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprConstant.cpp
odeGenModule.cpp
odeGenModule.h
28ad063b279378b19cb0704f977429df366a151e 23-Jun-2012 Nico Weber <nicolasweber@gmx.de> Support L__FUNCTION__ in microsoft mode, PR11789

Heavily based on a patch from
Aaron Wishnick <aaron.s.wishnick@gmail.com>.

I'll clean up the duplicated function in CodeGen as
a follow-up, later today or tomorrow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159060 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
7e0dc76b175414ecdd9a6b26bdb548281da8bffd 22-Jun-2012 Nuno Lopes <nunoplopes@sapo.pt> revert CodeGen support for the alloc_size attribute until we finish the design of a more generic metadata node

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159016 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
16ae9de07730832945204877d752db7f1c070962 22-Jun-2012 James Dennett <jdennett@google.com> Documentation cleanup: making \param docs match the code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158982 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
9d96e9c8a602d55a59bade0a20c05c52242db70e 22-Jun-2012 James Dennett <jdennett@google.com> Documentation cleanup: Escape @objc* in Doxygen comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158974 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
b0d8671f95fe08a220118bca29063ba4d11a9dac 21-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Remove a goofy CMake hack and use the standard CMake facilities to
express library-level dependencies within Clang.

This is no more verbose really, and plays nicer with the rest of the
CMake facilities. It should also have no change in functionality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158888 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
52e4ed949ba52958db1e938860e3b49944ce8680 20-Jun-2012 Chad Rosier <mcrosier@apple.com> [ms-style asm] Change the fatal error to an extension warning. Apparently, this
error was asserting on anything that included Windows.h. MS-style inline asm is
still dropped, but at least now we're not completely silent about it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158833 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
527e616722f45986883cbc20e4bbb5d1651e75f4 20-Jun-2012 Benjamin Kramer <benny.kra@googlemail.com> Don't circumvent the debug info type cache when emitting info for EnumConstantDecl.

CreateEnumType doesn't participate in caching so the descriptor for the enum
gets recomputed for every reference of an element of an enum, only to get
discarded when it gets turned into an MDNode.

No functionality change except performance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158832 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
6f61ba2e57aac6fc76638addce18ed59137ab9c1 20-Jun-2012 Chad Rosier <mcrosier@apple.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158830 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
260611a32535c851237926bfcf78869b13c07d5b 20-Jun-2012 John McCall <rjmccall@apple.com> Restructure how the driver communicates information about the
target Objective-C runtime down to the frontend: break this
down into a single target runtime kind and version, and compute
all the relevant information from that. This makes it
relatively painless to add support for new runtimes to the
compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z,
available at the driver level as a better and more general
alternative to -fgnu-runtime and -fnext-runtime. This new
concept of an Objective-C runtime also encompasses what we
were previously separating out as the "Objective-C ABI", so
fragile vs. non-fragile runtimes are now really modelled as
different kinds of runtime, paving the way for better overall
differentiation.

As a sort of special case, continue to accept the -cc1 flag
-fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak.

I won't go so far as to say "no functionality change", even
ignoring the new driver flag, but subtle changes in driver
semantics are almost certainly not intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158793 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GException.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GRTTI.cpp
odeGenModule.cpp
5900103d6606edef5fc81bbac685fa3651f1b936 20-Jun-2012 James Dennett <jdennett@google.com> Documentation cleanup: escape "::" to avoid a Doxygen warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158778 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
ddfc8a1e68ac67d748ca918acac8f1c78a51395c 19-Jun-2012 Fariborz Jahanian <fjahanian@apple.com> objc-arc: captured block variable accessed in its block literal
initializer need be null initialized before initializer takes
hold, just like any other initialized retainable object pointer.
// rdar://11016025


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158738 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
8af669f2f1d92436fe6dc43144bb084a620e7516 19-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> Add a -fuse-init-array option to cc1 and map to the UseInitArray target
option. On the driver, check if we are using libraries from gcc 4.7 or newer
and if so pass -fuse-init-array to the frontend.
The crtbegin*.o files in gcc 4.7 no longer call the constructors listed in
.ctors, so we have to use .init_array.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158694 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
adc6cbf5b502f1b58078455ab4fca66c7daac239 18-Jun-2012 Michael J. Spencer <bigcheesegs@gmail.com> [MSExtensions] Add support for __forceinline.

__forceinline is a combination of the inline keyword and __attribute__((always_inline))

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158653 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
860a319e62b0e256817a458396d191aa91c0787a 16-Jun-2012 Eli Friedman <eli.friedman@gmail.com> Fix Sema and IRGen for atomic compound assignment so it has the right semantics when promotions are involved.
(As far as I can tell, this only affects some edge cases.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158591 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
32f498a675df990901e6659d610dc740f9423228 16-Jun-2012 Eli Friedman <eli.friedman@gmail.com> Make the ".*" operator work correctly when the base is a prvalue and the field has a non-trivial copy constructor. PR13097.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158578 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
2ee5ba35febf830d366b65dd0dcbf8e291c41342 16-Jun-2012 James Dennett <jdennett@google.com> Documentation cleanup:
* Escaped Objective-C @keywords in Doxygen comments;
* Documented more accurate \params;
* Exposed some more summaries using \brief.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158559 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.h
GExprAgg.cpp
GObjC.cpp
GObjCRuntime.h
odeGenFunction.cpp
c7810fed64bff037915ba48f39f34614bc54517f 15-Jun-2012 James Dennett <jdennett@google.com> Documentation fix: made the name given to \param match the code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158511 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCRuntime.cpp
3b2adf237ab033173d7789ec1214d654eec17697 15-Jun-2012 James Dennett <jdennett@google.com> Documentation fixes: Added \brief markup and fixed some formatting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158501 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
f5533019fb70d62917fd080f6152b6469e2c6cd5 15-Jun-2012 John McCall <rjmccall@apple.com> It turns out that implementing the rethrow-on-fallthrough
semantics of a ctor/dtor function-try-block catch handler
by pushing a normal cleanup is not just overkill but actually
actively wrong when the handler contains an explicit return
(which is only legal in a dtor). Just emit the rethrow as
ordinary code at the fallthrough point. Fixes PR13102.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158488 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
809d1be9820039b4cf6efa48246a0d70ffa13394 14-Jun-2012 James Dennett <jdennett@google.com> More doxygen/documentation cleanups.

This reduces the number of warnings generated by Doxygen by about 100
(roughly 10%). Issues addressed:
(1) Primarily, backslash-escaped "@foo" and "#bah" in Doxygen comments
when they're not supposed to be Doxygen commands or links, and
similarly for "<baz>" when it's not intended as as HTML tag;
(2) Changed some \t commands (which don't exist) to \c ("to refer to a
word of code", as the Doxygen manual says);
(3) \precondition becomes \pre;
(4) When touching comments, deleted a couple of spurious spaces in them;
(5) Changed some \n and \r to \\n and \\r;
(6) Fixed one tiny typo: #pragms -> #pragma.

This patch touches documentation/comments only.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158422 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
645161f7f58068ef336c651f4dfaa6a38ce48e40 12-Jun-2012 Bill Wendling <isanbard@gmail.com> Remove unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158353 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b1756ef7b643fcc79dce0bdd1539a9b2eb8cf9e0 11-Jun-2012 Chad Rosier <mcrosier@apple.com> Make CodeGenFunction::EmitMSAsmStmt throw a fatal error as MS-style inline
assembly is completely untested and unsupported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158329 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
8cd64b4c5553fa6284d248336cb7c82dc960a394 11-Jun-2012 Chad Rosier <mcrosier@apple.com> Etch out the code path for MS-style inline assembly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158325 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
17d26a6c1f2cb921d0000c337b4967699dc928fd 11-Jun-2012 James Dennett <jdennett@google.com> Documentation cleanup, fixing Doxygen markup. Mostly this avoids common terms
such as "protocol" and "expression" being implicitly turned into links to
mistakenly-generated Doxygen pages:
- Escaping @ symbols when Doxygen would otherwise incorrectly interpret them;
- Escaping # symbols when they're not intended as explicit Doxygen link
requests, such as when discussing preprocessor directives;
- In one odd case, unescaping @ in @__experimental_modules_import, because
Doxygen wrote '\@' to the output in that case, causing the example in the
description of ImportDecl to be wrong; and
- Fixing a typo: @breif -> @brief.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158299 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCRuntime.h
ca5233044ef679840d1ad1c46a36b16e2ee8a6e1 10-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR13064: Store whether an in-class initializer uses direct or copy
initialization, and use that information to produce the right kind of
initialization during template instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158288 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenModule.cpp
50e3faaebfdbbc3b0a3f4f401c6e75d4a83ad346 09-Jun-2012 Michael J. Spencer <bigcheesegs@gmail.com> [C++11 Compat] Fix breaking change in C++11 pair copyctor.

While this code is valid C++98, it is not valid C++11. The problem can be
reduced to:

class MDNode;

class DIType {
operator MDNode*() const {return 0;}
};

class WeakVH {
WeakVH(MDNode*) {}
};

int main() {
DIType di;
std::pair<void*, WeakVH> p(std::make_pair((void*)0, di)));
}

This was not detected by any of the bots we have because they either compile
C++98 with libstdc++ (which allows it), or C++11 with libc++ (which incorrectly
allows it). I ran into the problem when compiling with VS 2012 RC.

Thanks to Richard for explaining the issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158245 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ec22f56f2031c3e61100d42133b06f9b9f020ee6 07-Jun-2012 Fariborz Jahanian <fjahanian@apple.com> User better API for vla in compund literals.
// rdar://11485774


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158157 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
2ccc0f9c23e6b948a4db6ffe46aefa098e1a2956 07-Jun-2012 Fariborz Jahanian <fjahanian@apple.com> When emitting compund literal of vla pointer elements, make
sure to emit vla size to prevent an irgen crash.
// rdar://11485774


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158153 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
855243789cb44799c03f4c7216d3d6308805f549 07-Jun-2012 Benjamin Kramer <benny.kra@googlemail.com> Plug a long standing memory leak in TemplateArgument.

The integral APSInt value is now stored in a decomposed form and the backing
store for large values is allocated via the ASTContext. This way its not
leaked as TemplateArguments are never destructed when they are allocated in
the ASTContext. Since the integral data is immutable it is now shared between
instances, making copying TemplateArguments a trivial operation.

Currently getting the integral data out of a TemplateArgument requires creating
a new APSInt object. This is cheap when the value is small but can be expensive
if it's not. If this turns out to be an issue a more efficient accessor could
be added.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158150 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e14da79c7b1c336b72e6a4548f53b1a9534f7e0d 07-Jun-2012 Fariborz Jahanian <fjahanian@apple.com> reverse r158117.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158119 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
30775778897112f79b6641e98c2722d306053f0b 07-Jun-2012 Fariborz Jahanian <fjahanian@apple.com> When doing arithmatic on vla pointer, make sure
to emit vla size to prevent an irgen crash.
// rdar://11485774


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158117 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
581deb3da481053c4993c7600f97acf7768caac5 06-Jun-2012 David Blaikie <dblaikie@gmail.com> Revert Decl's iterators back to pointer value_type rather than reference value_type

In addition, I've made the pointer and reference typedef 'void' rather than T*
just so they can't get misused. I would've omitted them entirely but
std::distance likes them to be there even if it doesn't use them.

This rolls back r155808 and r155869.

Review by Doug Gregor incorporating feedback from Chandler Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158104 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GClass.cpp
GDebugInfo.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
GRecordLayoutBuilder.cpp
odeGenModule.cpp
argetInfo.cpp
facde171ae4b8926622a1bffa833732a06f1875b 06-Jun-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove unused private member variables found by clang's new -Wunused-private-field.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158086 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
odeGenTBAA.h
f4bd4d8fe029ca314c2c61edb1d2a65bc18cdbf2 05-Jun-2012 Eli Friedman <eli.friedman@gmail.com> Fix a bug with va_arg and vectors on Darwin x86-32. <rdar://problem/11592208>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158017 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
3de00ce9075c197b1fcaca69f3b5870a32176349 05-Jun-2012 Eric Christopher <echristo@apple.com> Reapply "Only emit debug information for methods that are user defined, there's"

As the failing testcase has been fixed.

This reverts commit 0637f407e6ee7fdccde17fbf9a5fcc4853187b3e.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158009 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0637f407e6ee7fdccde17fbf9a5fcc4853187b3e 05-Jun-2012 John McCall <rjmccall@apple.com> Revert "Only emit debug information for methods that are user defined, there's"

This reverts r157970, which was not passing on
clang-x86_64-darwin10-nobootstrap-RA

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157983 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9b26efe7b62cf6dcb27ce60824e03856cedbea2f 05-Jun-2012 Eric Christopher <echristo@apple.com> Only emit debug information for methods that are user defined, there's
not much reason to emit for constructors and destructors that aren't
user defined.

rdar://11593099

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157970 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5a2eff85d185ad94b6272a6f6c869496d8c23ced 01-Jun-2012 Eric Christopher <echristo@apple.com> Support C++11 enum forward declarations.

Part of rdar://11570854

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157787 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
490a52b4947381879a47b4251db5fb81cdf5d02b 29-May-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: fix a sema and IRGen crash when property
getter result type is safe but does not match with property
type resulting in spurious warning followed by crash in
IRGen. // rdar://11515196


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157641 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.h
565204db54a61beacef4eb7a55cfead81ad58834 29-May-2012 Peter Collingbourne <peter@pcc.me.uk> OpenCL: Fix vector conditional operator CodeGen for the case where
the operands are vectors of doubles.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157596 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
a61ab0521576e9e9e90cd2d482f8684e6070a93c 28-May-2012 Chris Lattner <sabre@nondot.org> adjust to mainline llvm API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157557 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenModule.cpp
976f266b969e03ef08b37b5f4aaf013f48f1ba6e 25-May-2012 Nuno Lopes <nunoplopes@sapo.pt> fix codegen support for alloc_size attribute for static C++ methods
add test case for C++ codegen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157500 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
2813420dd3be04fc0c44074c3f1af1aada83ad99 25-May-2012 Nuno Lopes <nunoplopes@sapo.pt> add CodeGen support for the alloc_size attribute

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157483 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
2c585b991596859f39860b6094247ba027a03530 24-May-2012 Justin Holewinski <jholewinski@nvidia.com> Replace PTX back-end with NVPTX back-end in all places where Clang cares

NV_CONTRIB

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157403 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
c6794850a570a91c5f224b6f0293db9f560f4213 23-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> If the first argument of __builtin_object_size can be folded to a constant
pointer, but such folding encounters side-effects, ignore the side-effects
rather than performing them at runtime: CodeGen generates wrong code for
__builtin_object_size in that case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157310 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
9ee5f4641ee0d018cb6a2ce16611bfa170a5ecea 23-May-2012 Eric Christopher <echristo@apple.com> Emit C++11 enum class information if it exists.

Part of rdar://11496790

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157304 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
def18494b97f554ea0d95db75627c3e77b74307f 22-May-2012 Nuno Lopes <nunoplopes@sapo.pt> wire -fbounds-checking to the new LLVM bounds checking pass

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157262 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
GExpr.cpp
odeGenFunction.cpp
3e86a0433db4c664d29f2b19eb977138e071a68a 22-May-2012 Nuno Lopes <nunoplopes@sapo.pt> revert the usage of the objectsize intrinsic with 3 parameters (to match LLVM r157255)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157256 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
e6d11975d7182ee63ceb6a4f3ece4ee27efbba68 22-May-2012 Eric Christopher <echristo@apple.com> Revert r115805. An array type is required to have a range type,
however, the range can be unknown for the upper bound.

Testcase to follow.

Part of rdar://11457152

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157212 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
edb66f38dbdc501342aa1f17c8a15a34ed73584d 21-May-2012 Peter Collingbourne <peter@pcc.me.uk> Teach Clang about the NVPTX backend.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157173 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
4dc34ebf2a0716bf77ba110dab6777a3fc4397dd 20-May-2012 Peter Collingbourne <peter@pcc.me.uk> CUDA: add CodeGen support for global variable address spaces.
Because in CUDA types do not have associated address spaces,
globals are declared in their "native" address space, and accessed
by bitcasting the pointer to address space 0. This relies on address
space 0 being a unified address space.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157167 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
a2ac407e285290508c86baa358a0c011ce6f8958 20-May-2012 Eli Friedman <eli.friedman@gmail.com> Zap a bogus assert for delegating constructors. PR12890, part 2.

I'm pretty sure we are in fact doing the right thing here, but someone who knows the standard better should double-check that we are in fact supposed to zero out the member in the given testcase.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157138 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
37e4cea0f548fc8a4b3c46aa92c925d6ea49d071 19-May-2012 Eric Christopher <echristo@apple.com> Update API usage for llvm DIBuilder changes for rvalue reference
types and ensure we are actually creating the type.

rdar://11479676

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157095 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d9f07d45f16769cd7f8521b549c889a517492fd5 17-May-2012 Eric Christopher <echristo@apple.com> Remove unnecessary temporary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156953 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
29a93f810ae5277446f610e8b6cdf0985febb989 16-May-2012 Douglas Gregor <dgregor@apple.com> Fix code generation of variables reference expressions when mixing
blocks and lambdas, based heavily on a patch from Meador Inge. Fixes
PR12746 / <rdar://problem/11465120>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156925 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
13ec9100ca6bc03b5ce8832e4a0fcb724d47bcb1 14-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> Implement IRGen for C++11's "T{1, 2, 3}", where T is an aggregate and the
expression is treated as an lvalue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156781 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
ee409a916e9b97ed6bc2f48d8d6aac6b8b773d7b 12-May-2012 Benjamin Kramer <benny.kra@googlemail.com> Add support for __attribute__((hot)) and __attribute__((cold)).

Currently cold functions are marked with the "optsize" attribute in CodeGen
so they are always optimized for size. The hot attribute is just ignored,
LLVM doesn't have a way to express hotness at the moment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156723 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
91338cf4129cfdb85af7e9ef396ab09621da10ec 11-May-2012 Akira Hatanaka <ahatanaka@mips.com> Coerce byval aggregate arguments to integers whose size matches the integer
register size of the target architecture.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156650 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
8aeb1471ef62a4befba00721925a3717914f21d8 11-May-2012 Akira Hatanaka <ahatanaka@mips.com> Fix handling of vector return types.

A vector should be returned via the hidden pointer argument except if its size
is equal to or smaller than 16-bytes and the target ABI is N32 or N64.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156642 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
6ea175b086638cc813d7cd577ece517b0dc48547 11-May-2012 Sirish Pande <spande@codeaurora.org> Hexagon V5 intrinsics support in clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156630 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
0fbc4b97bd763850ecd72ad79b22b1ad85c5d965 09-May-2012 Roman Divacky <rdivacky@freebsd.org> Implement PPC64TargetCodeGenInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156491 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
08a9ae95ba7e0a87e667f97ccc5bac646df9a705 09-May-2012 Nuno Lopes <nunoplopes@sapo.pt> update calls to objectsize intrinsic to match LLVM r156473
add a test for -fbounds-checking code generation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156474 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
b3198a841e7f356f171f1e11faff014b2deb1eb8 09-May-2012 Nuno Lopes <nunoplopes@sapo.pt> add -fbounds-checking option.
When enabled, clang generates bounds checks for array and pointers dereferences. Work to follow in LLVM's backend.

OK'ed by Chad; thanks for the review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156431 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.cpp
odeGenFunction.h
a135f2ca67172940dd1dd9414f17b9397e4517ef 08-May-2012 Eric Christopher <echristo@apple.com> The address of a vla is actually complex and requires a dereference.

Part of rdar://11352000

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156407 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3a89bfbeedcc4ae0226d591cfdfd26615556e148 08-May-2012 Eric Christopher <echristo@apple.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156406 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d7fb96e3bfeeaae7e28666b2838b430ff8c26397 07-May-2012 Nuno Lopes <nunoplopes@sapo.pt> remove code to add bound checks for simple array accesses, since those are already covered by the check with the objectsize builtin
remove the comparison of objectsize with -1. since it's an unsigned comparison, it will always succeed if objectsize returns -1, which is enough to have the check removed

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156311 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4a7376d00df98cbfcad29ee709637707a2f3d46c 07-May-2012 Craig Topper <craig.topper@gmail.com> Convert AVX non-temporal store builtins to LLVM-native IR. This was previously done for SSE builtins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156296 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
27a00970bf4ababdc115e54383e6252cc3276dfa 05-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make BuiltinType::getName return a StringRef and introduce BuiltinType::getNameAsCString
to get a const char* if necessary.

This avoids unnecessary conversions when we want to use the result of getName as
a StringRef.

Part of rdar://10796159

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156227 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
fd00eecad6fa5400cf37269d84361a0551d0e6d3 04-May-2012 Alexey Samsonov <samsonov@google.com> This patch adds a new Clang compiler flag "-gline-tables-only".
It reduces the amount of emitted debug information:
1) DIEs in .debug_info have types DW_TAG_compile_unit, DW_TAG_subprogram,
DW_TAG_inlined_subroutine (for opt builds) and DW_TAG_lexical_block only.
2) .debug_str contains only function names.
3) No debug data for types/namespaces/variables is emitted.
4) The data in .debug_line is enough to produce valid stack traces with
function names and line numbers.

Reviewed by Eric Christopher.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156160 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDebugInfo.cpp
GDecl.cpp
odeGenFunction.cpp
odeGenModule.cpp
6c803f7f46533c69e2f8a9a882af9ae3b7fffb6f 01-May-2012 John McCall <rjmccall@apple.com> During block layout, after padding up to the max field alignment,
the alignment might actually exceed the max field alignment; don't
assert in this case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155937 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
d1c0c940ebc8e55d5c4672f61abedf87d6ea36f4 01-May-2012 Chad Rosier <mcrosier@apple.com> Spacing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155931 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
cf18ae57176a827b668e059d559ee5f1d6f8f910 01-May-2012 Ted Kremenek <kremenek@apple.com> Push variable declaration into nested scope (the only place where it is used). Found by static analyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155922 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
441c6239c6df8c759bacf6510efbfd434b647066 01-May-2012 John McCall <rjmccall@apple.com> Add support for laying out vtordisps according to our current
working knowledge of the Microsoft ABI. Based on a patch by
Dmitry Sokolov.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155905 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
20bb175cb8ae5844034828db094fb948c0e3454a 01-May-2012 John McCall <rjmccall@apple.com> Abstract the emission of global destructors into ABI-specific code
and only consider using __cxa_atexit in the Itanium logic. The
default logic is to use atexit().

Emit "guarded" initializers in Microsoft mode unconditionally.
This is definitely not correct, but it's closer to correct than
just not emitting the initializer.

Based on a patch by Timur Iskhodzhanov!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155894 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
GDeclCXX.cpp
GExpr.cpp
odeGenFunction.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
e2b45e2a43ae46bc00026b63ba7c04ef2b78c3ff 01-May-2012 John McCall <rjmccall@apple.com> Refactor the C++ ABI code a little bit to take advantage of
what I'm going to treat as basically universal properties of
array-cookie code. Implement MS array cookies on top of that.
Based on a patch by Timur Iskhodzhanov!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155886 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
odeGenModule.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
262bc18e32500558af7cb0afa205b34bd37bafed 30-Apr-2012 David Blaikie <dblaikie@gmail.com> Remove the ref/value inconsistency in filter_decl_iterator.

filter_decl_iterator had a weird mismatch where both op* and op-> returned T*
making it difficult to generalize this filtering behavior into a reusable
library of any kind.

This change errs on the side of value, making op-> return T* and op* return
T&.

(reviewed by Richard Smith)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155808 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCall.cpp
GClass.cpp
GDebugInfo.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
GRecordLayoutBuilder.cpp
odeGenModule.cpp
argetInfo.cpp
3a70cd6e1cc414856e41ce5509aa61c89bf472dc 27-Apr-2012 Alexey Samsonov <samsonov@google.com> Use enum to set debug info size generated by Clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155697 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
GClass.cpp
GDebugInfo.cpp
GExprCXX.cpp
GExprScalar.cpp
odeGenModule.cpp
c8f11e9b4b627a85aa83f74474327254d958cf8d 27-Apr-2012 Eli Friedman <eli.friedman@gmail.com> Add a missing check in CodeGen of packed classes with vtables. <rdar://problem/11324125>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155689 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
52c18b0933006acaf5c865f6e86a4694b5f288e7 26-Apr-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c IRGen. Fixes a getter synthesis bug
where getter type is super class of its property
type, resulting in an assert. // rdar://11323676


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155663 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
6ea4841da1390b4f76d066f25333f11f6d8c5f40 26-Apr-2012 John McCall <rjmccall@apple.com> Fix a bug with block layout when the block contains something
more aligned than the block header but also contains something
smaller than the block-header alignment but not exactly half
the difference between the large alignment and the header
alignment. Got that?

I'm really not sure what I was thinking with the buggy computation
here, but the fix is pretty obvious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155662 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
fa784da5b9039ead42323bfe9ae6d33ab3c5c6b3 24-Apr-2012 Shih-wei Liao <sliao@google.com> Merge with CLANG upstream r155088.

Conflicts:
lib/Basic/Targets.cpp

Change-Id: Id80f069ae25e623967b705e9fa11cfd94dd2461c
0982251be96409814c69d03193b558c7a927e1e8 24-Apr-2012 Bill Wendling <isanbard@gmail.com> Add a flag to the image info section indicating that the program is compiled for
a simulator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155436 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c9fe6056e4ce8ffad1ef439fca3318a5faf1c075 24-Apr-2012 Kostya Serebryany <kcc@google.com> enable TBAA when -fthread-sanitizer is given, even with -O0 or -relaxed-aliasing

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155430 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenTBAA.cpp
odeGenTBAA.h
87380aaf4273b2259fa75790f2f544c4514cc763 23-Apr-2012 Eric Christopher <echristo@apple.com> Forward declarations should take a context. This helps the debugger
find forward declarations in the context that the actual definition
will occur.

rdar://11291658

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155381 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
6603ff85d415c2aa72579f1a247012b75bfc2a19 23-Apr-2012 Chandler Carruth <chandlerc@gmail.com> Revert r155363, due to the underlying patches in LLVM causing regression
test suite failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155371 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
ac28eca18a9f0a343c78ba90b02dfe52302c1f19 23-Apr-2012 Sirish Pande <spande@codeaurora.org> Hexagon V5 (floating point) support in cfe.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155363 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
1664d540d1524f0faffd2f839fccb56178975c60 22-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR12571: Objects of type clang::ConstantArrayType aren't always emitted with
type llvm::ArrayType -- sometimes we emit them as packed structs. Don't assert
if such a global array has an element type with a non-trivial destructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155305 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
8560791791e7b33249feb0ffafeca427076b37b4 20-Apr-2012 Timur Iskhodzhanov <timurrrr@google.com> Fix bug 12574 - Avoid infinite recursion in constructors and destructors when using Microsoft C++ ABI

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155189 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
eb382ec1507cf2c8c12d7443d0b67c076223aec6 19-Apr-2012 Patrick Beard <pcbeard@mac.com> Implements boxed expressions for Objective-C. <rdar://problem/10194391>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155082 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjC.cpp
odeGenFunction.h
103f41d0e72a9e52a07e19cbde58c3afc8735098 18-Apr-2012 Chandler Carruth <chandlerc@gmail.com> Revert some Hexagon builtin commits to match reverts done to LLVM in
r155047. See the LLVM log for the primary motivation:
http://llvm.org/viewvc/llvm-project?rev=155047&view=rev

Primary commit r154828:
- Several issues were raised in review, and fixed in subsequent
commits.
- Follow-up commits also reverted, and which should be folded into the
original before reposting:
- r154837: Re-add the 'undef BUILTIN' thing to fix the build.
- r154928: Fix build warnings, re-add (and correct) header and
license
- r154937: Typo fix.

Please resubmit this patch with the relevant LLVM resubmission.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155048 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
26397edfea66a29ef433b62b4db6d621db438f75 17-Apr-2012 Chad Rosier <mcrosier@apple.com> Fix case where the alignment is overaligned, per Eli's suggestion.
rdar://11220251


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154893 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
7fea7c81c0970cdb150c1fadb2776dec9fd09780 17-Apr-2012 Chad Rosier <mcrosier@apple.com> Make sure EmitMoveFromReturnSlot is passing the correct alignment to
EmitFinalDestCopy (and thus pass EmitAggregateCopy the correct alignment).
rdar://11220251


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154883 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
0ff258b933fe385425bf2a85429bf46376d338f1 17-Apr-2012 Eric Christopher <echristo@apple.com> Typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154880 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
3c6ed1b5c50de8ab9375e59fd68ea2a9e5ae8c30 16-Apr-2012 Duncan Sands <baldrick@free.fr> Remove support for -fast-math metadata for the moment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154851 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
10e675d4824710426ab894336cfb659742c94d08 16-Apr-2012 Duncan Sands <baldrick@free.fr> Generate fpmath metadata when -ffast-math. Note that no optimizations are hooked
up to this yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154835 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
7ac715fd3118362f14574c312b044d22e3afeee9 16-Apr-2012 Sirish Pande <spande@codeaurora.org> Hexagon V5(Floating Point) support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154828 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
60c77079d4767133a587c1c9390f2f5fd43fba9f 16-Apr-2012 Duncan Sands <baldrick@free.fr> Adjust for LLVM name tweaks requested by Chandler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154824 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenTBAA.cpp
377ecc7996dce6803f7b7b6208cab5e197c9c5b8 16-Apr-2012 Eli Friedman <eli.friedman@gmail.com> Propagate alignment on lvalues through EmitLValueForField. PR12395.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154789 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GClass.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
2d7cb069fe101da3971a07900ff583380bcac184 15-Apr-2012 Duncan Sands <baldrick@free.fr> Use MDBuilder to help with metadata creation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154767 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenTBAA.cpp
odeGenTBAA.h
fe587201feaebc69e6d18858bea85c77926b6ecf 15-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR12226: don't generate wrong code if a braced string literal is used to
initialize an array of unsigned char. Outside C++11 mode, this bug was benign,
and just resulted in us emitting a constant which was double the required
length, padded with 0s. In C++11, it resulted in us generating an array whose
first element was something like i8 ptrtoint ([n x i8]* @str to i8).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154756 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
9bb1d34e34e3a428d8fb9a20922a1000ad42fd0c 14-Apr-2012 Duncan Sands <baldrick@free.fr> Rename "fpaccuracy" metadata to the more generic "fpmath". That's because I'm
thinking of generalizing it to be able to specify other freedoms beyond accuracy
(such as that NaN's don't have to be respected). I'd like the 3.1 release (the
first one with this metadata) to have the more generic name already rather than
having to auto-upgrade it in 3.2.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154745 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
534986f2b21e6050bf00163cd6423fd92155a6ed 14-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Add an AttributedStmt type to represent a statement with C++11 attributes
attached. Since we do not support any attributes which appertain to a statement
(yet), testing of this is necessarily quite minimal.

Patch by Alexander Kornienko!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154723 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
38baeabb253f3e04d5b54bf834dbd9f5ebdc9e5c 13-Apr-2012 John McCall <rjmccall@apple.com> Don't enter cleanups for unreachable variables. It's impossible to
jump into these scopes, and the cleanup-entering code sometimes wants
to do some operations first (e.g. a GEP), which can leave us with
unparented IR.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154684 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
c6b468e46d467eb8d0bcfdbbcc776ef9650133a0 13-Apr-2012 Benjamin Kramer <benny.kra@googlemail.com> Avoid string thrashing when we can concatenate them in the final buffer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154678 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
eaf856db5d1a272dc7188937206ef4572836f82a 13-Apr-2012 Anton Korobeynikov <asl@math.spbu.ru> Step forward with supporting of ARM homogenous aggregates:
- Handle unions
- Handle C++ classes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154664 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
odeGenFunction.h
argetInfo.cpp
51b92401c9f95023a2ef27064fd5a60fd99175f5 13-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Implement __atomic_fetch_nand and __atomic_nand_fetch to complete our set of
GNU __atomic builtins.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154659 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
7444639f2739905054ef37f3f100f4bad8810062 13-Apr-2012 John McCall <rjmccall@apple.com> Fix a trivial oversight with apple-kext static local destructors
and add a test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154653 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
2c39d71bb7cefdfe6116fa52454f3b3dc5abd517 13-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Implement the missing pieces needed to support libstdc++4.7's <atomic>:
__atomic_test_and_set, __atomic_clear, plus a pile of undocumented __GCC_*
predefined macros.

Implement library fallback for __atomic_is_lock_free and
__c11_atomic_is_lock_free, and implement __atomic_always_lock_free.

Contrary to their documentation, GCC's __atomic_fetch_add family don't
multiply the operand by sizeof(T) when operating on a pointer type.
libstdc++ relies on this quirk. Remove this handling for all but the
__c11_atomic_fetch_add and __c11_atomic_fetch_sub builtins.

Contrary to their documentation, __atomic_test_and_set and __atomic_clear
take a first argument of type 'volatile void *', not 'void *' or 'bool *',
and __atomic_is_lock_free and __atomic_always_lock_free have an argument
of type 'const volatile void *', not 'void *'.

With this change, libstdc++4.7's <atomic> passes libc++'s atomic test suite,
except for a couple of libstdc++ bugs and some cases where libc++'s test
suite tests for properties which implementations have latitude to vary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154640 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.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
GExpr.cpp
odeGenTypes.cpp
ff34d401ff385ef7173ca612432b4ea717fff690 12-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Implement support for 18 of the GNU-compatible __atomic builtins.

This is not quite sufficient for libstdc++'s <atomic>: we still need
__atomic_test_and_set and __atomic_clear, and may need a more complete
__atomic_is_lock_free implementation.

We are also missing an implementation of __atomic_always_lock_free,
__atomic_nand_fetch, and __atomic_fetch_nand, but those aren't needed
for libstdc++.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154579 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
b92bd4b3271b7892abe9fd8c74fb54a27ad702ab 12-Apr-2012 Eric Christopher <echristo@apple.com> These functions too have no prototypes. Audited the rest of Sema for
FunctionDecl::Create calls as well.

rdar://11079003

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154578 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GObjC.cpp
43443de48bd7f69bba033566abd9ca33abea6d67 12-Apr-2012 Eric Christopher <echristo@apple.com> static functions have a need for mangled name debug information too.
The mangler doesn't like non-prototyped functions so only use a mangled
name for prototyped functions.

rdar://11079003

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154570 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e5bbebb4d14347700ff0b1838f14cae3b8a35c69 12-Apr-2012 Eric Christopher <echristo@apple.com> The copy and destroy helper functions aren't prototyped, don't call them
so.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154569 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
fafbf06732746f3ceca21d452d77b144ba8652ae 11-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Provide, and document, a set of __c11_atomic_* intrinsics to implement C11's
<stdatomic.h> header.

In passing, fix LanguageExtensions to note that C11 and C++11 are no longer
"upcoming standards" but are now actually standardized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154513 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
5d70cfddc8a8a450d1425e190f10512a51352e5d 11-Apr-2012 David Chisnall <csdavec@swan.ac.uk> Make __atomic_init() (soon to be __c11_atomic_init()) work with non-scalar types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154507 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
be6c6869a993536d4cd007f04e84ef74a1c3b229 11-Apr-2012 Eric Christopher <echristo@apple.com> Enable debug info for objective c implementations that may not have
an explicit instance variable.

rdar://10590352

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154481 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
odeGenModule.cpp
c07833795aa6e569de5bb90945f5017b9969288d 10-Apr-2012 Eric Christopher <echristo@apple.com> For debug and coverage analysis if we're not optimizing go ahead
and emit a relatively empty block for a plain break statement. This
enables us to track where we went through a switch.

PR9796 & rdar://11215207

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154420 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
8250016fb9491fcfde7fce05230d66e267944484 10-Apr-2012 Duncan Sands <baldrick@free.fr> Express the number of ULPs in fpaccuracy metadata as a real rather than a
rational number, eg as 2.5 rather than 5, 2. OK'd by Peter Collingbourne.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154388 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
2b124ea9d2c27c6d002ecd4623f6321e305d907e 10-Apr-2012 Eric Christopher <echristo@apple.com> EmitStopPoint already checks if we have debug info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154384 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
fc65ec83f6719f06e460b61f83a3ba1e80c18d04 10-Apr-2012 Eric Christopher <echristo@apple.com> Tidy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154383 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
561d62280aecff3168097086425a7da0442d0de4 09-Apr-2012 David Chisnall <csdavec@swan.ac.uk> Revert r154321, pending more discussion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154327 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
649ee3fec12dcf7167630ff88087ad116e9eefa6 09-Apr-2012 David Chisnall <csdavec@swan.ac.uk> Add -fobjc-trace to emit a call before and after each Objective-C message send
for hooking in code flow visualisation applications.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154321 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
5081de5ae708bf783cc05a309f85212c0f793b99 08-Apr-2012 Chandler Carruth <chandlerc@gmail.com> Wire up -fpie and -fPIE to LLVM's newly added TargetOptions. No test
case as we don't currently have any way of dumping target options or
otherwise observing this. Another small step toward fixing PR12380. With
this we generate TLS accesses using the static model instead of the
dynamic model, but we're still generating suboptimal code under the
mistaken assumption that the TLS offset might be greater than 2^32, and
therefor not viable as an immediate offset of a segment register.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154298 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
5e219cf7f896873c1c1e64b9e87a7dade99debba 08-Apr-2012 Chandler Carruth <chandlerc@gmail.com> Teach Clang about PIE compilations. This is the first step of PR12380.

First, this patch cleans up the parsing of the PIC and PIE family of
options in the driver. The existing logic failed to claim arguments all
over the place resulting in kludges that marked the options as unused.
Instead actually walk all of the arguments and claim them properly.

We now treat -f{,no-}{pic,PIC,pie,PIE} as a single set, accepting the
last one on the commandline. Previously there were lots of ordering bugs
that could creep in due to the nature of the parsing. Let me know if
folks would like weird things such as "-fPIE -fno-pic" to turn on PIE,
but disable full PIC. This doesn't make any sense to me, but we could in
theory support it.

Options that seem to have intentional "trump" status (-static, -mkernel,
etc) continue to do so and are commented as such.

Next, a -pie-level flag is threaded into the frontend, rigged to
a language option, and handled preprocessor, setting up the appropriate
defines. We'll now have the correct defines when compiling with -fpie.

The one place outside of the preprocessor that was inspecting the PIC
level (as opposed to the relocation model, which is set and handled
separately, yay!) is in the GNU ObjC runtime. I changed it to exactly
preserve existing behavior. If folks want to change its behavior in the
face of PIE, they can do that in a separate patch.

Essentially the only functionality changed here is the preprocessor
defines and bug-fixes to the argument management.

Tests have been updated and extended to test all of this a bit more
thoroughly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154291 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
30fa3707c440222f65fcbb78ee8677462ea0d9ce 06-Apr-2012 John McCall <rjmccall@apple.com> Use atexit when __cxa_atexit isn't available instead of adding a
global destructor entry. For some reason this isn't enabled for
apple-kexts; it'd be good to have documentation for that.

Based on a patch by Nakamura Takumi!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154191 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
3f88f686e32949ffe02ccb551f482f9cf810358b 06-Apr-2012 John McCall <rjmccall@apple.com> Rename GenerateCXXGlobalDtorFunc to GenerateCXXGlobalDtorsFunc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154190 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenFunction.h
6614845b4f6724da8c6aca14ea720dbd157883a7 06-Apr-2012 David Chisnall <csdavec@swan.ac.uk> zext ivar offsets if required (GNU runtimes).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154175 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
78af8fd568f05aa872194756c96d8ba73d8c4956 06-Apr-2012 Eric Christopher <echristo@apple.com> Only emit the getter and setter names if they're not the default
synthesized ones. Reasonable debug info size reduction for objc.

rdar://11179756

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154129 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
87b9c0311f96c35109204a49d4bda909aa72b62a 05-Apr-2012 Eli Friedman <eli.friedman@gmail.com> Make the variant of __builtin_shufflevector that takes the shuffle indexes as a vector actually usable. Patch by David Neto. PR12465.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154128 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
465a8998bd5e2565ed98e1179876ef9266581f74 04-Apr-2012 Dan Gohman <gohman@apple.com> Fix an oversight: don't run ARC optimization cleanup at -O0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154052 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
9595dae5f78cd1762d8f0076887821be65f7e5a6 04-Apr-2012 David Chisnall <csdavec@swan.ac.uk> Don't crash (assert failure) when generating blocks for C++ types with a non-const copy constructor.

This was caused by the code deciding the number of fields in the byref structure using a different test to the part of the code creating the GEPs into said structure.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154013 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
beeb460aa571d23318fc0f6b8abcd868def791fa 04-Apr-2012 John McCall <rjmccall@apple.com> ErrorUnsupported on array cookies in the MS C++ ABI code;
patch by Timur Iskhodzhanov.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153990 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
74a1a1f0b6f6c4468444196a02c033be521f7d79 04-Apr-2012 Ted Kremenek <kremenek@apple.com> Silence dead store warning, and fix indentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153986 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
ea32047660159811a4c14d008a4b7e3807a705d6 03-Apr-2012 Eric Christopher <echristo@apple.com> Change location information for synthesized properties to be at the
property file/line rather than the @synthesize file/line. Avoids
some nasty confusing-ness with conflating the file from the scope
and the line from the original declaration. Use the current scope
location as a separate parameter so that we can match it up
better in the line table with the beginning of the scope.

Update a couple of testcases accordingly since I had to change
that we actually use the passed in location in EmitFunctionStart
and for the new metadata parameter and add a new testcase to
make sure we've got the right line numbers for synthesized
properties.

Part of rdar://11026482

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153917 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GObjC.cpp
50651b951c216573175e2145f32df2c4658ba3f9 30-Mar-2012 John McCall <rjmccall@apple.com> Fix a pair of invalidation bugs when emitting protocol definitions
in the fragile and non-fragile Mac ObjC runtimes. No useful test
case. Fixes rdar://problem/11072576.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153778 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
355bba72ca52c4a70ca3c3802412c03a6ec31f24 30-Mar-2012 John McCall <rjmccall@apple.com> Make sure we unique static-local decls across multiple emissions of
the function body, but do so in a way that doesn't make any assumptions
about the static local actually having a proper, unique mangling,
since apparently we don't do that correctly at all.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153776 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.h
taniumCXXABI.cpp
0f30a12ce7b3d4d86c9ca9072f587da77c8eef34 30-Mar-2012 Chandler Carruth <chandlerc@gmail.com> Revert r153723, and its follow-ups r153728 and r153733.

These patches cause us to miscompile and/or reject code with static
function-local variables in an extern-C context. Previously, we were
papering over this as long as the variables are within the same
translation unit, and had not seen any failures in the wild. We still
need a proper fix, which involves mangling static locals inside of an
extern-C block (as GCC already does), but this patch causes pretty
widespread regressions. Firefox, and many other applications no longer
build.

Lots of test cases have been posted to the list in response to this
commit, so there should be no problem reproducing the issues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153768 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
GDecl.cpp
GDeclCXX.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
49d26d2817180ccde605c987f79cd3a5b57639cd 30-Mar-2012 John McCall <rjmccall@apple.com> Do the static-locals thing properly in the face of unions and
other things which might mess with the variable's type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153733 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
GDecl.cpp
GDeclCXX.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
26945addf1660d2c54af7be57bc9adb7ccc50a24 30-Mar-2012 NAKAMURA Takumi <geek4civic@gmail.com> ItaniumCXXABI.cpp: Don't use nullptr. Clang source tree should be pre-c++11-compatible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153728 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
96579c43e777b9dea81dc56c8074b3755df00e27 30-Mar-2012 Eric Christopher <echristo@apple.com> Revert previous commit changing location information to see if this
is causing the gdb test failures on the bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153727 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GObjC.cpp
9993cc7b56b6bcb73914d707eb3afb29c2f85db8 30-Mar-2012 John McCall <rjmccall@apple.com> When emitting a static local variable in C++, handle
the case that the variable already exists. Partly this is just
protection against people making crazy declarations with custom
asm labels or extern "C" names that intentionally collide with
the manglings of such variables, but the main reason is that we
can actually emit a static local variable twice with the
requirement that it match up. There may be other cases with
(e.g.) the various nested functions, but the main exemplar is
with constructor variants, where we can be forced into
double-emitting the function body under certain circumstances
like (currently) the presence of virtual bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153723 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
taniumCXXABI.cpp
56ea377bc58a3a821da917599ed26c6b37b9727c 30-Mar-2012 John McCall <rjmccall@apple.com> Add a note about a missing optimization in the case of virtual
inheritance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153722 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
3754f9656ab6a4648e5264d891ad5fb2f94f2a1a 30-Mar-2012 Eli Friedman <eli.friedman@gmail.com> Missing piece of r153720: make sure the vtable pointer is handled correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153721 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
5fe61c6cb09a5a2d2ecddfb74f8b253d9d462165 30-Mar-2012 Eli Friedman <eli.friedman@gmail.com> ConstStructBuilder: fix offset math for base classes so it works correctly in general. Found by inspection.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153720 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
7435054a965eefb7ab29c0a8caa6698ec435b9f7 30-Mar-2012 Eric Christopher <echristo@apple.com> Change location information for synthesized properties to be at the
property file/line rather than the @synthesize file/line. Avoids
some nasty confusing-ness with conflating the file from the scope
and the line from the original declaration.

Update a couple of testcases accordingly since I had to change
that we actually use the passed in location in EmitFunctionStart.

Fixes rdar://11026482

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153714 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GObjC.cpp
84392d0edc7127f868d3c97484ffc9d789c317ff 30-Mar-2012 Bill Wendling <isanbard@gmail.com> The UTF16 string referenced by a CFString should go into the __TEXT,__ustring
section. A 'normal' string will go into the __TEXT,__const section, but this
isn't good for UTF16 strings. The __ustring section allows for coalescing, among
other niceties (such as allowing the linker to easily split up strings).

Instead of outputting the UTF16 string as a series of bytes, output it as a
series of shorts. The back-end will then nicely place the UTF16 string into the
correct section, because it's a mensch.
<rdar://problem/10655949>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153710 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8322c23956c4dea057a930753f23ff6467353e55 30-Mar-2012 Bill Wendling <isanbard@gmail.com> Fix whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153698 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
3a7d69bf666140e45ea7d75b6887d4b67eecd68e 29-Mar-2012 David Chisnall <csdavec@swan.ac.uk> Call out to GCC-compatible runtime functions for atomic ops that we can't use
LLVM intrinsics for.

I have an implementation of these functions, which wants to go in a libgcc_s
equivalent in compiler-rt. It's currently here:

http://people.freebsd.org/~theraven/atomic.c

It will be committed to compiler-rt as soon as I work out where would be a
sensible place to put it...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153666 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
649b4a1a9b5e6f768ca0cb84bd97b00f51083e15 29-Mar-2012 Chad Rosier <mcrosier@apple.com> Revert r153613 as it's causing large compile-time regressions on the nightly testers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153660 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCall.cpp
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GObjC.cpp
GStmt.cpp
GValue.h
odeGenFunction.h
ecae5965cf0c95a357e47227eeb2ec391672840d 29-Mar-2012 Eric Christopher <echristo@apple.com> Go back to using just the selector name for the getter and setter
in the property debug info. Any more isn't necessary after all.

rdar://11144023

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153659 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
16098f366097305c348b356a44638d6c959c6e60 29-Mar-2012 Eric Christopher <echristo@apple.com> Tidy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153658 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
51c0371816edadfe6275945b4e2155efb9451b3a 29-Mar-2012 Eric Christopher <echristo@apple.com> Add support for objc property decls according to the page at:

http://llvm.org/docs/SourceLevelDebugging.html#objcproperty

including type and DECL. Expand the getter and setter names
into the fully qualified names.

rdar://11144023

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153640 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
57cd1b89cd91433ce1991a5bff36fe776a263796 29-Mar-2012 John McCall <rjmccall@apple.com> When we can't prove that the target of an aggregate copy is
a complete object, the memcpy needs to use the data size of
the structure instead of its sizeof() value. Fixes PR12204.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153613 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCall.cpp
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GObjC.cpp
GStmt.cpp
GValue.h
odeGenFunction.h
a0786c91dfd920573e26c82e242143b6ec610b19 28-Mar-2012 NAKAMURA Takumi <geek4civic@gmail.com> CodeGen/CGDeclCXX.cpp: Twine-ize CreateGlobalInitOrDestructFunction().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153578 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
82fe6aea407a5a09a6131452ce622087ba83880d 28-Mar-2012 Chandler Carruth <chandlerc@gmail.com> Move the emission of strict enum range metadata behind a flag (the same
flag as GCC uses: -fstrict-enums). There is a *lot* of code making
unwarranted assumptions about the underlying type of enums, and it
doesn't seem entirely reasonable to eagerly break all of it.

Much more importantly, the current state of affairs is *very* good at
optimizing based upon this information, which causes failures that are
very distant from the actual enum. Before we push for enabling this by
default, I think we need to implement -fcatch-undefined-behavior support
for instrumenting and trapping whenever we store or load a value outside
of the range. That way we can track down the misbehaving code very
quickly.

I discussed this with Rafael, and currently the only important cases he
is aware of are the bool range-based optimizations which are staying
hard enabled. We've not seen any issue with those either, and they are
much more important for performance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153550 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
8cb4a070d491ddd671b049110cc8d0accb08b905 26-Mar-2012 Kostya Serebryany <kcc@google.com> add tbaa metadata to vtable pointer loads/stores

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153447 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenModule.cpp
odeGenModule.h
odeGenTBAA.cpp
odeGenTBAA.h
7e42392eb2ea29ddeb6d125417fb4c17d847b5e0 24-Mar-2012 Benjamin Kramer <benny.kra@googlemail.com> Simplify some users of DenseMap::erase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153389 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
odeGenModule.cpp
c3f8955d7da1019dbe16b0bdf3e49d2e08d988e9 24-Mar-2012 Rafael Espindola <rafael.espindola@gmail.com> Add back r153360 with a fix for enums that cover all the 32 bit values.
Thanks to NAKAMURA Takumi for finding it!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153383 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
88a569a9781e0472a1f1c392f6c94ed0c068d946 24-Mar-2012 NAKAMURA Takumi <geek4civic@gmail.com> Revert r153360 (and r153380), "Second part of PR12251. Produce the range metadata in clang for booleans and".

For i686 targets (eg. cygwin), I saw "Range must not be empty!" in verifier.

It produces (i32)[0x80000000:0x80000000) from (uint64_t)[0xFFFFFFFF80000000ULL:0x0000000080000000ULL), for signed i32 on MDNode::Range.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153382 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
d316862f4fb281ec08a2e45cd3e5580574adb889 24-Mar-2012 Shih-wei Liao <sliao@google.com> Merge branch 'upstream' into sliao_d
e27af29401da15cc2e9a92825cb24adb1aef7091 24-Mar-2012 Rafael Espindola <rafael.espindola@gmail.com> Second part of PR12251. Produce the range metadata in clang for booleans and
c++ enums.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153360 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
e78ec3e8f7324e36ac9cf2268d5fe32997762940 24-Mar-2012 Kostya Serebryany <kcc@google.com> use EP_OptimizerLast instead of EP_ScalarOptimizerLate for ThreadSanitizer

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153356 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
acb5310542b82e7acf5f5a91fa619e4b7efeff5c 23-Mar-2012 Bill Wendling <isanbard@gmail.com> When an MMX output variable is tied to the input variable, we have to implicitly
cast the value to x86_mmx. This gives the ASM string the correct call signature.
<rdar://problem/10919182>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153290 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
e5a8aeb4ad762b9383f9e9544c619dc386951e18 22-Mar-2012 Eli Friedman <eli.friedman@gmail.com> Make sure we correctly set the alignment for vector loads and stores associated with vector element lvalues. Patch by Kevin Schoedel (with some minor modifications by me).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153285 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
451b4414543d23f6281f888f8f79b6e5b3684833 21-Mar-2012 Eric Christopher <echristo@apple.com> Update comment.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153120 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
6181e56a44ecc31dfca8baea2ae8738957003496 20-Mar-2012 Benjamin Kramer <benny.kra@googlemail.com> Debug info: Tighten up uses of plain MDNode pointers which don't survive replaceOperandWith.

TrackingVH notices when it gets RAUW'd. Fixes PR12305 and PR12315.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153115 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
acd76fe8e1b1b3fd83dac66848041629a8b06e8a 20-Mar-2012 David Chisnall <csdavec@swan.ac.uk> Add missing bitcast that was breaking Objective-C++ exception typeinfo (GNUstep runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153090 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
c9b47f9ba822e69349dffe2b7c1c694a57e279fa 16-Mar-2012 Benjamin Kramer <benny.kra@googlemail.com> Escape % in diagnostic message when compiling LLVM IR.

% is a common character in IR so we'd crash on almost any malformed IR. The
diagnostic formatter expects a formatting directive when it sees an unescaped %.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152956 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenAction.cpp
08212631e15a17157368af03180018601b31fb4d 16-Mar-2012 Bill Wendling <isanbard@gmail.com> When "low alignment" is specified, then set the alignment of the aggregate's
store to 1. This allows code-gen to select a more appropriate alignment. If left
to zero, an alignment greater than the alignment of the pointer may be selected,
causing code-gen to use instructions which require an alignment greater than the
pointer guarantees.
<rdar://problem/11043589>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152951 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ff993202abf6f5dc41c584c7103f5d39f248b3dd 16-Mar-2012 Eli Friedman <eli.friedman@gmail.com> Don't try to create "store atomic" instructions of non-integer types; they aren't supported at the moment. PR12040.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152891 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
a43ef3e0511dc48d98d61598163c9deddc09cb9c 16-Mar-2012 Eli Friedman <eli.friedman@gmail.com> When a variable has a specified asm name, but isn't using the register storage class, the asm name doesn't specify a register. PR12244.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152873 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
bd86ad5c1a4ce7cd05f0370921b31a2eabf19f8f 15-Mar-2012 James Molloy <james.molloy@arm.com> Fix codegen for vld{3,4}_dup intrinsics.

Patch by Silviu Baranga!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152788 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
8fbe3855db0c341964bb550e13659505efe06c43 15-Mar-2012 Chad Rosier <mcrosier@apple.com> [frontend] Add support for disabling the "inline" keyword using
-fno-inline-functions.

This behaves much like -fno-inline in gcc, but based on a discussion with
Daniel it was decided that -fno-inline-functions should subsume -fno-inline.
Please speak up if you object. The -fno-inline flag remains ignored.
Final part of rdar://10972766



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152754 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
167174518cc9bdd84b27bfad581028f4092cd68c 14-Mar-2012 Eric Christopher <echristo@apple.com> Add support to mangle templated member function names with template
args.

Fixes rdar://11042577

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152691 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3b10cfe6b804cef041ddf85854d2d536f7a82cb6 14-Mar-2012 Eric Christopher <echristo@apple.com> When adding member functions to a class add any specializations of
function templates as well.

A future commit will mangle the added name with the template args
like classes are mangled.

Fixes rdar://10986010

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152683 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a5f4441de7890953460d95f4e88b9fa432b48dc2 13-Mar-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [Sema] Prefer to use ObjCInterfaceDecl's protocol_begin()/protocol_end() iterators instead of
ObjCInterfaceDecl::getReferencedProtocols(), because the iterators are safe to use
even if the caller did not check that the interface is a definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152597 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.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
GBlocks.cpp
GCall.cpp
GClass.cpp
GDebugInfo.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GRTTI.cpp
GRecordLayoutBuilder.cpp
GStmt.cpp
GVTables.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
taniumCXXABI.cpp
oduleBuilder.cpp
argetInfo.cpp
7c02cfeb0861278c09ba05d1b92bd2a996bbe2e0 11-Mar-2012 Stepan Dyatkovskiy <stpworld@narod.ru> llvm::SwitchInst
Renamed methods caseBegin, caseEnd and caseDefault with case_begin, case_end, and case_default.
Added some notes relative to case iterators.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152533 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
4e494cf56325f26a6c3eb5a065c35e54835f14e6 10-Mar-2012 Benjamin Kramer <benny.kra@googlemail.com> Simplify code. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152503 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
f4b88a45902af1802a1cb42ba48b1c474474f228 10-Mar-2012 John McCall <rjmccall@apple.com> Remove BlockDeclRefExpr and introduce a bit on DeclRefExpr to
track whether the referenced declaration comes from an enclosing
local context. I'm amenable to suggestions about the exact meaning
of this bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152491 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
odeGenFunction.h
dd2ecee313b558a9b621ec003b45e0fbc83508d7 10-Mar-2012 John McCall <rjmccall@apple.com> Unify the BlockDeclRefExpr and DeclRefExpr paths so that
we correctly emit loads of BlockDeclRefExprs even when they
don't qualify as ODR-uses. I think I'm adequately convinced
that BlockDeclRefExpr can die.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152479 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
edfac0302490d84419eb958c812c533b8df29785 10-Mar-2012 Daniel Dunbar <daniel@zuster.org> IRgen/ABI/x86_64: Avoid passing small structs using byval sometimes.

- We do this when it is easy to determine that the backend will pass them on
the stack properly by itself.

Currently LLVM codegen is really bad in some cases with byval, for example, on
the test case here (which is derived from Sema code, which likes to pass
SourceLocations around)::

struct s47 { unsigned a; };
void f47(int,int,int,int,int,int,struct s47);
void test47(int a, struct s47 b) { f47(a, a, a, a, a, a, b); }

we used to emit code like this::

...
movl %esi, -8(%rbp)
movl -8(%rbp), %ecx
movl %ecx, (%rsp)
...

to handle moving the struct onto the stack, which is just appalling.

Now we generate::

movl %esi, (%rsp)

which seems better, no?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152462 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
71cba34b6e2d3fb81860bd2176ab7003eaf2e918 09-Mar-2012 Eli Friedman <eli.friedman@gmail.com> Make sure we update the static local decl address map when we are forced to rebuild a global because of the initializer. <rdar://problem/10957867>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152372 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.h
8b42ab718d89ce458145118ec2071edd28b66a9a 09-Mar-2012 Eli Friedman <eli.friedman@gmail.com> Make sure constant emission handles initializer lists with strings correctly. Part of <rdar://problem/10957867>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152370 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
3d13c5a1e72ed8f8be9c083791d30643d1b1ec43 09-Mar-2012 Daniel Dunbar <daniel@zuster.org> [AST] Reduce Decl::getASTContext() calls.
- This function is not at all free; pass it around along some hot paths instead
of recomputing it deep inside various VarDecl methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152363 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
025039377d7247620750205dbd61ca1ba336f7e0 08-Mar-2012 Rafael Espindola <rafael.espindola@gmail.com> Replace MarkVarRequired with a more generic
HandleCXXStaticMemberVarInstantiation. Suggested by Argyrios.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152320 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenAction.cpp
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
aae1d8bd6f2482e0bf13a29d5b0cb7639080974d 08-Mar-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Taken into account Duncan's comments for r149481 dated by 2nd Feb 2012:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120130/136146.html

Implemented CaseIterator and it solves almost all described issues: we don't need to mix operand/case/successor indexing anymore. Base iterator class is implemented as a template since it may be initialized either from "const SwitchInst*" or from "SwitchInst*".

ConstCaseIt is just a read-only iterator.
CaseIt is read-write iterator; it allows to change case successor and case value.

Usage of iterator allows totally remove resolveXXXX methods. All indexing convertions done automatically inside the iterator's getters.

Main way of iterator usage looks like this:
SwitchInst *SI = ... // intialize it somehow

for (SwitchInst::CaseIt i = SI->caseBegin(), e = SI->caseEnd(); i != e; ++i) {
BasicBlock *BB = i.getCaseSuccessor();
ConstantInt *V = i.getCaseValue();
// Do something.
}

If you want to convert case number to TerminatorInst successor index, just use getSuccessorIndex iterator's method.
If you want initialize iterator from TerminatorInst successor index, use CaseIt::fromSuccessorIndex(...) method.

There are also related changes in llvm-clients: klee and clang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152298 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
9fcce65e7e1307b5b8da9be13e4092d6bb94dc1d 07-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> AST representation for user-defined literals, plus just enough of semantic
analysis to make the AST representation testable. They are represented by a
new UserDefinedLiteral AST node, which is a sugared CallExpr. All semantic
properties, including full CodeGen support, are achieved for free by this
representation.

UserDefinedLiterals can never be dependent, so no custom instantiation
behavior is required. They are mangled as if they were direct calls to the
underlying literal operator. This matches g++'s apparent behavior (but not its
actual mangling, which is broken for literal-operator-ids).

User-defined *string* literals are now fully-operational, but the semantic
analysis is quite hacky and needs more work. No other forms of user-defined
literal are created yet, but the AST support for them is present.

This patch committed after midnight because we had already hit the quota for
new kinds of literal yesterday.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152211 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
946e2726f91c17574d248f9c4b3eeea41e892a22 07-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> Don't even try to directly emit the value of a DeclRefExpr if that declaration
is not usable in a constant expression. ~2.5% speedup on 403.gcc / combine.c.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152193 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
ebcb57a8d298862c65043e88b2429591ab3c58d3 06-Mar-2012 Ted Kremenek <kremenek@apple.com> Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,
NSNumber, and boolean literals. This includes both Sema and Codegen support.
Included is also support for new Objective-C container subscripting.

My apologies for the large patch. It was very difficult to break apart.
The patch introduces changes to the driver as well to cause clang to link
in additional runtime support when needed to support the new language features.

Docs are forthcoming to document the implementation and behavior of these features.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152137 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
91932089c31e1233f0c478b03412e90a65e07ad2 05-Mar-2012 Stephen Hines <srhines@google.com> Merge branch 'upstream' into merge-20120305

Conflicts:
lib/Basic/Targets.cpp

Change-Id: Ib76c138030a701355ce39a6eda1a89a79f401667
234fe654a3dd2888be42ae5db34db96c5c2c4ba3 05-Mar-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix a small difference in sema and codegen views of what needs to be output.

In the included testcase, soma thinks that we already have a definition after we
see the out of line decl. Codegen puts it in a deferred list, to be output if
a use is seen. This would break when we saw an explicit template instantiation
definition, since codegen would not be notified.

This patch adds a method to the consumer interface so that soma can notify
codegen that this decl is now required.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152024 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenAction.cpp
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
77889c43b73a99aae82e7ede01baa08a60b6976b 04-Mar-2012 Chandler Carruth <chandlerc@gmail.com> Silence a GCC warning about a set-but-not-used variable in release builds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152005 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
d6e73569ccf09369f9bd2021d53c88e7bded06e3 04-Mar-2012 Chris Lattner <sabre@nondot.org> add a testcase for PR12094 and fix a crash on pointer to incomplete type,
reported by Richard Smith.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151993 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
a3ca41f0c2bd1c4a752df88b283332f3b757d21e 03-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> Reinstate r151879, r151880, reverted in r151922, along with a bugfix for
scalar emission of DeclRefExprs to const bools: emit scalar bools as i1,
not as i8.

In addition to the extra unit testing, this has successfully bootstrapped.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151955 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GExprScalar.cpp
odeGenModule.cpp
odeGenModule.h
f4c3db175101cbf94dad59419c3ed7aed51bf606 02-Mar-2012 Jay Foad <jay.foad@gmail.com> PR12094: Set the alignment of memory intrinsic instructions based on the
types of the pointer arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151927 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
c169e08f3ad678df4ffb87cbbe5096208f6bf40a 02-Mar-2012 Daniel Dunbar <daniel@zuster.org> Revert r151879, r151880, "PR12145: Avoid emitting loads of constexpr variables in contexts where there" and "Fix buildbot: make this test less dependent on the value names in the produced IR."

They broke bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151922 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
a3cac5b76a5243d8fca812d3a276950b0cfc56b6 02-Mar-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR12145: Avoid emitting loads of constexpr variables in contexts where there
is no odr-use of the variable. Go slightly beyond what the standard requires
for variables of reference type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151879 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
8c72a7db34a63c38c6065b73fda4aeb0fe19eb65 01-Mar-2012 Eli Friedman <eli.friedman@gmail.com> Make CodeGenFunction::EmitBlockCopyAndAutorelease actually do what its name says.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151853 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
3c93122d31924d6d4a6265f36a0c98a164002da6 01-Mar-2012 Kostya Serebryany <kcc@google.com> Add a flag -fthread-sanitizer.
This flag enables ThreadSanitizer instrumentation committed to llvm as r150423.
The patch includes one test for -fthread-sanitizer and one similar test for -faddress-sanitizer.
This patch does not modify the linker flags (as we do it for -faddress-sanitizer) because the run-time library is not yet
committed and it's structure in compiler-rt is not 100% clear.
The users manual wil be changed in a separate commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151846 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
ad8de5142a592db1d947e4883b64f63936d5d682 01-Mar-2012 Eric Christopher <echristo@apple.com> Reapply r151702 with a small fix for a failure to cut and paste
correctly.

Still rdar://10900684

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151838 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
23f0267e2d56c0407f12e62df3561ecf75d74e6e 01-Mar-2012 Eli Friedman <eli.friedman@gmail.com> Implement "optimization" for lambda-to-block conversion which inlines the generated block literal for lambdas which are immediately converted to block pointer type. This simplifies the AST, avoids an unnecessary copy of the lambda and makes it much easier to avoid copying the result onto the heap.

Note that this transformation has a substantial semantic effect outside of ARC: it gives the converted lambda lifetime semantics similar to a block literal. With ARC, the effect is much less obvious because the lifetime of blocks is already managed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151797 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GClass.cpp
odeGenFunction.cpp
odeGenFunction.h
3f3335dbc30fbcd71b295d248cd3d5f6d94ce3fb 29-Feb-2012 Chad Rosier <mcrosier@apple.com> Allocate TargetLibraryInfo for the CodeGen passes. Otherwise, it's instantiated
by the BAA pass, which uses the default TargetLibraryInfo constructor.
Unfortunately, the default TargetLibraryInfo constructor assumes all library
calls are available and thus ignores -fno-builtin.
rdar://10947759


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151745 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
956ecbd2c8d3558230300754d5abf72e9eb9afc1 29-Feb-2012 Daniel Dunbar <daniel@zuster.org> Revert r151702, "Add support for handling captured variables in lambda debug
info.", which broke some -O0 -g tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151730 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0a0714ddd3a5bd1a8147735ae7fe20b8c4b656fa 29-Feb-2012 Eric Christopher <echristo@apple.com> Add support for handling captured variables in lambda debug info.
This currently doesn't handle capturing the 'this' pointer for any
enclosing class.

Steal the lambda-expressions.cpp testcase and debugify it and try
to use more variables to proof it against random changes.

Part of rdar://10900684

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151702 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
c07b18ed2b207b17cf8d770966e5c1e52d46f4ec 29-Feb-2012 Eric Christopher <echristo@apple.com> Formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151700 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
c60ccf5b4fb657ca40da3019c2bbe15dd8ab9732 29-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Make sure list-initialization of arrays works correctly in explicit type conversions. PR12121.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151674 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
c5685438df6105052b02c9e02f01c34489606308 28-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Prefer bitcast+GEP over ptrtoint+sub+inttoptr: it's semantically equivalent here, and generally nicer to the optimizer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151659 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
85fdea03687e45dfde025867fe98ea24ac74c501 28-Feb-2012 Daniel Dunbar <daniel@zuster.org> Remove stray semi-colons.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151631 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
cae40c4d448529fe65de3d87bdbe97d3b54b4d98 28-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Implement IRGen for the retain-autorelease in the lambda conversion-to-block-pointer outside of ARC. Testcases coming up soon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151603 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjC.cpp
odeGenFunction.h
062a82cdfab01d95f7fa3d759342e6f2ee5c51b0 28-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Hack in a loud error for PR12086. Better than a silent miscompile.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151586 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
fce4715bc343bf788c3767e16f1492b96ef73b8e 27-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Add missing code for compound literals of complex type. <rdar://problem/10938628>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151549 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
af3db7d9e4a702d8f072ae97f793be42177e898b 27-Feb-2012 Eric Christopher <echristo@apple.com> ObjcInterfaceTypes are also complete types for the type cache.

Fixes rdar://10934887

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151519 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9a561d539158a30b68fc258b81a994f3fac10212 26-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Ensure that we delete destructors in the right cases. Specifically:
- variant members with nontrivial destructors make the containing class's
destructor deleted
- check for a virtual destructor after checking for overridden methods in the
base class(es)
- check for an inaccessible operator delete for a class with a virtual
destructor.

Do not try to call an anonymous union field's destructor from the destructor of
the containing class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151483 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
19b1a6eb2c90fab7cefe74bea5b6de490b65ac9d 25-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> CodeGen support for global variables of type std::initializer_list<X>.

This emits a backing array with internal linkage and fills it with data,
then has the initializer_list point at the array. Dynamic initialization
and global destructors are correctly supported.

What doesn't work is nested initializer_lists. I have no idea how to
get them to work, either. However, these should be very rare, and so
I'll just call it a known bug and declare generalized initializers
DONE!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151457 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
odeGenModule.cpp
odeGenModule.h
babcf9d04f4ed9d7ac96812e42c9e8fc0f1ae2c2 25-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Fix crashers on unexpected std::initializer_list layouts. Found by inspection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151456 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
9875962295022661213153127eae961250fefd55 25-Feb-2012 Chad Rosier <mcrosier@apple.com> Prevent llvm.lifetime intrinsics from being emitted at -O0.
rdar://10921594



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151430 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
64bee65a3436e3f0c352fcfe2130676f3502cffe 25-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Work-in-progress for lambda conversion-to-block operator. Still need to implement the retain+autorelease outside of ARC, and there's a bug that causes the generated code to crash in ARC (which I think is unrelated to my code, although I'm not completely sure).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151428 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GClass.cpp
odeGenFunction.cpp
odeGenFunction.h
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
odeGenTypes.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
odeGenTypes.cpp
5a13d4d2c1e45ab611ca857d923caacfaeb3cd07 25-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Fix a stupid mistake in r151133. Reported to me by Joerg Sonnenberger.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151407 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.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
odeGenTypes.cpp
577fb5b2c15f7c187983a53e53f4f53b5d7aabb1 24-Feb-2012 Chad Rosier <mcrosier@apple.com> Reapply r151172 - Unwind path cleanup for array new list initializers - with a
test case that only runs on debug builds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151311 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
887ddf39b365320fdf8dde923287bf52bb3c6a38 23-Feb-2012 Douglas Gregor <dgregor@apple.com> Replace a use of hasTrivialDefaultConstructor() with the appropriate
isTrivial() call.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151259 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
c22adbd40ac2fc445e41fb664777179aa5c522e3 23-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR12067: When emitting an evaluated constant structure in C++11 mode, don't
forget the vptrs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151245 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
5c89c399ba0a171e3312a74e008d61d174d961f3 23-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Try to handle qualifiers more consistently for array InitListExprs. Fixes <rdar://problem/10907510>, and makes the ASTs a bit more self-consistent.

(I've chosen to keep the qualifiers, but it isn't a strong preference; if anyone prefers removing them, please yell.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151229 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
b45cfead07d9f0143970d24f5c8a0c4f232b8163 23-Feb-2012 Eric Christopher <echristo@apple.com> Add a quick TODO.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151217 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
fdc5d565b30bd2009ec98aac4b5846a740aff767 23-Feb-2012 Eric Christopher <echristo@apple.com> Fold debug scope emission into the cleanup scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151216 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
4d8b79786bf1426ed7031274433279737a6917fe 22-Feb-2012 Chad Rosier <mcrosier@apple.com> Revert r151172: Unwind path cleanup for array new list initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151203 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
0f5a1930ccf169f9a2885bff18e3169af4aff2a4 22-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Unwind path cleanup for array new list initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151172 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
9203647221439c6eb04842bb8a22f5f03fd4d2bf 22-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> CodeGen for array new list initializers. Doesn't correctly clean up in the face of exceptions yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151171 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
795b10062c2eaffae9e04241fb1a73cdbcb24a37 22-Feb-2012 Bill Wendling <isanbard@gmail.com> Use an ArrayRef when we can instead of passing in a SmallVectorImpl reference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151150 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.h
b1e3f324b0c4d17399609c246918dadcb886d739 22-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Make sure null initialization in arrays works correctly with ARC types. <rdar://problem/10907547>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151133 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
ac1303eca6cbe3e623fb5ec6fe7ec184ef4b0dfa 22-Feb-2012 Douglas Gregor <dgregor@apple.com> Generate an AST for the conversion from a lambda closure type to a
block pointer that returns a block literal which captures (by copy)
the lambda closure itself. Some aspects of the block literal are left
unspecified, namely the capture variable (which doesn't actually
exist) and the body (which will be filled in by IRgen because it can't
be written as an AST).

Because we're switching to this model, this patch also eliminates
tracking the copy-initialization expression for the block capture of
the conversion function, since that information is now embedded in the
synthesized block literal. -1 side tables FTW.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151131 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
6c60c8d7466b3191602dbb8e4a81f4ee7d9a09a6 22-Feb-2012 Aaron Ballman <aaron@aaronballman.com> Adding support for Microsoft's thiscall calling convention. Clang side of the patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151122 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
ef7844666b36226521e459d18f2834dacaa039e3 21-Feb-2012 Nick Lewycky <nicholas@mxc.ca> Emit the exact size for the invariant intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151010 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
e86b9eaccdbdba1ec798064840913f3e6d8703b8 21-Feb-2012 Eric Christopher <echristo@apple.com> Formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150996 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
cd285d061546b701431b4214e068e024245a96f5 20-Feb-2012 Fariborz Jahanian <fjahanian@apple.com> objc IRGen: force CSE of load of ivar offsets by setting
the 'invariant.load' metadata tag onto those loads.
// rdar://10840980


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150994 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
86211df4d28f6fb3c48ab09f02a011e8570d8b1c 20-Feb-2012 Eric Christopher <echristo@apple.com> Remove the type retaining from the clang frontend. This is now
handled by the caching and rauw. Also fix one cache that wasn't
being added to highlighted by this patch. Update all testcases
accordingly.

This should fix the deall failure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150977 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
917bc8d55e9c172b5985a7cc57ccf02d8439464f 20-Feb-2012 Eric Christopher <echristo@apple.com> Make forward declarations for objective-c types use the new
temporary forward declaration nodes. Fixes a problem building
Chrome.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150976 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
345032a7211a6f983d59c30c0b3fa2b96819532a 20-Feb-2012 Chandler Carruth <chandlerc@gmail.com> Add 3dNOW intrinsic header to x86intrin.h, conditioned on __3dNOW__ to
match the behavior of GCC. Also add a test for these intrinsics, which
apparently have *zero* tests. =[ Not surprisingly, Clang crashed when
compiling these.

Fix the bug in CodeGen where we failed to bitcast the argument type to
x86mmx prior to calling the LLVM intrinsic. This fixes an assert on the
new 3dnow-builtins.c test.

This is one issue impacting the efforts to get Clang to emulate the
Microsoft intrinsics headers -- 3dnow intrinsics are implictitly made
available there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150948 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
972edf0534d8a50f87fac1d0ff34eb22f593df11 19-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Make heap-allocation of std::initializer_list 'work'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150931 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDecl.cpp
GExprAgg.cpp
GExprCXX.cpp
odeGenFunction.h
924db71fc8f6076c532c8c2ae93acc7f477452c8 19-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Make std::initializer_list member initializers 'work'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150930 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
24fe798fffc1748d8bce1321af42981c3719cb85 19-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Refuse to compile global std::initializer_lists instead of doing completely the wrong thing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150928 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
af130fd78267ee9e2395b758a7d827b07ce317a0 19-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Get recursive initializer lists to work and add a test. Codegen of std::initializer_list is now complete. Onward to array new.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150926 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenFunction.h
e8e92b9dccc362be33a7f9bb84a114b18db65b10 19-Feb-2012 Ahmed Charles <ace2001ac@gmail.com> Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150919 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
dfb80ded6767f7b79a0f1fa4f6921d543ff0a643 18-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix wrong-code bug: __imag on a scalar lvalue should produce a zero rvalue,
rather than an lvalue referring to the scalar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150889 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
7acebfb71f16a8bb15add402ab915d23c64d912f 18-Feb-2012 Chad Rosier <mcrosier@apple.com> Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150859 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
7ff0c5d30d365ba5d4f08e1d2fcea0370b21699b 18-Feb-2012 Eric Christopher <echristo@apple.com> Add in a caching mechanism so that forward declarations are replaced
with full types if they exist.

rdar://10809898 and rdar://10209967 and rdar://10400981

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150858 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
1486d2c5d73302bdfdb1cece09d95958052c9cdb 18-Feb-2012 Eric Christopher <echristo@apple.com> Formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150857 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
51b2f6bae6847ccf4c48960c925316dccfb10190 18-Feb-2012 Eric Christopher <echristo@apple.com> Remove UpdateCompletedType from the debug info emission. We now
emit less than complete types on purpose on occasion and so
our caches aren't useful for this kind of lazy emitting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150856 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
odeGenModule.cpp
6e94f6c0f124c9a88b3dae0eea5e6b27957df183 18-Feb-2012 Chad Rosier <mcrosier@apple.com> Remove redundant check.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150855 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
00a8c3f6c979a11b15b2a4a4ce08c7888634d6cd 17-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Don't emit optimization-specific intrinsic at -O0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150838 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
32cf1f27ae8620e7b79bb4e81a067187c0aab7ae 17-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Basic code generation support for std::initializer_list.

We now generate temporary arrays to back std::initializer_list objects
initialized with braces. The initializer_list is then made to point at
the array. We support both ptr+size and start+end forms, although
the latter is untested.

Array lifetime is correct for temporary std::initializer_lists (e.g.
call arguments) and local variables. It is untested for new expressions
and member initializers.

Things left to do:
Massively increase the amount of testing. I need to write tests for
start+end init lists, temporary objects created as a side effect of
initializing init list objects, new expressions, member initialization,
creation of temporary objects (e.g. std::vector) for initializer lists,
and probably more.
Get lifetime "right" for member initializers and new expressions. Not
that either are very useful.
Implement list-initialization of array new expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150803 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprAgg.cpp
odeGenFunction.h
abb943284cabd9131586c2758a4f02baba668ace 17-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> The clang half of r150794: after the construction of a global or static const
variable ends, if the variable has a trivial destructor and no mutable
subobjects then emit an llvm.invariant.start call for it. globalopt knows to
make the variable const when evaluating this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150798 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
1e009d594325390eda1e3c89e4930b30d8b828dc 17-Feb-2012 Eric Christopher <echristo@apple.com> Index "12" holds the vtable, not "9".

Fixes lots of gdb testsuite failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150797 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a9b21d22bb9337649723a8477b5cb15f83451e7d 17-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Bug fix: do not emit static const local variables with mutable members
as constants.

Refactor and simplify all the separate checks for whether a type can be
emitted as a constant.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150793 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
odeGenModule.h
e15c71236252c21a77c8a406246053e1cbb63ffa 17-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> When performing IRGen on a global, emit it as a constant if:
1) It has a const-qualified type, and
2) It has no mutable members, and
3) It has no dynamic initialization, and
4) It has trivial destruction.
Remove the unnecessary requirement that the type be POD. This allows us to
mark all constexpr objects with no mutable members as 'constant'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150792 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.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
GBlocks.cpp
GCXX.cpp
GCXXABI.cpp
GCall.cpp
GCall.h
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GExpr.cpp
GExprCXX.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GObjCRuntime.h
GVTables.cpp
odeGenModule.cpp
odeGenTypes.cpp
odeGenTypes.h
taniumCXXABI.cpp
argetInfo.cpp
argetInfo.h
27dd7d962bbf774988bc5e59d04a7743ed503514 17-Feb-2012 Douglas Gregor <dgregor@apple.com> Rework the Sema/AST/IRgen dance for the lambda closure type's
conversion to function pointer. Rather than having IRgen synthesize
the body of this function, we instead introduce a static member
function "__invoke" with the same signature as the lambda's
operator() in the AST. Sema then generates a body for the conversion
to function pointer which simply returns the address of __invoke. This
approach makes it easier to evaluate a call to the conversion function
as a constant, makes the linkage of the __invoke function follow the
normal rules for member functions, and may make life easier down the
road if we ever want to constexpr'ify some of lambdas.

Note that IR generation is responsible for filling in the body of
__invoke (Sema just adds a dummy body), because the body can't
generally be expressed in C++.

Eli, please review!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150783 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.cpp
odeGenFunction.h
9965deaad40b08203e4cfacf9253fbe494dce81f 16-Feb-2012 Eric Christopher <echristo@apple.com> Reapply r150631:

"Add a completed/incomplete type difference. This allows us to have
partial types for contexts and forward decls while allowing us to
complete types later on for debug purposes.

This piggy-backs on the metadata replacement and rauw changes
for temporary nodes and takes advantage of the incremental
support I added in earlier. This allows us to, if we decide,
to limit adding methods and variables to structures in order
to limit the amount of debug information output into a .o file.

The caching is a bit complicated though so any thoughts on
untangling that are welcome."

with a fix:

- Remove all RAUW during type construction by adding stub versions
of types that we later complete.

and some TODOs:

- Add an RAUW cache for forward declared types so that we can replace
them at the end of compilation.
- Remove the code that updates on completed types because we no
longer need to have that happen. We emit incomplete types on
purpose and only want to know when we want to complete them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150752 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
22cfaf512e4f66105fb1f8dd39e0a77787fbdf9b 16-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Elide copy construction in new expressions. PR11757.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150738 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
2aed8b88613863f3c439cdfb205bdf8b608fb205 16-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Revert "Revert "Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself.""

This reintroduces commit r150682 with a fix for the Bullet benchmark crash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150685 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
1548d14f4092a817f7d90ad3e7a65266dc85fbc5 16-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Revert "Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself."
It leads to a compiler crash in the Bullet benchmark.

This reverts commit r12014.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150684 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
5f688f4b15d02aa7ad159c46b1f78fe59d412f12 16-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Make CXXNewExpr contain only a single initialier, and not hold the used constructor itself.

Holding the constructor directly makes no sense when list-initialized arrays come into play. The constructor is now held in a CXXConstructExpr, if construction is what is done. The new design can also distinguish properly between list-initialization and direct-initialization, as well as implicit default-initialization constructors and explicit value-initialization constructors. Finally, doing it this way removes redundance from the AST because CXXNewExpr doesn't try to handle both the allocation and the initialization responsibilities.

This breaks the static analysis of new expressions. I've filed PR12014 to track this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150682 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
21f6ed94b929beea31622f5e6b3890e51293cfad 16-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Initial implementation of IRGen for the lambda conversion-to-function-pointer operator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150660 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
bd89f8c2caa9550e41daa1aa9bf30f0f1e0dfaf7 16-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Start of IRGen for lambda conversion operators.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150649 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.cpp
odeGenFunction.h
3973accabc855b81b55bcc1945a98b2adb2ce72a 16-Feb-2012 Bill Wendling <isanbard@gmail.com> Use the new method for specifying garbage collection metadata in the module.

The garbage collection metadata needs to be merged "intelligently", when two or
more modules are linked together, and not merely appended. (Appending creates a
section which is too large.) The module flags metadata method is the way to do
this.
<rdar://problem/8198537>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150648 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b49bd27b334a6c4e3bf9d810a7d5b022578f1194 16-Feb-2012 Dan Gohman <gohman@apple.com> Teach clang to add metadata tags to calls and invokes in ObjC with
-fno-objc-arc-exceptions. This will allow the optimizer to perform
optimizations which are only safe under that flag.

This is a part of rdar://10803830.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150644 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
ba83c95b9f8e6bd65405ebff815416fd06b3d4f8 16-Feb-2012 Fariborz Jahanian <fjahanian@apple.com> objc-arc: For arc's ivar layout, treat __unsafe_unretained ivars
as unscanned. // rdar://10832643


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150639 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
64a043045874c9a054f9dfb8d37daf6e5e8d054c 16-Feb-2012 Eric Christopher <echristo@apple.com> Revert "Add a completed/incomplete type difference. This allows us to have"

This reverts commit 9a68d4584afcd0853b930bd80235b58736e785b4.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150637 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
9a68d4584afcd0853b930bd80235b58736e785b4 16-Feb-2012 Eric Christopher <echristo@apple.com> Add a completed/incomplete type difference. This allows us to have
partial types for contexts and forward decls while allowing us to
complete types later on for debug purposes.

This piggy-backs on the metadata replacement and rauw changes
for temporary nodes and takes advantage of the incremental
support I added in earlier. This allows us to, if we decide,
to limit adding methods and variables to structures in order
to limit the amount of debug information output into a .o file.

The caching is a bit complicated though so any thoughts on
untangling that are welcome.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150631 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
4d4e5c1ae83f4510caa486b3ad19de13048f9f04 15-Feb-2012 John McCall <rjmccall@apple.com> Split reinterpret_casts of member pointers out from CK_BitCast; this
is general goodness because representations of member pointers are
not always equivalent across member pointer types on all ABIs
(even though this isn't really standard-endorsed).

Take advantage of the new information to teach IR-generation how
to do these reinterprets in constant initializers. Make sure this
works when intermingled with hierarchy conversions (although
this is not part of our motivating use case). Doing this in the
constant-evaluator would probably have been better, but that would
require a *lot* of extra structure in the representation of
constant member pointers: you'd really have to track an arbitrary
chain of hierarchy conversions and reinterpretations in order to
get this right. Ultimately, this seems less complex. I also
wasn't quite sure how to extend the constant evaluator to handle
foldings that we don't actually want to treat as extended
constant expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150551 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
taniumCXXABI.cpp
14c598268ff7534d3753ae84eba9b8a81bf0bf8f 14-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Use a simpler (and more efficient) pattern to pad vectors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150475 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
df33a35f6010fea92c786c0d8f85bfd7c73ebd3e 14-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Remove useless if statement.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150459 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
b74ed087469db042325bad76fdf3ff6ed67dec09 14-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Implement IRGen of lambda expressions which capture arrays.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150452 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
odeGenFunction.h
0bdb5aa1a3384d194b0e14a9ecbe3309ff33daa3 14-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Refactor out new function EmitInitializerForField from EmitMemberInitializer. The new function will be used to initialize the fields of lambda expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150451 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
e76872e81ea32fbc863d8d7ef6eadc91a8f8673b 14-Feb-2012 Nick Lewycky <nicholas@mxc.ca> Mark the cxa_guard_{abort,acquire,release} functions nounwind.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150435 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
7ca4850a3e3530fa6c93b64b740446e32c97f992 13-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> Deal with a horrible C++11 special case. If a non-literal type has a constexpr
constructor, and that constructor is used to initialize an object of static
storage duration such that all members and bases are initialized by constant
expressions, constant initialization is performed. In this case, the object
can still have a non-trivial destructor, and if it does, we must emit a dynamic
initializer which performs no initialization and instead simply registers that
destructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150419 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
GDecl.cpp
GDeclCXX.cpp
GExprConstant.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
e88a71f00e9dce979dfb409459d54c92e5075a42 13-Feb-2012 Eric Christopher <echristo@apple.com> Add back in the code to create forward decls using temporary mdnodes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150390 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
42e75daaefc11922c585053bfa5e5db6ff312c3e 13-Feb-2012 Eric Christopher <echristo@apple.com> Temporarily walk back a few of my recent debug info limiting changes
while reworking how we handle wanting to emit only parts of structures.

Fixes PR11970.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150388 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
5b9cc5df25c2198f270dd1d5c438fdce70d4051d 12-Feb-2012 Sebastian Redl <sebastian.redl@getdesigned.at> Represent C++ direct initializers as ParenListExprs before semantic analysis
instead of having a special-purpose function.

- ActOnCXXDirectInitializer, which was mostly duplication of
AddInitializerToDecl (leading e.g. to PR10620, which Eli fixed a few days
ago), is dropped completely.
- MultiInitializer, which was an ugly hack I added, is dropped again.
- We now have the infrastructure in place to distinguish between
int x = {1};
int x({1});
int x{1};
-- VarDecl now has getInitStyle(), which indicates which of the above was used.
-- CXXConstructExpr now has a flag to indicate that it represents list-
initialization, although this is not yet used.
- InstantiateInitializer was renamed to SubstInitializer and simplified.
- ActOnParenOrParenListExpr has been replaced by ActOnParenListExpr, which
always produces a ParenListExpr. Placed that so far failed to convert that
back to a ParenExpr containing comma operators have been fixed. I'm pretty
sure I could have made a crashing test case before this.

The end result is a (I hope) considerably cleaner design of initializers.
More importantly, the fact that I can now distinguish between the various
initialization kinds means that I can get the tricky generalized initializer
test cases Johannes Schaub supplied to work. (This is not yet done.)

This commit passed self-host, with the resulting compiler passing the tests. I
hope it doesn't break more complicated code. It's a pretty big change, but one
that I feel is necessary.

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150293 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GExpr.cpp
GVTables.cpp
odeGenFunction.cpp
odeGenFunction.h
taniumCXXABI.cpp
a6ce20ea10b1788ed1f266d5809a7ac2bca7bf1b 10-Feb-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Fix function prolog codegen whe coerce-to type is a struct.

This changes function prolog in such a way as to avoid out-of-bounds
stack store in the case when coerce-to type has a larger storage size
than the real argument type.

Fixes PR11905.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150238 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
a4dc693368e7af4001fe88076bdf4efd440022fa 09-Feb-2012 Bill Wendling <isanbard@gmail.com> Remove evil const_cast that's not needed anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150210 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3964e62786b0912fecc82d776daac236e05fc792 09-Feb-2012 Bill Wendling <isanbard@gmail.com> Use SmallVector when we can instead of std::vector.

This looks like it had a small, but measurable performance improvement on -O0
compile time for our ObjC tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150208 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a34e92116581531f7325527d952a9ffcc819d905 09-Feb-2012 Akira Hatanaka <ahatanaka@mips.com> Class objects passed by value follow the same rules as structure objects.
Double fields of by-value class objects should be passed in floating point
registers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150200 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
da54ff306270e179f64d046369419724356d30d7 09-Feb-2012 Akira Hatanaka <ahatanaka@mips.com> Fix bugs in function MipsABIInfo::returnAggregateInRegs. Functions returning
class objects follow the same rules as those returning struct objects.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150196 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
3b8e197bbfd2c9a1a5fc3ab6509f89cc274e77f8 09-Feb-2012 Eric Christopher <echristo@apple.com> Don't cache the artificial type for the this pointer, there's no
difference in the qual type. This is a workaround for the fact that
the type isn't artificial but the this decl is, however, we don't
have any way of representing it in the current metadata. For now,
however, just don't cache the full type.

Fixes rdar://10831526 and probably a couple of others.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150159 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f8823e7ae00d2b0a9395b51b7bd53b505df72031 09-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Use RAII object for cleanups.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150147 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
4c5d8afd100189b6cce4fd89bfb8aec5700acb50 09-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Refactor lambda IRGen so AggExprEmitter::VisitLambdaExpr does the right thing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150146 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
odeGenFunction.h
b4e5e286a5cd156247720b1eb204abaa8e09568d 09-Feb-2012 Richard Smith <richard-llvm@metafoo.co.uk> CWG issue 1405: mutable members are allowed in literal types, but can't undergo
lvalue-to-rvalue conversions in constant expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150145 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
c6a6369b82db5b51769c4eaa29f8b0199142577a 09-Feb-2012 Eli Friedman <eli.friedman@gmail.com> Basic IRGen for LambdaExprs with captures.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150141 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
b30be29d0bab7ef152d60b0193e0501364546b96 09-Feb-2012 Eli Friedman <eli.friedman@gmail.com> A tiny bit more lambda IRGen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150140 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
af2771b147f1a5934c6c91574f1c2df986034e74 08-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: Move EHPersonality from CGException.h into the cpp file, it has no other users.

While at it make it value-initializable to get rid of static ctors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150070 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GException.h
odeGenFunction.cpp
31a3702618ab49578542cffee20ba0c8859b9d1e 08-Feb-2012 Eli Friedman <eli.friedman@gmail.com> A little bit of lambda IRGen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150058 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
9caf440928c16a8862de932fd19744dc8a6f4157 08-Feb-2012 Eric Christopher <echristo@apple.com> Constify the getClassName routine and variables that come out of it,
and then use it for forward decl names.

Part of rdar://10209967 and rdar://10400981

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150040 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
526cdfb2bf51c8c6612504f1d06c02c736d3d126 08-Feb-2012 Akira Hatanaka <ahatanaka@mips.com> Do not return records with non trivial destructors or copy constructors in
registers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150035 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
2f764a91225ae8e34110243071177c545072fa0e 08-Feb-2012 Eric Christopher <echristo@apple.com> Use the new forward declaration scheme for records. Also add more
caching of results after we create them.

Fixes rdar://10809898

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150025 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
53bc51871a7937f49b80ea8a1b22dc7d15ad86dc 08-Feb-2012 Devang Patel <dpatel@apple.com> Remove tabs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150021 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d7a3e2c5f61cd4893f95b69a424fe4def3aa0f69 07-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Revert my patches which removed Diagnostic.h includes by moving some operator overloads out of line.

This seems to negatively affect compile time onsome ObjC tests
(which use a lot of partial diagnostics I assume). I have to come
up with a way to keep them inline without including Diagnostic.h
everywhere. Now adding a new diagnostic requires a full rebuild
of e.g. the static analyzer which doesn't even use those diagnostics.

This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99.
This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789.
This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7.
This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f.
This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150006 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GDebugInfo.cpp
odeGenTBAA.cpp
6bd17d2f2e6e498b0ff01e2e755f044de046d138 07-Feb-2012 David Blaikie <dblaikie@gmail.com> Make use of const-correct ParseCommandLineOptions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150000 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
7fb8630e76fe2c4e7e048c7c8a448baf282390cd 07-Feb-2012 Devang Patel <dpatel@apple.com> Remove tabs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149996 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
693fcaa99933b47056447099ab6e0d1ea3a12d0d 07-Feb-2012 Devang Patel <dpatel@apple.com> Emit debug info for properites that are not backed by an ivar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149995 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f978059b82db8c0d849c5f992036210b5ca53200 07-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Switch the ObjC*Decl raw_stream overloads to take a reference, for consistency with NamedDecls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149981 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1e01ac4e4b8981942514ca8e1916bccef99a7ae2 07-Feb-2012 Bill Wendling <isanbard@gmail.com> Use SmallVector instead of std::vector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149976 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
bb02855f46423d2034918b75b157f886bb04bccc 07-Feb-2012 Bill Wendling <isanbard@gmail.com> Use 'ArrayRef<>' instead of 'std::vector<>&' for passed-in arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149975 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
13562a1f30df391607604fb6bf345af42b0d831d 07-Feb-2012 Bill Wendling <isanbard@gmail.com> Calculate the .size() of the vector once.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149974 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9085030171299809be4076f0ceb5b6e8add908da 07-Feb-2012 Bill Wendling <isanbard@gmail.com> Reserve a moderate amount of space for the back-end arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149973 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
cf6511be740688c6fc554aaaeee1da9853b3c7df 07-Feb-2012 Bill Wendling <isanbard@gmail.com> Bump up the initial vector size to avoid having to grow the vector more often.

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149943 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBuiltin.cpp
GClass.cpp
GDebugInfo.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GRTTI.cpp
GStmt.cpp
GVTT.cpp
GVTables.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
argetInfo.cpp
f9ea953f22d8e50cae7fd541406d6f563ef86cda 07-Feb-2012 Bill Wendling <isanbard@gmail.com> Use a more efficient container for these values. Also reserve space when using a
std::vector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149936 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
35f18a5e8b5a434894a4886ed98f3dbaa3b895c0 07-Feb-2012 Bill Wendling <isanbard@gmail.com> Use a SmallVector instead of std::vector. This improves compilation time in
445.gobmk by ~1.7%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149935 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
fd3e5ef640df089a1e717097cdb599eb9dd32ec4 07-Feb-2012 Bill Wendling <isanbard@gmail.com> Don't recalculate the size of the array each time through the for-loop.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149933 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
362ed2a95b70aaea4869bfa9ecaf581a6c180b40 07-Feb-2012 Devang Patel <dpatel@apple.com> Relax valid location check. This fixes a clang crash while emitting debug info for properties that are synthesized by the compiler by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149929 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d79ed43d2bb9dd4a54889450ecff9299a9d4d1bc 06-Feb-2012 Chris Lattner <sabre@nondot.org> build wide strings with ConstantDataArray, just because we can.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149928 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
812234b70461eafd43acb6ccbd736bb4bbf88728 06-Feb-2012 Chris Lattner <sabre@nondot.org> improve the code that handles IR generation of byte-sized string literals to avoid
allocating an std::string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149924 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
0b2397132efe74ee11c1b371dd9033820c54240f 06-Feb-2012 Chris Lattner <sabre@nondot.org> use cheaper llvm APIs for various bits of IR generation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149916 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
6ef016f87244aa8072394687e27b3b4fa0147028 06-Feb-2012 Chris Lattner <sabre@nondot.org> simplify code and smallvectorize.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149915 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
5f3c7faa398e64a94d0757e19c69441e04819166 06-Feb-2012 Devang Patel <dpatel@apple.com> Let an ivar directly refer property TAG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149881 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5fa560819d41857d80a224f80ebc1964e54c16eb 06-Feb-2012 Craig Topper <craig.topper@gmail.com> Fix vector splat casts to cast element to the appropriate vector element before inserting into the vector. Fixes PR11930.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149855 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
94010695f7fce626e41ef045b60def9c912e9ce8 05-Feb-2012 Chris Lattner <sabre@nondot.org> reapply the patches reverted in r149477, which enable ConstantDataArray.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149801 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
GRTTI.cpp
odeGenModule.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
GDebugInfo.cpp
GExpr.cpp
GObjCMac.cpp
GRTTI.cpp
GVTT.cpp
GVTables.cpp
odeGenModule.cpp
odeGenTBAA.cpp
odeGenTypes.cpp
taniumCXXABI.cpp
6f42b62b6194f53bcbc349f5d17388e1936535d7 05-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> Basic: import OwningPtr<> into clang namespace

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149798 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXXABI.h
GVTables.cpp
odeGenAction.cpp
oduleBuilder.cpp
eac1f6746a2915fea3ed42284b07e274c0095a95 05-Feb-2012 Bob Wilson <bob.wilson@apple.com> Preserve alignment for Neon vld1_lane/dup and vst1_lane intrinsics.

We had been generating load/store instructions with the default alignment
for the vector element type, even when the pointer argument had less alignment.
<rdar://problem/10538555>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149794 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
00bd44d5677783527d7517c1ffe45e4d75a0f56f 04-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Move various diagnostic operator<< overloads out of line and remove includes of Diagnostic.h.

Fix all the files that depended on transitive includes of Diagnostic.h.
With this patch in place changing a diagnostic no longer requires a full rebuild of the StaticAnalyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149781 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GDebugInfo.cpp
odeGenTBAA.cpp
693a70dfb1515cb62178861fb6c318c0ff484130 04-Feb-2012 Devang Patel <dpatel@apple.com> Create new tag for the property. This is a work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149734 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
71fd6cc843719cab528a5df0899ad3d15cb9297f 03-Feb-2012 Bob Wilson <bob.wilson@apple.com> Fix -ftrap-function fallout from llvm r145714. <rdar://problem/10799325>

That llvm change removed the -trap-func backend option, so that using
-ftrap-function with clang would cause the backend to complain. Fix it
by adding the trap function name to the CodeGenOptions and passing it through
to the TargetOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149679 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
245da28bd2629c7bcd0d30f389ac6b1fb7e33fd7 02-Feb-2012 Andrew Trick <atrick@apple.com> unnecessary include of TargetMachine.h?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149638 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
89651eaf4170168cac2f34f2738e3d58fc38bbf1 02-Feb-2012 Alexander Potapenko <glider@google.com> Move the code that sets the AddressSafety
attribute into CodeGenModule::SetLLVMFunctionAttributesForDefinition().

Previously it resided in CodeGenModule::GetOrCreateLLVMFunction, which
for some reason wasn't called for ObjC class methods, see
http://code.google.com/p/address-sanitizer/issues/detail?id=33



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149605 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
271ce5454ba525931b8b773bb3d03b1893093f9d 02-Feb-2012 Eric Christopher <echristo@apple.com> r149474 went a bit too far when combined with type caching. If we want
a full type go ahead and emit it if we currently only have a forward
declaration.

Fixes gdb bots for gdb1090.exp and call-ar-st.exp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149560 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ef81e0f8f18cc6fb05d37b8d3d399bc95f936c5b 01-Feb-2012 Eric Christopher <echristo@apple.com> Remove duplicated comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149544 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
af790885c7890f3d205bd4715161289bc8aa3f29 01-Feb-2012 Eric Christopher <echristo@apple.com> Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149543 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
a28c1df2ccc414b72df1238ea24bcfb40a730e81 01-Feb-2012 Douglas Gregor <dgregor@apple.com> Add missing dependency to unbreak the CMake build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149531 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
dccaa239ec125926a9c1fb5f328bce349e41637b 01-Feb-2012 David Chisnall <csdavec@swan.ac.uk> size() == 0 -> empty().

Spotted by rjmcall.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149526 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
ab14ae2ab16088b6a7f69eac6e152c3e9f9ea01b 01-Feb-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Compatability fix for SwitchInst refactoring.

The purpose of refactoring is to hide operand roles from SwitchInst user (programmer). If you want to play with operands directly, probably you will need lower level methods than SwitchInst ones (TerminatorInst or may be User). After this patch we can reorganize SwitchInst operands and successors as we want.

What was done:

1. Changed semantics of index inside the getCaseValue method:
getCaseValue(0) means "get first case", not a condition. Use getCondition() if you want to resolve the condition. I propose don't mix SwitchInst case indexing with low level indexing (TI successors indexing, User's operands indexing), since it may be dangerous.
2. By the same reason findCaseValue(ConstantInt*) returns actual number of case value. 0 means first case, not default. If there is no case with given value, ErrorIndex will returned.
3. Added getCaseSuccessor method. I propose to avoid usage of TerminatorInst::getSuccessor if you want to resolve case successor BB. Use getCaseSuccessor instead, since internal SwitchInst organization of operands/successors is hidden and may be changed in any moment.
4. Added resolveSuccessorIndex and resolveCaseIndex. The main purpose of these methods is to see how case successors are really mapped in TerminatorInst.
4.1 "resolveSuccessorIndex" was created if you need to level down from SwitchInst to TerminatorInst. It returns TerminatorInst's successor index for given case successor.
4.2 "resolveCaseIndex" converts low level successors index to case index that curresponds to the given successor.

Note: There are also related compatability fix patches for dragonegg, klee, llvm-gcc-4.0, llvm-gcc-4.2, safecode, clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149482 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
GStmt.cpp
5d3a4bb13dfad72c89df09bce70351175ecd19dc 01-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r149363 which was part a series of commits that were reverted in llvm
commit 149470. This fixes test/CodeGen/PR3589-freestanding-libcalls.c.

Original log:

ConstantArray::get() (for strings) is going away, use
ConstantDataArray::getString instead.

Many instances of ConstantArray::get() could be moved to
use more efficient ConstantDataArray methods that avoid a ton
of intermediate Constant*'s for each element (e.g.
GetConstantArrayFromStringLiteral). I don't plan on doing this
in the short-term though.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149477 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
GRTTI.cpp
odeGenAction.cpp
odeGenModule.cpp
0086a5b44af6384b369f8660da69cf2775d09733 01-Feb-2012 Eric Christopher <echristo@apple.com> For pass-by-value record arguments to functions emit a forward decl
instead of the entire class definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149474 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
29254f4dd114fe2dd5c4e7a261ebea941973ad3d 31-Jan-2012 David Chisnall <csdavec@swan.ac.uk> Support @compatibility_alias at run time (GNUstep Runtime)

Patch by Niels Grewe!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149401 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
003eff627b3435d51b41fdbcdbbdbbfb55055bd4 31-Jan-2012 Benjamin Kramer <benny.kra@googlemail.com> Don't zero terminate the bitmap twice.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149377 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ff8f9ec8336c62b5e3504e2a394f4b25c0cb1963 31-Jan-2012 Chris Lattner <sabre@nondot.org> ConstantArray::get() (for strings) is going away, use
ConstantDataArray::getString instead.

Many instances of ConstantArray::get() could be moved to
use more efficient ConstantDataArray methods that avoid a ton
of intermediate Constant*'s for each element (e.g.
GetConstantArrayFromStringLiteral). I don't plan on doing this
in the short-term though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149363 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
GRTTI.cpp
odeGenAction.cpp
odeGenModule.cpp
f492cb1b62b9113d80d85d32515566d6c2a8cdb3 31-Jan-2012 Chris Lattner <sabre@nondot.org> enhance some optimization logic to handle ConstantDataSequential
as well as ConstantArray.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149347 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
3c52d3633707453fbc08898935c45bed16953cfb 31-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> test for a v-table dispatch that consumes an
argument. twik to support the test case.
// rdar://10444476


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149298 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3c267e6262bb319c8e56c9ea1283c7087f9ac107 30-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> objc-arc: Perform null check on receiver before sending methods which
consume one or more of their arguments. If not done, this will cause a leak
as method will not consume the argument when receiver is null.
In this patch, the null path releases consumed argument.
// rdar://10444474


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149279 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
30c5f1444d0c46c32dbb50820469d12fa89d7b53 30-Jan-2012 Craig Topper <craig.topper@gmail.com> Remove long dead code for handling vector shift by immediate builtins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149237 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
79a64c7f8c501e3df4330db8f50a2dbc9877953b 30-Jan-2012 Craig Topper <craig.topper@gmail.com> Remove custom handling for cmpsd/cmpss/cmppd/cmpps builtins. The builtins are now in IntrinsicsX86.td.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149235 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
f8495d67ca4dd2ea15a4dc59e9a2fa32a9bfa475 30-Jan-2012 Craig Topper <craig.topper@gmail.com> Cleanup 3dnow builtin handling. Most of them were already handled by LLVM connecting intrinsics and builtins in IntrinsicsX86.td.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149233 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
89f42834092621ab6ebac24e09b17b61ac000b6b 30-Jan-2012 Chris Lattner <sabre@nondot.org> Simplify code by using the new getAggregateElement method that got added
recently. This also conveniently gets clang ready for a change about to
land in mainline.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149225 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4e1524babb095e70de1da882573eb6fbee98a857 29-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> revert r149184



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149205 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
odeGenFunction.h
77fe6cd58f284bcc0130b8fd90018d7e5a960b56 29-Jan-2012 John McCall <rjmccall@apple.com> When emitting an ARC epilogue that looks like a return of 'self',
kill the retain from the return site.

This has the workaround nature. It's badness all around.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149193 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
f48f79636d5506d15784c2c2fa8a02086adda40a 29-Jan-2012 John McCall <rjmccall@apple.com> Get a little bit smarter about killing off the ReturnValue alloca
in the presence of straight-line cleanups. This is a simple but
important case, particularly for ARC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149190 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
de2fdc249e9c04757a7aaec029b231f4d7e6dbd7 28-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> objc-arc: Perform null check on receiver before sending methods which
consume one or more of their arguments. If not done, this will cause a leak
as method will not consume the argument when receiver is null.
// rdar://10444474


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149184 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
odeGenFunction.h
a49a2839266f0bac2b6286e9f49fdc0c292938fe 28-Jan-2012 Benjamin Kramer <benny.kra@googlemail.com> Make the __builtin_c[lt]zs builtins target independent.

There is really no reason to have these only available on x86. It's
just __builtin_c[tl]z for shorts.

Modernize the test while at it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149183 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
ba4be25c90566f5f214c2ad0364840c5a04ba651 27-Jan-2012 Matt Beaumont-Gay <matthewbg@google.com> Placate gcc's -Wreturn-type

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149104 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
8b30a9379f730875ba8fb2d0fe2d43611e0c20ff 26-Jan-2012 Bob Wilson <bob.wilson@apple.com> Make clz/ctz builtins defined for zero on ARM targets. rdar://10732455

ARM supports clz and ctz directly and both operations have well-defined
results for zero. There is no disadvantage in performance to using the
defined-at-zero versions of llvm.ctlz/cttz intrinsics. We're running into
ARM-specific code written with the assumption that __builtin_clz(0) == 32,
even though that value is technically undefined. The code is failing now
because of llvm optimizations that are taking advantage of the undef
behavior (specifically svn r147255). There's nothing wrong with that
optimization on x86 where any incorrect assumptions about __builtin_clz(0)
will quickly be exposed. For ARM, though, optimizations based on that undef
behavior are likely to cause subtle bugs. Other targets with defined-at-zero
clz/ctz support may want to override the default behavior as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149086 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
5b78a244ef213835337a5a860fe7c3f2fa90a943 26-Jan-2012 Eric Christopher <echristo@apple.com> Use createRecordFwdDecl here since that's what we're doing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149051 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1c081d97b6f1785013e2294bcc5209d468c0765e 26-Jan-2012 Eric Christopher <echristo@apple.com> Revert previous patch unifying all of the C++ record prep in one area,
the gdb testsuite complains too much about the ordering of items printed,
even if the offsets in the debug info are correct.

This reverts commit 027cb30af828f07750f9185782822297a5c57231.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149049 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3ee8c913ebe776a0b8b973c74be2ea9cc8ad6305 26-Jan-2012 Eric Christopher <echristo@apple.com> Remove another duplicated variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149047 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
516bbd42e62d709013824d6fb8445a0cfda3129a 26-Jan-2012 Peter Collingbourne <peter@pcc.me.uk> Use function pointers, rather than references, to pass Destroyers
around, in the process cleaning up the various gcc/msvc compiler
workarounds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149036 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GClass.cpp
GCleanup.cpp
GDecl.cpp
GDeclCXX.cpp
GExpr.cpp
GObjC.cpp
odeGenFunction.h
de983d868f35d20c46152f9aabbc41f0d3dca8e7 26-Jan-2012 Eric Christopher <echristo@apple.com> Tidy and remove some unused variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149015 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
027cb30af828f07750f9185782822297a5c57231 26-Jan-2012 Eric Christopher <echristo@apple.com> Collect this information together. No reason to have it split.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149013 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
6faa5540dfd17388c62bef8e69f91b0e6bd86e9c 26-Jan-2012 Eric Christopher <echristo@apple.com> Refactor into its own function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149012 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
55fc7e2b8005ba87a81664d065e9b9e2fff1b1af 25-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Add some ABI tweaks for i386-pc-win32 triple so that we return structs in an MSVC-compatible way. Patch by Joe Groff.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148992 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
51cb75a62511905ffa6dc9712493c50a8f3ebcd2 25-Jan-2012 Eric Christopher <echristo@apple.com> Clean up comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148982 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
edf5a7b4ebbb2a49c941ca11a131790f50cc55f9 25-Jan-2012 NAKAMURA Takumi <geek4civic@gmail.com> Fixup r148926, for -Asserts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148943 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
2ce8842641cc312628c4be836d34eb250e7c3f78 25-Jan-2012 Chris Lattner <sabre@nondot.org> reapply r148902:

"use the new ConstantVector::getSplat method where it makes sense."

Also simplify a bunch of code to use the Builder->getInt32 instead
of doing it the hard and ugly way. Much more progress could be made
here, but I don't plan to do it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148926 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprScalar.cpp
2c0c745709c9f258f4c968bcf3e891faa9acbca6 25-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Fix a crash for an edge case of the GNU ?: extension.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148923 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
af521dae8ee15ebf4ecceae3d25f66a475104a07 25-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert 148902 which was part of 148901 which was reverted in r148906.

Original log:
use the new ConstantVector::getSplat method where it makes sense.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148907 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprScalar.cpp
5d613b57972a761973861f7c38b3e6442243a6ab 25-Jan-2012 Eric Christopher <echristo@apple.com> Refactor the record decl forward declaration code a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148904 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
a70e2468865408df4f4a37212b40b85983aac4de 25-Jan-2012 Eric Christopher <echristo@apple.com> Typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148903 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.h
9ddc6246b5f3dbb1a1e05d012361dc2c6d403381 25-Jan-2012 Chris Lattner <sabre@nondot.org> use the new ConstantVector::getSplat method where it makes sense.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148902 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprScalar.cpp
71efba0bbafaefab14419fbd284efff5f7acade7 24-Jan-2012 Kostya Serebryany <kcc@google.com> The following patch adds __attribute__((no_address_safety_analysis)) which will allow to disable
address safety analysis (such as e.g. AddressSanitizer or SAFECode) for a specific function.

When building with AddressSanitizer, add AddressSafety function attribute to every generated function
except for those that have __attribute__((no_address_safety_analysis)).

With this patch we will be able to
1. disable AddressSanitizer for a particular function
2. disable AddressSanitizer-hostile optimizations (such as some cases of load widening) when AddressSanitizer is on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148842 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8f675e4b18fb9b8972847e9f681044184da5586c 24-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Make sure the integer type used to align the vaarg address is the same as the
type of pointers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148753 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
a8536c086fbac59bd7f9a6493bc99b4a92d585e4 24-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Ignore return type if its size is zero.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148744 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
1db772bd68502e0dabbd8efeb7f7c64a4ab2e37a 23-Jan-2012 Nick Lewycky <nicholas@mxc.ca> Add support for -fno-optimize-sibling-calls. Currently only implemented in the
X86 backend in LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148689 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
416de514f8a7a9c121e45ae450d0faef9e5a0ef9 21-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Add an assertion that our use-marking actually covers all uses of a variable. The assertion doesn't cover quite as much as it should, but it's a good start, at least.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148625 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4ddca8ab795be2bb239a80b48a57d09f54dc07ba 20-Jan-2012 Eric Christopher <echristo@apple.com> When adding types to the context chain for record types, just emit
a forward declaration unless we already have a type. We can fill it in
later if it's actually used.

Fixes PR11345

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148584 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
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
GBuiltin.cpp
GCleanup.cpp
GDebugInfo.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GObjCMac.cpp
GRTTI.cpp
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
argetInfo.cpp
c891666f477bfee387c10a429038eb6d98e9d175 20-Jan-2012 Kostya Serebryany <kcc@google.com> use llvm:Attributes instead of unsigned

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148554 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
7d6a7c004361c45a463874a58da28d9f3c35f2e6 18-Jan-2012 Seth Cantrell <seth.cantrell@gmail.com> test svn commit access

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148388 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f6b56374e4e5b9f0078efac5ed4918c3a04296f7 18-Jan-2012 Nick Lewycky <nicholas@mxc.ca> Fix a string over-run detected by ASAN.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148375 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
22afaccd9ab77d46106e94c47907d955a014ae3f 18-Jan-2012 Nick Lewycky <nicholas@mxc.ca> Fix special king of typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148368 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
303b4f946470a054cea8f91af54008aeb3c09507 18-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> output body of folded case again.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148361 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
985df1c1f2d0666a09bc03f3593929286b0dea65 18-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> Folding away unreachable case statement.
patch (slightly revised) by Aaron Ballman.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148359 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
65a1e6707de0d6641e70d0a6edd7593fae85df3c 18-Jan-2012 Douglas Gregor <dgregor@apple.com> Make sure to initialize ExternalProtocolPtrTy

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148358 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f7b2d8b3b1971e73e2d2f0662520dc7693235a7f 17-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Add __builtin_labs and __builtin_llabs, to complete the set of __builtin_*abs. Patch by Ruben Van Boxem.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148340 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
e7aa62de659049428976052eadf69188eae64170 17-Jan-2012 Richard Smith <richard-llvm@metafoo.co.uk> Remove constant member pointer support from Expr-based constant emission now
that APValue-based constant emission knows how to emit member pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148336 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
GExprConstant.cpp
taniumCXXABI.cpp
a8398ea850fbd9cd4a67d80f59062d309f6462c3 17-Jan-2012 Dan Gohman <gohman@apple.com> Enable the new ObjC ARC autorelease pool elimination pass.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148331 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
b29b12d494babf061201ffbcbcacddd21abec50e 17-Jan-2012 John McCall <rjmccall@apple.com> When initializing a catch variable in ARC, be sure to emit retains
or whatever else is required for the initialization instead of
assuming it can be done with a simple store.

Fixes PR11732.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148325 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCRuntime.cpp
4c86fdb84ff016ee708e71f563ffe2a1c1b96b26 17-Jan-2012 Douglas Gregor <dgregor@apple.com> Don't eagerly deserialize the 'Protocol' type when initializing code
generation for Objective-C; it may not be needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148317 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
561d3abc881033776ece385a01a510e1cbc1fa92 17-Jan-2012 David Blaikie <dblaikie@gmail.com> Remove unnecessary default cases in switches over enums.

This allows -Wswitch-enum to find switches that need updating when these enums are modified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148281 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GObjCGNU.cpp
GObjCMac.cpp
4f692c27d74e249d6ef8d24792c35f3e5c620e2a 16-Jan-2012 Tanya Lattner <tonic@nondot.org> Add support for OpenCL 1.1 logical operations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148254 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
d66715d83e64b6bfd0bddebe51874b1b7a64abef 16-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> Fixes a crash during constant folding of a switch and case
statement which has an unscoped case inside it.
Patch by Aaron Ballman


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148243 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
7a7ee3033e44b45630981355460ef89efa0bdcc4 16-Jan-2012 David Chisnall <csdavec@swan.ac.uk> Some improvements to the handling of C11 atomic types:

- Add atomic-to/from-nonatomic cast types
- Emit atomic operations for arithmetic on atomic types
- Emit non-atomic stores for initialisation of atomic types, but atomic stores and loads for every other store / load
- Add a __atomic_init() intrinsic which does a non-atomic store to an _Atomic() type. This is needed for the corresponding C11 stdatomic.h function.
- Enables the relevant __has_feature() checks. The feature isn't 100% complete yet, but it's done enough that we want people testing it.

Still to do:

- Make the arithmetic operations on atomic types (e.g. Atomic(int) foo = 1; foo++;) use the correct LLVM intrinsic if one exists, not a loop with a cmpxchg.
- Add a signal fence builtin
- Properly set the fenv state in atomic operations on floating point values
- Correctly handle things like _Atomic(_Complex double) which are too large for an atomic cmpxchg on some platforms (this requires working out what 'correctly' means in this context)
- Fix the many remaining corner cases



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148242 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenFunction.h
ef96ee0be5f100789f451641542a69cd719144d2 14-Jan-2012 Douglas Gregor <dgregor@apple.com> De-virtualize getPreviousDecl() and getMostRecentDecl() when we know
we have a redeclarable type, and only use the new virtual versions
(getPreviousDeclImpl() and getMostRecentDeclImpl()) when we don't have
that type information. This keeps us from penalizing users with strict
type information (and is the moral equivalent of a "final" method).

Plus, settle on the names getPreviousDecl() and getMostRecentDecl()
throughout.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148187 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
170fd49294b85ab10f820721d99ff9d109c7230d 14-Jan-2012 Zhongxing Xu <xuzhongxing@foxmail.com> Remove a redundant word.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148179 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
2d6a5670465cb3f1d811695a9f23e372508240d2 14-Jan-2012 Richard Smith <richard-llvm@metafoo.co.uk> constexpr irgen: Add irgen support for APValue::Struct, APValue::Union,
APValue::Array and APValue::MemberPointer. All APValue values can now be emitted
as constants.

Add new CGCXXABI entry point for emitting an APValue MemberPointer. The other
entrypoints dealing with constant member pointers are no longer necessary and
will be removed in a later change.

Switch codegen from using EvaluateAsRValue/EvaluateAsLValue to
VarDecl::evaluateValue. This performs caching and deals with the nasty cases in
C++11 where a non-const object's initializer can refer indirectly to
previously-initialized fields within the same object.

Building the intermediate APValue object incurs a measurable performance hit on
pathological testcases with huge initializer lists, so we continue to build IR
directly from the Expr nodes for array and record types outside of C++11.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148178 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXXABI.cpp
GCXXABI.h
GDebugInfo.cpp
GDecl.cpp
GExprConstant.cpp
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
89e6e85f1a6c4972ece0b68950673735daec970a 13-Jan-2012 Eli Friedman <eli.friedman@gmail.com> A base subobject type doesn't make sense for unions; don't try to compute it. Based on patch by Yin Ma. Fixes PR11751.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148093 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
121c67d7ecab148f1ce24ab2b7e56460d1c47e7a 12-Jan-2012 Eric Christopher <echristo@apple.com> Formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147989 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7c9b2fdf1920b2e7b9f8f353dd70041cfc44473f 12-Jan-2012 Eric Christopher <echristo@apple.com> Formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147988 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
cc66254946ec86a2ec94ff9c8db96b05a364a94f 12-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Take into account the pointer to an aggregate that is passed as a hidden
argument when Offset is initialized.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147986 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
2afd23da0e33a8cd44c1c46b1651c677fdd27151 12-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Call CodeGenTypes::ConvertType to get LLVM::Type*.
Remove function MipsABIInfo::GetFloatingPointTy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147985 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
5ff53b27dfd918a5d9943cd008de51edc8cbec2c 11-Jan-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed VLA code generation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147933 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
9db0a5e7e360d8048c83ee1c46a88c4172182791 11-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Remove switch/case statements and call GetFloatingPointTy() instead to get the
floating point type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147894 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
6d1080fd1851f18bd40bb46fa074aa1252b13e8e 11-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Flatten float complex arguments. N32/64 requires float complex arguments be
passed in floating point registers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147892 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
9659d59ec368933050684af573b6d32ab5714332 10-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Remove space.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147889 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
b43550bf1bd944a16cdae9703cb1c2049b04e6bd 10-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Add support for the androideabi environment to our triple support, and
for the arm-linux-androideabi triple in particular.

Also use this to do a better job of selecting soft FP settings.

Patch by Evgeniy Stepanov.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147872 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
91ee4a7f36b520248f505f7d82418eb8fc08f315 10-Jan-2012 Joerg Sonnenberger <joerg@bec.de> Contrary to the other BSDs, NetBSD followed the ELF ABI for structure
passing on i386 and does not use registers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147856 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
1bf7a3fcc4e2ad30688f7b0db464ad1ccabe77e2 10-Jan-2012 Bill Wendling <isanbard@gmail.com> The `-fwritable-strings' flag doesn't make the backing store strings of all
CFStrings writable.

The strings (both Unicode and ASCII) should reside in a read-only section. E.g.,
__TEXT,__cstring instead of __DATA,__data. This is done by making the global
variable created for the strings constant despite the value of that flag.
<rdar://problem/10657500>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147845 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7ead5c7b6fd48cf549e55b4db499c26ecf88ae75 10-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Implement the missing pieces of Evaluate for _Complex types. With that complete, remove some code from CGExprConstant which is no longer necessary. While I'm here, a couple minor tweaks to _Complex-in-C++. (Specifically, make _Complex types literal types, and don't warn for _Complex int.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147840 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
20abee6b95c4f5a61e471b4b616439280ca4a81b 10-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> objc++: patch for IRgen for atomic properties of
c++ objects with non-trivial assignment/copy functions.
Also, one additional sema check. // rdar://6137845


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147817 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.h
a33fd393d5255716e904fed021f87260095ed00a 09-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Insert padding before unaligned long double arguments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147791 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
4ba3fd45bb134e4a5119f297537adce4e7ef4a39 09-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Move the piece of code up that skips the padding argument. Without this change,
padding insertion will not work if the coerced type is not a structure.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147786 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
b08cfb3c5909752c0e501a4e5c31a507a4cc1f72 08-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> objc++: more atomic property api code for
c++ object properties. wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147750 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenModule.h
b6e5fe3cae9bf456f084c555c3ecc256f4181cc5 07-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> objc++: More codegen stuff for atomic properties of c++ objects
with non-trivial copies. // rdar://6137845



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147735 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.h
06284c1dc56caed19850bc3766c89f51763724c3 07-Jan-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed TypeofExpr AST and code generation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147730 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
f0cc2087b18c48b17c2f647c88a3e7eef19285fd 07-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Add field PaddingType to ABIArgInfo which specifies the type of padding that
is inserted before the real argument. Padding is needed to ensure the backend
reads from or writes to the correct argument slots when the original alignment
of a byval structure is unavailable due to flattening.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147699 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetInfo.cpp
cd93b96bc51c255d104095bc6a6d8eac74a84b1e 06-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> objc++: more code gen stuff for atomic property api,
currently turned off. // rdar://6137845
Also, fixes a test case which should be nonatomic under
new API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147691 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.h
odeGenModule.h
d97927d69b277120f8d403580c44acd84907d7b4 06-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Revert r147664; it's breaking clang regression tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147681 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
52a27f5be98d99fd5339949d8a3d0b2aec655e0b 06-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Revert r147655; it's breaking the compiler_rt build on OSX.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147677 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
e3173021fa3bfdf7e6759d67838e385a83b2d57e 06-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> objc++: some declarations related to atomic
properties of c++ object types with non-trivial
assignment copy. Not used yet. // rdar://6137845


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147666 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
2d5f0952a93dae4b648f2b33bab621ad6e932d9a 06-Jan-2012 Jakub Staszak <kubastaszak@gmail.com> Silence GCC warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147664 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
843cc5aaed8c1b2e750aeef3ba13959f0ee117cc 06-Jan-2012 David Chisnall <csdavec@swan.ac.uk> If we are compiling with -fno-builtin then don't do constant folding of
builtins.

This fixes PR11711.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147655 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
84e49865cbc2392787efcf2211ec53a947128a9e 06-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> objc++: sythesize a helper function to be used
for copying atomic properties of c++ objects
with non-trivial copy assignment in setters/getters.
Not yet used. // rdar://6137845


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147636 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.h
5930a4c5224eea3b0558655f7f8c9ea027ef573e 06-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Address Richard's review comments on r147561 (Evaluate support for address-of-label differences).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147631 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
c3953aab1b6167b7f394ca87096e91ab840026ad 05-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> Fixes a code gen bug for setter code for a property of
c++ object reference type with trivial copy constructor.
This causes an assert crash and bad code gen. when assert
is off. // rdar://6137845


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147573 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
65639284118d54ddf2e51a05d2ffccda567fe246 05-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Add an APValue representation for the difference between two address-of-label expressions. Add support to Evaluate and CGExprConstant for generating/handling them. Remove the special-case for such differences in Expr::isConstantInitializer.

With that done, remove a bunch of buggy code from CGExprConstant for handling scalar expressions which is no longer necessary.

Fixes PR11705.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147561 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
44a239973dfe86a0d2432ca2502b7878fadfe23e 04-Jan-2012 Chris Lattner <sabre@nondot.org> implement rdar://10639962 by keeping track of increased alignment
information even in subscripting operations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147557 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
13df6f6e2e6adfb9933ba1a16802d35942e26a5c 04-Jan-2012 David Chisnall <csdavec@swan.ac.uk> Restore r147493 and remove the part of the test that was checking the wrong thing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147530 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
c7ecc2e3691e484cffcfec7fcefef18b2bd23e5f 04-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Have functions return structures smaller than 128-bit in registers if ABI
is either N32 or N64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147520 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
4cd55b04e37d2c2c078be8d55c767213af8cc4ef 04-Jan-2012 Rafael Espindola <rafael.espindola@gmail.com> Revert r147493. It broke test/CodeGenObjC/constant-strings.m.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147511 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
78c6fcf819241097073ae154c92c01021e6174ca 04-Jan-2012 David Chisnall <csdavec@swan.ac.uk> Initialise constant Objective-C string isa pointers with a weak reference to the class, so that they are usable in +load methods if the string class has been compiled with clang - if it's been compiled with GCC, the ABI makes this impossible. (GNU runtimes)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147493 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
bd9482d859a74bf2c45ef8b8aedec61c0e1c8374 01-Jan-2012 Douglas Gregor <dgregor@apple.com> Eliminate ObjCForwardProtocolDecl, which is redundant now that
ObjCProtocolDecl modules forward declarations properly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147415 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
1d784b277cdfd4eba03680715d2a082b3f28d295 01-Jan-2012 Douglas Gregor <dgregor@apple.com> Introduce the core infrastructure needed to model redeclaration chains
for Objective-C protocols, including:
- Using the first declaration as the canonical declaration
- Using the definition as the primary DeclContext
- Making sure that all declarations have a pointer to the definition
data, and that we know which declaration is the definition
- Serialization support for redeclaration chains and for adding
definitions to already-serialized declarations.

However, note that we're not taking advantage of much of this code
yet, because we're still re-using ObjCProtocolDecls.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147410 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
51201882382fb40c9456a06c7f93d6ddd4a57712 30-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> Unrevert r147271, reverted in r147361.

Also temporarily remove the assumption from IR gen that we can emit IR for every
constant we can fold, since it isn't currently true in C++11, to fix PR11676.

Original comment from r147271:

constexpr: perform zero-initialization prior to / instead of performing a
constructor call when appropriate. Thanks to Eli for spotting this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147384 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
80d4b55db94db2172a04617d1a80feca6bbcea5c 28-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> Small refactoring and simplification of constant evaluation and some of its
clients. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147318 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDebugInfo.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
375bb1413c041055262c8a416f20d10474a5eda9 27-Dec-2011 Douglas Gregor <dgregor@apple.com> Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDecl
covers both declarations (@class) and definitions (@interface) of an
Objective-C class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147299 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
47d2145675099893d702be4bc06bd9f26d8ddd13 27-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> constexpr: support for evaluation and codegen of typeid constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147290 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
5c75208a5b88c835bce0a1671015c7e22c72f35f 25-Dec-2011 Craig Topper <craig.topper@gmail.com> Add intrinsics for lzcnt and tzcnt instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147263 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
58c65fcb909c9c25d06507bcf41eb630b3d5e2da 22-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Fix a failure (which led to a crash) in constant emission code with vector compound literals.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147111 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
99ba9e3bd70671f3441fb974895f226a83ce0e66 20-Dec-2011 David Blaikie <dblaikie@gmail.com> Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146959 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenAction.cpp
oduleBuilder.cpp
6446c3e3600032c5f17ca2324a4581b9301afa59 20-Dec-2011 Bill Wendling <isanbard@gmail.com> Mark the calls to the _setjmp function as returns twice. <rdar://problem/10492556>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146926 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d71f44266a598ab174f17435289526bbb57000e2 20-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Switch a few callers of MakeAddrLValue places over to MakeNaturalAlignAddrLValue.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146920 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjCRuntime.cpp
4cac9e169bd85bea592a49a0f4a0d2f37260b29a 19-Dec-2011 Chris Lattner <sabre@nondot.org> Fix PR5279 - don't sliently drop alignment information on stores of types that have alignment less than the natural alignment of the type when it comes from a typedef.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146908 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
bcf6b98247bd3ac76c5edf706b1087a8d32c0320 19-Dec-2011 Rafael Espindola <rafael.espindola@gmail.com> Extend the fix for PR9614 to handle inline asm in the outer decl and
the inner decl being a builtin. This is needed to support the glibc headers
in fedora 16 (2.14).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146867 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
9c2ffd803af03f1728423d0d73ff87d988642633 19-Dec-2011 Craig Topper <craig.topper@gmail.com> More AVX2 intrinsic support including saturating add/sub and palignr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146857 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
973bbb6a8abdc8af99c9a0b78cdbf6e7adb684eb 17-Dec-2011 Eric Christopher <echristo@apple.com> When in a limited debug information situation if we can find the original
declaration for the type then go ahead and use that, it's still smaller
than creating an all new derived type.

Part of rdar://10335756 and others.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146779 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
435e106f94a4e17bbbf6b1ad82185b305943ad3f 17-Dec-2011 Eric Christopher <echristo@apple.com> Start down the path of getting clang to internally agree on structs versus
classes.

Part of rdar://10520586 and a couple others.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146778 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9b879db75be6b8db4a7c804e9bba4c07c4cfa81c 16-Dec-2011 Logan Chien <loganchien@google.com> Apply changes to migrate to clang upstream r146715.

Change-Id: I7a40ad93f4cc76a6e748ba314ac06a1bef473bbf
ndroid.mk
298aaf2c97ab7c4d5bd3a8e8d8112e3bc77b29b6 16-Dec-2011 Logan Chien <loganchien@google.com> Merge with clang upstream r146715 (Dec 16th 2011)

Change-Id: I66024a7b6eb0ee37d7b3ff7ce41c0bfb4b514bee
7c1f1f158205efd07ab169772079ab527aed34dc 16-Dec-2011 Douglas Gregor <dgregor@apple.com> When generating debug info for an ObjCInterfaceDecl, try to dig out the definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146705 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7723fec9b45b7258c0eddf4cbfd0d335348f5edc 15-Dec-2011 Douglas Gregor <dgregor@apple.com> Keep track of all declarations of an Objective-C class (both forward
declarations and definitions) as ObjCInterfaceDecls within the same
redeclaration chain. This new representation matches what we do for
C/C++ variables/functions/classes/templates/etc., and makes it
possible to answer the query "where are all of the declarations of
this class?"



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146679 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
60ef308e51c71b760d7f598c1b763ceb7b768148 15-Dec-2011 Douglas Gregor <dgregor@apple.com> Replace all comparisons between ObjCInterfaceDecl pointers with calls
to declaresSameEntity(), as a baby step toward tracking forward
declarations of Objective-C classes precisely. Part of
<rdar://problem/10583531>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146618 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCRuntime.cpp
9f6d068b29ea2f6276f1105c71d9e768201f2b88 14-Dec-2011 Chad Rosier <mcrosier@apple.com> Per discussion on the list, remove BitcodeVerify pass to reimplement as a free function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146530 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
odeGenAction.cpp
fa2b3dd31c2fa32f10156e3cbbc8d0cfa2879d03 13-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Make CGRecordLayoutBuilder correctly switch over to a packed class when a class has a base whose alignment will break the class layout. <rdar://problem/10551376>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146443 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
ff7892758f1e46221b552486c1e329db92147ebc 13-Dec-2011 Chad Rosier <mcrosier@apple.com> Add frontend flags to enable bitcode verifier pass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146441 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
odeGenAction.cpp
9631939f82c0eaa6fb3936a0ce58a41adfbc9011 12-Dec-2011 Tony Linthicum <tlinth@codeaurora.org> Hexagon backend support

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146413 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
argetInfo.cpp
50058ec63f38eabeb94391a61d2e7fb18a062173 12-Dec-2011 Chandler Carruth <chandlerc@gmail.com> Update Clang to emit the new form of llvm.cttz and llvm.ctlz intrinsics,
setting the is_zero_undef flag appropriately to true as that matches the
semantics of these GCC builtins.

This is the Clang side of r146357 in LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146358 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
9f32a920c6f21a2719e220cd50d708ab4e5543fd 11-Dec-2011 Benjamin Kramer <benny.kra@googlemail.com> Reuse forAddr to create ignored AggValueSlots.

Silences valgrind warnings about uninitalized alignment values.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146342 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
40563cd5ea402b7a0db13058ee869a77cd1ab5ee 10-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Make array new on a pointer to data member type work correctly. PR11523.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146291 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
cc1f918ed4ef8f414d306c02e237a9540c67926e 09-Dec-2011 Bill Wendling <isanbard@gmail.com> Don't get the exception obj from the slot more than once.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146202 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
1e4f68ce0bffd9a6b9a8fc56d1766177382788e3 08-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Fix an edge case in IRGen for conditionals. PR11509.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146189 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
26e80cdfe8933a7f804e1d05b379d5ad50119db5 07-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Make sure we correctly zero-initialize unions containing a pointer to data member as the first field. PR11487.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146009 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GRecordLayoutBuilder.cpp
4e785c908ae01519d3592eae2828e2cc94fb02eb 06-Dec-2011 Nick Lewycky <nicholas@mxc.ca> Stack realignment is a tristate. Add -mno-stackrealign to turn off all stack
realignment, even with locals with alignment exceeding the ABI guarantee.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145909 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
68805fef77978e69a14584148a3c6a4239e34171 06-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Minor comment update.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145905 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
e9d11dbfe1f3286c5f8a2f2fc8ac759f63890655 06-Dec-2011 Joerg Sonnenberger <joerg@bec.de> Add -mstack-alignment=X and fix -mstackrealign handling now that the
backend options are gone.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145868 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
bd7d82878c1588afccbee6c68fa6e17bbbab7f2c 05-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Make EmitAggregateCopy take an alignment argument. Make EmitFinalDestCopy pass in the correct alignment when known.

The test includes a FIXME for a related case involving calls; it's a bit more complicated to fix because the RValue class doesn't keep track of alignment.

<rdar://problem/10463337>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145862 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenFunction.h
6da2c716017d5c8530ec99779524491ebc5dadb8 03-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Switch LValue so that it exposes alignment in CharUnits. (No functional change.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145753 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCall.cpp
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GExpr.cpp
GExprCXX.cpp
GObjC.cpp
GValue.h
odeGenFunction.h
51f512090530807e2c80f9411cc262025820c859 03-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Add a utility to get a RValue for a given LValue for an aggregate; switch a few places over to it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145747 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExprAgg.cpp
GValue.h
d7722d9d76a851e7897f4127626616d3b1b8e530 03-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Switch the Alignment argument on AggValueSlot over to CharUnits, per John's review comment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145741 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GException.cpp
GExpr.cpp
GExprCXX.cpp
GStmt.cpp
GValue.h
odeGenFunction.h
f394078fde147dcf27e9b6a7965517388d64dcb6 03-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Track alignment in AggValueSlot. No functional change in this patch, but I'll be introducing uses of the specified alignment soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145736 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GException.cpp
GExpr.cpp
GExprCXX.cpp
GStmt.cpp
GValue.h
odeGenFunction.h
15de72cf580840c61e5704c2f8a2b56f9d0638e1 03-Dec-2011 Douglas Gregor <dgregor@apple.com> Introduce a module import declaration, so that we properly represent, e.g.,

__import_module__ std.vector;

in the AST.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145725 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
3aaeccc597fa49e5b5aa9c197ef699d2c19ec86b 02-Dec-2011 Nick Lewycky <nicholas@mxc.ca> Update for change to LLVM TargetMachine API in r145714.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145715 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
4bb6686274c292669bac9e658b3c210a317ee61a 02-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> Fix wrong-code bug when a const automatic variable of struct type has both a
mutable member and a constant initializer. We'd previously promoted such
variables to global constants, resulting in nasal demons if the mutable member
was modified.

This is only a temporary fix. The subtle interplay between isConstantInitializer
and CGExprConstant is very bug-prone; there are some other issues in this area
which I will be addressing in subsequent, more major reworking of this code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145654 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
ee1ad99f1ced9ffee436466ef674d4541c37864e 02-Dec-2011 Eli Friedman <eli.friedman@gmail.com> When we're passing a vector with an illegal type through memory on x86-64, use byval so we're sure the backend does the right thing. Fixes va_arg with illegal vectors and an obscure ABI mismatch with __m64 vectors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145652 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
403bc3f85f3b3461b73abdd9c632980bf95f34bd 01-Dec-2011 David Chisnall <csdavec@swan.ac.uk> Fix -forwardingTargetForSelector: (GNUstep runtime) which was broken for the
old dispatch mechanism when I introduced the new one.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145609 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
3ed7903d27f0e7e0cd3a61c165d39eca70f3cff5 01-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Don't use a varargs convention for calls unprototyped functions where one of the arguments is an AVX vector.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145574 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
argetInfo.cpp
argetInfo.h
1a4761edca58c6b559de825b9abfb66f7f1ba94a 01-Dec-2011 Douglas Gregor <dgregor@apple.com> Promote ModuleMap::Module to a namespace-scope class in the Basic
library, since modules cut across all of the libraries. Rename
serialization::Module to serialization::ModuleFile to side-step the
annoying naming conflict. Prune a bunch of ModuleMap.h includes that
are no longer needed (most files only needed the Module type).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145538 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenAction.cpp
e5dd2ea8c54663239255f9ba36ce92c978cefd7e 30-Nov-2011 Kostya Serebryany <kcc@google.com> make asan work at -O0, clang part. Patch by glider@google.com

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145531 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
dc8dab6fabf4bfd4f4b94bf572ac3342a5bbfcd7 30-Nov-2011 Bob Wilson <bob.wilson@apple.com> Add bigger method type encodings to protocol objects. <rdar://problem/10492418>

The new metadata are method @encode strings with additional data.

1. Each Objective-C object is marked with its class name and protocol names.
The same is done for property @encode already.

2. Each block object is marked with its function prototype's @encoding. For
example, a method parameter that is a block object that itself returns void
and takes an int would look like:
@?<v@?i>

These new method @encode strings are stored in a single array pointed to by structs protocol_t and objc_protocol_ext.

Patch provided by Greg Parker!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145469 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d5a3b7804f1594c9f21c7f2cee0920a66feeb93a 30-Nov-2011 Eric Christopher <echristo@apple.com> Make sure that forward declarations are marked as such in the debug info
for the structure type.

rdar://10499337

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145461 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7a71524d9b51b01e124719f8e538f2bb85eae07e 29-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> The cheap version of getName() is sufficient here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145399 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
a9e269e661ca7def681b69f2b88acf0c1fa3e654 29-Nov-2011 Bill Wendling <isanbard@gmail.com> The _setjmp builtin library function should have the "returns twice"
attribute. This prevents the stack slot allocator from coming along and using a
stack which it thinks is available but isn't.
<rdar://problem/10492556>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145332 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ce275675d33142c235d7027db16abe43da616ee4 29-Nov-2011 Tanya Lattner <tonic@nondot.org> Correct the code generation for function arguments of vec3 types on x86_64 when they are greater than 128 bits. This was incorrectly coercing things like long3 into a double2.
Add test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145312 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
5c00fc309bec8900a798e7d5f87d1ccab7908a28 28-Nov-2011 Peter Collingbourne <peter@pcc.me.uk> Another silly workaround for MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145227 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
567f02f3b81b5f16b990bae0640d77022d46c922 28-Nov-2011 Peter Collingbourne <peter@pcc.me.uk> Sigh, another workaround for MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145211 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
3fb91f6abd15b117dbd2c930f626fa87fe7a3b10 28-Nov-2011 Peter Collingbourne <peter@pcc.me.uk> Work around a gcc4.2 bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145209 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
86811609d9353e3aed198045d56e790eb3b6118c 27-Nov-2011 Peter Collingbourne <peter@pcc.me.uk> When destroying temporaries, instead of a custom cleanup use the
generic pushDestroy function.

This would reduce the number of useful declarations in
CGTemporaries.cpp to one. Since CodeGenFunction::EmitCXXTemporary
does not deserve its own file, move it to CGCleanup.cpp and delete
CGTemporaries.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145202 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
GExpr.cpp
GExprAgg.cpp
GTemporaries.cpp
MakeLists.txt
odeGenFunction.h
2871020b2d30b8a642c02280be849a7924426222 27-Nov-2011 Rafael Espindola <rafael.espindola@gmail.com> Add inreg attributes to reference arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145189 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
13dc8f98f6108dca8aaa9721567ed5a2d9911e0f 27-Nov-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Reference initialization with initializer lists.

This supports single-element initializer lists for references according to DR1288, as well as creating temporaries and binding to them for other initializer lists.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145186 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
2db4f4e0b4234eb96347aa69c00aa0c5624676a3 25-Nov-2011 Logan Chien <loganchien@google.com> Apply changes to migrate to clang upstream r145117. (Nov 25th 2011)

Change-Id: I13ff6eaa1f0b0f179c026f9703292a532d714c07
ndroid.mk
2a710c84db1ebf0c16cba0ff121ca8e15f045a07 25-Nov-2011 Logan Chien <loganchien@google.com> Merge with clang upstream r145117 (Nov 25th 2011)

Change-Id: Id4fde985342e3c81f13887e8728bd94b82523642
7401cf524cdb7aad4951d8727d280f8b271af5a2 22-Nov-2011 Richard Smith <richard-llvm@metafoo.co.uk> Use static storage duration for file-scope compound literals, even when they
appear in non-constant initializers in C++.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145087 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
odeGenModule.h
b61968857fd2c6579b4dcd7bad65736e89d21185 22-Nov-2011 Kostya Serebryany <kcc@google.com> implement __has_feature(address_sanitizer); also use LangOpts.AddressSanitizer instead of CodeGenOpts.AddressSanitizer

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145054 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
c3c8f2225dfb3a162020fb6a5ae61904ee5b4f5c 21-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: Simplify code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145040 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
5c247db14566f4668efb63cf5184e62dd40039b5 20-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: allow __asm renaming on static local variables.

Fixes PR4777.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145015 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
5a1ac89b244940a0337ea7ae7dc371e2a9bf7c50 18-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Finish r144971, which was an incomplete commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144972 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
7e7ad3f8fa150de6144be332ae4bfe5d1acb5c6d 18-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Fix the meaning of an "empty" record for the case of a zero-length array. Use isEmptyRecord for arguments on x86-32; there are structs of size 0 which don't count as empty.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144971 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
8d2fe42417fcc861b3324d585dc29ac4da59bee0 18-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Make va_arg on x86-64 compute alignment the same way as argument passing.

Fixes <rdar://problem/10463281>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144966 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
7b1fb81a512def2a20e2834b4598a7b3a740dc7f 18-Nov-2011 Eli Friedman <eli.friedman@gmail.com> A bunch of fixes to argument passing and va_arg on Darwin x86-32 for structures containing an SSE vector.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144963 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
506d4e375a6a36a49eb70578983dc4acaf2f15ae 18-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Don't try to expand struct arguments containing holes on x86-32. From gcc struct layout tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144961 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
bd4d3bcd2cd64d1bba29b2a52705b97d68ebccd5 18-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Simplify code for returning a struct for Darwin x86-32 ABI. Use a better type for a function returning a struct containing only a pointer. Handle the edge case of a struct containing only a float or double plus some dead padding instead of asserting.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144960 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
5a4d35247f55dae6dd0d5ad349ecadbbea0b4572 18-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Ignore empty unions in argument lowering on x86-32. From gcc struct layout tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144944 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
88c2596edc8eb475e20f6033de1ea01669695a0c 18-Nov-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Change ASTConsumer::HandleTopLevelDecl to return true for the parser to continue
parsing or false to abort parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144943 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenAction.cpp
oduleBuilder.cpp
deae6a8bbcfd6bd2f919a8e8aabeb28cd10d101b 18-Nov-2011 Eric Christopher <echristo@apple.com> Use the canonical decl to index so that we can really find it later.

Fixes rdar://10433202

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144938 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e24f5fc8c763f1b5536b8d70dd510ca959db3a80 17-Nov-2011 Richard Smith <richard-llvm@metafoo.co.uk> Constant expression evaluation: add support for evaluation of member pointers
and base-to-derived casts, and add proper handling of temporaries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144926 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
1b4eca67e073f0beefb9924cbe6c65427869f1fa 16-Nov-2011 Kostya Serebryany <kcc@google.com> Add -f[no-]address-sanitizer flag

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144800 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
9254bf77d28731e70942e2bfe6053b495a634b64 16-Nov-2011 Evan Cheng <evan.cheng@apple.com> Match LLVM API change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144789 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
2f77b3d57031ded0de2b7b977fb63b4660f82624 16-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Fix a bunch of really nasty bugs in how we compute alignment for reference lvalues. PR11376.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144745 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
71d9a71d19099a6673750b47b32e9786803fa81d 15-Nov-2011 Logan Chien <loganchien@google.com> Merge with clang upstream r144605 (Nov 15th 2011)

Conflicts:
include/clang-c/Index.h
include/clang/AST/APValue.h
include/clang/AST/DeclBase.h
include/clang/AST/DeclObjC.h
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Serialization/ASTWriter.h
lib/AST/APValue.cpp
lib/AST/ASTImporter.cpp
lib/AST/DeclObjC.cpp
lib/AST/ExprConstant.cpp
lib/Driver/ToolChains.cpp
lib/Frontend/SerializedDiagnosticPrinter.cpp
lib/Frontend/Warnings.cpp
lib/Lex/HeaderSearch.cpp
lib/Lex/LiteralSupport.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaInit.cpp
lib/Sema/SemaPseudoObject.cpp
test/Analysis/misc-ps.c
test/Analysis/retain-release-path-notes.m
test/CodeGen/string-literal-unicode-conversion.c
test/CodeGenCXX/blocks.cpp
test/Driver/crash-cleanup.c
test/Misc/serialized-diags.c
test/Misc/warning-flags.c
tools/c-index-test/c-index-test.c
tools/libclang/CXLoadedDiagnostic.cpp
tools/libclang/IndexDecl.cpp
tools/libclang/IndexTypeSourceInfo.cpp
tools/libclang/Indexing.cpp
tools/libclang/IndexingContext.cpp
tools/libclang/IndexingContext.h
tools/libclang/libclang.exports

Change-Id: I6621e7d5d9a9d1e4cdec7b7b62ffa6dffaff375d
ca3d3fcabaa0d7255e9a778ef468daa6e052b211 15-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Fix crash in calling convention code expanding an struct with a complex member.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144612 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
bf97947c4c467e72b97f8623f84c9bccb03e9448 14-Nov-2011 Eric Christopher <echristo@apple.com> Fixup comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144548 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1bf9a9e6a5bdc0de7939908855dcddf46b661800 12-Nov-2011 Richard Smith <richard-llvm@metafoo.co.uk> Represent an APValue based on a Decl as that Decl, rather than a DeclRefExpr
or MemberExpr which refers to it. As a side-effect, MemberExprs which refer to
static member functions and static data members are now emitted as constant
expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144468 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
790bd91528fbce1ddd6c2ec5f8cb3f9a9f879f02 10-Nov-2011 Pete Cooper <peter_cooper@apple.com> Add invariant.load metadata to loads from selector references. Allows these loads to later be moved/combined in the optimizer. Fixes <rdar://problem/6027699>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144318 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f4635feb7262d91a3169349cd7e97fce49967155 10-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Add missing dependency for shared library build to CMakeLists. Patch by Johannes Obermayr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144310 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
9f75ab129a02c17375fc616aa33176c88fdff5ae 10-Nov-2011 John McCall <rjmccall@apple.com> Whenever explicitly activating or deactivating a cleanup, we
need to provide a 'dominating IP' which is guaranteed to
dominate the (de)activation point but which cannot be avoided
along any execution path from the (de)activation point to
the push-point of the cleanup. Using the entry block is
bad mojo.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144276 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GCleanup.cpp
GException.cpp
GExprAgg.cpp
GExprCXX.cpp
odeGenFunction.h
4faa0b2f8722f3ff2646997734d3094365ba9989 10-Nov-2011 John McCall <rjmccall@apple.com> Fix a subtle bug with cleanups: when activating
a previously-inactive cleanup, not only do we need a
flag variable, but we should also force the cleanup to
query the flag variable. However, we only need to do
this when we're activating in a context that's
conditionally executed; otherwise, we may safely
assume that the cleanup is dominated by the activation
point.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144271 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
bf0716b0ab692bb93949e8969c0c2041d5ad50f4 10-Nov-2011 John McCall <rjmccall@apple.com> Enter the cleanups for a block outside the enclosing
full-expression. Naturally they're inactive before we enter
the block literal expression. This restores the intended
behavior that blocks belong to their enclosing scope.

There's a useful -O0 / compile-time optimization that we're
missing here with activating cleanups following straight-line
code from their inactive beginnings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144268 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GTemporaries.cpp
odeGenFunction.cpp
odeGenFunction.h
62d3cba9d0c608e894a8ce65f0012d730f29f267 10-Nov-2011 Richard Smith <richard-llvm@metafoo.co.uk> Constant expression evaluation: support for evaluation of structs and unions of
literal types, as well as derived-to-base casts for lvalues and
derived-to-virtual-base casts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144265 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
46f02c2833938f0e1b2c90d0af19113e2d20de8e 10-Nov-2011 Nick Lewycky <nicholas@mxc.ca> Reflow lines, remove else-if after returns, rename variable "TydefContext" to
"TypedefContext". No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144248 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a8c0a959629f2781a0354a86d14d25936ca2fe43 09-Nov-2011 Devang Patel <dpatel@apple.com> Remove unnecessary include.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144210 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
87d99bf271af1bfc298d693ba65496192b2f8604 09-Nov-2011 Nick Lewycky <nicholas@mxc.ca> Reflow one line I missed in previous cleanup commit. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144168 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b3a891ab3d060299f2b687d4df25984779a65b43 09-Nov-2011 Nick Lewycky <nicholas@mxc.ca> Minor cleanup, mostly reindenting. Remove one helper function that just called
the other helper functions, since we already differentiated the cases it was
testing between. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144167 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
607f7ffe284480cc828953ee43707f866d457a1a 09-Nov-2011 John McCall <rjmccall@apple.com> Emit the copy and dipose helpers for ARC __strong
block-typed __block variables using objc_retainBlock
and objc_dispose. Previously we were using
_Block_object_assign and _Block_object_destroy
with BLOCK_BYREF_CALLER, which causes the runtime
to completely ignore the retain and release.
In most cases this doesn't cause catastrophe
because the retain/release are balanced and
because the block in the variable was copied
upon assignment there. However, the stack
copy of the variable will be released when
it goes out of scope, which is a problem if
that value was released due to an assignment
to the heap copy. Similarly, a leak can occur
if the variable is assigned after the copy to
the heap.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144162 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
e5c47f85376092a74f49f1f5dc27f5da153918a4 08-Nov-2011 John McCall <rjmccall@apple.com> Bind function "r-values" as l-values when emitting them as
opaque values. Silly C type system.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144144 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
1e8c75f44f4db4f79f82c5e233ff65fb74c0ce0e 08-Nov-2011 John McCall <rjmccall@apple.com> Fix the layout of vb-tables and vf-tables in the MS C++ ABI.
Based on work by Dmitry Sokolov!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144072 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
570d3887d2ad29e5963f92b5eaac978a7939fde9 08-Nov-2011 NAKAMURA Takumi <geek4civic@gmail.com> lib/CodeGen/CGBuiltin.cpp: Tweak the identifier "Type" to appease msvc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144065 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
2d21c996bf9c26386f475c58adad2ef5851117c6 08-Nov-2011 Bob Wilson <bob.wilson@apple.com> Clean up type flags for overloaded Neon builtins. No functional change.

This patch just adds a simple NeonTypeFlags class to replace the various
hardcoded constants that had been used until now. Unfortunately I couldn't
figure out a good way to avoid duplicating that class between clang and
TableGen, but since it's small and rarely changes, that's not so bad.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144054 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
a938489d14e815f56971b271bd5202e32d4df9d5 07-Nov-2011 Richard Smith <richard-llvm@metafoo.co.uk> Constant expression evaluation: support for arrays.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143922 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
6295b53422fbbc9dfaa5035abdada4648ab73d40 07-Nov-2011 John McCall <rjmccall@apple.com> Rip out CK_GetObjCProperty.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143910 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
ec1c59ce30a6f4ad4ad9a923dc44bfb789020f4c 07-Nov-2011 John McCall <rjmccall@apple.com> Rip the ObjCPropertyRef l-value kind out of IR-generation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143908 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GValue.h
odeGenFunction.h
7acf4bf00ecc31652177b3ac1d3f523346581d71 06-Nov-2011 John McCall <rjmccall@apple.com> Change the AST representation of operations on Objective-C
property references to use a new PseudoObjectExpr
expression which pairs a syntactic form of the expression
with a set of semantic expressions implementing it.
This should significantly reduce the complexity required
elsewhere in the compiler to deal with these kinds of
expressions (e.g. IR generation's special l-value kind,
the static analyzer's Message abstraction), at the lower
cost of specifically dealing with the odd AST structure
of these expressions. It should also greatly simplify
efforts to implement similar language features in the
future, most notably Managed C++'s properties and indexed
properties.

Most of the effort here is in dealing with the various
clients of the AST. I've gone ahead and simplified the
ObjC rewriter's use of properties; other clients, like
IR-gen and the static analyzer, have all the old
complexity *and* all the new complexity, at least
temporarily. Many thanks to Ted for writing and advising
on the necessary changes to the static analyzer.

I've xfailed a small diagnostics regression in the static
analyzer at Ted's request.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143867 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GValue.h
odeGenFunction.h
ec2f877b8691b65d2cb858a4272a66776db77ae0 04-Nov-2011 Akira Hatanaka <ahatanaka@mips.com> Use a single integer type for a sub-doubleword part of a byval structure.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143666 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
b9c6199714746d4e723f2fc97bc62ab8b836c63a 03-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Fix alignment on alloca's for parameters using ABIArgInfo::Expand.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143658 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
0d5365f5ba867d636832d6a52aa5db618027b192 03-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Fix the alignment on scalar parameter variables so that it matches what the AST thinks it should be. Per report on cfe-dev.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143645 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
f528f6b7bd4fdebea8da2cb66f9480c2bac36678 03-Nov-2011 Jan Wen Voung <jvoung@google.com> Do not add "byval" attribute to records with non-trivial copy constructors
and destructors in the DefaultABIInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143601 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
1c740da05d4697273114be2c199eff714df74654 03-Nov-2011 Akira Hatanaka <ahatanaka@mips.com> Set MinABIStackAlignInBytes to 8 if ABI is N32/64.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143597 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
a9f43af449ff6568aeef2ce665cd811f6ce65eb7 03-Nov-2011 Akira Hatanaka <ahatanaka@mips.com> Convert the type of a structure passed by value if it has double precision
fields in order to ease handling of such structures in backend.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143596 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
673325fe09226d66c794a4f52798d5f360241923 03-Nov-2011 Akira Hatanaka <ahatanaka@mips.com> Return function results whose size is smaller than 128-bits in registers if ABI
is N32/64.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143589 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
a364fb712dbb0dfe2f0852c0c87be5a59a464742 02-Nov-2011 Fariborz Jahanian <fjahanian@apple.com> back out changes in r143399 and r143475.
rvale-references are captured by reference
in blocks. // rdar://9971124.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143583 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
0ffea35f26d156b2ad4f9b83fba2e7ab9f22c9db 02-Nov-2011 Bob Wilson <bob.wilson@apple.com> Check for homogeneous aggregate return values with ARM's AAPCS-VFP ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143530 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
f3aa8d6ef9457c7e36a8f265c781c38dadc7c074 01-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Fix the representation of wide strings in the AST and IR so that it uses the native representation of integers for the elements. This fixes a bunch of nastiness involving
treating wide strings as a series of bytes.

Patch by Seth Cantrell.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143417 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
odeGenModule.cpp
odeGenModule.h
23833e3ef13ed48816dd39918376e23dd3cbd4e9 01-Nov-2011 Fariborz Jahanian <fjahanian@apple.com> Adds IRGen support for captured rvalue references in blocks.
In this case, temporary value is copied into block descriptor
as their own copy to work on. // rdar://9971124


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143399 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
321b7acdc381a46aa6f5992525a6b78f1963aeb2 31-Oct-2011 Anders Carlsson <andersca@mac.com> In x86_64, when calling an Objective-C method that returns a _Complex long double, make sure to use the objc_msgSend_fp2ret function which ensures that the return value will be {0, 0} if the receiver is nil.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143350 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GObjCMac.cpp
odeGenModule.h
70b2382aea8678cfab363d9cf21905b9754a269e 31-Oct-2011 Nick Lewycky <nicholas@mxc.ca> Turn on the new .file directive when appropriate, instead of turning it off.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143327 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
7e770a0a4b685e1bb6b8d3847fa56ee67e952e31 30-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for lazily linking bitcode files (using a new
-mlink-bitcode-file flag), and more generally llvm::Modules, before
running optimisations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143314 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenAction.cpp
d778105d47d92af4bf74f3e3019ca74ab0d78986 29-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Rename Expr::Evaluate to Expr::EvaluateAsRValue to make it clear that it will
implicitly perform an lvalue-to-rvalue conversion if used on an lvalue
expression. Also improve the documentation of Expr::Evaluate* to indicate which
of them will accept expressions with side-effects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143263 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDebugInfo.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenFunction.cpp
b26f67c8c55eb720893fe13e792fdddc9f1f6379 28-Oct-2011 Devang Patel <dpatel@apple.com> In case of template specialization, do not try to delay emitting debug info for concrete type in -flimit-debug-info mode. This fixes some of the failures from bs15503.exp tests in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143227 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
55a96f0c5c378b77b633e514f231e2c5b0622aa2 28-Oct-2011 Rafael Espindola <rafael.espindola@gmail.com> Fix PR9614 for functions with the always_inline attribute. Try to keep
the common case (-O0, no always_inline) fast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143222 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8485874f3f3bf16112eee699d69c63217e98b538 28-Oct-2011 David Chisnall <csdavec@swan.ac.uk> It turns out that the Objective-C message lookup functions can throw exceptions after all...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143205 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
2006a7fc4ad008cd80baf5e91c9e62b4bf6ab60e 27-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> Annotate imprecise FP division with fpaccuracy metadata

The OpenCL single precision division operation is only required to
be accurate to 2.5ulp. Annotate the fdiv instruction with metadata
which signals to the backend that an imprecise divide instruction
may be used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143136 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
3e2443477803de6b88d869b562572bdcc110456a 26-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> Objective-c: fix an ir-gen crash where objc messag returns a _Complex
value and ABI requires return slot to be passed as first
argument to message sent. // rdar://10331109


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143053 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b8020ba1b1c9d2c610028e28e55d7cb628e38ed4 26-Oct-2011 Rafael Espindola <rafael.espindola@gmail.com> Fix pr9614 by not emitting an available_externally function when it calls
itself via an asm label.

available_externally functions are supposed to correspond to an external
function, and that is not the case in the examples in pr9614.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143049 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
e859fbf5938fc0f8ca5aa115c35c66732174f513 25-Oct-2011 John McCall <rjmccall@apple.com> Restore r142914 and r142915, now with missing file and apparent
GCC compiler workaround.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142931 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
50e13c58f2c5dafb9b0fdc93a4610c0e61b2ec8f 25-Oct-2011 NAKAMURA Takumi <geek4civic@gmail.com> Revert r142914 and r142915, due to possibly missing file.

r142914: "Introduce a placeholder type for "pseudo object""
r142915: "Pull the pseudo-object stuff into its own file."

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142921 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
4827cf634f86d5d16d4e893f7985a7c3ef4d7213 25-Oct-2011 David Chisnall <csdavec@swan.ac.uk> Change an int64_t to an intptr_t so that we don't end up with crashes in the back end on large classes on 32-bit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142918 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
1374a279a4708255530d462d4b03910e6441bf06 25-Oct-2011 John McCall <rjmccall@apple.com> Introduce a placeholder type for "pseudo object"
expressions: expressions which refer to a logical rather
than a physical l-value, where the logical object is
actually accessed via custom getter/setter code.
A subsequent patch will generalize the AST for these
so that arbitrary "implementing" sub-expressions can
be provided.

Right now the only client is ObjC properties, but
this should be generalizable to similar language
features, e.g. Managed C++'s __property methods.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142914 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
1db0028f9aadf052735dd3433ee43b091a272d3d 25-Oct-2011 Douglas Gregor <dgregor@apple.com> Implement support for dependent Microsoft __if_exists/__if_not_exists
statements. As noted in the documentation for the AST node, the
semantics of __if_exists/__if_not_exists are somewhat different from
the way Visual C++ implements them, because our parsed-template
representation can't accommodate VC++ semantics without serious
contortions. Hopefully this implementation is "good enough".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142901 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
4dc03961bcc6bf521cefbdacc934638ae88ebd37 25-Oct-2011 Dan Gohman <gohman@apple.com> Remove the SystemZ backend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142879 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
b7b4fa386f3075b8491cacde12c9ff6906a8a5c0 25-Oct-2011 Devang Patel <dpatel@apple.com> Do not drop type qualifiers in -flimit-debug-info mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142873 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4592bf7196eed90686c08b261ec4115582d11488 25-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Don't try to emit CK_LValueBitCast casts as constants. PR9558.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142863 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
b8217de2b3176a92e59f0179eb7db8ff1abe3219 24-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Fix mismatched new[]/delete[].

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142803 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
320fa6259ef37f9101e71c600d3ed882e9db8266 24-Oct-2011 David Chisnall <csdavec@swan.ac.uk> Remove debugging printfs that some idiot left in.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142796 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
7ad3a4c2200c17058884995bd9834c4083f79031 24-Oct-2011 David Chisnall <csdavec@swan.ac.uk> Enable experimental support for objc_msgSend with GNUstep ObjC runtime.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142795 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
f5aca73f5c005870bdffb22bcf283ab24c2052df 22-Oct-2011 Bob Wilson <bob.wilson@apple.com> Fix a typo that completely broke the expansion of complex arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142734 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
b773239a42e7163cb44f8056b3c6d623069887ce 22-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Remove obsolete debugging macro, make helper static.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142730 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
5cf55457de9098686a815fa029521d2bd75e92da 22-Oct-2011 Eric Christopher <echristo@apple.com> Fix PR11073 by adding the argument type information to the decl we construct
for the function type. Update a testcase accordingly.

Patch initially by Anders Waldenborg!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142700 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
c93c168eb32a804129a0c7b32ed90b72280abc39 22-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> c++: support gcc's application of weak attribute on
class declaration which forces any such class and any
class that inherits from such a class to have their
typeinfo symbols be marked as weak.
// rdar://10246395
A test/CodeGenCXX/weak-extern-typeinfo.cpp
M lib/Sema/SemaDeclCXX.cpp
M lib/Sema/SemaDeclAttr.cpp
M lib/CodeGen/CGRTTI.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142693 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
c8f2c405e2c57d11f4315f3f0cfc71d75ba6cfd5 21-Oct-2011 Nick Lewycky <nicholas@mxc.ca> Take DW_AT_comp_dir from $PWD when it's present and starts with a '/'. This is
closer to what GCC does, except that GCC also checks that the inodes for $PWD
and '.' match.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142633 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b6d7114bcfa29b262f9f043a76da7dba39d65136 10-Nov-2011 Pete Cooper <peter_cooper@apple.com> Add invariant.load metadata to loads from selector references. Allows these loads to later be moved/combined in the optimizer. Fixes <rdar://problem/6027699>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144318 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a60279d9ae6c213ccddee44c78bd8ae82658d3d9 10-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Add missing dependency for shared library build to CMakeLists. Patch by Johannes Obermayr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144310 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
6f103ba42cb69d50005a977c5ea583984ab63fc4 10-Nov-2011 John McCall <rjmccall@apple.com> Whenever explicitly activating or deactivating a cleanup, we
need to provide a 'dominating IP' which is guaranteed to
dominate the (de)activation point but which cannot be avoided
along any execution path from the (de)activation point to
the push-point of the cleanup. Using the entry block is
bad mojo.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144276 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GCleanup.cpp
GException.cpp
GExprAgg.cpp
GExprCXX.cpp
odeGenFunction.h
b99785bdd1cc9ce1ba4f94eeb871faba1a22e95f 10-Nov-2011 John McCall <rjmccall@apple.com> Fix a subtle bug with cleanups: when activating
a previously-inactive cleanup, not only do we need a
flag variable, but we should also force the cleanup to
query the flag variable. However, we only need to do
this when we're activating in a context that's
conditionally executed; otherwise, we may safely
assume that the cleanup is dominated by the activation
point.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144271 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
1a343ebbf413e8eae6b2737b2b2d79cbf5765571 10-Nov-2011 John McCall <rjmccall@apple.com> Enter the cleanups for a block outside the enclosing
full-expression. Naturally they're inactive before we enter
the block literal expression. This restores the intended
behavior that blocks belong to their enclosing scope.

There's a useful -O0 / compile-time optimization that we're
missing here with activating cleanups following straight-line
code from their inactive beginnings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144268 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GTemporaries.cpp
odeGenFunction.cpp
odeGenFunction.h
180f47959a066795cc0f409433023af448bb0328 10-Nov-2011 Richard Smith <richard-llvm@metafoo.co.uk> Constant expression evaluation: support for evaluation of structs and unions of
literal types, as well as derived-to-base casts for lvalues and
derived-to-virtual-base casts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144265 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
7480d96830ab80547da28f585e522958b001de52 10-Nov-2011 Nick Lewycky <nicholas@mxc.ca> Reflow lines, remove else-if after returns, rename variable "TydefContext" to
"TypedefContext". No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144248 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a8ecd7c82a13be635f3f550691752a268fc69ec6 09-Nov-2011 Devang Patel <dpatel@apple.com> Remove unnecessary include.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144210 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
7b3819dfb88df33fdaba4d879044b2cdfeb0e0d2 09-Nov-2011 Nick Lewycky <nicholas@mxc.ca> Reflow one line I missed in previous cleanup commit. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144168 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d4c100e98d34e13fc6bd4f3a005533419f03a808 09-Nov-2011 Nick Lewycky <nicholas@mxc.ca> Minor cleanup, mostly reindenting. Remove one helper function that just called
the other helper functions, since we already differentiated the cases it was
testing between. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144167 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
a59e4b7fca1d46afd8f315fa87fa8bf1a68df9cd 09-Nov-2011 John McCall <rjmccall@apple.com> Emit the copy and dipose helpers for ARC __strong
block-typed __block variables using objc_retainBlock
and objc_dispose. Previously we were using
_Block_object_assign and _Block_object_destroy
with BLOCK_BYREF_CALLER, which causes the runtime
to completely ignore the retain and release.
In most cases this doesn't cause catastrophe
because the retain/release are balanced and
because the block in the variable was copied
upon assignment there. However, the stack
copy of the variable will be released when
it goes out of scope, which is a problem if
that value was released due to an assignment
to the heap copy. Similarly, a leak can occur
if the variable is assigned after the copy to
the heap.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144162 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
a5493f885095bd63d525a7035ad1c224de3ae5f2 08-Nov-2011 John McCall <rjmccall@apple.com> Bind function "r-values" as l-values when emitting them as
opaque values. Silly C type system.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144144 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
9da235244c2de2bcca654b518c66133c30ebde53 08-Nov-2011 John McCall <rjmccall@apple.com> Fix the layout of vb-tables and vf-tables in the MS C++ ABI.
Based on work by Dmitry Sokolov!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144072 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
83084c863572b48579767a4dd5dc686e1a8d669d 08-Nov-2011 NAKAMURA Takumi <geek4civic@gmail.com> lib/CodeGen/CGBuiltin.cpp: Tweak the identifier "Type" to appease msvc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144065 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
da95f73b59f9af964e33725c515139d34c90c863 08-Nov-2011 Bob Wilson <bob.wilson@apple.com> Clean up type flags for overloaded Neon builtins. No functional change.

This patch just adds a simple NeonTypeFlags class to replace the various
hardcoded constants that had been used until now. Unfortunately I couldn't
figure out a good way to avoid duplicating that class between clang and
TableGen, but since it's small and rarely changes, that's not so bad.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144054 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
cc5d4f637cdf83adc174b96d2bfe27cef1cf0f36 07-Nov-2011 Richard Smith <richard-llvm@metafoo.co.uk> Constant expression evaluation: support for arrays.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143922 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
7864435ef2bce200224120bd1df3aed98ea5b99a 07-Nov-2011 John McCall <rjmccall@apple.com> Rip out CK_GetObjCProperty.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143910 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
db45806b991013280a03057025c9538de64d5dfb 07-Nov-2011 John McCall <rjmccall@apple.com> Rip the ObjCPropertyRef l-value kind out of IR-generation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143908 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GValue.h
odeGenFunction.h
4b9c2d235fb9449e249d74f48ecfec601650de93 06-Nov-2011 John McCall <rjmccall@apple.com> Change the AST representation of operations on Objective-C
property references to use a new PseudoObjectExpr
expression which pairs a syntactic form of the expression
with a set of semantic expressions implementing it.
This should significantly reduce the complexity required
elsewhere in the compiler to deal with these kinds of
expressions (e.g. IR generation's special l-value kind,
the static analyzer's Message abstraction), at the lower
cost of specifically dealing with the odd AST structure
of these expressions. It should also greatly simplify
efforts to implement similar language features in the
future, most notably Managed C++'s properties and indexed
properties.

Most of the effort here is in dealing with the various
clients of the AST. I've gone ahead and simplified the
ObjC rewriter's use of properties; other clients, like
IR-gen and the static analyzer, have all the old
complexity *and* all the new complexity, at least
temporarily. Many thanks to Ted for writing and advising
on the necessary changes to the static analyzer.

I've xfailed a small diagnostics regression in the static
analyzer at Ted's request.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143867 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GValue.h
odeGenFunction.h
b49d5a6606ec9b912f74279c935934c4ecb39dfa 04-Nov-2011 Akira Hatanaka <ahatanaka@mips.com> Use a single integer type for a sub-doubleword part of a byval structure.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143666 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
1bb94a417a53a524784ec98f232acc70e62370b2 03-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Fix alignment on alloca's for parameters using ABIArgInfo::Expand.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143658 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ddfb8d1026d8f9001d8111bd8a96d89301aa11cd 03-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Fix the alignment on scalar parameter variables so that it matches what the AST thinks it should be. Per report on cfe-dev.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143645 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
90306934bccaadaf2b538b3c90c3dd478aa1e7d8 03-Nov-2011 Jan Wen Voung <jvoung@google.com> Do not add "byval" attribute to records with non-trivial copy constructors
and destructors in the DefaultABIInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143601 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
b551dd31f6b15aa959127ee906084fcf5bf0154e 03-Nov-2011 Akira Hatanaka <ahatanaka@mips.com> Set MinABIStackAlignInBytes to 8 if ABI is N32/64.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143597 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
d5a257f39b6f78fb66bb0227486b65592476c572 03-Nov-2011 Akira Hatanaka <ahatanaka@mips.com> Convert the type of a structure passed by value if it has double precision
fields in order to ease handling of such structures in backend.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143596 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
c0e3b665344a39bd733e0d9f55bf0f1937922289 03-Nov-2011 Akira Hatanaka <ahatanaka@mips.com> Return function results whose size is smaller than 128-bits in registers if ABI
is N32/64.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143589 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
c637d738897b1745af3bad7fc551f26b98da838c 02-Nov-2011 Fariborz Jahanian <fjahanian@apple.com> back out changes in r143399 and r143475.
rvale-references are captured by reference
in blocks. // rdar://9971124.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143583 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
3b694fab31d3a7a8379996cbe7ef8d53f7d677bc 02-Nov-2011 Bob Wilson <bob.wilson@apple.com> Check for homogeneous aggregate return values with ARM's AAPCS-VFP ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143530 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
64f45a24b19eb89ff88f7c3ff0df9be8e861ac97 01-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Fix the representation of wide strings in the AST and IR so that it uses the native representation of integers for the elements. This fixes a bunch of nastiness involving
treating wide strings as a series of bytes.

Patch by Seth Cantrell.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143417 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
odeGenModule.cpp
odeGenModule.h
d8c4551fa22a9c346e6a9e56333915197c97e394 01-Nov-2011 Fariborz Jahanian <fjahanian@apple.com> Adds IRGen support for captured rvalue references in blocks.
In this case, temporary value is copied into block descriptor
as their own copy to work on. // rdar://9971124


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143399 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
eea64802558cc398571938b1f28cda1d4fa79ec3 31-Oct-2011 Anders Carlsson <andersca@mac.com> In x86_64, when calling an Objective-C method that returns a _Complex long double, make sure to use the objc_msgSend_fp2ret function which ensures that the return value will be {0, 0} if the receiver is nil.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143350 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GObjCMac.cpp
odeGenModule.h
aaf2f36a8c5939b08dc8096da8e6eeeee4975177 31-Oct-2011 Nick Lewycky <nicholas@mxc.ca> Turn on the new .file directive when appropriate, instead of turning it off.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143327 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
22a7dfea585703d6755db69b83e29a0e6ee10369 30-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for lazily linking bitcode files (using a new
-mlink-bitcode-file flag), and more generally llvm::Modules, before
running optimisations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143314 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenAction.cpp
51f4708c00110940ca3f337961915f2ca1668375 29-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Rename Expr::Evaluate to Expr::EvaluateAsRValue to make it clear that it will
implicitly perform an lvalue-to-rvalue conversion if used on an lvalue
expression. Also improve the documentation of Expr::Evaluate* to indicate which
of them will accept expressions with side-effects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143263 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDebugInfo.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenFunction.cpp
ef8857dfdd4d6b4d139278c52d32e3f2e055c5d7 28-Oct-2011 Devang Patel <dpatel@apple.com> In case of template specialization, do not try to delay emitting debug info for concrete type in -flimit-debug-info mode. This fixes some of the failures from bs15503.exp tests in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143227 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
cc4889f72ec68319969ba51e214d9940eb9327e5 28-Oct-2011 Rafael Espindola <rafael.espindola@gmail.com> Fix PR9614 for functions with the always_inline attribute. Try to keep
the common case (-O0, no always_inline) fast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143222 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6f3887ec3652482d2e0e8959d8a89b785330b0b2 28-Oct-2011 David Chisnall <csdavec@swan.ac.uk> It turns out that the Objective-C message lookup functions can throw exceptions after all...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143205 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
c5096cbf7a42e0f9012945b00d9037a5b5a88d72 27-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> Annotate imprecise FP division with fpaccuracy metadata

The OpenCL single precision division operation is only required to
be accurate to 2.5ulp. Annotate the fdiv instruction with metadata
which signals to the backend that an imprecise divide instruction
may be used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143136 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
6c29edaa6fa0bd71c9b1770647a02ae686db87bd 26-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> Objective-c: fix an ir-gen crash where objc messag returns a _Complex
value and ABI requires return slot to be passed as first
argument to message sent. // rdar://10331109


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143053 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a411d2f1ed4598a7a96a7befe07a9d9ee1a6efde 26-Oct-2011 Rafael Espindola <rafael.espindola@gmail.com> Fix pr9614 by not emitting an available_externally function when it calls
itself via an asm label.

available_externally functions are supposed to correspond to an external
function, and that is not the case in the examples in pr9614.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143049 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
3c3b7f90a863af43fa63043d396553ecf205351c 25-Oct-2011 John McCall <rjmccall@apple.com> Restore r142914 and r142915, now with missing file and apparent
GCC compiler workaround.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142931 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
327a50f46449c946c42d50d97689bcb30e2af7d9 25-Oct-2011 NAKAMURA Takumi <geek4civic@gmail.com> Revert r142914 and r142915, due to possibly missing file.

r142914: "Introduce a placeholder type for "pseudo object""
r142915: "Pull the pseudo-object stuff into its own file."

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142921 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
9d06ba82d8afb1cf01235f38f350ce5ad0c15444 25-Oct-2011 David Chisnall <csdavec@swan.ac.uk> Change an int64_t to an intptr_t so that we don't end up with crashes in the back end on large classes on 32-bit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142918 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
a1b852f8e1bee5ed3604ee483803cef39ce57a20 25-Oct-2011 John McCall <rjmccall@apple.com> Introduce a placeholder type for "pseudo object"
expressions: expressions which refer to a logical rather
than a physical l-value, where the logical object is
actually accessed via custom getter/setter code.
A subsequent patch will generalize the AST for these
so that arbitrary "implementing" sub-expressions can
be provided.

Right now the only client is ObjC properties, but
this should be generalizable to similar language
features, e.g. Managed C++'s __property methods.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142914 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
ba0513de93d2fab6db5ab30b6927209fcc883078 25-Oct-2011 Douglas Gregor <dgregor@apple.com> Implement support for dependent Microsoft __if_exists/__if_not_exists
statements. As noted in the documentation for the AST node, the
semantics of __if_exists/__if_not_exists are somewhat different from
the way Visual C++ implements them, because our parsed-template
representation can't accommodate VC++ semantics without serious
contortions. Hopefully this implementation is "good enough".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142901 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
0986eb5c59c43809df95bac10138edd44c1ebb69 25-Oct-2011 Dan Gohman <gohman@apple.com> Remove the SystemZ backend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142879 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
41422511e80e05d42bbf2d8460ca1b8b59db68ae 25-Oct-2011 Devang Patel <dpatel@apple.com> Do not drop type qualifiers in -flimit-debug-info mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142873 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b000459901bc1c5a55246da83550ad427ad4c4ff 25-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Don't try to emit CK_LValueBitCast casts as constants. PR9558.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142863 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
2a04f1cf72d57cf5d74b24e785c04f7a3fc3398f 24-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Fix mismatched new[]/delete[].

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142803 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
dfa4ab91a09daa15be507d7b0f474ceb2b83b264 24-Oct-2011 David Chisnall <csdavec@swan.ac.uk> Remove debugging printfs that some idiot left in.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142796 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
89c300400b0b75d879da88f81c97a46feb0675be 24-Oct-2011 David Chisnall <csdavec@swan.ac.uk> Enable experimental support for objc_msgSend with GNUstep ObjC runtime.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142795 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
bfcacd9e00015b9b8e1a027639000fdbaa398194 22-Oct-2011 Bob Wilson <bob.wilson@apple.com> Fix a typo that completely broke the expansion of complex arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142734 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
f5c7504d046efe5bda36451e3a5719e726be4476 22-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Remove obsolete debugging macro, make helper static.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142730 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
fe6bd6dc51777802a0118521b9039981a0e6a806 21-Oct-2011 Logan Chien <loganchien@google.com> Apply changes to migrate to upstream Oct 20th 2011 (r142531)

Change-Id: I32cdb5da2c07c84e01f42b4e87161196f468806a
ndroid.mk
00a92abaf907802bfa4d6f38bdd242c6bfc34c09 21-Oct-2011 Logan Chien <loganchien@google.com> Merge with clang upstream Oct 20th 2011 (r142531)

Change-Id: I42181113f38ce445f2a48694d6f654438562b71e
06253664315307d34ab57b892b6a0c6c5b3153bb 22-Oct-2011 Eric Christopher <echristo@apple.com> Fix PR11073 by adding the argument type information to the decl we construct
for the function type. Update a testcase accordingly.

Patch initially by Anders Waldenborg!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142700 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
13c7fcceb9fd96f5be03af038ce16b05bb5e9598 22-Oct-2011 Fariborz Jahanian <fjahanian@apple.com> c++: support gcc's application of weak attribute on
class declaration which forces any such class and any
class that inherits from such a class to have their
typeinfo symbols be marked as weak.
// rdar://10246395
A test/CodeGenCXX/weak-extern-typeinfo.cpp
M lib/Sema/SemaDeclCXX.cpp
M lib/Sema/SemaDeclAttr.cpp
M lib/CodeGen/CGRTTI.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142693 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
7c4fd9121f5885096fd3258d20a984e3f08f8603 21-Oct-2011 Nick Lewycky <nicholas@mxc.ca> Take DW_AT_comp_dir from $PWD when it's present and starts with a '/'. This is
closer to what GCC does, except that GCC also checks that the inodes for $PWD
and '.' match.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142633 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b9c8c42c392d0fe7079b968bbd5ed2bd4bd2f8d2 19-Oct-2011 Eric Christopher <echristo@apple.com> Add block information for ObjC @catch blocks.

Fixes rdar://10282889

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142467 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCRuntime.cpp
c3287793626a778178a4dbadcc7b64e392c6e26f 19-Oct-2011 Eric Christopher <echristo@apple.com> Add a new subclass of RunCleanupScopes that also handles creating new
lexical blocks for debug info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142466 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
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
GRTTI.cpp
odeGenTypes.cpp
e0a22d06888c13989b3f72db319f1d498bf69153 18-Oct-2011 John McCall <rjmccall@apple.com> Macro metaprogramming for builtin types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142420 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0282c5a3d7fea9dd26dcc44c56515d1ced3e7101 03-Aug-2011 Rafael Espindola <rafael.espindola@gmail.com> Implements alignment for long long and double types in va_arg on ARM AAPCS.
Patch by Jim (Ningjie) Chen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136734 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
97c0aefe8c0523417ffe8a500a220286e11e7a46 18-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Rewrite parts of MS ABI C++ layout. Based on work by r4start; I ended up doing this while I was trying to review his patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142325 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
ea523d73a6de06f828952a02f5ff86e4cc631695 18-Oct-2011 Nick Lewycky <nicholas@mxc.ca> Wire up support for the controlling the extended dwarf .file directive. With
r142300 but not this patch, clang -S may emit .s files that assemblers other
than llvm-mc can't parse.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142301 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.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
GDebugInfo.cpp
GRTTI.cpp
odeGenTypes.cpp
96fda0c4a7bb5502d82791f361997471c173b909 16-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Convert inline asm source ranges into clang SourceRanges and print them with the instantiated note.

t.c:2:7: error: invalid operand for instruction
asm("movl 0(%rax), 0(%edx)");
^
<inline asm>:1:16: note: instantiated into assembly here
movl 0(%rax), 0(%edx)
^~~~~~~
1 error generated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142131 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenAction.cpp
1d236ab930816f5da27bade92904914c44b73b4c 15-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Replace vectors with arrays.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142072 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
odeGenModule.cpp
c8645e38bfe5ab46e424b7aaca53c064105c4265 15-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Handle an edge case involving the conditional operator and throw expressions. PR10582.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142047 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.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
GDebugInfo.cpp
GExprConstant.cpp
GExprScalar.cpp
GRTTI.cpp
odeGenTypes.cpp
2be460723940f8184ec36529b6f6ddf59c04e411 14-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Misc fixes for atomics. Biggest fix is doing alignment correctly for _Atomic types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142002 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
2b5cfbc0b074ef77ccac407533d27778ace4028c 14-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Simplify code to avoid a useless string copy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141970 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
bcbca75e94c8eb7073482fa0c5c8940f39f66849 14-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Upgrade to PathV2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141969 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
c95ff94a2d67093a696a0c70dbb272bcf8b97146 14-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Add parens to pacify GCC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141968 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2ed7cb649aa709b875c519f4a980a1e2b5712370 14-Oct-2011 Eli Friedman <eli.friedman@gmail.com> PR11124: Don't overwrite memory outside of a base class when performing zero-initialization before running its constructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141933 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
GExprConstant.cpp
odeGenModule.h
73fb35003aad027492e661a3749e921b5d1ecaf9 13-Oct-2011 Eric Christopher <echristo@apple.com> Recommit:

Start handling debug line and scope information better:

Migrate most of the location setting within the larger API in CGDebugInfo and
update a lot of callers.
Remove the existing file/scope change machinery in UpdateLineDirectiveRegion
and replace it with DILexicalBlockFile usage.

Finishes off the rest of rdar://10246360

after fixing a few bugs that were exposed in gdb testsuite testing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141893 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GClass.cpp
GDebugInfo.cpp
GDebugInfo.h
GExpr.cpp
GObjC.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenModule.cpp
2f7aa998c0d6494301c12c4fceb6134a1bc248ab 13-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> TCE target: conversion of OpenCL reqd_work_group_size attr to metadata

Patch by Pekka Jääskeläinen!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141865 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
6700415542121e2cb7d867728046ffa21e402019 12-Oct-2011 Rafael Espindola <rafael.espindola@gmail.com> Add returns_twice to functions that are known to return twice. This implements
the same behavior of gcc by keeping the attribute out of the function type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141803 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
28e06354b5d4dd539be6781e388ff27c0dffd807 12-Oct-2011 Eric Christopher <echristo@apple.com> Revert file/scope handling patches. gdb testing revealed a couple of bugs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141796 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GClass.cpp
GDebugInfo.cpp
GDebugInfo.h
GExpr.cpp
GObjC.cpp
GStmt.cpp
odeGenModule.cpp
55acb0d050b303289e552f241a9996df072ca700 12-Oct-2011 Jim Goodnow II <jim@thegoodnows.net> Removed extra line in comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141773 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
c6bfbca5733f1fc090b2149c4fff0548f1f15526 12-Oct-2011 Eric Christopher <echristo@apple.com> Remember to set the location in EmitGlobalVariable to the current decl
if we're going to delete the setLocation as we did in 141732.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141762 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4b2d5498729a74a8e952bdf762e6f2d8c6b52690 12-Oct-2011 Eric Christopher <echristo@apple.com> Start handling debug line and scope information better:

Migrate most of the location setting within the larger API in CGDebugInfo and
update a lot of callers.
Remove the existing file/scope change machinery in UpdateLineDirectiveRegion
and replace it with DILexicalBlockFile usage.

Finishes off the rest of rdar://10246360

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141732 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GClass.cpp
GDebugInfo.cpp
GDebugInfo.h
GExpr.cpp
GObjC.cpp
GStmt.cpp
odeGenModule.cpp
ab5278e0ead5697ff27ef69d960c3e138b299ce6 12-Oct-2011 Eric Christopher <echristo@apple.com> 80-column and tab cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141731 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
944542e29c2d796049be1db12160e232fb28aebf 12-Oct-2011 Eric Christopher <echristo@apple.com> Reorder this to make it easier to add more changes for a location set.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141730 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9e3c20b2b600af7b2b8c65fb12362ba2046caf10 11-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Silence some -Wuninitialized false positives with gcc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141701 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
276b061970939293f1abaf694bd3ef05b2cbda79 11-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Initial implementation of __atomic_* (everything except __atomic_is_lock_free).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141632 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
a6b8b2c09610b8bc4330e948ece8b940c2386406 10-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Constant expression evaluation refactoring:
- Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions,
and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert
behaviour.
- Factor out evaluation of bitfield bit widths.
- Fix a few places which would evaluate an expression twice: once to determine
whether it is a constant expression, then again to get the value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141561 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDebugInfo.cpp
GDebugInfo.h
GExprConstant.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GRecordLayoutBuilder.cpp
GStmt.cpp
argetInfo.cpp
49de5289acea91c9d224c9aadd4d527e8f9fdaff 08-Oct-2011 David Chisnall <csdavec@swan.ac.uk> Apparently getPtrToInt() takes an explicit type parameter to allow you to generate invalid bitcode, not so that it can actually produce a value of this type. This should fix PR11085.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141482 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
0628b724ff68105dc88af00a39f859447f22981e 08-Oct-2011 Ted Kremenek <kremenek@apple.com> Free 'TheTargetCodeGenInfo' in the class CodeGenModule. This looks like an obvious memory leak that was reported from LLDB devs. The comment indicates the leak is deliberate, but I have no idea why this needs to be so. Please comment/revert if you know otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141479 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
argetInfo.cpp
e3c944a9f620dacb0c29d16e7d61c8e7fca10963 08-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Fix warning on MSVC. Patch by Aaron Ballman.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141467 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.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
GRTTI.cpp
odeGenTypes.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
odeGenTypes.cpp
51c3b79caa493a53d324190c0d7e3cd1fe93d4f3 07-Oct-2011 Eli Friedman <eli.friedman@gmail.com> llvm.memory.barrier is going away; remove the wrapper intrinsic __builtin_llvm_memory_barrier.

__atomic_thread_fence will be landing soon as a replacement, wrapping around the new fence instruction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141332 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.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
GDebugInfo.cpp
GDebugInfo.h
GRTTI.cpp
odeGenFunction.cpp
odeGenTypes.cpp
a4ae2294b6ebfb2554aacb6a6a0682fb5ed1f276 06-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> CUDA: IR generation support for device stubs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141304 91177308-0d34-0410-b5e6-96231b3b80d8
GCUDANV.cpp
GCUDARuntime.h
odeGenFunction.cpp
d51e43af0b3a6897b971f316c4de2035ec82d1f2 06-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> CUDA: add -fcuda-is-device flag

This frontend-only flag is used by the IR generator to determine
whether to filter CUDA declarations for the host or for the device.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141301 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6c0aa5ff6e6253db0f993053599e2a52b5b93b2d 06-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> CUDA: IR generation support for kernel call expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141300 91177308-0d34-0410-b5e6-96231b3b80d8
GCUDANV.cpp
GCUDARuntime.cpp
GCUDARuntime.h
GExpr.cpp
GExprCXX.cpp
MakeLists.txt
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
744d90bfe2a43847764a707b1bee7ef1e30ad5f2 06-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> CUDA: set proper calling conventions for PTX

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141296 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
d1ab1a2dffa66a88e5215216893adcfc658d3e7e 06-Oct-2011 Eric Christopher <echristo@apple.com> When constructing debug information for synthesized variables for the
non-fragile ABI we may not be able to lay out the type and the debugger
would ignore us even if we did put in the offset. Go ahead and just
put any value there and don't look up the offset since it may not exist.

rdar://10210157

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141261 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1cd1d74b5c376ad1e9ab5f6b87fbcc54cc816e08 06-Oct-2011 Eric Christopher <echristo@apple.com> Reformat comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141260 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
818eafb6ac56c87b80b34be29ca115cd309026d2 05-Oct-2011 Justin Holewinski <justin.holewinski@gmail.com> PTX: Set proper calling conventions for PTX in OpenCL mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141193 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
917b28b980a8300ce9c7c8d71b2a77bb93b7cdd2 04-Oct-2011 David Chisnall <csdavec@swan.ac.uk> Add bitmaps for strong / weak ivar layout (GNUstep runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141085 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
348f16fc7c71f0d9b651cb79fd1012843073493f 04-Oct-2011 John McCall <rjmccall@apple.com> Mark calls to objc_retainBlock that don't result from casts
to id so that we can still optimize them appropriately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141064 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjC.cpp
odeGenFunction.h
f87cced71a955dca5731e7b28bc182e4824c0355 03-Oct-2011 Rafael Espindola <rafael.espindola@gmail.com> Propagate __attribute__((returns_twice)) from C to IL.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141002 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
491306a83c4f0f49f95a3bcbca8580cb98a91c7a 03-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow getting all source locations of selector identifiers in a ObjCMethodDecl.

Instead of always storing all source locations for the selector identifiers
we check whether all the identifiers are in a "standard" position; "standard" position is

-Immediately before the arguments: -(id)first:(int)x second:(int)y;
-With a space between the arguments: -(id)first: (int)x second: (int)y;
-For nullary selectors, immediately before ';': -(void)release;

In such cases we infer the locations instead of storing them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140989 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDebugInfo.cpp
GObjC.cpp
odeGenModule.cpp
11d77169555480ee0a04c6e5bc390d8fde41175d 03-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Pass from the parser the locations of selector identifiers when creating
objc method decls.

They are not stored in the AST yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140984 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d1e40d5389a4382cbebc97d54792f41ee0414af4 02-Oct-2011 John McCall <rjmccall@apple.com> Make -fobjc-nonfragile-abi the -cc1 default, since it's the
increasingly prevailing case to the point that new features
like ARC don't even support the fragile ABI anymore.

This required a little bit of reshuffling with exceptions
because a check was assuming that ObjCNonFragileABI was
only being set in ObjC mode, and that's actually a bit
obnoxious to do.

Most, though, it involved a perl script to translate a ton
of test cases.

Mostly no functionality change for driver users, although
there are corner cases with disabling language-specific
exceptions that we should handle more correctly now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140957 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2b014d6c0c6b8ac94b416ac37dfc7931f20777a7 01-Oct-2011 John McCall <rjmccall@apple.com> When performing an @throw in ARC, retain + autorelease
the pointer, being sure to do so before running cleanups
associated with that full-expression. rdar://10042689



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140945 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.h
ccae76c8214c5ff469e0291371127084d252ac7a 30-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> objc gc: assigning to an objc object struct member through an ivar
pointer to this struct must go through the none ivar writer barrier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140867 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
225bf773d19bb4e3a673a52bebc6892285cb8e23 30-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Minor cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140866 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
aa2164cc2aecafb9efbddd72e6f25cea4995b330 29-Sep-2011 Eric Christopher <echristo@apple.com> Change "Regions" to be "LexicalBlocks" since that's what they
correspond to.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140740 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GObjC.cpp
GStmt.cpp
5321bc492b2f29deecb6cb0bc68b7887164ee8a6 29-Sep-2011 Eric Christopher <echristo@apple.com> Rename EmitStopPoint in CGDebugInfo to EmitLocation. "stop points" don't
exist anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140739 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDebugInfo.cpp
GDebugInfo.h
GExpr.cpp
GStmt.cpp
69a1b749ed44d59a86a9b10f21259b3a222ba068 29-Sep-2011 Eric Christopher <echristo@apple.com> Reorder functions in the file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140738 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
414ee4bb74957b4c5fe05e11848028e4701b51f7 29-Sep-2011 Eric Christopher <echristo@apple.com> Call UpdateLineDirectiveRegion every time we want to emit a stop
point in the code. Ensures that we don't miss any places and the
check is reasonably cheap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140737 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GExpr.cpp
GStmt.cpp
441937c9be818279f68003071ea2cefc5da7d25d 29-Sep-2011 Eric Christopher <echristo@apple.com> Update comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140736 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
578faa837b552403e2002b97fdfbfde14f2448e5 27-Sep-2011 Benjamin Kramer <benny.kra@googlemail.com> de-tmpify clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140637 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBuiltin.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
taniumCXXABI.cpp
43202aee91646c9b5cd6d5cbea690b479075b67b 26-Sep-2011 Eric Christopher <echristo@apple.com> Update comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140531 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f9aac38d1290c17192a74b5bc2de52b9fb1a87ca 26-Sep-2011 Eric Christopher <echristo@apple.com> Fix comment to reflect reality.

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

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

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

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

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

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

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140502 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
GDebugInfo.cpp
GRTTI.cpp
GVTables.cpp
GVTables.h
odeGenModule.h
taniumCXXABI.cpp
5c551f7aef7db952eca6133366e5afa9e37ab0b7 26-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Move VTT builder to AST

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140501 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
33446f1a22a662335c76e2ef7511e48f61801a35 26-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Move BaseSubobject class to AST

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140500 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.h
4c341ac59cdbf5f0235478424dec6af1f57ebb7a 26-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Remove CodeGenModule field from VTTBuilder

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140499 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
e2ff5abe47e12d63341b76f0f8e311aa9dbc3f94 26-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Make the VTTBuilder class independent of LLVM core

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140498 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVTables.h
d6471f7c1921c7802804ce3ff6fe9768310f72b9 26-Sep-2011 David Blaikie <dblaikie@gmail.com> Rename Diagnostic to DiagnosticsEngine as per issue 5397


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
GCXXABI.cpp
GDebugInfo.cpp
odeGenAction.cpp
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
cea8d966f826554f0679595e9371e314e8dbc1cf 24-Sep-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Treat list-initialization of scalars as a first-class citizen in C++11.
Allow empty initializer lists for scalars, which mean value-initialization.
Constant evaluation for single-element and empty initializer lists for scalars.
Codegen for empty initializer lists for scalars.
Test case comes in next commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140459 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.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
GCall.cpp
GDebugInfo.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjCMac.cpp
GStmt.cpp
GVTables.cpp
odeGenAction.cpp
odeGenTypes.cpp
argetInfo.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
GBuiltin.cpp
GCall.cpp
GDebugInfo.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GRTTI.cpp
GStmt.cpp
GVTables.cpp
odeGenAction.cpp
odeGenModule.cpp
odeGenTypes.cpp
argetInfo.cpp
8990daf237a48fa2eed3d0546687fc097a004db6 22-Sep-2011 Bill Wendling <isanbard@gmail.com> Don't remove filters.

It's not valid to remove filters from landingpad instructions, even if we catch
the type. The metadata won't be set up correctly.

Testcase is projects/llvm-test/SingleSource/UnitTests/EH/filter-2.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140335 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
690b2dbde0ef9eec6b5c950b0c4c7106db37f0a5 22-Sep-2011 Douglas Gregor <dgregor@apple.com> Only trigger the initialize-an-array-via-elementwise-copy/move code
generation when we're dealing with an implicitly-defined copy or move
constructor. And, actually set the implicitly-defined bit for
implicitly-defined constructors and destructors. Should fix self-host.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140334 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
b681fb180dd1d1e8659006f1987711dcc92a6241 22-Sep-2011 Douglas Gregor <dgregor@apple.com> Explicitly-defaulted copy/move constructors are not "implicit", but
they still need the logic to cope with array member
initialization. Fixes PR10720.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140302 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
01f151e0ffba72bcad770bea5f563a9b68ca050e 21-Sep-2011 John McCall <rjmccall@apple.com> ANSI C requires that a call to an unprototyped function type succeed
if the definition has a non-variadic prototype with compatible
parameters. Therefore, the default rule for such calls must be to
use a non-variadic convention. Achieve this by casting the callee to
the function type with which it is required to be compatible, unless
the target specifically opts out and insists that unprototyped calls
should use the variadic rules. The only case of that I'm aware of is
the x86-64 convention, which passes arguments the same way in both
cases but also sets a small amount of extra information; here we seek
to maintain compatibility with GCC, which does set this when calling
an unprototyped function.

Addresses PR10810 and PR10713.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140241 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
argetInfo.cpp
argetInfo.h
243f108a7c5dc4733e9ef6b7b7c2cd0465cf2104 21-Sep-2011 Richard Trieu <rtrieu@google.com> Change "ivar" to true for a boolean function argument. Since string literals are cast to true, this should no effect on behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140231 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
8c6dfbe044155277b06e4345f1b98910692390b6 20-Sep-2011 Akira Hatanaka <ahatanak@gmail.com> Create a MipsTargetCodeGenInfo object for mips64/mips64el. The size of the
UnwindException structure is 32 for mips64.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140165 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
e624fa02b2c2c614b3a27a25516885fc64e07001 20-Sep-2011 Akira Hatanaka <ahatanak@gmail.com> Add a parameter to MipsTargetCodeGenInfo's constructor.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140161 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
eecb6a1e8b95fcdb7d1a0d92b0a0311c041440cd 20-Sep-2011 Bill Wendling <isanbard@gmail.com> Don't assume that the clause is a GlobalVariable. It could be a constant.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140123 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
0c706c29f20b6fa36759fa41333b9c3ec0bd2969 20-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Add list initialization for complex numbers in C. Essentially, this allows "_Complex float x = {1.0f, 2.0f};". See changes to docs/LanguageExtensions.html for a longer description.

<rdar://problem/9397672>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140090 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
GExprConstant.cpp
40ccaccd21a4377cd76d6adda2b192dcf9514ef6 20-Sep-2011 Bill Wendling <isanbard@gmail.com> The eh.selector intrinsic isn't used anymore. Replace the check here with a
check for the landingpad instruction instead. This check looks at each of the
clauses in the landingpad instruction. If it's a catch clause, it compares the
name directly with the global. If it's a filter clause, it has to look through
each value in the filer to see if any have the prefix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140075 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
8c25fc584ce27d59df9923f153e8a132dde58d04 19-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> OpenCL: introduce support for function scope __local variables

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140068 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GOpenCLRuntime.cpp
GOpenCLRuntime.h
MakeLists.txt
odeGenModule.cpp
odeGenModule.h
5a9ee2082891e04ce793d7a7a111301873c4f854 19-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> In CodeGenAction::ExecuteAction() use SourceManager::translateFileLineCol()
instead of getLocation() since we don't care about expanded macro arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140061 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenAction.cpp
a64ccefdf0ea4e03ec88805d71b0af74950c7472 19-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.

It already works (and is useful with) macro locs as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140057 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenAction.cpp
285cfd8953d4ca4da613a47a0d691f7234068f8c 19-Sep-2011 Bill Wendling <isanbard@gmail.com> Throw the switch to convert clang to the new exception handling model!

This model uses the 'landingpad' instruction, which is pinned to the top of the
landing pad. (A landing pad is defined as the destination of the unwind branch
of an invoke instruction.) All of the information needed to generate the correct
exception handling metadata during code generation is encoded into the
landingpad instruction.

The new 'resume' instruction takes the place of the llvm.eh.resume intrinsic
call. It's lowered in much the same way as the intrinsic is.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140049 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.cpp
odeGenFunction.h
8c6f9c49e6b1af5917f5879aed5496d0886b4e90 19-Sep-2011 Devang Patel <dpatel@apple.com> Tighten check to match an ivar with corresponding property by using ObjCImplementationDecl.
Radar 10139522 - Part 1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140038 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5584d91c938384b57563edbca5c2d4f1c66ff02a 19-Sep-2011 John McCall <rjmccall@apple.com> In apple-kext mode, use external linkage for explicit template instantiations
instead of internal linkage.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140030 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
416f63e42d4c34a38833a3aa8fa1ebb3c847722b 18-Sep-2011 Richard Smith <richard-llvm@metafoo.co.uk> PR10304: Do not call destructors for data members from union destructors. Prior to C++11, this
has no effect since any such destructors must be trivial, and in C++11 such destructors must not
be called.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139997 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
ae270598d5c7a9a283d4b3ddce53b151c6e2b182 15-Sep-2011 Bill Wendling <isanbard@gmail.com> Refactor the load of the exception pointer and the exception selector from their
storage slot into helper functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139826 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCRuntime.cpp
odeGenFunction.h
197056726ed6412501130c2ef2ff69009772aa65 15-Sep-2011 John McCall <rjmccall@apple.com> Rewrite this loop to use partial destruction; I'm not sure it's
possible for that to matter right now, but eventually I think we'll
need to unify this better, and then it might. Also, use a more
efficient looping structure.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139788 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
odeGenFunction.h
3460c0c761eb4b4b5d835aeda3807f81709df8ef 15-Sep-2011 John McCall <rjmccall@apple.com> Sorry, that assertion actually already exists.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139770 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
082aadee6381ec5e99c19c1e4aef41dcc5c00d2b 15-Sep-2011 John McCall <rjmccall@apple.com> We don't generate null initializer expressions anymore, and
we don't need to.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139769 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
f60dca355d3e754b7a51726c7455d1e7583a65ba 15-Sep-2011 Devang Patel <dpatel@apple.com> Emit debug info for c++0x nullptr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139752 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2121cdaa41dbf4f64a1f2979af242b54987d661e 14-Sep-2011 Eric Christopher <echristo@apple.com> Formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139681 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5c22ad2ef6bf39da22d5190025e0ddfd4b568b2a 14-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Fix comment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139678 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
edc9592b2d100f841ae0ba69f07a5eaaccb08900 14-Sep-2011 Eric Christopher <echristo@apple.com> Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139668 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a45680b7e7c49ea9893c6cff585984f3e4120366 14-Sep-2011 John McCall <rjmccall@apple.com> Correctly generate IR for casted "builtin" functions, where
the builtin is really just a predefined declaration. These are
totally valid to cast.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139657 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenModule.cpp
eb43f4a8f133c2bc510ae136a556e92b68a6ff44 14-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Re-commit r139643.

Make clang use Acquire loads and Release stores where necessary.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139650 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
taniumCXXABI.cpp
a179b531f4728b91291bfbf639ddf71ed7db810a 14-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Revert r139643 while I look into it; it's breaking selfhost.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139648 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
taniumCXXABI.cpp
93013b235680b184be3cda150bcd6456944415f4 13-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Make clang use Acquire loads and Release stores where necessary.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139643 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
taniumCXXABI.cpp
de24d44665486e98df2aeb2ef5bbc163abfe7981 13-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Turn off the generation of unaligned atomic load/store; I'm going to explicitly error out on such cases in the backend, at least for the moment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139640 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
265941bc308d65cc270d5c4de5806f37ce405606 13-Sep-2011 John McCall <rjmccall@apple.com> Refactoring, mostly to give ObjCPropertyDecls stronger invariants for
their semantic attributes and then to take advantage of that.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139615 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
e289d81369914678db386f6aa86faf8f178e245d 13-Sep-2011 Douglas Gregor <dgregor@apple.com> Switch LangOptions over to a .def file that describes header of the
language options. Use that .def file to declare the LangOptions class
and initialize all of its members, eliminating a source of annoying
initialization bugs.

AST serialization changes are next up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139605 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
c5d9a90b3a3c16324e0cceeccec3d2993888deb6 13-Sep-2011 John McCall <rjmccall@apple.com> Don't use native atomics on ivars whose size is not a power of two,
even on architectures that support unaligned access (which is the
only way this is otherwise legal, given that ivars apparently do
not honor alignment attributes).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139590 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
6c11f0b3106263600af2ea0438ebb372821514aa 13-Sep-2011 John McCall <rjmccall@apple.com> Handle reference properties correctly in the trivial-getter check.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139585 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
5889c60d19101156a3a54b8c49bcc60a12cc1fdb 13-Sep-2011 John McCall <rjmccall@apple.com> Always emit bitfield properties using expression behavior, even if they're
atomic. This is probably something we should warn about.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139584 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
1e1f4871535f2cadcbf8c9af8cc48a2213192320 13-Sep-2011 John McCall <rjmccall@apple.com> Unify the decision of how to emit property getters and setters into a
single code path. Use atomic loads and stores where necessary. Load and
store anything of the appropriate size and alignment with primitive
operations instead of going through the call.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139580 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.h
41bdde9e961c4d96a94148f20f0b18397f4358dd 13-Sep-2011 John McCall <rjmccall@apple.com> Privatize the setter/getter call generation methods, plus some minor
modernization. No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139555 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.h
e7566cf6e194946c2b6540444e99452e3e678349 12-Sep-2011 Devang Patel <dpatel@apple.com> By popular demand, enumerate all builtin types!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139521 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3d3aa19232cef951193e087b8d11ae9fe02be69d 12-Sep-2011 Devang Patel <dpatel@apple.com> Add an assert so that new builtins do not sneak without proper debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139514 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e8ee3f2cda32818f30004226f7d8d27bada9b509 12-Sep-2011 Devang Patel <dpatel@apple.com> Fix debug info encodings for char16_t and char32_t.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139502 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
bbb253c307bc98fea5af9c9e59003e1c0da4cdc2 10-Sep-2011 John McCall <rjmccall@apple.com> Modernize and comment; no functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139470 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
71c758d3f4ecc8b511e6ae4a7210486aa994c182 10-Sep-2011 John McCall <rjmccall@apple.com> Simplify the generation of Objective-C setters, at least a little.
Use a more portable heuristic for deciding when to emit a single
atomic store; it's possible that I've lost information here, but
I'm not sure how much of the logic before was intentionally arch-specific
and how much was just not quite consistent.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139468 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.h
odeGenModule.h
33e56f3273457bfa22c7c50bc46cf5a18216863d 10-Sep-2011 John McCall <rjmccall@apple.com> Rename the ARC cast kinds to start with "ARC".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139466 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
dc05b11c67331016473fbc7909827b1b89c9616b 10-Sep-2011 John McCall <rjmccall@apple.com> When converting a block pointer to an Objective-C pointer type, extend
the lifetime of the block by copying it to the heap, or else we'll get
a dangling reference because the code working with the non-block-typed
object will not know it needs to copy.

There is some danger here, e.g. with assigning a block literal to an
unsafe variable, but, well, it's an unsafe variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139451 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
68f76b112cb50b6dd6cf6935680bc8f242f43441 10-Sep-2011 Devang Patel <dpatel@apple.com> Emit debug info for wchar_t.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139443 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
94da1587f7d584fc61df793229d197969f204cd9 10-Sep-2011 Douglas Gregor <dgregor@apple.com> Clean up our handling of Objective-C definitions in AST files. Rather
than having CodeGen check whether a declaration comes from an AST file
(which it shouldn't know or care about), make sure that the AST writer and
reader pass along "interesting" declarations that CodeGen needs to
know about.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139441 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
919814def90acecd25a35445862f0c0ff72a9b05 10-Sep-2011 Douglas Gregor <dgregor@apple.com> Introduce a new predicate Decl::isFromASTFile() to determine whether a
declaration was deserialized from an AST file. Use this instead of
Decl::getPCHLevel() wherever possible. This is a simple step toward
killing off Decl::getPCHLevel().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139427 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ef004ec5adb0e11815cef3435fa5ac7366d783a9 10-Sep-2011 Julien Lerouge <jlerouge@apple.com> Remove trailing } in comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139424 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
77f68bb90af93b95045fb994e7cd68137adcc132 10-Sep-2011 Julien Lerouge <jlerouge@apple.com> Bring llvm.annotation* intrinsics support back to where it was in llvm-gcc: can
annotate global, local variables, struct fields, or arbitrary statements (using
the __builtin_annotation), rdar://8037476.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139423 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDecl.cpp
GExpr.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
acae01124151392a842bd6c37bd01b1ad56d6b4d 09-Sep-2011 Eric Christopher <echristo@apple.com> Carry the debug information from single exit unified return block
along with the new insert point.

Fixes PR10829

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139416 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
13db5cfc4e5f03eb70efe0d227b53b8280f16161 09-Sep-2011 John McCall <rjmccall@apple.com> Treat the weak export of block runtime symbols as a deployment-target
feature akin to the ARC runtime checks. Removes a terrible hack where
IR gen needed to find the declarations of those symbols in the translation
unit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139404 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenModule.cpp
ead363bdd2756efa945108941ab46bbde3bd8bdf 09-Sep-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Do a lookup for the blocks runtime globals to see if they were declared,
instead of codegen waiting to consume such a declaration, which won't
happen if that decls are coming from a PCH.

Fixes rdar://10028656.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139359 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
1d9b3b25f7ac0d0195bba6b507a684fe5e7943ee 09-Sep-2011 John McCall <rjmccall@apple.com> Give conversions of block pointers to ObjC pointers a different cast kind
than conversions of C pointers to ObjC pointers. In order to ensure that
we've caught every case, add asserts to CastExpr that strictly determine
which cast kind is used for which kind of bit cast.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139352 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
6aff47db98890aa537edfb579b21d11d5ea3d1cd 08-Sep-2011 Eric Christopher <echristo@apple.com> Formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139296 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
c83b975f1fb9d11e10b5aa25029ae9bb5fa80e07 07-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Switch clang over to using fence/atomicrmw/cmpxchg instead of the intrinsics (which will go away). LLVM CodeGen does almost exactly the same thing with these and the old intrinsics, so I'm reasonably confident this will not break anything.

There are still a few issues which need to be resolved with code generation for atomic load and store, so I'm not converting the places which need those for now.

I'm not entirely sure what to do about __builtin_llvm_memory_barrier: the fence instruction doesn't expose all the possibilities which can be expressed by __builtin_llvm_memory_barrier. I would appreciate hearing from anyone who is using this intrinsic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139216 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
1ddc9c4674b7c737ec65241a531df8c64e40b0a9 06-Sep-2011 Douglas Gregor <dgregor@apple.com> When extracting the callee declaration from a call expression, be sure
to look through SubstNonTypeTemplateParmExprs. Then, update the IR
generation of CallExprs to actually use CallExpr::getCalleeDecl()
rather than attempting to mimick its behavior (badly).

Fixes <rdar://problem/10063539>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139185 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
576cf17055c92e7d1ae8fb9fd9f79433a16a4394 06-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Rearrange code so that we pass the right pointer to delete[] when an exception is thrown constructing the array elements in an array new expression. Fixes PR10870.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139158 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
b2b5658a8e4ad566303ec98caceaa3485e7635f7 06-Sep-2011 Douglas Gregor <dgregor@apple.com> When performing a derived-to-base cast on the right-hand side of the
synthesized move assignment within an implicitly-defined move
assignment operator, be sure to treat the derived-to-base cast as an
xvalue (rather than an lvalue). Otherwise, we'll end up getting the
wrong constructor.

Optimize a direct call to a trivial move assignment operator to an
aggregate copy, as we do for trivial copy assignment operators, and
update the the assertion in CodeGenFunction::EmitAggregateCopy() to
cope with this optimization.

Fixes PR10860.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139143 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprCXX.cpp
d295b8229c119e0f2b085874249437347084e320 02-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> blocks: Support capturing complex variable in block.
// rdar://10033896


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139041 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
776b790fe404360b691f2dd477877a1112db7ad2 02-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> revert patch in r139020


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139029 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
da8e571ce443304665de1a1713980e7f2a2dbc54 02-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> blocks: Support capturing complex variable in block.
// rdar://10033896


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139020 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.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
GCall.cpp
GDebugInfo.cpp
GDeclCXX.cpp
GException.cpp
GExprAgg.cpp
GExprConstant.cpp
GObjC.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GRecordLayoutBuilder.cpp
GVTables.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
taniumCXXABI.cpp
oduleBuilder.cpp
argetInfo.cpp
7803ec829d1cc657e21bb0d1afb8596a81bfd542 01-Sep-2011 Nick Lewycky <nicholas@mxc.ca> Don't try to emit unsupported templated friend declarations. They're unsupported
and may very well be dependent-types, triggering an assertion in debug info
codegen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138970 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
85ea7aa961deac1d754f610af8062ae3f8b4e2a5 30-Aug-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Declare and define implicit move constructor and assignment operator.

This makes the code duplication of implicit special member handling even worse,
but the cleanup will have to come later. For now, this works.
Follow-up with tests for explicit defaulting and enabling the __has_feature
flag to come.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138821 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
GExprConstant.cpp
49e34be6ae0c25b9843610cdd2fd6fea9cd8b870 30-Aug-2011 John McCall <rjmccall@apple.com> The size of struct UnwindException varies by platform with no
apparent general rule. Just special-case it as appropriate.
PR10789.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138792 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
argetInfo.h
2148011bffc011f8e5f5b6dc1e312fa4afbc10a9 30-Aug-2011 John McCall <rjmccall@apple.com> Be sure to emit lvalue-to-rvalue casts for loads from x-values.
Doing this happens to disrupt the pattern that ARC was looking for
for move optimizations, so we need to fix that simultaneously.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138789 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
74cfb23d44de82f1932f0229b742805b0b3c3719 27-Aug-2011 Benjamin Kramer <benny.kra@googlemail.com> Remove unused variables noticed by GCC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138707 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
cec52f0623d57f090e3477941acebe4932fa7abd 26-Aug-2011 John McCall <rjmccall@apple.com> Slight optimization enabled by the previous assert:
emit all gl-value arguments as reference bindings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138655 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
8affed5107ea79bf4d429770d2873e9c7288255e 26-Aug-2011 John McCall <rjmccall@apple.com> Assert that a call argument is a gl-value iff the parameter is a reference type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138639 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
fd71fb81c5f9382caf0131946e890b133e12ceb5 26-Aug-2011 John McCall <rjmccall@apple.com> What say we document some of these AggValueSlot flags a bit
better.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138628 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GValue.h
4418439220a8f8e0b1deffdccce2354854c702f5 26-Aug-2011 John McCall <rjmccall@apple.com> Since the 'is aliased' bit is critical for correctness in C++, it
really shouldn't be optional. Fix the remaining place where a
temporary was being passed as potentially-aliased memory.

Fixes PR10756.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138627 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprCXX.cpp
GValue.h
90b2bdf3b96892ea44e5bf6869a92a08d09a6545 26-Aug-2011 John McCall <rjmccall@apple.com> An initialization does not alias.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138624 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
1366862c3f5d390140b5978380d9ac7317d60fc6 26-Aug-2011 John McCall <rjmccall@apple.com> The allocated exception slot does not alias anything; should fix self-host.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138615 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
1b9060553221720152e12981109549e0a1d8e3a1 26-Aug-2011 Chad Rosier <mcrosier@apple.com> [driver] Add -mglobal-merge/-mno-global-merge machine options to enable/disable merging of
globals during codegen.
Fixes <rdar://problem/10017909>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138612 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
410ffb2bc5f072d58a73c14560345bcf77dec1cc 26-Aug-2011 John McCall <rjmccall@apple.com> Track whether an AggValueSlot is potentially aliased, and do not
emit call results into potentially aliased slots. This allows us
to properly mark indirect return slots as noalias, at the cost
of requiring an extra memcpy when assigning an aggregate call
result into a l-value. It also brings us into compliance with
the x86-64 ABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138599 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GExpr.cpp
GExprAgg.cpp
GObjC.cpp
GStmt.cpp
GValue.h
odeGenFunction.h
7c2349be2d11143a2e59a167fd43362a3bf4585e 25-Aug-2011 John McCall <rjmccall@apple.com> Use stronger typing for the flags on AggValueSlot and require
creators to tell us whether something needs GC barriers.
No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138581 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GObjC.cpp
GStmt.cpp
GValue.h
odeGenFunction.h
045c84264f7c9d5b166e9a93d8fe62c777d3039c 25-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> blocks - capturing logic of byref block variable's expression
statement initializer makes safe assumption when a substatement
is encounterred (with a fix me).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138528 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
a6b4045dc462c03cd1e7cb9c3ec9dbfdb9c6ad62 24-Aug-2011 Evan Cheng <evan.cheng@apple.com> Match LLVM change: TargetRegistry and TargetSelect have been moved to Support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138451 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
736a9c211c065784f7a7889ade55aa569a89520e 24-Aug-2011 Eric Christopher <echristo@apple.com> Make constant aggregate constant initializers private linkage.
After talking with John making this the case for all of these is
the right way to go.

Fixes rdar://9804564 and PR10414

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138418 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
c6fad60801ff271d425ff8f635b66998008ffd7a 24-Aug-2011 Eric Christopher <echristo@apple.com> Whitespace and 80-col cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138413 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
e1f549028bd6850e7d85ab6bce7626050d2e8ace 24-Aug-2011 Eric Christopher <echristo@apple.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138404 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
dbff1a0dde2019f0a7688bf87656d6e5162912fa 23-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Cleanup to use helper.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138369 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
5033be1b3a6f1d1c1ab9b2d284267c8f6f531f2e 23-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> checking for __block variable captured by given
stmt expression, recursively walk down all substatements
of the stmt expression. // rdar://10001085


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138334 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
b9dbab1e78917c80704428f948f7b2ef8110f8e1 23-Aug-2011 Fariborz Jahanian <fjahanian@apple.com> block IRgen - Fixes a crash when determining if given block variable
is captured by a given statement expression. // rdar://10001085


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138314 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
2873aee1774a2ae731d6cc5c5ee05ba82780dc98 23-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Make sure we don't inline functions marked with __attribute__((naked)). <rdar://problem/9973228>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138310 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
012614ecf78442368ec82ee30efb3bc047b413e6 17-Aug-2011 Ted Kremenek <kremenek@apple.com> Fix a handful of dead stores found by Clang's static analyzer. There's a bunch of others I haven't touched.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137867 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
75cf3e86d33ce810c12084126385371b335c30ba 17-Aug-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Mark objc methods that are implicitly declared for properties (not user-declared) as implicit.
This results in libclang ignoring such methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137852 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f391dbe39dca85f2a2c6ea558811dacc571c223e 16-Aug-2011 Devang Patel <dpatel@apple.com> Finalize debug info after all deferred globals are emitted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137750 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4111feff7ccefee4efda8832eb14a9e64b2ffc1a 16-Aug-2011 Devang Patel <dpatel@apple.com> Use new DIBuilder::finalize() at the end to wrap up debug info encoding for a translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137674 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.h
odeGenModule.cpp
041087caec03e8855770695d3eabc0feb031f6ed 16-Aug-2011 Eric Christopher <echristo@apple.com> 'pure' and 'const' functions should also be marked nounwind. Migrate
test over from llvm/test/FrontendC++ and update others to account for
the change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137669 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ec24b0ed9ccf8b34986eadeb98dd0b4a0a50f6f2 14-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Fix r137086 to actually work properly in general. PR10650.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137574 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
af0f4d0b2e38c810effc8b024ad2fb6604eec5d3 14-Aug-2011 Francois Pichet <pichet2000@gmail.com> Implement function template specialization at class scope extension in Microsoft mode. A new AST node is introduced: ClassScopeFunctionSpecialization. This node holds a FunctionDecl that is not yet specialized; then during the class template instantiation the ClassScopeFunctionSpecialization will spawn the actual function specialization.

Example:
template <class T>
class A {
public:
template <class U> void f(U p) { }
template <> void f(int p) { } // <== class scope specialization
};

This extension is necessary to parse MSVC standard C++ headers, MFC and ATL code.
BTW, with this feature in, clang can parse (-fsyntax-only) all the MSVC 2010 standard header files without any error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137573 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
83bbba1fc98dd3b2a351013a40808e995e648f40 13-Aug-2011 Bob Wilson <bob.wilson@apple.com> Move handling of vget_lane/vset_lane before the code that checks the type.

Unlike most of the other Neon intrinsics, these are not overloaded and do not
have the extra argument that specifies the vector type. This has not been
fatal because the lane number operand is supposed to be an ICE and so that
value has harmlessly been used as the type identifier. Radar 9901281.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137550 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.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
GBlocks.cpp
GObjCGNU.cpp
GObjCMac.cpp
GRecordLayoutBuilder.cpp
odeGenTypes.cpp
7b0a0383ef5ba23cbf2968f7cb314be0b80847e8 12-Aug-2011 Akira Hatanaka <ahatanak@gmail.com> Alignment of a va_arg must be at least as large as the ABI's minimum alignment.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137420 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
3827e42982d578ace7713f2e43a7e7e2fa5f8418 12-Aug-2011 Akira Hatanaka <ahatanak@gmail.com> Add definition of a static member of a class.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137411 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
01a4cf11777bb34c35f5d251a9e95eb736d0842b 11-Aug-2011 Douglas Gregor <dgregor@apple.com> Encapsulate the Objective-C id/Class/SEL "redefinition" types in
ASTContext with accessors/mutators. The only functional change is that
the AST writer won't bother writing the id/Class/SEL redefinition type
if it hasn't been explicitly set; previously, it ended up being
written as a synonym for the built-in id/Class/SEL.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137349 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
777d6e56ad9b1fed9866daf3ee6486d85c5b7d32 11-Aug-2011 John McCall <rjmccall@apple.com> Simplify EH control flow by observing that EH scopes form a simple
hierarchy of delegation, and that EH selector values are meaningful
function-wide (good thing, too, or inlining wouldn't work).
2,3d
1a
hierarchy of delegation and that EH selector values have the same
meaning everywhere in the function instead of being meaningful only
in the context of a specific selector.

This removes the need for routing edges through EH cleanups,
since a cleanup simply always branches to its enclosing scope.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137293 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
GCleanup.h
GException.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
e7d002041dc60521f237b4219fd4167d1fe67aa7 10-Aug-2011 John McCall <rjmccall@apple.com> Formatting.



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



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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137126 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GClass.cpp
GVTables.cpp
0815b579b31cb3129f732bb7ea36fd6ba6949e98 09-Aug-2011 Douglas Gregor <dgregor@apple.com> Move the creation of the record type for the state of Objective-C fast
enumerations from the ASTContext into CodeGen, so that we don't need
to serialize it to AST files. This appears to be the last of the
low-hanging fruit for SpecialTypes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137124 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenModule.cpp
odeGenModule.h
45c4ea75b235de94f44bf96843624e6a559e4c00 09-Aug-2011 Douglas Gregor <dgregor@apple.com> Move the construction of the RecordDecl representing the runtime
layout of a constant NSString from the ASTContext over to CodeGen,
since this is solely CodeGen's responsibility. Eliminates one of the
unnecessary "special" types that we serialize.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137121 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
3f86ce1dc64a46d9cd3675787b8af32c9158abe6 09-Aug-2011 Douglas Gregor <dgregor@apple.com> Hand materialization of temporary expressions when emitting a scalar
expression. Fxies PR10592.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137086 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
4bd5d09e3a233ed23ec6f913166e4b75d8de215c 08-Aug-2011 David Chisnall <csdavec@swan.ac.uk> Fix typo so we don't use the wrong function for ending ObjC++ catch blocks (GNU runtimes)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137052 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
f66a3ea8595d44843f43b8c4b0825b1f8ceeda78 07-Aug-2011 John McCall <rjmccall@apple.com> Avoid fallthrough-branching to an inactive cleanup even if it's
otherwise required.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137029 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
82cd2e5c15aa909ec9613c4228ab69e07f1c6f7a 06-Aug-2011 John McCall <rjmccall@apple.com> Be sure to destroy the normal entry block of a cleanup that we
aren't actually going to make a normal cleanup for. Sometimes
we optimistically create branches to such blocks for fixups,
and then we resolve the fixup to somewhere within the cleanup's
scope, and then the cleanup is actually not reachable for some
reason. The process of resolving the fixup leaves us with
switches whose default edge leads to the cleanup; we can
replace that with unreachable, then (in many cases) turn
the switch into an unconditional branch.

Fixes PR10467.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137011 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
4b302d32378b364703b212834f908762e570c29c 05-Aug-2011 John McCall <rjmccall@apple.com> The continue label in an ARC for-in loop should not involve
releasing the collection.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136949 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
a5e19c6b2554f6d9c4b9850d4dbbbfa3643282e5 04-Aug-2011 John McCall <rjmccall@apple.com> Emit wide string literals with the appropriate alignment.
Patch by Craig Topper and Sundeep!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136856 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
bddfd87863bac7aa17d226cdfb228f49b30dd5f2 04-Aug-2011 John McCall <rjmccall@apple.com> Use the general conditional-cleanup framework instead of rolling our
own, incorrectly, for releasing objects at the end of a full-expression.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136823 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
194f06a476d299a7a70e5ff1d152f5895dc0a76c 03-Aug-2011 Bob Wilson <bob.wilson@apple.com> Handle "homogeneous aggregates" as required by the ARM AAPCS-VFP ABI.

A homogeneous aggregate is an aggregate data structure where after flattening
any nesting there are 1 to 4 elements of the same base type that is either a
float, double, or Neon vector. All Neon vectors of the same size, either 64
or 128 bits, are treated as equivalent for this purpose. When using the
AAPCS-VFP ABI, check for homogeneous aggregates and pass them as arguments by
expanding them into a sequence of their base types. This requires extending
the existing support for expanded arguments to handle not only structs, but
also constant arrays and complex types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136767 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
argetInfo.cpp
40f9c302f23a35611cd354f40b22b37f2c554a40 03-Aug-2011 John McCall <rjmccall@apple.com> When rewriting a call to a K&R function to lead to a well-prototyped
function, be sure to drop parameter attributes when dropping their
associated arguments. Patch by Aaron Landwehr!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136753 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
e164c180527354acc16c1b9b2c5a5ed4a1e484d4 03-Aug-2011 Rafael Espindola <rafael.espindola@gmail.com> Implements alignment for long long and double types in va_arg on ARM AAPCS.
Patch by Jim (Ningjie) Chen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136734 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
cf565c57371b3d294a1737c8f3924491d2fe8e3e 02-Aug-2011 Rafael Espindola <rafael.espindola@gmail.com> Update for LLVM change in PassManagerBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136728 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
aebab72698ce5283395e61597a266fb04e62e390 02-Aug-2011 Eli Friedman <eli.friedman@gmail.com> PR10566: Make sure codegen for deleting an pointer to an incomplete type actually works.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136703 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
53fc1a6151ec31350309f479c0d2252366e4815c 02-Aug-2011 Bob Wilson <bob.wilson@apple.com> Revert "Re-enable byval for ARM in clang. rdar://problem/7662569"

This reverts commit 67d097e1232b7d66f58989c16a45b8a11721f76e.
We found a miscompile with ARM byval, which is still being investigated.
In the meantime, this works around the problem by disabling ARM byval.

Conflicts:
lib/CodeGen/TargetInfo.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136662 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
c35e69d758e43563ec3785cdd4472d9f2386cf9a 01-Aug-2011 Akira Hatanaka <ahatanak@gmail.com> Implement MipsABIInfo::EmitVAArg. This fix enables clang to complete compilation
without bailing out when va_arg is an aggregate expression. However,
alignment checking needs to be added in isSafeToEliminateVarargsCast in
InstCombineCalls.cpp in order to produce correct mips code (see link below).

http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-July/042047.html





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136647 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
511949bf7ea721556ea3eb2777fc1e36e6c3e243 01-Aug-2011 Akira Hatanaka <ahatanak@gmail.com> Pass records with non-trivial destructors or constructors indirectly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136630 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
3fc81d32314eca98b51846f493a8bc77cf14a701 01-Aug-2011 David Chisnall <csdavec@swan.ac.uk> Fix linkage type for tentative definition of ivar offset variables (GNUstep runtime)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136628 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
da549e8995c447542d5631b8b67fcc3a9582797a 29-Jul-2011 Jay Foad <jay.foad@gmail.com> Remove some unnecessary single element array temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136461 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDeclCXX.cpp
GException.cpp
GObjC.cpp
GObjCGNU.cpp
taniumCXXABI.cpp
93f1322684e928a559286ba1c7cb83af077aa658 29-Jul-2011 Peter Collingbourne <peter@pcc.me.uk> Fix assertion failure in CodeGen where the input operand to an asm
instruction is tied to an output operand which is a pointer, and
the input operand is narrower than the output operand.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136438 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
fb7208119a60f68c87e7d4b6e4b87371871abb49 28-Jul-2011 John McCall <rjmccall@apple.com> Fix a couple of problems with initialization and assignment to
__block variables where the act of initialization/assignment
itself causes the __block variable to be copied to the heap
because the variable is of block type and is being assigned
a block literal which captures the variable.

rdar://problem/9814099



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136337 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GObjC.cpp
07524039dce5c820f111a1b3f772b4261f004b4a 27-Jul-2011 John McCall <rjmccall@apple.com> The lock operand to an @synchronized statement is also
supposed to be a full-expression; make it so. In ARC, make sure
we retain the lock for the entire protected block.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136271 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCRuntime.cpp
e926523105dd2604ccd5c101605dea43c5269965 27-Jul-2011 Peter Collingbourne <peter@pcc.me.uk> CodeGen: rename CodeGenModule::Runtime to ObjCRuntime

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136254 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
odeGenModule.cpp
odeGenModule.h
91873b72bf01b7170f80154f3118300ff2eacd34 27-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Make CodeGen for array delete involving incomplete class work without crashing. Should fix regression on g++.dg/init/delete1.C.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136241 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
5cee1195584fa8672253139c86e922daeda69b9e 27-Jul-2011 Douglas Gregor <dgregor@apple.com> Add support for C++0x unicode string and character literals, from Craig Topper!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136210 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
990567cb60e8530ba01b41d4e056e32b44b95ec0 27-Jul-2011 John McCall <rjmccall@apple.com> Clean up the analysis of the collection operand to ObjC
for-in statements; specifically, make sure to close over any
temporaries or cleanups it might require. In ARC, this has
implications for the lifetime of the collection, so emit it
with a retain and release it upon exit from the loop.

rdar://problem/9817306



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136204 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
3e23d68e2e642db107b78aac2bb27585ed0ef337 27-Jul-2011 Douglas Gregor <dgregor@apple.com> Disable the optimization that skips emission of complete, non-virtual
destructors of abstract classes. It's undefined behavior to actually
call the destructor (e.g., via delete), but the presence of code that
calls this destructor doesn't make the program
ill-formed. Fixes <rdar://problem/9819242>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136180 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
642116259e8df6286063a17361c20e95b5017a0a 25-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Rename getInstantiationLineNumber to getExpansionLineNumber in both
SourceManager and FullSourceLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135969 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
402785357ab053dd53f4fdd858b9630a5e0f8bad 25-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Mechanically rename SourceManager::getInstantiationLoc and
FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part
of the API and documentation update from 'instantiation' as the term for
macros to 'expansion'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135914 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1cbac8ac446cf513dbc7486dd50abd55bcfc62c6 25-Jul-2011 Frits van Bommel <fvbommel@gmail.com> Shorten some expressions by using ArrayRef::slice().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135910 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
9f5bff086cad25c15b4deb8a7763786097aadccd 23-Jul-2011 Chris Lattner <sabre@nondot.org> fix PR10415, tidying up IR representation of module level inline asm
to avoid extraneous \n's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135862 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2d3ba4f5a923a90c3fc290ddfba5e36c2d0a9b46 23-Jul-2011 Chris Lattner <sabre@nondot.org> Move ArrayRef to LLVM.h and eliminate now-redundant qualifiers, patch by Jon Mulder!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135855 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
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
GBlocks.cpp
GBuiltin.cpp
GCXX.cpp
GCXXABI.cpp
GCall.cpp
GClass.cpp
GCleanup.cpp
GDebugInfo.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GRTTI.cpp
GRecordLayoutBuilder.cpp
GStmt.cpp
GVTT.cpp
GVTables.cpp
odeGenAction.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenTBAA.cpp
odeGenTypes.cpp
taniumCXXABI.cpp
icrosoftCXXABI.cpp
argetInfo.cpp
d47d3b0cfeb7e8564ff77f48130fe63282b6d127 23-Jul-2011 Chris Lattner <sabre@nondot.org> clean up forward declarations of raw_ostream to use the new LLVM.h
patch by Jon Mulder!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135851 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GRecordLayout.h
dc7c5ad7a15914b7ae24f31f18a20ad2f8ecd0bc 22-Jul-2011 John McCall <rjmccall@apple.com> Document the existing objc_precise_lifetime attribute.
Introduce and document a new objc_returns_inner_pointer
attribute, and consume it by performing a retain+autorelease
on message receivers when they're not immediately loaded from
an object with precise lifetime.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135764 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
0f6ac7cf7bc6a02c1a5c19d2c90ec0d1dd7786e7 22-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to use
ArrayRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135761 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GObjCMac.cpp
odeGenFunction.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
odeGenTypes.cpp
ba3dd902d1cde09776a50c1adf2cd40bf0a15a7f 22-Jul-2011 John McCall <rjmccall@apple.com> In ARC, non-atomic getters do not need to retain and autorelease
their loaded values, although it still worth doing this for __weak
properties to get the autoreleased-return-value optimization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135747 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
db8264e4c5ffd7af6fbad4ca4306bd382bb02691 22-Jul-2011 Jordy Rose <jediknil@belkadan.com> Add a const overload for ObjCInterfaceDecl::all_declared_ivar_begin.
This was previously not-const only because it has to lazily construct a chain
of ivars the first time it is called (and after the chain is invalidated).
In practice, all the clients were just const_casting their const Decls;
all those now-unnecessary const_casts have been removed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135741 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.cpp
odeGenModule.cpp
a5c04344fa70d6eec34344760c1fe511e16f2d76 21-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert ConstantExpr::getGetElementPtr and
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135673 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
GRTTI.cpp
GVTT.cpp
odeGenModule.cpp
77577ce8f081892eb579094abe35dd023d71216e 20-Jul-2011 Benjamin Kramer <benny.kra@googlemail.com> Unbreak build after API change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135585 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
9d102547dc44d064b40473a5a5166a8bb0dec99a 20-Jul-2011 Logan Chien <loganchien@google.com> Merge with clang upstream r135574 (Jul 20th 2011)

Change-Id: Ib6cc2ba08a63e4cf8febc05fb6e3f2ca58f1d71d
8cc488fefb2fb04bc8d5398da29f0182f97934cf 20-Jul-2011 Chris Lattner <sabre@nondot.org> add raw_ostream and Twine to LLVM.h, eliminating a ton of llvm:: qualifications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135577 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayout.h
odeGenFunction.h
686775deca8b8685eb90801495880e3abdd844c2 20-Jul-2011 Chris Lattner <sabre@nondot.org> now that we have a centralized place to do so, add some using declarations for
some common llvm types: stringref and smallvector. This cleans up the codebase
quite a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135576 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
GCall.h
GCleanup.h
GDebugInfo.h
GException.h
GVTables.h
odeGenFunction.h
odeGenModule.h
odeGenTBAA.h
odeGenTypes.h
argetInfo.h
b13eab95e1a5bb1e78706179f15f8416e9fbcfbf 20-Jul-2011 Chris Lattner <sabre@nondot.org> fix rdar://9780211 - Clang crashes with an assertion failure building WKView.mm from WebKit

This is something of a hack, the problem is as follows:

1. we instantiate both copied of RetainPtr with the two different argument types
(an id and protocol-qualified id).
2. We refer to the ctor of one of the instantiations when introducing global "x",
this causes us to emit an llvm::Function for a prototype whose "this" has type
"RetainPtr<id<bork> >*".
3. We refer to the ctor of the other instantiation when introducing global "y",
however, because it *mangles to the same name as the other ctor* we just use
a bitcasted version of the llvm::Function we previously emitted.
4. We emit deferred declarations, causing us to emit the body of the ctor, however
the body we emit is for RetainPtr<id>, which expects its 'this' to have an IR
type of "RetainPtr<id>*".

Because of the mangling collision, we don't have this case, and explode.

This is really some sort of weird AST invariant violation or something, but hey
a bitcast makes the pain go away.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135572 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.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
odeGenTypes.cpp
cb8095f766f1fe3d664d90ec450093468933f23c 20-Jul-2011 Chris Lattner <sabre@nondot.org> as eli points out, we're not doing memory stuff here. While ConvertType
and ConvertTypeForMem are the same for pointers, it is best to just
use ConvertType. Thanks Eli!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135567 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
410b12e55395216a02a848a791a38b0f153eba87 20-Jul-2011 Chris Lattner <sabre@nondot.org> fix PR10395 - array decay can produce an interesting type when
decaying an array of incomplete type (which has type [0 x i8]*) to a
normal pointer (which has incompletetype*).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135565 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
2860e30d837ac361c126d4350b5d74f956160eba 19-Jul-2011 Evan Cheng <evan.cheng@apple.com> Match createTargetMachine API change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135469 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
cb2a07e33789df99d28c3b9cd0770b4e3a8f31b5 19-Jul-2011 Devang Patel <dpatel@apple.com> Simplify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135456 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
478b94b9454361446a981851a00f2f92062d4b66 19-Jul-2011 Devang Patel <dpatel@apple.com> Check column number also.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135437 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e9c0265d6e6b5bf865f4a0c2c00d00ac251e6437 18-Jul-2011 Frits van Bommel <fvbommel@gmail.com> Migrate LLVM and Clang to use the new makeArrayRef(...) functions where previously explicit non-default constructors were used.
Mostly mechanical with some manual reformatting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135390 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenTBAA.cpp
dce67a70a86db8758c926a76fdd980f5369d5746 18-Jul-2011 Nick Lewycky <nicholas@mxc.ca> In C99, emit an inline function when encountering an extern redeclaration.
Fixes PR10233!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135377 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.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
GBlocks.cpp
GBlocks.h
GBuiltin.cpp
GCXX.cpp
GCXXABI.cpp
GCall.cpp
GClass.cpp
GCleanup.cpp
GDebugInfo.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GRTTI.cpp
GRecordLayoutBuilder.cpp
GStmt.cpp
GVTT.cpp
GVTables.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
taniumCXXABI.cpp
argetInfo.cpp
174cba922331b896949d02d8b1a05f1998ed98e1 16-Jul-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r135344 at Sat. 16th July 2011.
e9b5d77b7bfd3e8bba05df9914a6e8c336d68ff3 15-Jul-2011 Joerg Sonnenberger <joerg@bec.de> Fix typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135285 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
4c7d9f1507d0f102bd4133bba63348636facd469 15-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert CallInst and InvokeInst APIs to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135265 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCall.cpp
GDeclCXX.cpp
GException.cpp
GExprCXX.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GStmt.cpp
odeGenFunction.h
odeGenModule.cpp
379010addb0e84fd0fbc37c829baf658958521bd 15-Jul-2011 John McCall <rjmccall@apple.com> Fix the definition of AsTypeExpr. I'm still not sure this
is right --- shouldn't there be a TypeLoc in here somewhere? ---
but at least it doesn't have a redundant QualType and a broken
children() method.

Noticed this while doing things in serialization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135257 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
d26c07142710790b820a66245939668f62eaf2d9 15-Jul-2011 Chris Lattner <sabre@nondot.org> protect some calls to ConvertType when a function info is under construction
to prevent recursive compilation problems. This fixes a failure of CodeGen/decl.c
on x86-32 targets that don't fill in the coerce-to type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135256 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.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
GCall.cpp
odeGenTypes.cpp
odeGenTypes.h
91a5755ad73c5dc1dfb167e448fdd74e75a6df56 15-Jul-2011 John McCall <rjmccall@apple.com> Create a new expression node, SubstNonTypeTemplateParmExpr,
to represent a fully-substituted non-type template parameter.
This should improve source fidelity, as well as being generically
useful for diagnostics and such.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135243 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
8dd55a3c3b28d195717c87bbc60e765951d408fe 14-Jul-2011 Benjamin Kramer <benny.kra@googlemail.com> Change intrinsic getter to take an ArrayRef, now that the underlying function in LLVM does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135155 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprCXX.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
b8981df0ed2886dfa221f2fad6d86872c39d3549 13-Jul-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Reapply r134946 with fixes. Tested on Benjamin testcase and other test-suite failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135091 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
d15608e9861ae4c2667780e5f5b59d6b10472aec 13-Jul-2011 Devang Patel <dpatel@apple.com> Emit debug info for extended vectors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135083 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
799d34e9505a833549c71f2ac5f842da157ea031 13-Jul-2011 John McCall <rjmccall@apple.com> Don't crash if defining -dealloc in a category.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135054 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
fbf780a9d1dbb191fc40c8af967c590e08724b74 13-Jul-2011 John McCall <rjmccall@apple.com> Okay, that rule about zero-length arrays applies to destroying
them, too.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135038 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprCXX.cpp
odeGenFunction.h
dd376cae98ce4d0ab92c90d3e9c01ee19e919f44 13-Jul-2011 John McCall <rjmccall@apple.com> Arrays are permitted to be zero-length in some situations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135036 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
c3c0766277cd64bf117450a1519c9cf762d994d4 13-Jul-2011 John McCall <rjmccall@apple.com> Convert the standard default-construction loops to use phis and
partial destruction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135033 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.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
odeGenTypes.cpp
6af13f3a3538d6c075a6282a7f393c26ee1563c7 13-Jul-2011 Chris Lattner <sabre@nondot.org> PR10337 reminds me that calls return values, lets handle them just
like arguments. Thanks PR10337! :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135030 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
8f62992730c88e3b9d6815c322e045e79251d3d5 13-Jul-2011 John McCall <rjmccall@apple.com> Aggressive dead code elimination.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135029 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
a91f6661c4685fecee6dc09bdaef73254c1aaa06 13-Jul-2011 John McCall <rjmccall@apple.com> Generalize the routine for destroying an object with static
storage duration, then explicitly exempt ownership-qualified
types from it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135028 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenFunction.h
7cfd76cb5cec2aa7aaa4176339c806de6ec85a79 13-Jul-2011 John McCall <rjmccall@apple.com> Switch delete[] IR-generation over to the destroy framework,
which implicitly makes it EH-safe as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135025 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
a8b20f70d562cdc2679f82d409832b79fc415277 13-Jul-2011 Douglas Gregor <dgregor@apple.com> When compiling ::delete for a class with a virtual destructor, call
the complete destructor and then invoke the global delete
operator. Previously, we would invoke the deleting destructor, which
calls the wrong delete operator. Fixes PR10341.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135021 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
548e478b8bd02b0295bc4efd0c282337f00646fd 13-Jul-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Revert r134946

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135004 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
ad346f4f678ab1c3222425641d851dc63e9dfa1a 12-Jul-2011 John McCall <rjmccall@apple.com> Generalize Cleanup::Emit's "isForEH" parameter into a set
of flags. No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134997 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GClass.cpp
GCleanup.cpp
GDecl.cpp
GException.cpp
GExprCXX.cpp
GObjC.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GTemporaries.cpp
odeGenFunction.h
taniumCXXABI.cpp
0d516767a3af70538a40a297577960034e6ad66f 12-Jul-2011 Benjamin Kramer <benny.kra@googlemail.com> Add more compiler workarounds. Should fix the build with old GCCs and MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134995 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
5bcd95efc380b0f7e74290e0555facb760935767 12-Jul-2011 John McCall <rjmccall@apple.com> Ugh, use this compiler workaround again.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134989 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
9928c4805aa8d5fabd488d0d0c5aeb64fd50f0e3 12-Jul-2011 John McCall <rjmccall@apple.com> Switch field destruction over to use the new destroyer-based API
and kill a lot of redundant code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134988 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GClass.cpp
GDecl.cpp
GExpr.cpp
GObjC.cpp
odeGenFunction.h
df983a8bcbbcea911b8dce283f044787df119d50 12-Jul-2011 Jay Foad <jay.foad@gmail.com> Second attempt at de-constifying LLVM Types in FunctionType::get(),
StructType::get() and TargetData::getIntPtrType().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134982 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a98742c32c159a8c76f842947c02a79c530a1d4b 12-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Work around a problem with a static helper's formulation in release
builds introduced in r134972:

lib/CodeGen/CGExpr.cpp:1294:7: error: no matching function for call to 'EmitBitCastOfLValueToProperType'
lib/CodeGen/CGExpr.cpp:1278:1: note: candidate function not viable: no known conversion from 'CGBuilderTy' (aka 'IRBuilder<false>') to 'llvm::IRBuilder<> &' for 1st argument

This fixes the issue by passing CodeGenFunction on down, and using its
builder directly rather than passing just the builder down.

This may not be the best / cleanest fix, Chris please review. It at
least fixes builds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134977 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.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
GExpr.cpp
odeGenTypes.cpp
811bf3669f4d82c57fe3cd3c49050fdbc95d0aff 12-Jul-2011 Chris Lattner <sabre@nondot.org> insert a bitcast in the 'expand' case of argument passing when needed. This
fixes the -m32 build of oggenc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134971 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.h
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
odeGenTypes.cpp
21ca1fdb25c2bb98721e569aacd10e8b684dd51a 12-Jul-2011 Chris Lattner <sabre@nondot.org> fix PR10335 by watching out for IR type compatibility in call argument lists.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134966 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
708554498595e047cc53e366c91cc063fcc1c5bc 12-Jul-2011 Chris Lattner <sabre@nondot.org> add some aggressive assertions that call arguments match up to callee
expectations in EmitCall. Next patch will take this further.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134962 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
75d28b58d97c60cc01898b8e4ca958c27aef05c7 12-Jul-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Fix a typo!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134952 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
089d8927abe73fe6a806987937d9b54b1a7a8659 12-Jul-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Do the same as r134946 for arrays. Add more testcases for avx x86_64 arg
passing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134951 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
e455f1c32b9b35e28d2a4ab49beccb62f0d8d79d 12-Jul-2011 Bill Wendling <isanbard@gmail.com> Revert r134888 (and related patches in other trees). It was causing
an assert on Darwin llvm-gcc builds.

Assertion failed: (castIsValid(op, S, Ty) && "Invalid cast!"), function Create, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.llvm-gcc-i386-darwin9-RA/llvm.src/lib/VMCore/Instructions.cpp, line 2067.
etc.

http://smooshlab.apple.com:8013/builders/llvm-gcc-i386-darwin9-RA/builds/2354

--- Reverse-merging r134888 into '.':
U lib/CodeGen/CodeGenModule.cpp



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134950 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ccafadb68f5a8132a4ee23f441cf5d6976a4133b 12-Jul-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Fix one x86_64 abi issue and the test to actually look for the right thing,
which is: { <4 x float>, <4 x float> } should continue to go through memory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134946 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
c4a1a8450a3613ef256a71b9d8305b41f79eef50 12-Jul-2011 John McCall <rjmccall@apple.com> Do full-expression cleanups in a much more sensible way that still lets
people write useful cleanup classes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134942 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
GException.cpp
GObjC.cpp
GTemporaries.cpp
odeGenFunction.h
4943c15df59fdec444656a48c16e72a2077ab61f 12-Jul-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Reapply r134754, which turns out to be working correctly and also
add one more testcase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134934 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
2b30dcfb769e4015f8d41c5c9a4e723ff3d522a0 11-Jul-2011 John McCall <rjmccall@apple.com> Emit partial destruction of structs with initializer lists.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134913 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.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
GBlocks.cpp
GExprConstant.cpp
GObjCGNU.cpp
GStmt.cpp
odeGenTypes.cpp
argetInfo.cpp
argetInfo.h
2673c68aa58e277ebc755b71d81aca618cdedbf9 11-Jul-2011 John McCall <rjmccall@apple.com> Fix a lot of problems with the partial destruction of arrays:
- an off-by-one error in emission of irregular array limits for
InitListExprs
- use an EH partial-destruction cleanup within the normal
array-destruction cleanup
- get the branch destinations right for the empty check
Also some refactoring which unfortunately obscures these changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134890 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprAgg.cpp
odeGenFunction.h
00d40eae546219786a74564fc0d95eab1978b82b 11-Jul-2011 Jay Foad <jay.foad@gmail.com> De-constify Types in FunctionType::get().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134888 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
61c1601e2a8534c09cb7032f791f918158abaa27 10-Jul-2011 John McCall <rjmccall@apple.com> Use cached types; no functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134880 91177308-0d34-0410-b5e6-96231b3b80d8
GException.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
odeGenTypes.cpp
1b5ba858e4628049a7105257fa712b4ab93c0a62 10-Jul-2011 Chris Lattner <sabre@nondot.org> enhance EmitLValueForFieldInitialization to do the proper pointer adjustment, allowing
us to revert the other half of r134860. Now things are back to a relatively tidy state.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134865 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
aa01d26e6bf177aba365a7adce62cea6ceccfa5b 10-Jul-2011 Chris Lattner <sabre@nondot.org> revert part of r134860, which is empirically unnecessary after the proper fix


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134864 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.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
odeGenTypes.cpp
odeGenTypes.h
74339dfbfe3fa9c1839ce02e3427e4dc5478a3ae 10-Jul-2011 Chris Lattner <sabre@nondot.org> change EmitLValueForField to cast the returned lvalue to the right
type, even when in the struct case. This was one root issue that was
causing type mismatches throughout the compiler.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134862 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.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
odeGenTypes.cpp
12569fb55db2a8181711ac134b7479155db4f838 10-Jul-2011 Chris Lattner <sabre@nondot.org> when emitting pointer load from an lvalue or storing to an lvalue,
do an explicit bitcast to whatever ConvertType produces. This will
go with the next patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134860 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.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
GCall.cpp
odeGenTypes.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
GCall.cpp
GVTables.cpp
odeGenTypes.cpp
odeGenTypes.h
taniumCXXABI.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
odeGenTypes.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
BIInfo.h
GBlocks.cpp
GBuiltin.cpp
GCXXABI.cpp
GCXXABI.h
GCall.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprCXX.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
taniumCXXABI.cpp
argetInfo.cpp
0850e8d1b093cfe1fc2fdf533a0e264ef9d5412e 09-Jul-2011 John McCall <rjmccall@apple.com> More compiler workarounds. I have to admit that I was not
expecting so much concentrated oddity on what seemed like a
trivial feature. Thanks to François Pichet for doing the
MSVC legwork here.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134813 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
7566aa2e47c2452f06cd59917748299065e83607 09-Jul-2011 John McCall <rjmccall@apple.com> GCC 4.2 compatibility hack.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134785 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
bdc4d80956c83a486e58d3df6bb524a1f66ff574 09-Jul-2011 John McCall <rjmccall@apple.com> A number of array-related IR-gen cleanups.
- Emit default-initialization of arrays that were partially initialized
with initializer lists with a loop, rather than emitting the default
initializer N times;
- support destroying VLAs of non-trivial type, although this is not
yet exposed to users; and
- support the partial destruction of arrays initialized with
initializer lists when an initializer throws an exception.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134784 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDecl.cpp
GExprAgg.cpp
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
c3e0fb406fb6fe83566dc6d8b05362e0a2c1e191 09-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Change -mno-mmx to be more compatible with gcc. Specifically, -mno-mmx should not imply -mno-sse.

Note that because we don't usually touch the MMX registers anyway, all -mno-mmx needs to do is tweak the x86-32 calling convention a little for vectors that look like MMX vectors, and prevent the definition of __MMX__.

clang doesn't actually stop the user from using MMX inline asm operands or MMX builtins in -mno-mmx mode; as a QOI issue, it would be nice to diagnose, but I doubt it really matters much.

<rdar://problem/9694837>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134770 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
528a8c7b4c39ae1c551760fd087a508a71ee9541 09-Jul-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Revert x86_64 ABI changes until I have time to check the items raised by Eli.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134765 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
558229f267d2cdee69639df04382082e7c7ad54c 09-Jul-2011 Jakub Staszak <jstaszak@apple.com> Introduce __builtin_expect() intrinsic support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134761 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
df41b4c10ab2a0096957e415e520bd467f8b2e9e 09-Jul-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Add support for AVX 256-bit in the x86_64 ABI (as in the 0.99.5 draft)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134754 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
094240ab184c3ca4b94e9d7eac80fcd34d8dd30c 08-Jul-2011 Cameron Zwarich <zwarich@apple.com> Add codegen support for the fma/fmal/fmaf builtins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134743 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
14ef3191a75b8bcdab391e6ffa6367b731c2ce67 07-Jul-2011 Bill Wendling <isanbard@gmail.com> Layout the code for trapping arithmetic so that the overflow case comes after
the normal case.

Before, for this:

$ cat t.c
int test(int x) { return x * 2; }

We would get this:

addl %edi, %edi
jno LBB0_2
## BB#1: ## %overflow
ud2
LBB0_2: ## %nooverflow
movl %edi, %eax
popq %rbp
ret

Now we get this:

addl %edi, %edi
jo LBB0_2
## BB#1: ## %nooverflow
movl %edi, %eax
popq %rbp
ret
LBB0_2: ## %overflow
ud2

<rdar://problem/8283919>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134642 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
dbd3c85825ad59896292ac7d326fe1985768f1e3 07-Jul-2011 Cameron Zwarich <zwarich@apple.com> r134634 causes a failure on MultiSource/Benchmarks/Olden/bh with TEST=nightly,
so roll it out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134638 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2357aeec0da2740838963880edd97e43f14cb6fd 07-Jul-2011 Nick Lewycky <nicholas@mxc.ca> A redeclaration of an inline method in C99 mode should trigger emission of that
function. Fixes PR10233!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134634 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
63ff703393543904046462aee2ac0a53b8937a3e 07-Jul-2011 David Chisnall <csdavec@swan.ac.uk> If we're using the pure non-fragile ABI, then skip some of the contortions required to support the transitional ABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134612 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
f074885425af40e5e03569371e453d9f7ae43aa6 07-Jul-2011 David Chisnall <csdavec@swan.ac.uk> Set a flag to tell the runtime when we're compiling in ARC mode and use the pure-nonfragile ABI for both ARC and GC mode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134611 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
7e5e5f4cc36fe50f46ad76dca7a266434c94f475 07-Jul-2011 John McCall <rjmccall@apple.com> In ARC, reclaim all return values of retainable type, not just those
where we have an immediate need of a retained value.

As an exception, don't do this when the call is made as the immediate
operand of a __bridge retain. This is more in the way of a workaround
than an actual guarantee, so it's acceptable to be brittle here.

rdar://problem/9504800



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134605 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
e4330726b8070bb7094414507a1040972ee52474 07-Jul-2011 Nick Lewycky <nicholas@mxc.ca> Sort #includes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134589 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
9d5ac7c9ca31ef4d7f79822b3e4c486ec80f1c26 06-Jul-2011 Fariborz Jahanian <fjahanian@apple.com> revert patch for // rdar://9227352


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134536 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
256a76e0b0e0c9e65a3122917d553ef10bc84d29 06-Jul-2011 John McCall <rjmccall@apple.com> Call objc_terminate() instead of abort() when a cleanup throws an
exception in Objective-C; in Objective-C++ we still use std::terminate().
This is only available in very recent runtimes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134456 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
9f084a3166b684573ba49df28fc5792bc37d92e1 06-Jul-2011 John McCall <rjmccall@apple.com> Change the driver's logic about Objective-C runtimes: abstract out a
structure to hold inferred information, then propagate each invididual
bit down to -cc1. Separate the bits of "supports weak" and "has a native
ARC runtime"; make the latter a CodeGenOption.

The tool chain is still driving this decision, because it's the place that
has the required deployment target information on Darwin, but at least it's
better-factored now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134453 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
b18b8ad63061c23daf4d95b022764027739691d8 06-Jul-2011 Dan Gohman <gohman@apple.com> Add the ObjC ARC optimization passes manually, now that they're not
hardwired into the default pass list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134445 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
odeGenAction.cpp
3c54415a4e1db09b210a466469c72d2582ce1d83 02-Jul-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r134305 at Sat. 2nd July 2011.
14508ff0bffee0fdfe5d336946c6db0e709099c8 02-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Don't use x86_mmx where it isn't necessary.

The start of some work on getting -mno-mmx working the way we want it to.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134300 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
aa7333c860ac651c75da495217e0d6a9c10c0bb0 02-Jul-2011 Eric Christopher <echristo@apple.com> Update for llvm commit r134291.

Fixes rdar://9714064


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134292 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
e67d1512f299e7f32182553f9941d61dae4f433e 01-Jul-2011 Douglas Gregor <dgregor@apple.com> Emit guard variables for any weak global that has a run-time
initializer. Previously, we only used guard variables for weak static
data members. Fixes <rdar://problem/9692249>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134266 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
bcc3e660a1fdc19722157ef3e2f133418856ca3d 01-Jul-2011 Douglas Gregor <dgregor@apple.com> Don't zero-initialize default-initialized local variables that have
trivial default constructors. This generated-code regression was
caused by r131796, which had simplified the handling of default
initialization in Sema. Fixes <rdar://problem/9694300>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134260 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
d3fc7296ae95353173bae25ee4dd3ecf4d6dced1 30-Jun-2011 David Chisnall <csdavec@swan.ac.uk> Add support for weakly imported classes (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134140 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
368691e5ac9805bd1528dace0f5575a2531db0d3 30-Jun-2011 Evan Cheng <evan.cheng@apple.com> createTargetMachine now takes a CPU string.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134128 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
8fefc8e245c47daacae7a7fb218677fdcb85d122 29-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> objc-arc: fix a IRGen crash when checking for
accessibility of an initializer which is a compound
statement. // rdar://9694706


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134091 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
5d9b6bf9de98a33427fc7a3beeca90a3002b4744 29-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Use existing -fcatch-undefined-behavior option,
replacing -freset-local-blocks. // rdar://9227352


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134082 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
c7aed3b9fbfbb6e85c234a4ba6f00cab1901f2f7 29-Jun-2011 David Chisnall <csdavec@swan.ac.uk> Add ARC support for the GNUstep runtime.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134065 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
ded137fcab19f0aace08a28b5c91574e6b23debc 29-Jun-2011 Eli Friedman <eli.friedman@gmail.com> We don't pass classes with a copy-constructor or destructor byval, so the address takes up an integer register (if one is available). Make sure the x86-64 ABI implementation takes that into account properly.

The fixed implementation is compatible with the implementation both gcc and llvm-gcc use.

rdar://9686430 . (This is the issue that was reported in the thread "[LLVMdev] Segfault calling LLVM libs from a clang-compiled executable".)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134059 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
693769cafc218ff31393e0bf43cd3dcf21a36be2 29-Jun-2011 Evan Cheng <evan.cheng@apple.com> SubtargetFeature.h has been moved to MC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134050 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
1077e420b89c9541396135157f22a1eff6062edf 29-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Under a compiler flag, -freset-local-blocks,
wipe out stack blocks when they go out of scope.
// rdar://9227352


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134045 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
de31fd7eeebdc64fb043463e7f515dab8eccac8d 28-Jun-2011 Eric Christopher <echristo@apple.com> Split out logic for valid clobbers and valid inline asm registers.

Fixes rdar://9281377


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134016 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
bf9eb88792e022e54a658657bf22e1925948e384 28-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Eliminate most uses of ShallowCollectObjCIvars which requires
a vector for collection. Use iterators where needed instead.
// rdar://6817577


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134015 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GObjCRuntime.cpp
e6d134b244cd666c47a3d2dd78f82ff0824188bd 27-Jun-2011 John McCall <rjmccall@apple.com> Fix PR10204 in a better way.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133943 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
9d11e6f4754848cd74b9a08d40d4a9e0fe68e29d 27-Jun-2011 Nico Weber <nicolasweber@gmx.de> Revert parts of r133860 to fix a crash. Add a test.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133931 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
6594942e98e25640f226aba622eb76bcaf0a521c 25-Jun-2011 Eli Friedman <eli.friedman@gmail.com> Cleanup cast IRGen a bit; no intended functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133864 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
GExprScalar.cpp
df7b091c58ccdb402a32bfbde9c506074dba5f3d 25-Jun-2011 John McCall <rjmccall@apple.com> Do not apply the ARC move optimization to 'const'-qualified xvalues.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133861 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
545d996ec5a3113f046944f11b27cc2d6cb055b4 25-Jun-2011 John McCall <rjmccall@apple.com> LValue carries a type now, so simplify the main EmitLoad/Store APIs
by removing the redundant type parameter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133860 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GClass.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
GObjC.cpp
GStmt.cpp
odeGenFunction.h
913dab2525cc705e5238023a446f5371fa411883 25-Jun-2011 John McCall <rjmccall@apple.com> Mark the multiply which occurs as part of performing pointer
arithmetic on a VLA as 'nsw', per discussion with djg, and
implement pointer arithmetic (other than array accesses) and
pointer subtraction for VLA types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133855 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
0c24c808e4dce43e88abf2d5f98546b901bd4315 25-Jun-2011 John McCall <rjmccall@apple.com> Honor objc_precise_lifetime in GC mode by feeding the value
in the variable to an inline asm which gets run when the variable
goes out of scope.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133840 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GObjC.cpp
odeGenFunction.h
537c3461166ce074d05fb7c96ffa98ed54c9aaa0 25-Jun-2011 Bob Wilson <bob.wilson@apple.com> Revert "Shorten some ARM builtin names by removing unnecessary "neon" prefix."
Sorry, this was a bad idea. Within clang these builtins are in a separate
"ARM" namespace, but the actual builtin names should clearly distinguish tha
they are target specific.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133833 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
1d323e0482889ad5f9637d62899f35f41a05df46 25-Jun-2011 Devang Patel <dpatel@apple.com> Fix struct member's scope. Patch by Xi Wang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133829 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
bc8d40d85f3fa1e34569834916f18fecaa635152 24-Jun-2011 John McCall <rjmccall@apple.com> Change the IR-generation of VLAs so that we capture bounds,
not sizes; so that we use well-typed allocas; and so that we
properly recurse through the full set of variably-modified types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133827 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
GExprScalar.cpp
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
89f19e43730a2895cd81159d375c71c91872b8c2 24-Jun-2011 Bob Wilson <bob.wilson@apple.com> Shorten some ARM builtin names by removing unnecessary "neon" prefix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133826 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
cf5abc7ba032bd35158e4d75b0bc92a482fc67e8 23-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Support for catching objc pointer objects in c++ catch-statement
in fragile abi mode and some other cleanups. // rdar://8940528



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133747 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
7062281f240ef9c4fb343614fb2406532307c4a5 23-Jun-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r133678 at Thu. 23th Jun 2011.
9d96bce991048fd2337cf058ec6a6a722207cbf2 22-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Alloa catching Objective-C id's being thrown with C++ throw
in Darwin's fragile abi mode. // rdar://8940528


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133639 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
34aace89335d175c3a87a47737fc841e9853767d 22-Jun-2011 Douglas Gregor <dgregor@apple.com> Try to silence GCC warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133623 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
d1bd98a2c239d2a730b07f7c1b2c8c8718eaeac8 22-Jun-2011 Douglas Gregor <dgregor@apple.com> Implement the C++0x move optimization for Automatic Reference Counting
objects, so that we steal the retain count of a temporary __strong
pointer (zeroing out that temporary), eliding a retain/release
pair. Addresses <rdar://problem/9364932>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133621 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
d7b23167763f43d3e76b0de26141b1e52613ee3c 22-Jun-2011 Douglas Gregor <dgregor@apple.com> When binding a reference to an Automatic Reference Counting temporary,
retain/release the temporary object appropriately. Previously, we
would only perform the retain/release operations when the reference
would extend the lifetime of the temporary, but this does the wrong
thing across calls.


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133615 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GVTT.cpp
GVTables.cpp
d768e9d29abe1ac1ccc3ed63f2dce835d9bab342 22-Jun-2011 John McCall <rjmccall@apple.com> Emit @finally blocks completely lazily instead of forcing their
existence by always threading an edge from the catchall. Not doing
this was previously causing a crash in the very extreme case where
neither the normal cleanup nor the EH catchall was actually reachable:
we would delete the catchall entry block, which would cause us to
delete the entry block of the finally cleanup as well because the
cleanup logic would merge the blocks, which in turn triggered an assert
because later blocks in the finally would still be using values from the
entry. Laziness turns out to be the most elegant solution to the problem.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133601 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCRuntime.cpp
odeGenFunction.h
e26bdb91b7e3912ffe895b78a446db94471a59dd 21-Jun-2011 Daniel Dunbar <daniel@zuster.org> IRgen: Add a -fuse-register-sized-bitfield-access option, for testing.
- Changes bit-field access policy to try to use (aligned) register sized accesses.

The idea here is that by using larger accesses we expose more coalescing
potential to the backend when we have situations like adjacent bit-fields in the
same structure (which is common), and that the backend should be smart enough to
narrow the accesses down when no coalescing is done or when it is shown not to
be profitable.

--
$ clang -m32 -O3 -S -o - t.c
_f0: ## @f0
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
movb (%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, (%eax)
movb 1(%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, 1(%eax)
movb 2(%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, 2(%eax)
movb 3(%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, 3(%eax)
popl %ebp
ret

$ clang -m32 -O3 -S -o - t.c -Xclang -fuse-register-sized-bitfield-access
_f0: ## @f0
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
movl $-2139062144, %ecx ## imm = 0xFFFFFFFF80808080
andl (%eax), %ecx
orl $16843009, %ecx ## imm = 0x1010101
movl %ecx, (%eax)
popl %ebp
ret
--

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133532 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.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
odeGenModule.cpp
odeGenTypes.cpp
odeGenTypes.h
0b5810882bd34183c2b764676cafa4c2ce324740 21-Jun-2011 Douglas Gregor <dgregor@apple.com> A few tweaks to MaterializeTemporaryExpr suggested by John.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133528 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
03e80030515c800d1ab44125b9052dfffd1bd04c 21-Jun-2011 Douglas Gregor <dgregor@apple.com> Introduce a new AST node describing reference binding to temporaries.

MaterializeTemporaryExpr captures a reference binding to a temporary
value, making explicit that the temporary value (a prvalue) needs to
be materialized into memory so that its address can be used. The
intended AST invariant here is that a reference will always bind to a
glvalue, and MaterializeTemporaryExpr will be used to convert prvalues
into glvalues for that binding to happen. For example, given

const int& r = 1.0;

The initializer of "r" will be a MaterializeTemporaryExpr whose
subexpression is an implicit conversion from the double literal "1.0"
to an integer value.

IR generation benefits most from this new node, since it was
previously guessing (badly) when to materialize temporaries for the
purposes of reference binding. There are likely more refactoring and
cleanups we could perform there, but the introduction of
MaterializeTemporaryExpr fixes PR9565, a case where IR generation
would effectively bind a const reference directly to a bitfield in a
struct. Addresses <rdar://problem/9552231>.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133521 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
odeGenFunction.h
4857947d18a7d0d0c250892fc5597ec0aecc9823 21-Jun-2011 NAKAMURA Takumi <geek4civic@gmail.com> De-Unicode-ify in comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133501 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
c3b9014c7236a15cf467662264b243a22c420312 21-Jun-2011 Nick Lewycky <nicholas@mxc.ca> Add support for -Wa,--noexecstack when building from a non-assembly file. For
an assembly file it worked correctly, while for a .c file it would given an
error about how --noexecstack is not a supported argument to -Wa.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133489 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
43fec879a527c74ff01d8aa2bf94a12432249fc7 21-Jun-2011 Eric Christopher <echristo@apple.com> Canonicalize register names properly.

Fixes rdar://9425559


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133486 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
ab27d6ea7b4ce2762a16905281de796db32bb6f2 20-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> llvm-gcc treats a tentative definition with a previous
(or follow up) extern declaration with weak_import as
an actual definition. make clang follows this behavior.
// rdar://9538608
llvm-gcc treats an extern declaration with weak_import


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133450 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d36d036c819f7925b933974fa18eacc95d46049a 20-Jun-2011 Jay Foad <jay.foad@gmail.com> Change how PHINodes store their operands.

Change PHINodes to store simple pointers to their incoming basic blocks,
instead of full-blown Uses.

Note that this loses an optimization in SplitCriticalEdge(), because we
can no longer walk the use list of a BasicBlock to find phi nodes. See
the comment I removed starting "However, the foreach loop is slow for
blocks with lots of predecessors".

Extend replaceAllUsesWith() on a BasicBlock to also update any phi
nodes in the block's successors. This mimics what would have happened
when PHINodes were proper Users of their incoming blocks. (Note that
this only works if OldBB->replaceAllUsesWith(NewBB) is called when
OldBB still has a terminator instruction, so it still has some
successors.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133435 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
6af966266235cae3287d50f1a10072bc48759ba0 20-Jun-2011 Francois Pichet <pichet2000@gmail.com> Remove more unnecessary #include <llvm/ADT/SmallVector.h>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133418 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.h
c5cbb909e8a27deb8f1a2b6b7bf56a96051af81a 20-Jun-2011 Chris Lattner <sabre@nondot.org> Update to match mainline ConstantStruct::get API change. Also, use
ConvertType on InitListExprs as they are being converted. This is
needed for a forthcoming patch, and improves the IR generated anyway
(see additional type names in testcases).

This patch also converts a bunch of std::vector's in CGObjCMac to use
C arrays. There are a ton more that should be converted as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133413 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
GRTTI.cpp
odeGenModule.cpp
taniumCXXABI.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
GBlocks.cpp
GBuiltin.cpp
GCleanup.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
odeGenTypes.cpp
taniumCXXABI.cpp
argetInfo.cpp
19bd77c64937d6818c61f2aa9e6a9d51c65d0356 18-Jun-2011 Benjamin Kramer <benny.kra@googlemail.com> Remove dead variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133346 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
GObjC.cpp
d510fd2dde3cd0fdda9b87772adbfb0d7d26a551 18-Jun-2011 Benjamin Kramer <benny.kra@googlemail.com> 80 cols.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133345 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
673e98b4814642eb040a661fcc0f7953edd4c150 17-Jun-2011 Douglas Gregor <dgregor@apple.com> When emitting a compound literal of POD type, continue to emit a
separate aggregate temporary and then memcpy it over to the
destination. This fixes a regression I introduced with r133235, where
the compound literal on the RHS of an assignment makes use of the
structure on the LHS of the assignment.

I'm deeply suspicious of AggExprEmitter::VisitBinAssign()'s
optimization where it emits the RHS of an aggregate assignment
directly into the LHS lvalue without checking whether there is any
aliasing between the LHS/RHS. However, I'm not in a position to
revisit this now.

Big thanks to Eli for finding the regression!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133261 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
0502a224984a26087ea4d64e8e5d2dd4dca432f6 17-Jun-2011 John McCall <rjmccall@apple.com> Perform an acquire memory barrier on the fast path of a thread-safe
static initializer check, as required by the Itanium ABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133250 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
7acddacc921cd0b3f813443a8641eeddb82dfbd4 17-Jun-2011 John McCall <rjmccall@apple.com> Objective-C fast enumeration loop variables are not retained in ARC, but
they should still be officially __strong for the purposes of errors,
block capture, etc. Make a new bit on variables, isARCPseudoStrong(),
and set this for 'self' and these enumeration-loop variables. Change
the code that was looking for the old patterns to look for this bit,
and change IR generation to find this bit and treat the resulting
variable as __unsafe_unretained for the purposes of init/destroy in
the two places it can come up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133243 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GObjC.cpp
odeGenFunction.h
751ec9be961888f14342fb63b39bf8727f0dee49 17-Jun-2011 Douglas Gregor <dgregor@apple.com> Implement proper support for generating code for compound literals in
C++, which means:
- binding the temporary as needed in Sema, so that we generate the
appropriate call to the destructor, and
- emitting the compound literal into the appropriate location for
the aggregate, rather than trying to emit it as a temporary and
memcpy() it.

Fixes PR10138 / <rdar://problem/9615901>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133235 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
e3e07a5b3490bc2977859d56bac211afac2236fb 17-Jun-2011 Eric Christopher <echristo@apple.com> Check the specific target to figure out if a constraint is a valid
register constraint. Note that we're not checking if the register itself
is valid for the constraint.

Fixes rdar://9382985


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133226 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
c7c9058f4977ef4584d68718e23f34504b150ef4 16-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Move computation of __private_extern__ visibilty to
getLVForNamespaceScopeDecl(). // rdar://9609649


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133182 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
16c8f9d68ae6d302083763d4733e728634717dec 16-Jun-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r133163 at Fri. 17th Jun 2011.
119f19b46b79cbe48f1992911588a728dfa5ad2e 16-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Set the visibility to 'hidden' when previous
declaration of global var is __private_extern__.
// rdar://9609649


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133157 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a07398ed98ea2b55ad7a505a3aab18aed93b149f 16-Jun-2011 John McCall <rjmccall@apple.com> Restore correct use of GC barriers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133144 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GObjCRuntime.cpp
GValue.h
odeGenFunction.h
175d6596a53508d8ac2ff844672bab0dd0bd7c91 16-Jun-2011 John McCall <rjmccall@apple.com> Suppress a warning in -Asserts builds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133110 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
f85e193739c953358c865005855253af4f68a497 16-Jun-2011 John McCall <rjmccall@apple.com> Automatic Reference Counting.

Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.

Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GCall.cpp
GCall.h
GClass.cpp
GDebugInfo.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GStmt.cpp
GValue.h
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
argetInfo.cpp
argetInfo.h
97cb5a4a21866610227963fc3dcce9d89b2f7990 16-Jun-2011 Eli Friedman <eli.friedman@gmail.com> Per Chris's suggestion, simplify code using llvm::getOrEnforceKnownAlignment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133095 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
431e4b35fb222fad17702775df4cd50648697229 15-Jun-2011 Eli Friedman <eli.friedman@gmail.com> Use isAnyComplexType here so we don't pass complex numbers into the aggregate handling code; found by inspection.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133070 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
70cbd2a2a07ff3109adb2d584f7ad4b5cce88af2 15-Jun-2011 Eli Friedman <eli.friedman@gmail.com> Fix a regression from r132957 involving complex integers. (Fixes failures on gcc-testsuite bot.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133069 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
98703d32ff37fbfbcfd844241d2be44b8f80cf9f 15-Jun-2011 Devang Patel <dpatel@apple.com> Do not emit stoppoint before emitting debug info for parameters.
- llvm.dbg.declare already receives line number information from ParmDecl
- Additional extra stoppoint messes up gdb's understanding of where function body starts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133065 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
2eccb672799d19fb535ce349566fea6729cbb891 14-Jun-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Update the prefetch intrinsic usage. Now the last argument tells codegen
whether it's a data or instruction cache access.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132977 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
fd05ca03abdfb38f78b9535d996ecc9c39d3b0db 14-Jun-2011 Peter Collingbourne <peter@pcc.me.uk> Move GlobalDecl to AST

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132973 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.h
GVTables.h
odeGenModule.h
odeGenTypes.h
lobalDecl.h
ea5e4da116aae0eb932d32b73e7cec2f04932248 14-Jun-2011 Eli Friedman <eli.friedman@gmail.com> The LLVM IR representation of byval arguments has a rather strange property: if the alignment of an argument to a call is less than the specified byval alignment for that argument, there is no way to specify the alignment of the implied copy. Therefore, we must ensure that the alignment of the argument is at least the byval alignment. To do this, we have to mess with the alignment of relevant alloca's in some cases, and insert a copy that conceptually shouldn't be necessary in some cases.

This patch tries relatively hard to avoid creating an extra copy if it can be avoided (see test3 in the included testcase), but it is not possible to avoid in some cases (like test2 in the included testcase).

rdar://9483886



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132957 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
9d99f2db9bccc1664d6bbf1fc5346bab293ec0c3 14-Jun-2011 Devang Patel <dpatel@apple.com> Put local variables in appropriate debug info scope.
This fixes radar 8757124.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132949 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
7a614d8380297fcd2bc23986241905d97222948c 11-Jun-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement support for C++11 in-class initialization of non-static data members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132878 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GClass.cpp
GObjCMac.cpp
926df6cfabf3eaa4afc990c097fa4619b76a9b57 11-Jun-2011 Douglas Gregor <dgregor@apple.com> Implement Objective-C Related Result Type semantics.

Related result types apply Cocoa conventions to the type of message
sends and property accesses to Objective-C methods that are known to
always return objects whose type is the same as the type of the
receiving class (or a subclass thereof), such as +alloc and
-init. This tightens up static type safety for Objective-C, so that we
now diagnose mistakes like this:

t.m:4:10: warning: incompatible pointer types initializing 'NSSet *'
with an
expression of type 'NSArray *' [-Wincompatible-pointer-types]
NSSet *array = [[NSArray alloc] init];
^ ~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1:
note:
instance method 'init' is assumed to return an instance of its
receiver
type ('NSArray *')
- (id)init;
^

It also means that we get decent type inference when writing code in
Objective-C++0x:

auto array = [[NSMutableArray alloc] initWithObjects:@"one", @"two",nil];
// ^ now infers NSMutableArray* rather than id




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132868 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
cb5d2d0647fdab2e36c85b417e03bf18916ce10c 10-Jun-2011 Eli Friedman <eli.friedman@gmail.com> PR10120: Make CodeGenModule::getVTableLinkage use NamedDecl::getLinkage to determine whether the vtable should be externally visible, instead of a rough approximation of it which messes up with templates.

While I'm here, zap the other user of isInAnonymousNamespace outside of Decl.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132861 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
e5df885367b9e122ac11c89ddfbc62375695cdab 10-Jun-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r132843 at Fri. 10th Jun 2011.
002333f8b2cf1a8614e532f6ce366b21af85142c 08-Jun-2011 Stuart Hastings <stuart@apple.com> Clang support for ARM Uv/Uy/Uq inline-asm constraints.
rdar://problem/9037836


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132737 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
6a576ab708d3aa7d40e5d867ab1de5d3cb507553 05-Jun-2011 Douglas Gregor <dgregor@apple.com> When inferring the result type of a block based on a return statement
with a type-dependent expression, infer the placeholder type
'Context.DependentTy' to indicate that this is just a
placeholder. Fixes PR9982 / <rdar://problem/9486685>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132657 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
61eee0ca33b29e102f11bab77c8b74cc00e2392b 04-Jun-2011 Tanya Lattner <tonic@nondot.org> Add support for builtin astype:
__builtin_astype(): Used to reinterpreted as another data type of the same size using for both scalar and vector data types.
Added test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132612 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
9198126067a447f8aaccf9fff09be294c8bcb81e 04-Jun-2011 Devang Patel <dpatel@apple.com> Rework r132576.
Emit debug info only if there is an insertion point. The debug info should not force an insertion point. Codegen may later on decide to not emit code for some reason, see extensive comment in CodeGenFunction::EmitStmt(), and debug info should not get in the way.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132610 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GStmt.cpp
c594abdb78b67d477c9bdd24c3600aec3dc2eda4 03-Jun-2011 Devang Patel <dpatel@apple.com> Emit debug info only if there is an insertion point. The debug info should not force an insertion point. Codegen may later on decide to not emit code for some reason, see extensive comment in CodeGenFunction::EmitStmt(), and debug info should not get in the way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132576 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GStmt.cpp
c490312704c87841c2f9646478ff4d93c3bc90f1 03-Jun-2011 Devang Patel <dpatel@apple.com> Simplify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132560 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2fd5a0f3eafe65c73b737a1cd995dfda7302ed81 03-Jun-2011 Devang Patel <dpatel@apple.com> Fix typedef's context.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132557 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a18f539628a6506bae6af52eacd541cebefff762 03-Jun-2011 Eric Christopher <echristo@apple.com> 80-column cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132548 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
c7f532f9b8e934a0a284d15a739333372e979f61 03-Jun-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r132540 at Fri. 3rd Jun 2011.
619e8875d29cc019c7360595f66b9f91b3439494 02-Jun-2011 Akira Hatanaka <ahatanak@gmail.com> Add stuff for o32 ABI conformance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132443 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
d127bcbaab6411a6d1a79c1e01abd0320f366cc5 01-Jun-2011 Devang Patel <dpatel@apple.com> Robustify objc method type description (subroutine type) by walking parameters directly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132368 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
c478f21820a187458c60c7d023a32c81eba24e42 31-May-2011 Devang Patel <dpatel@apple.com> List objective-c ineterfaces as public types in dwarf debug info output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132361 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1c29652fbcd097aa6c21511c9f4f886bb3f3a8af 31-May-2011 Devang Patel <dpatel@apple.com> List c++ class type as public type in dwarf debug info output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132357 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
31fc0c1a16dabd397dd3323fb0dbe7052b87abd0 30-May-2011 David Chisnall <csdavec@swan.ac.uk> Fix another incorrect type bug.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132311 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
93c332a8ba2c193c435b293966d343dab15f555b 28-May-2011 John McCall <rjmccall@apple.com> Convert Clang over to resuming from landing pads with llvm.eh.resume.
It's quite likely that this will explode, but I need to know how. :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132269 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.cpp
odeGenFunction.h
95d318c4c10437db40ca6e15fdf32e04012da58e 28-May-2011 Benjamin Kramer <benny.kra@googlemail.com> Eliminate temporary argument vectors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132260 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDeclCXX.cpp
GExprScalar.cpp
GObjCGNU.cpp
odeGenFunction.cpp
taniumCXXABI.cpp
68e5e1331d99140ae5dd7b27c3dd28618827dfc8 28-May-2011 David Chisnall <csdavec@swan.ac.uk> Fix another type mismatch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132259 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
0bbe0cfd374d0e564c4570b5e84a77f886c32d52 28-May-2011 David Chisnall <csdavec@swan.ac.uk> Fix missing cast.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132258 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
43c9791207a2bd7cef8b17e9bfc4dd87db21690f 28-May-2011 Nowar Gu <nowar100@gmail.com> Merge upstream r132249 at Sat. 28th. May 2011.
26c1b8df8d1af0d8ef7f6c726fe1a8a9ddc60267 28-May-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Add support for ARM ldrexd/strexd builtins

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132249 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
460980d3b9d045288041bf8b826899795c60ca1d 28-May-2011 Eli Friedman <eli.friedman@gmail.com> Add unnamed_addr to internal globals which are only used as an operand to memcpy. (Spotted by looking at IR.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132226 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
b0dd6702ab5e7f53a4bdab5a3371285ad2a4b20b 28-May-2011 Eli Friedman <eli.friedman@gmail.com> Match llvm-gcc's string literals alignment by forcing alignment on string literals to 1. This can significantly impact the size of the string data, and as far as I know, the alignment doesn't help performance. rdar://9078969 .



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132223 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
addd80d1c80d1e9f249988452103c93a564945f0 27-May-2011 Eli Friedman <eli.friedman@gmail.com> Back out r132209; it's breaking nightly tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132219 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.h
0903421e36c174a82597f83bd296f3cd5b5f169b 27-May-2011 John McCall <rjmccall@apple.com> Implement a new, much improved version of the cleanup hack. We just need
to be careful to emit landing pads that are always prepared to handle a
cleanup path. This is correct mostly because of the fix to the LLVM
inliner, r132200.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132209 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.h
f968d8374791c37bc464efd9168c2d33dd73605f 27-May-2011 Douglas Gregor <dgregor@apple.com> Objective-C doesn't consider the use of incomplete types as method
parameter types to be ill-formed. However, it relies on the
completeness of method parameter types when producing metadata, e.g.,
for a protocol, leading IR generating to crash in such cases.

Since there's no real way to tighten down the semantics of Objective-C
here without breaking existing code, do something safe but lame:
suppress the generation of metadata when this happens.

Fixes <rdar://problem/9123036>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132171 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
55d484802f3e27930317739efc5f5956b78aac25 26-May-2011 Eli Friedman <eli.friedman@gmail.com> Skip extra copy from aggregate where it isn't necessary; rdar://problem/8139919 . This shouldn't make much of a difference at -O3, but should substantially reduce the number of generated memcpy's at -O0.

Originally r130717, but was backed out due to an ObjC regression.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132102 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
b44eda31a214ad88616acbe28c3f0a70268adc6c 25-May-2011 David Chisnall <csdavec@swan.ac.uk> Remove bitcast to incorrect type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132077 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
abca5a1b3e74e644e297c7590b46ab73a6bb476a 25-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Update for llvm api change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132034 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
odeGenModule.cpp
ca63c200346c0ca9e00194ec6e34a5a7b0ed9321 25-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement a new type node, UnaryTransformType, designed to represent a
type that turns one type into another. This is used as the basis to
implement __underlying_type properly - with TypeSourceInfo and proper
behavior in the face of templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132017 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
848afb0c1ff4571ca7a21927ecc2699ea2e7429a 24-May-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r131958 at Tue. 24th May 2011.
5f0bcc4c3f4a75375a3571e71bffebf603f4ca67 24-May-2011 David Chisnall <csdavec@swan.ac.uk> Fix bug introduced with r131930.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131935 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
e6a11a62d1d66d10a87d81ed697348d66d59adf7 24-May-2011 David Chisnall <csdavec@swan.ac.uk> Don't omit retain / release / autorelease message sends in hybrid GC mode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131932 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
789ecdebd04aebdb2d6b801ebe8e04a189ebc023 24-May-2011 David Chisnall <csdavec@swan.ac.uk> Fix some problems where functions must be bitcast but we're expecting a llvm::Function of the right type.

PR9994.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131930 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCRuntime.cpp
GObjCRuntime.h
de92d739ba0ef42a5a7dcfd6e170329549d0716b 23-May-2011 Chris Lattner <sabre@nondot.org> make the x86-32 backend specify a byval alignment, even when the
code generator will do it. With this patch, clang compiles the example
in PR9794 to not have an alloca temporary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131881 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
855d227967f8332237f1f1cf8eb63a1e22d8be05 23-May-2011 Chris Lattner <sabre@nondot.org> Fix x86-64 byval passing to specify the alignment even when the code
generator will give it something sufficient. This is important because
the mid-level optimizer doesn't know what alignment is required otherwise.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131879 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
a2120039ed08a5d5d6096e2560fd32c6128e951a 23-May-2011 David Chisnall <csdavec@swan.ac.uk> Provide the runtime with information about the GC compile options (GNU runtimes)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131877 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
b644425e4c337f5fcffc00b2d4914d3e4012c45a 23-May-2011 Chris Lattner <sabre@nondot.org> fix 80 col violation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131870 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
9ca02e521b6aabc63d7af95e5c0140e20e137a07 22-May-2011 Chris Lattner <sabre@nondot.org> adjust to mainline api change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131815 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
33c09d5cb33a510ab903c80081f6d23d0fa44112 21-May-2011 Chris Lattner <sabre@nondot.org> switch clang off StandardPasses.h onto PassManagerBuilder.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131808 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
4d509341bd5db06a517daa311379f52bb540bc34 21-May-2011 Eli Friedman <eli.friedman@gmail.com> Fix the clang part of PR7952: rewrite the specialization of isa<> in DeclBase,
and stop abusing the multi-level dereference isa<> used to allow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131804 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
575a1c9dc8dc5b4977194993e289f9eda7295c39 20-May-2011 Douglas Gregor <dgregor@apple.com> Introduce Type::isSignedIntegerOrEnumerationType() and
Type::isUnsignedIntegerOrEnumerationType(), which are like
Type::isSignedIntegerType() and Type::isUnsignedIntegerType() but also
consider the underlying type of a C++0x scoped enumeration type.

Audited all callers to the existing functions, switching those that
need to also handle scoped enumeration types (e.g., those that deal
with constant values) over to the new functions. Fixes PR9923 /
<rdar://problem/9447851>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131735 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
GExprCXX.cpp
GExprConstant.cpp
GExprScalar.cpp
GRecordLayoutBuilder.cpp
7dfd96fd5f4e63071f5d4f684e9f0e1928d226c7 20-May-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r131722 at Fri. 20th May 2011.
8d3f8979e46f9d0b8735566eabe471db0e1e0e53 20-May-2011 Devang Patel <dpatel@apple.com> Fix location of setter/getter synthesized for a property.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131701 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.h
0eb47fc01849a94bac7fda236134f9301eff688b 19-May-2011 Eli Friedman <eli.friedman@gmail.com> Make __builtin_shufflevector and -ftrapv work correctly together. PR9945.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131611 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
09345d1c2adf95ea90f06911dbb4f12372b7f24c 18-May-2011 Roman Divacky <rdivacky@freebsd.org> Add ARMTargetCodeGenInfo::initDwarfEHRegSizeTable() defining 16 32bit regs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131558 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
3621b31cd9255adb1471592ff8116cdc78eb9249 18-May-2011 Bill Wendling <isanbard@gmail.com> Conditionalize the use of 4.4 or 4.2 format based on the target.
<rdar://problem/8107317>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131504 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
25dba5d294364fa8339091e4d9e6a8f5db008377 18-May-2011 Fariborz Jahanian <fjahanian@apple.com> Code cleanup of my last patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131499 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6f40e2244b0590f144c5ceee07981a962fbbc72e 18-May-2011 Fariborz Jahanian <fjahanian@apple.com> Patch to fix IR-gen crash generating structure ABI which implements
user specified string class via -fconstant-string-class option.
pr9914.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131496 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
badea57d1db45caa95e71a256f4f4cf94fe20451 17-May-2011 Eli Friedman <eli.friedman@gmail.com> For calls returning first-class aggregates, store by element instead of creating aggregate stores in common cases. This is more friendly to fast-isel.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131490 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
492bafc66bdd22128327aab11804db476688b44e 17-May-2011 John McCall <rjmccall@apple.com> Revert r131434, my commit disabling the complete-object constructor
optimization for abstract classes; there was a misunderstanding, and
it turns out that there are no kexts which rely on this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131489 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
6ee6cf6a13e4047a78ce61951870c6605a7260f0 17-May-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r131450 at Tue. 17th May 2011.
c5f18f3e8c3f1e9cb25534f9a9676f112bedc2a7 17-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r131447, see if it fixes the buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131450 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
b7d2516f5dd1e5dfb112fc4e273db16f636b7fdc 17-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Inside isEmptyRecord function, for CXXRecordDecl just check the isEmpty bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131447 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
bc6a191a1575fa3b7785fe5cbe01463d220553a7 17-May-2011 Devang Patel <dpatel@apple.com> Set up appropriate context for member function.
Radar 9440721



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131441 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7aa488a7fc5c3a8cd1a2b93476150e9737760713 17-May-2011 Ted Kremenek <kremenek@apple.com> Fix crash on C++ code when compiling with -finstrument-functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131435 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
3217395e88e661e2a1c2b7eecb59629f67945b41 17-May-2011 John McCall <rjmccall@apple.com> Emit complete-object constructors for abstract classes in kext mode for
reasons that honestly really, really need to be looked into.



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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131400 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GVTT.cpp
GVTables.cpp
b1c98a35fbd49d6404a72db4aca2ceda352380c7 16-May-2011 John McCall <rjmccall@apple.com> Don't actually emit calls to the reserved global placement new and delete
operators; their semantics are guaranteed by the language.

If someone wants to argue that freestanding compiles shouldn't recognize
this, I might be convinceable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131395 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
adf5dc340db3ea99de5fe3f6c42cfee1807d445e 15-May-2011 Anders Carlsson <andersca@mac.com> Re-enable the fix for PR9181 now that all the edge cases are handled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131385 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
7d16627081caede9691a6f46b796da4073ac14ad 15-May-2011 John McCall <rjmccall@apple.com> The array-size operand to a new-expression is not necessarily a size_t.
It can be larger, it can be smaller, it can be signed, whatever. Handle
all the crazy cases with grace and spirit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131378 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
f2aac84709c418189e476ad591848dad50291885 15-May-2011 John McCall <rjmccall@apple.com> Make CGF.getContext() inlinable, because it's trivial, and optimize
hasAggregateLLVMType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131375 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
42e06119496e84e74cfc60230b18fcb53b35eb1c 15-May-2011 John McCall <rjmccall@apple.com> More killing of std::vector.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131374 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenTypes.h
0774cb84719f2aea3016493a2bbd9a02aa3e0541 15-May-2011 John McCall <rjmccall@apple.com> Use arrays and SmallVectors instead of std::vectors when building function
types. Also, cache a translation of 'void' in CGM and provide a ptrdiff_t
alias. No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131373 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GObjC.cpp
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
1493e2369cb426da9d916949f45e62a6e6ac5ab4 15-May-2011 Anders Carlsson <andersca@mac.com> Disable the optimization until the bug noticed by Sean Hunt has been fixed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131372 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
ffb945ffb5d29b80fd93649c3572b6d87abce3fc 15-May-2011 Anders Carlsson <andersca@mac.com> When emitting the destructor for a class with a vtable, if we can determine
that the destructor body is trivial and that all member variables also have either
trivial destructors or trivial destructor bodies, we don't need to initialize the
vtable pointers since no virtual member functions will be called on the destructor.

Fixes PR9181.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131368 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
cba681af356e24ec4335bcf2b6bb6515072ace99 14-May-2011 John McCall <rjmccall@apple.com> Only perform the null-initialization of an aggregate result of a message
send if the receiver is null. Normally it's not worthwhile to check this,
but avoiding the null-initialization is nice, and this also avoids nasty
problems where the null-initialization is visible within the call because
we use an aliased result buffer. rdar://problem/9402992



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131366 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d01d2b2de449d68e6c44d99a12c0c1fc53222113 14-May-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r131335 at Sat. 14th May 2011.
944c84313da15477eb18d90babb0890d10d98082 14-May-2011 John McCall <rjmccall@apple.com> Objective-C vtables are not taking the world by storm; call them
out as "v-table" message sends and stop calling normal messages "legacy"
message sends.

Also, fix some comments to reveal the true state of affairs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131335 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b1e8144a9620a16281a8b56a8b49d4cf37db3242 14-May-2011 John McCall <rjmccall@apple.com> Reorganize this method to avoid multiple calls for computing CGFunctionInfo
and to decrease the amount of effort in appending strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131323 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
62c296e1bd7581a444c2dc7ddb76f0bf2f364f23 14-May-2011 Joerg Sonnenberger <joerg@bec.de> Simplify


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131321 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4fe497d5cd34a7dca6e68b2e0a00fe2293570742 13-May-2011 Joerg Sonnenberger <joerg@bec.de> Bug 8765: Honor assembler labels for builtins. Ensure that the label is
mangled to avoid doing it twice for platforms that use prefixes like
Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131311 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
600d57ff204fb8167134aa4a4b9a3f74d5113a50 13-May-2011 Bill Wendling <isanbard@gmail.com> Remove the 'unaligned load' builtins now that they're no longer used in the *mmintrin.h files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131300 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
cf8e168baf75b7ede6493d0373d64545c29c1a90 13-May-2011 Fariborz Jahanian <fjahanian@apple.com> Produce UTF-8 strings with -fconstant-string-class
-fno-constant-cfstrings. Patch by Jonathan Schleifer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131298 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2bb110125e0e5adb7c1c65d12adfa34151ca1c47 13-May-2011 Douglas Gregor <dgregor@apple.com> When determining whether we can make a declaration into a global
constant, also consider whether it's a class type that has any mutable
fields. If so, it can't be a global constant.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131276 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenModule.cpp
aad16096f49e670aecc92beaa49b33d1c9aba4f2 12-May-2011 Devang Patel <dpatel@apple.com> Doug convinced me that DW_AT_APPLE_objc_complete_type is more appropriate name.
s/DW_AT_APPLE_objc_class_extension/DW_AT_APPLE_objc_complete_type/g



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131245 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f568b6459dd6df59b809a798cb198b4438c13abe 12-May-2011 Devang Patel <dpatel@apple.com> Do not add AT_APPLE_objc_class_extension attribute if @implementation is not seen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131242 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
707b1e9566776ca26b099685bd7ba5b440bb2acd 12-May-2011 Devang Patel <dpatel@apple.com> Use DW_AT_APPLE_objc_class_extension attribute to identify interfaces that represent class extension.
Radar 9423077.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131239 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0c9643008e5a35cac76cf3419b3308dcad97e53e 12-May-2011 Bill Wendling <isanbard@gmail.com> LLVM doesn't always optimize away the four loads from this:

(__m128){ p[0], p[1], p[2], p[3] }

which produces really bad code. This could be done in instcombine, but it's
probably better to do it in the front-end instead.
<rdar://problem/9424836>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131237 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
fe3e3bd63d73c1a370b0b0447b8744d495fa6626 12-May-2011 John McCall <rjmccall@apple.com> Make this code more resilient against catch variables which need cleanups.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131215 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCRuntime.cpp
023df37c27ee8035664fb62f206ca58f4e2a169d 09-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Rename "hasTrivialConstructor" to "hasTrivialDefaultConstructor" and
modify the semantics slightly to accomodate default constructors (I
hope).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131087 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprCXX.cpp
GObjC.cpp
a2447e0d1e28669cd637204a871f15b1215277fd 08-May-2011 Anders Carlsson <andersca@mac.com> Move code to emit the callee of an CXXOperatorCallExpr out into a separate function in CGClass.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131075 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
odeGenFunction.h
8e0397a39eaf9db83cbd9a3a459893fd12a3a05e 08-May-2011 Anders Carlsson <andersca@mac.com> Don't emit complete constructors for abstract classes. Also, don't emit
complete destructors for abstract classes unless the destructor is virtual
and thus needs to be in the vtable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131068 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
da55074866ca2fe7f718c5d3334648d6e340fb15 08-May-2011 Douglas Gregor <dgregor@apple.com> In C++, allow us to emit a global as 'constant' even if it has class
type, so long as it is known to have a constant initializer and the
class type is a POD class. Fixes <rdar://problem/9306265>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131060 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6f0877744517fa1daf3ac9d2e5c63c9acfcfa562 07-May-2011 Douglas Gregor <dgregor@apple.com> Revert r130717, which caused a regression (<rdar://problem/9402621>).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131057 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
6bd2f6ad857949d4dfb6e75e0760c61950b917cf 06-May-2011 Cameron Esfahani <dirty@apple.com> Fix false positive warning about uninitialized variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131019 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
10620eb5164e31208fcbf0437cd79ae535ed0559 06-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Modify some deleted function methods to better reflect reality:

- New isDefined() function checks for deletedness
- isThisDeclarationADefinition checks for deletedness
- New doesThisDeclarationHaveABody() does what
isThisDeclarationADefinition() used to do
- The IsDeleted bit is not propagated across redeclarations
- isDeleted() now checks the canoncial declaration
- New isDeletedAsWritten() does what it says on the tin.
- isUserProvided() now correct (thanks Richard!)

This fixes the bug that we weren't catching

void foo() = delete;
void foo() {}

as being a redefinition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131013 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
oduleBuilder.cpp
d4b9ee3b6ad82843c55909d6499232fce530113e 06-May-2011 Eli Friedman <eli.friedman@gmail.com> Don't emit nsw flags for vector operations; there's basically no benefit, and a lot of downside (like PR9850, which is about clang's xmmintrin.h making an unexpected transformation on an expression involving _mm_add_epi32).



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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130993 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
odeGenFunction.h
odeGenModule.cpp
54ec6c59d8b2e529fc3f07ae97415721f394ad92 06-May-2011 Axel Naumann <Axel.Naumann@cern.ch> Reset the emitted initializers.
This enables incremental codegen, where the initializer array can be removed from the module, such that only new initializers will be emitted and run.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130986 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
e0c7665b042fd1ef7aaad5074131c5ce8bfba766 06-May-2011 Fariborz Jahanian <fjahanian@apple.com> type of last arg of objc_assign_ivar is ptrdiff_t.
// rdar://9362887


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130956 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3e4c6c4c79a03f5cb0c4671d7c282d623c6dc35e 05-May-2011 Richard Smith <richard-llvm@metafoo.co.uk> Implement support for C++0x alias templates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130953 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
31c79b470bf609028b585266a3127e7fb5f0a534 05-May-2011 Devang Patel <dpatel@apple.com> Do not drop uint128 on the floor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130929 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3dc05418538c719fea48b906bfa4febe5296e126 05-May-2011 Nick Lewycky <nicholas@mxc.ca> Preserve the full name of the file, so that '-c -o foo.pic.o' produces
foo.pic.gcno instead of foo.gcno.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130899 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
1f382510495b581e3028d670a23c7dcf5440be62 04-May-2011 Bill Wendling <isanbard@gmail.com> Pack ivar offsets together.

Ivar offsets for synthesized ivars are wrong, which could end up with a large
number of dirty pages because of ivar fixups at runtime. When we pack all of the
synthesized ivars into the same section, it limits the number of dirty pages
created. Place them in the "__DATA,__objc_ivar" section.
<rdar://problem/9374905>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130870 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
5ea4f44e34449a78d6b38aa47c14b527839d7aac 04-May-2011 Nick Lewycky <nicholas@mxc.ca> Record where the GCOV data files should be placed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130866 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
b107dd02f5e365f60b036b8a27c784f2d0d0a855 04-May-2011 Bill Wendling <isanbard@gmail.com> Simplification noticed by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130864 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
b51bddab211ba7daa8832c017d82281e0d8348d1 04-May-2011 Bill Wendling <isanbard@gmail.com> Convert the non-temporal store builtins to LLVM-native IR.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130830 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
b76af9c969558b4484be87933e89e76e7ee87e21 04-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Ensure that destructors are properly inovked when an exception leaves
the body of a delegating constructor call.

This means that the delegating constructor implementation should be
complete and correct, though there are some rough edges (diagnostic
quality with the cycle detection and using a deleted destructor).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130803 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
855a8e79f42e670b405b31efd3963f4d89732aff 03-May-2011 Fariborz Jahanian <fjahanian@apple.com> Finish off rules for z-length bitfields in ms_struct
structs. // rdar://8823265


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130783 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GExprConstant.cpp
GRecordLayoutBuilder.cpp
d49bd5515b89bedc57c3d1d3be457e4340dbdb1d 03-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Fix delegating constructors stylistic issues.

Material bugfixes to come this afternoon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130782 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
a87a2b2d18b7482f91994e2bba769cddea8bd0ee 03-May-2011 Devang Patel <dpatel@apple.com> Function with internal linkage name do not have mangled name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130736 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2df74c000cb031e9e92a9402a8a39301218fca95 03-May-2011 Devang Patel <dpatel@apple.com> Do not try to get mangled name of block helpers. Apply a stopgap measure to fix SingleSource/UnitTests/block-copied-in-cxxobj compile time crash.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130734 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
58dc5ca0841900b197de7733197196f435bf0cc3 02-May-2011 Devang Patel <dpatel@apple.com> Emit debug info for __destroy_helper_block_ and __copy_helper_block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130719 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
b5a03b6217cd6c3eecdc1aa4df03060cf51ac942 02-May-2011 Eli Friedman <eli.friedman@gmail.com> Skip extra copy from aggregate where it isn't necessary; rdar://problem/8139919 . This shouldn't make much of a difference at -O3, but should substantially reduce the number of generated memcpy's at -O0.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130717 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
c6d07821c529bb95e4cf072e49b736c5142f1786 02-May-2011 Eli Friedman <eli.friedman@gmail.com> Switch CallArgList from an std::pair to a new CallArg struct (which will eventually gain more members). Working towards modifying call emission to avoid unnecessary copies.



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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130699 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GClass.cpp
GDecl.cpp
GExprCXX.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GVTables.cpp
340fa242130c2d8d74c83edca0952e771aebe0e6 02-May-2011 Fariborz Jahanian <fjahanian@apple.com> More rule enforcement of zero bitfields for ms_struct.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130696 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GExprConstant.cpp
GRecordLayoutBuilder.cpp
7d4b159c0e47f4e78e25cb298430be4fdf415bb7 02-May-2011 Nick Lewycky <nicholas@mxc.ca> Remove unused variable spotted by GCC.

Devang, can we remove this call entirely? If I try that, "make check" passes
but the call has a side-effect of ensuring that the block's context exists in
the debug info. getContextDescriptor() is used in a void context for that side-
effect elsewhere in this file. Please take a look!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130679 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ba0f1012c4d7dfff2de8f1b728c47bc080e81712 02-May-2011 Nick Lewycky <nicholas@mxc.ca> Remove dead variable, flagged by gcc's -Wunused-but-set-variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130674 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
28ff4d640493dab5323d035a69730f9951d65ca1 02-May-2011 Nick Lewycky <nicholas@mxc.ca> Remove dead variable flagged by gcc's -Wunused-but-set-variable. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130673 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
635ca1bad3cce84cbe31a5574416e055c5e9f054 02-May-2011 Nick Lewycky <nicholas@mxc.ca> Remove a dead variable flagged by gcc's -Wunused-but-set-variable. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130672 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
059ce0d92eb5a7da900ae735dc0a2ea3d64f4b0b 01-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Fully implement delegating constructors!

As far as I know, this implementation is complete but might be missing a
few optimizations. Exceptions and virtual bases are handled correctly.

Because I'm an optimist, the web page has appropriately been updated. If
I'm wrong, feel free to downgrade its support categories.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130642 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
odeGenFunction.h
f24a151d645abc89f94aa58ad59f3131502041b1 30-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Implement -fno-dwarf2-cfi-asm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130616 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
22a5cdf326a55739078c0930fe42116a93d6c930 30-Apr-2011 Devang Patel <dpatel@apple.com> Tie constructor defintion with its declaration using AT_specification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130561 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a0fa203f04235cb6d05eeb8cea3392a01aa7571b 30-Apr-2011 Bob Wilson <bob.wilson@apple.com> Add -Oz option and use it to set the inline threshold to 25.
Radar 9333566. Patch by Chad Rosier!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130554 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
73a6f8e8ad2174fb70cfb4c7d7afe424cfe8a147 30-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> removes a meaningless comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130550 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
2c7168c660ab2b961ad48087e02cca96f7bb94d2 29-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> block variables on lhs need be ir-gen'ed after the
rhs when its 'forwarding' pointer may be modified
in rhs evaluation as result of call to Block_copy.
// rdar://9309454


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130545 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
7bcf6c3e098e808282cc96309c02c08ab6229940 29-Apr-2011 David Chisnall <csdavec@swan.ac.uk> Don't crash if the AST doesn't have a sensible ObjC id type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130500 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
fbc3cc69d2028eccb85bb456d762457b38a65e3b 29-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Fixes debug info generation problem for ms_struct structs.
// rdar://8823265


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130458 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
657baf19ca8a48a926bd3bc148b6ad1b17e53199 29-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Cut down unnecessary zero'ing when value-initializing arrays of C++ objects.

-C++ objects with user-declared constructor don't need zero'ing.
-We can zero-initialize arrays of C++ objects in "bulk" now, in which case don't zero-initialize each object again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130453 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprCXX.cpp
07a8a21c3376f3a2ee470bfa3549c6f3ac4e236d 29-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> ms_struct patch for initialization and field access irgen.
// rdar://8823265 - wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130451 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
a1dadc9874992fdb5a9a721bec6cf1b9f0e90fed 28-Apr-2011 Stuart Hastings <stuart@apple.com> Raise ARM byval minimum size from 32 to 64, addressing a performance
regression in mason. rdar://problem/7662569


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130444 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
4962153cd2e48a67b7834b9cf5c8c6327f2b385a 28-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Get the base element type even in multidimensional arrays.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130427 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
ea971e968f2e4a2cd8cbaf4a8cb416ed70c35ffb 28-Apr-2011 Stuart Hastings <stuart@apple.com> Replace unitary array with scalar. rdar://problem/7662569

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130423 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
3b4d490b09347e0b68ec0511ddfae79dfaba77a6 28-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> When value-initializing the elements of an array not not included in the initializer make sure
that a non-trivial C++ constructor gets called.

Fixes rdar://9347552 & http://llvm.org/PR9801

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130421 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
b7f62d01369c2a6e4af5dd2a76052ae65892161d 28-Apr-2011 Stuart Hastings <stuart@apple.com> Replace SmallVector with an array, as suggested by Frits van Bommel. rdar://problem/7662569

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130417 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
642a75f883e644bcfbb82e7af0313776ad1ce33c 28-Apr-2011 John McCall <rjmccall@apple.com> When block-capturing a variable with a non-trivial destructor,
make sure to mark the destructor. This normally isn't required,
because the destructor should have been marked as part of the
declaration of the local, but it's necessary when the variable
is a parameter because it's the call sites that are responsible
for those destructors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130372 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
28bbe4b8acc338476fe0825769b41fb32b423c72 28-Apr-2011 John Wiegley <johnw@boostpro.com> Parsing/AST support for Structured Exception Handling

Patch authored by Sohail Somani.

Provide parsing and AST support for Windows structured exception handling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130366 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
21ff2e516b0e0bc8c1dbf965cb3d44bac3c64330 28-Apr-2011 John Wiegley <johnw@boostpro.com> Implementation of Embarcadero array type traits

Patch authored by John Wiegley.

These are array type traits used for parsing code that employs certain
features of the Embarcadero C++ compiler: __array_rank(T) and
__array_extent(T, Dim).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130351 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
67d097e1232b7d66f58989c16a45b8a11721f76e 27-Apr-2011 Stuart Hastings <stuart@apple.com> Re-enable byval for ARM in clang. rdar://problem/7662569

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130312 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
14d56ef43ff4921c6749f7340212fbb743fdbb9b 27-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Some refactoring of my ms_struct patch.
// rdar://8823265 related.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130311 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
173d51286bcaff4b6b76eebf6542d3b1311142e2 27-Apr-2011 Anders Carlsson <andersca@mac.com> When compiling with -fno-threadsafe-statics, guard variables for globals with internal linkage don't have to be i64, i8 works just fine!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130286 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
62055b0618fafb4747e783ba3fedd7bc7d57d27d 27-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> With ms_struct attribut, Zero-length bitfields following
non-bitfield members are ignore. // rdar://8823265 wip


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130257 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
37833b00d282cacb7dd1b9889e2a113eed9190ff 26-Apr-2011 Devang Patel <dpatel@apple.com> We need pointer size in bits here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130244 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.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
GExprCXX.cpp
GRTTI.cpp
odeGenTypes.cpp
eab80782f645489db299db24aa7a5886b37185b0 26-Apr-2011 Daniel Dunbar <daniel@zuster.org> IRgen/Darwin: Fix refacto introduced in Triple changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130233 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
ad27eeaf03fc834f5e8e8d5b343582fe6b29000d 26-Apr-2011 Eric Christopher <echristo@apple.com> Temporarily revert r130176, it appears to have broken a few tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130179 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
50811d2e8939d3dc79f1ce30985c7cfcb17eda19 26-Apr-2011 Devang Patel <dpatel@apple.com> Emit intrinsic at current insert point, not at the end of current block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130177 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
df39fa2811933737974862ad376f140e4cdfeee1 26-Apr-2011 Stuart Hastings <stuart@apple.com> Turn on byval parameters in Clang for ARM APCS. rdar://problem/7662569

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130176 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
e2d0191afbe95f46abd21c3511a02a5a76106da4 26-Apr-2011 Devang Patel <dpatel@apple.com> Simplify. There is no need to have a method to just call another method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130175 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
dd697bc8629f0fa6777245610d52ca7ceb3b67f4 26-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Generalize case for built-in expressions having
side-effect to generate their ir. Not just for
__builtin_expect. // rdar://9330105


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130172 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
ec9919549095390b5737c561544f8bd49fc894de 26-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Ir-gen the side-effect(s) when __builtin_expect is
constant-folded. // rdar://9330105


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130163 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
552622067dc45013d240f73952fece703f5e63bd 25-Apr-2011 John Wiegley <johnw@boostpro.com> t/clang/expr-traits

Patch authored by David Abrahams.

These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for
parsing code that employs certain features of the Embarcadero C++ compiler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130122 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1a8c15a8b7f7c6d851e0d3dd1b86d5f78515ffa4 24-Apr-2011 Ken Dyck <kd@kendyck.com> Convert size and alignment variables to CharUnits in EmitAggregateCopy(). No
change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130113 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
5ff1a3508b39cfe3c9d108679a6532d85586b5ce 24-Apr-2011 Ken Dyck <kd@kendyck.com> Convert type size and alignment to CharUnits in CheckAggExprForMemSetUse().
No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130112 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
02c45333b8310bb792a15f85f219706025f9752c 24-Apr-2011 Ken Dyck <kd@kendyck.com> Convert the return type of GetNumNonZeroBytesInInit() to CharUnits. No
change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130111 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
479b61ccd8cd847281eef0b43e6873f0930f1b98 24-Apr-2011 Ken Dyck <kd@kendyck.com> Eliminate some literal 8s by converting size variables in EmitGCMove() and
EmitFinalDestCopy() to CharUnits. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130110 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
243a4aa8afd19df52f21db4afb665c4d8b22ef66 24-Apr-2011 Ken Dyck <kd@kendyck.com> Replace calls to ASTContext::getTypeInfo() with calls to
ASTContext::getTypeSize() when only the size part is used. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130109 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
3256de709a69572be90e9c8855fafb58c4d93d10 24-Apr-2011 Ken Dyck <kd@kendyck.com> Simplify AppendTailPadding() by converting its parameter to CharUnits. No
change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130108 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
737978d336ea8bbb27cc7a3c9cb5eeb2b7dea8a5 24-Apr-2011 Ken Dyck <kd@kendyck.com> Eliminate literal 8s from LayoutUnionField by converting NumBytesToAppend to
CharUnits. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130107 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
edda6e432789b7a668c86573fd5881342b9f6e27 24-Apr-2011 Ken Dyck <kd@kendyck.com> Eliminate literal 8s from LayoutBitField(), converting variables to
CharUnits or replacing the 8s with char align. No change in functionality
intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130106 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
b9e6b2c215d0a7930ad160b054bc86353da4a517 24-Apr-2011 Ken Dyck <kd@kendyck.com> Convert AccessInfo::AccessAlignment to CharUnits. No change in functionality
intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130087 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
c556ef293692cf4cb40e11e816656ac23e5567db 24-Apr-2011 Jay Foad <jay.foad@gmail.com> PR9214: Convert the DIBuilder API to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130086 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
28ebde58dd94b5ed2a6d149251202ab2c602a4a6 24-Apr-2011 Ken Dyck <kd@kendyck.com> Convert CGBitFieldInfo::FieldByteOffset to CharUnits. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130085 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
c69a505cfa318d571ce8a0cd038c8d958585a735 23-Apr-2011 Jay Foad <jay.foad@gmail.com> Remove unused STL header includes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130068 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCRuntime.h
120bf32525829be4622fc85b67e38b2ff0276744 23-Apr-2011 Devang Patel <dpatel@apple.com> Tie debug information for method declaration with debug information for method definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130037 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
8387e2a41eef6fa17fb140a18c29b6eee9dd2b8a 23-Apr-2011 Francois Pichet <pichet2000@gmail.com> Add -fdelayed-template-parsing option. Using this option all templated function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup.

Using this flag is necessary for compatibility with Microsoft template code.
This also provides some parsing speed improvement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130022 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
64089cece350472c04b420c497ae391443353325 23-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Fixes an instance method meta-data generation bug in
ObjC NeXt runtime where method pointer registered in
metadata belongs to an unrelated method. Ast part of this fix,
I turned at @end missing warning (for class
implementations) into an error as we can never
be sure that meta-data being generated is correct.
// rdar://9072317


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130019 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
e0afc892e75f526f7ecce7dd152d946337632efe 22-Apr-2011 Ken Dyck <kd@kendyck.com> Replace a couple of literal 8s with ASTContext::getCharWidth(). No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130002 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
79be76c0e360d9e9c44285c9838af02adc43e55f 22-Apr-2011 Ken Dyck <kd@kendyck.com> Eliminate some literal 8s from EmitNullInitialization() by converting
variables to CharUnits. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130001 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
0ebce0e15ad5cb0f3e346b35643c7f054a23c6b0 22-Apr-2011 Ken Dyck <kd@kendyck.com> Eliminate some literal 8s from EmitDeclare by converting to CharUnits. No
change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129999 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
573be633903ecae1f75aeb762f68963379d5ae43 22-Apr-2011 Ken Dyck <kd@kendyck.com> Use CharUnits to eliminate some literal 8s in
EmitTypeForVarWithBlocksAttr(). No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129998 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
18052cd75ef2793c756d851af29d39d5b538fe50 22-Apr-2011 Ken Dyck <kd@kendyck.com> Replace some literal 8s with char width and char align. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129996 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCRuntime.cpp
0259c3a3df3c2f3b9de7e3845df1eea3ac04e1aa 22-Apr-2011 Justin Holewinski <justin.holewinski@gmail.com> PTX: Add default PTX calling conventions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129987 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
e8ba8d78a258ec992d3521eebdae8324db777b14 22-Apr-2011 Nick Lewycky <nicholas@mxc.ca> Wire up the -ftest-coverage and -fprofile-arcs flags to .gcno file emission (at
compile time) and .gcda emission (at runtime). --coverage enables both.

This does not yet add the profile_rt library to the link step if -fprofile-arcs
is enabled when linking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129956 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
MakeLists.txt
odeGenModule.cpp
6f141659cab11109d9931d92d0988f8850778de3 21-Apr-2011 Jay Foad <jay.foad@gmail.com> PR9214: Convert Metadata API to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129929 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenTBAA.cpp
67a5773ba529aebcad03fa5e7cc95555d133e93d 21-Apr-2011 John McCall <rjmccall@apple.com> The 0.98 revision of the x86-64 ABI clarified a lot of things, some
of which break strict compatibility with previous compilers. Implement
one of them and then immediately opt out on Darwin.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129899 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
4423ac0282acb8ba801eb05b38712438dc0c1e3e 21-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> For

double data[20000000] = {0};

we would blow out the memory by creating 20M Exprs to fill out the initializer.

To fix this, if the initializer list initializes an array with more elements than
there are initializers in the list, have InitListExpr store a single 'ArrayFiller' expression
that specifies an expression to be used for value initialization of the rest of the elements.

Fixes rdar://9275920.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129896 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.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
odeGenTypes.cpp
odeGenTypes.h
42f681b83378de1541919c7f72e7555e35158867 21-Apr-2011 Chris Lattner <sabre@nondot.org> fix a crash on code that uses the result value of __builtin___memcpy_chk.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129892 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
db27b5fb2d7fc50b8962b2c95e4d43b90c69b1f0 20-Apr-2011 Daniel Dunbar <daniel@zuster.org> IRgen/ARM: Fix a think-o in conversion-to-null for member function pointers, we
were computing the conversion as (ptr != 0 && non-virtual), when it should be
(ptr != 0 || is-virtual).
- Test to follow in LLVM test-suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129830 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
48431f9c8c2a09df80da5999358f9cf85553e9b2 20-Apr-2011 Chris Lattner <sabre@nondot.org> some cleanups to use IRBuilder methods instead of llvm:: foo methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129829 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
db57a4cdb0a6abf3239f3a794a900ce312c5887b 19-Apr-2011 Daniel Dunbar <daniel@zuster.org> ADT/Triple: Switch to using .isOSDarwin() predicate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129823 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenModule.cpp
argetInfo.cpp
97d5437f48f8d935bf053915ab3d250edfe5fad5 19-Apr-2011 Chris Lattner <sabre@nondot.org> use the newly introduced IRBuilder getInt() method to reduce some
redundancy pointed out by John.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129808 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
1f15c19005861b77cc52c14a3b294c6908b603bd 18-Apr-2011 Devang Patel <dpatel@apple.com> Fix typo in comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129703 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
2839d6b17715045d5eba6a47f750060a198d04b2 18-Apr-2011 Anders Carlsson <andersca@mac.com> Get rid of std::vector usage when getting function types in CGException.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129698 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
3f6c5e13f6c1662a7173c747fc63f4e8edb91206 18-Apr-2011 Anders Carlsson <andersca@mac.com> Clean up code generation of typeid expressions and add C++ standard references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129682 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
421048698b6b6bf86754190bcfe98a0ed82ee5b5 18-Apr-2011 Chris Lattner <sabre@nondot.org> Fix a miscompilation I introduced in r129652, thanks for Eli for tracking
it down. we effectively were compile the testcase into:

void test14(int x) {
switch (x) {
case 11: break;
case 42: test14(97); // fallthrough
default: test14(42); break;

which is not the same thing at all. This fixes a miscompilation of
MallocBench/gs seen on the clang-x86_64-linux-fnt buildbot.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129679 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
eb9d81dff99d4996f41c93ce71b08aaf753cbae8 17-Apr-2011 Anders Carlsson <andersca@mac.com> When laying out bases in, always try the "base subobject" LLVM type. If it
turns out that a field or base needs to be laid out in the tail padding of
the base, CGRecordLayoutBuilder::ResizeLastBaseFieldIfNecessary will convert
it to an array of i8.

I've audited the new test results to make sure that they are still valid. I've
also verified that we pass a self-host with this change.

This (finally) fixes PR5589!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129673 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.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
odeGenTypes.cpp
odeGenTypes.h
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
odeGenTypes.cpp
odeGenTypes.h
2786a81415c43cf3110d197b20987c352edbd0fe 17-Apr-2011 Anders Carlsson <andersca@mac.com> Use a SmallVector for field types in CGRecordLayoutBuilder now that llvm::StructType::get takes an ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129667 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
10292cc239df9f78ff76ef1e4476fadead971709 17-Apr-2011 Eli Friedman <eli.friedman@gmail.com> Hack to turn the valgrind buildbot green, until Devang can address it
properly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129657 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b11f9198111796ada02b57f62cdea92134fde9f7 17-Apr-2011 Chris Lattner <sabre@nondot.org> implement rdar://9289524 - case followed immediately by break results in empty IR block,
a -O0 code quality issue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129652 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
GStmt.cpp
odeGenFunction.h
a5e5e0f41e1dcee4603244ccea3d3956c55c23ac 17-Apr-2011 Chris Lattner <sabre@nondot.org> fold memcpy/set/move_chk to llvm.memcpy/set/move when the sizes
are trivial. This exposes opportunities earlier, and allows fastisel
to do good things with these at -O0.

This addresses rdar://9289468 - clang doesn't fold memset_chk at -O0


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129651 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
c6bea67efc38b075c401ebdb6ae97afa08cbb51d 17-Apr-2011 Chris Lattner <sabre@nondot.org> fix rdar://9289603 - clang should fold trivial ?: for enums as well as integer constants into select at -O0
by making the isCheapEnoughToEvaluateUnconditionally predicate handle anything that folds to a constant. In particular, we now fold enums.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129649 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
90c1eedd060b33946a0c3ed7d25b6ae435c4aac9 16-Apr-2011 Devang Patel <dpatel@apple.com> Emit proper selector name in debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129626 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
fa936d8304a014f0d0a8382183fb3370ced3bc0a 16-Apr-2011 Devang Patel <dpatel@apple.com> Emit debug info for Objective-C properties.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129625 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
8b36a9ee7fe7204b30a85b95b11850aeb4b63ee3 15-Apr-2011 Michael J. Spencer <bigcheesegs@gmail.com> Add 3DNow! Intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129570 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.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
GDecl.cpp
odeGenTBAA.cpp
odeGenTypes.cpp
fc8f0e14ad142ed811e90fbd9a30e419e301c717 15-Apr-2011 Chris Lattner <sabre@nondot.org> fix a bunch of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129559 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenAction.cpp
odeGenFunction.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
argetInfo.cpp
f111d935722ed488144600cea5ed03a6b5069e8f 15-Apr-2011 Peter Collingbourne <peter@pcc.me.uk> C1X: implement generic selections

As an extension, generic selection support has been added for all
supported languages. The syntax is the same as for C1X.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129554 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenFunction.cpp
ad762fcdc16b9e4705b12b09d92b8c026212b906 15-Apr-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add support for C++0x's range-based for loops, as specified by the C++11 draft standard (N3291).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129541 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
414d8967e1d760ea1e19a4aca96b13777a8cf8c5 14-Apr-2011 Anton Korobeynikov <asl@math.spbu.ru> Implement ARM pcs attribute. Basically it's another way of calling convention selection (AAPCS or
AAPCS+VFP), similar to fastcall / stdcall / whatevercall seen on x86.

In particular, all library functions should always be AAPCS regardless of floating point ABI used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129534 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
argetInfo.cpp
0afe9672b582978bfa4849e073dfb1a2c81fb819 14-Apr-2011 Ken Dyck <kd@kendyck.com> Replace a couple of divide-by-8s with divide-by-charwidths. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129496 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCRuntime.cpp
fb67ccd9da412d652d62e2ac9675b0f1b14fdc73 14-Apr-2011 Ken Dyck <kd@kendyck.com> Replace a couple of divisions-by-'8' with divisions-by-charwidth. No change
in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129491 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9b064d8bf94fc70aee7773feb04e5e96134f52f2 13-Apr-2011 Bill Wendling <isanbard@gmail.com> Removing the unaligned load tests from builtins-x86.c since they're generated by a regular 'load' now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129464 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
9c08b39781f0b4268f32aba65128c8700e3131f8 13-Apr-2011 Bill Wendling <isanbard@gmail.com> It looks like the FreeBSD buildbot needs this for the builtins-x86.c test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129433 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
60cb5e9d39ec1ec8f476eb700c423bfe574fbac8 13-Apr-2011 Bill Wendling <isanbard@gmail.com> Just use a native "load" instead of translating the builtin later. Clang can
take it!

I wasn't able to get __builtin_ia32_loaddqu to transform into an unaligned
load...I'll have to look into it further.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129427 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
ad3692bbe1874abafae1757a2b9d3bfa2249dc43 13-Apr-2011 Anders Carlsson <andersca@mac.com> Use EmitCallOrInvoke in EmitBadTypeidCall and EmitBadCastCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129424 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
aa48244cc043b1bcf166635745481d0d7f4f6838 13-Apr-2011 Bill Wendling <isanbard@gmail.com> Convert the unaligned load builtins to the first-class versions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129420 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
f7e903d7a30891083420c07ebeed281726a101d6 13-Apr-2011 Daniel Dunbar <daniel@zuster.org> IRgen/Obj-C: Emit CFStrings and NSStrings with the alignment of the char type,
there is no reason to align them higher.
- This roughly matches llvm-gcc's r126913.
- It is an open question whether or not we should do this for cstring's in
general (code size vs optimization potential), for now we just match llvm-gcc
until someone wants to run some experiments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129410 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6591271275f7a3db357f3cb7af37ef86e800e4ba 13-Apr-2011 John McCall <rjmccall@apple.com> We can't emit an aggregate cast as its sub-expression in general just
because the result is ignored. The particular example here is with
property l-values, but there could be all sorts of lovely casts that this
isn't safe for. Sink the check into the one case that seems to actually
be capable of honoring this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129397 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
99ace16bc6962f1fc3dc45bbbdf2eb74e555a8ad 12-Apr-2011 John McCall <rjmccall@apple.com> Template static data members can have weak_odr linkage, not just
weak linkage. Also, fix a problem where global weak variables
with non-trivial initializers were getting guard variables, or at
least were checking for them and then crashing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129342 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenModule.cpp
26fbc72b33bdbd20b0145bf117c64d373f8051e3 12-Apr-2011 John McCall <rjmccall@apple.com> Ignore indirect field declarations. Fixes PR9570.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129337 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
755d8497e39071aa24acc173ff07083e3256b8f8 12-Apr-2011 John McCall <rjmccall@apple.com> After some discussion with Doug, we decided that it made a lot more sense
for __unknown_anytype resolution to destructively modify the AST. So that's
what it does now, which significantly simplifies some of the implementation.
Normal member calls work pretty cleanly now, and I added support for
propagating unknown-ness through &.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129331 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
4bdbc0cb1e29ac870b7e7985cf4a1b5c34176e8c 11-Apr-2011 Anders Carlsson <andersca@mac.com> If there's an invoke destination, we should use invoke instead of call when calling the __cxa_bad_typeid function. Fixes PR7400.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129273 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
379b5155b4566f63679e1da6b0ceb5fdfa2aec6d 11-Apr-2011 John McCall <rjmccall@apple.com> More __unknown_anytype work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129269 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprConstant.cpp
GExprScalar.cpp
taniumCXXABI.cpp
575b374fdbfc2c2224fd3047ac11ffc4b8db9ae5 11-Apr-2011 Anders Carlsson <andersca@mac.com> Remove CK_DynamicToNull.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129265 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
3ddcdd5d6c88902d24baa9e6bb240a3da88e68d4 11-Apr-2011 Anders Carlsson <andersca@mac.com> When we know that a dynamic_cast always returns null, we can make
CodeGenFunction::EmitDynamicCast always return null or throw a bad_cast
exception.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129264 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
f0cb4a6ac7ffcba25309a5d1ad1a4bf869b13a33 11-Apr-2011 Anders Carlsson <andersca@mac.com> Clean up CodeGenFunction::EmitDynamicCast. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129262 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
b924124316becf2968a37dab36d0c48ea167666f 11-Apr-2011 Anders Carlsson <andersca@mac.com> Replace a couple of Builder.CreateICmpEQ with Builder.CreateIsNull. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129261 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
7d99bc37e77157523e3bfbc6c077842b74e6690f 10-Apr-2011 Anders Carlsson <andersca@mac.com> As a first step towards fixing PR9641, add a CK_DynamicToNull cast kind which
represents a dynamic cast where we know that the result is always null.

For example:

struct A {
virtual ~A();
};
struct B final : A { };
struct C { };

bool f(B* b) {
return dynamic_cast<C*>(b);
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129256 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
cd0b32e73a66a20a8dab7a7f0ce963dc669f7c0a 10-Apr-2011 Anders Carlsson <andersca@mac.com> Strip off parens and no-op casts when deciding if an expr can be devirtualized. Fixes the second half of PR9660.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129250 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
52d6874271829c4f5bb70121fb678c27780ce65a 10-Apr-2011 Eli Friedman <eli.friedman@gmail.com> PR9580: Handle vectors correctly in ScalarExprEmitter::EmitRem.

While I'm here, FileCheck-ize the ext-vector test, so we actually check
what it is generating.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129241 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
5536daa627b508299007b735a588bf4e88825bb3 09-Apr-2011 Eli Friedman <eli.friedman@gmail.com> Make sure we or together the overflow flags of the multiply and add, so the
check is triggered appropriately. Reported on cfe-dev.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129231 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
2eba7abeab4abddd28644200397f8a1d5badccdd 09-Apr-2011 Logan Chien <tzuhsiang.chien@gmail.com> Merge with clang upstream r129173 (Apr 8th 2011)

Upstream Revision
git-id: 0ff32595e4b92c5bdee78946b39f9e990b20cc90
svn-id: 129173
a49218e17bcbb1acde0245773173e2c0c42f4f19 09-Apr-2011 Eli Friedman <eli.friedman@gmail.com> PR8369: make __attribute((regparm(0))) work correctly. Original patch by
pageexec@freemail.hu, tweaks by me.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129206 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
baf101d1f96b4e41c9f2797875329840514f54f1 09-Apr-2011 Chris Lattner <sabre@nondot.org> fix indentation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129202 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
23aa9c8ca0bc441aab2a38a4c9fc7a1c9e9ac16a 09-Apr-2011 Chris Lattner <sabre@nondot.org> add a __sync_swap builtin to fill out the rest of the __sync builtins.
Patch by Dave Zarzycki!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129189 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
1246ba6f6801390ffc0e1d4b83a2b45e72283b8f 09-Apr-2011 Ken Dyck <kd@kendyck.com> Convert the PointerWidthInBytes variable in EmitMemberPointer() to CharUnits
to eliminate a divide-by-8. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129180 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
b653d5ac2f1afab5bf3256145c4112754f4b5779 09-Apr-2011 Ken Dyck <kd@kendyck.com> Eliminate a divide-by-8 in BuildVMIClassTypeInfo() by using CharUnits for
the base offset. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129179 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
3894c073fea642d54237d83e94be8797d0b54151 09-Apr-2011 Nick Lewycky <nicholas@mxc.ca> Apply explicit braces to avoid ambiguous 'else' [-Wparentheses]


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129176 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
6cf37dd1fd7280dbe4208bab7169ccafc816c768 08-Apr-2011 Devang Patel <dpatel@apple.com> Do not use zero as an upper bound for unbounded array because upper bound zero also indicates one element array.


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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129072 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDebugInfo.cpp
GRTTI.cpp
GVTables.cpp
GVTables.h
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
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
GRTTI.cpp
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
1a7f7526b7fd817e3f49c210302d189eff981b5e 07-Apr-2011 Ken Dyck <kd@kendyck.com> [Reapply r128773. This is not the source of the issues Devang was seeing
with debug info.]

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



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

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



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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129043 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
01cb307f0b84a368cdbc0738d6680aab8ed7423f 06-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Refine rules for atomic property api to
pass a previously failing clang test.
// rdar://8808439


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129004 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
0ac2cf4d28e1ed92508b27a3d9e28fc8db2a390b 06-Apr-2011 Peter Collingbourne <peter@pcc.me.uk> If this is an intrinsic function, set the function's attributes to the intrinsic's attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129000 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
0c959fc7f1e1006f44eae6fdb5b659eb12bf8ddc 06-Apr-2011 Nowar Gu <nowar100@gmail.com> Add some source files into Android.mk.
ndroid.mk
9a7319305fc25222b91d585dfa056c8cdbac8434 06-Apr-2011 Nowar Gu <nowar100@gmail.com> Merge upstream until 2011.04.05.
ddd72ac675d0d7ecc1172fa5c98ab846f983103c 06-Apr-2011 Devang Patel <dpatel@apple.com> Simplify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128957 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5fb6509b402d052aa661b15bfa5b71b7cdd7d0e9 06-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Fixes a regression caused by my last patch.
As a result, I had to remove a c++ version of a clang
test which requires more scrutiny on my part.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128950 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
5ecb1dfb303c58138fdabeea00e73bee075b21ee 06-Apr-2011 Devang Patel <dpatel@apple.com> Emit debug info for function template parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128948 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
1d3a61a5ab0952ebf1f829bd2e48bc09bb332189 05-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Generate atomic api for atomic properties (x86 and x86_64
targets) when load/store results in multiple instructions.
// rdar://8808439


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128937 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
89054fb972f5f93a6d29a6701f8ad4a5d38030d4 05-Apr-2011 Devang Patel <dpatel@apple.com> Remove unintentional check-in.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128928 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
12e6d838e22be421b8870b0b3d4069569ee669a5 05-Apr-2011 Devang Patel <dpatel@apple.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128921 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDecl.cpp
c5ce297007527038884673d6eb9d174ae036f586 05-Apr-2011 Devang Patel <dpatel@apple.com> Use TemplateParameterList to extract template parameter name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128915 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
92b5d947e262bcc9afe6ddee6caf66151bd7c572 05-Apr-2011 Andrew Trick <atrick@apple.com> Added *hidden* flags -print-options and -print-all-options so
developers can see if their driver changed any cl::Option's. The
current implementation isn't perfect but handles most kinds of
options. This is nice to have when decomposing the stages of
compilation and moving between different drivers. It's also a good
sanity check when comparing results produced by different command line
invocations that are expected to produce the comparable results.

Note: This is not an attempt to prolong the life of cl::Option. On the
contrary, it's a placeholder for a feature that must exist when
cl::Option is replaced by a more appropriate framework. A new
framework needs: a central option registry, dynamic name lookup,
non-global containers of option values (e.g. per-module,
per-function), *and* the ability to print options values and their defaults at
any point during compilation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128911 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
6445d6278b8c324eb45be59fc9a10992a65252bf 05-Apr-2011 Andrew Trick <atrick@apple.com> whitespace


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128908 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
9c1714ba3d668b6519f8211927976d777d716b95 05-Apr-2011 Devang Patel <dpatel@apple.com> Refactor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128893 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
978d415adab4ef423f5aef430ddfdbefc4cfb000 05-Apr-2011 David Chisnall <csdavec@swan.ac.uk> Fix copy-and-paste bug that I introduced while tidying up the code.

Does anyone want to buy me a new brain?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128890 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
34c1af83e159cfe0f43e7a855e84783f301fc1f1 05-Apr-2011 Sandeep Patel <deeppatel1987@gmail.com> Set AAPCS-VFP calling convention accordingly and hard float ABI command handling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128866 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
argetInfo.cpp
ab868e2b409e73516dd83c44e1a32c122c460757 05-Apr-2011 Devang Patel <dpatel@apple.com> Eliminate conservative check that is covered by isIncompleteType() check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128857 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ba690a4112be4f0abde48ce51d41e92c79f96f3e 05-Apr-2011 Devang Patel <dpatel@apple.com> Incomplete type does not have any size.


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


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


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


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


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128770 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
e87e717b0dbe4776f2b4dbb1e6ce2a19f562d2b0 02-Apr-2011 csmon7507 <csmon7507@gmail.com> Merge branch 'upstream' into logan-fastforward-20110320
396e4f672b4fc22936f385e0478a09eb223f113a 02-Apr-2011 Ken Dyck <kd@kendyck.com> Convert BaseOffset::NonVirtualOffset to CharUnits. No change in
functionality intended.


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


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


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128752 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
ae503df62bde42440a9c4495d26d6142c4af7bcb 01-Apr-2011 Devang Patel <dpatel@apple.com> Do not try calculate the size of forward-declared template type array.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128725 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f445debe3a6825e6528655db0906ce4fa41240ea 01-Apr-2011 csmon <csmon@csmon-desktop.(none)> Merge branch 'upstream' into logan-fastforward-20110320
d553408ff15b38710a1ba0947efbf4c5637018ab 01-Apr-2011 Daniel Dunbar <daniel@zuster.org> IRgen: Reapply r128691 with a fix to ensure we don't increase alignment past
that of the array element type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128698 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
457c838b7252dd3deeec8a924dcb0e47b8c6df23 01-Apr-2011 Daniel Dunbar <daniel@zuster.org> Revert r128691, "IRgen: Improve GCC compatibility when dealing with packed
arrays by propagating", it's breaking test in ways I don't understand yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128693 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
b23a5a0a043b852ad643d366a0bb5b4c5a5c8881 01-Apr-2011 Daniel Dunbar <daniel@zuster.org> IRgen: Improve GCC compatibility when dealing with packed arrays by propagating
the array alignment to the array access.
- This is more or less the best we can do without having alignment present in
the type system, but is a long way from truly matching how GCC handles this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128691 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
361701965ed119099d180d419ac25a0503fcc0fe 31-Mar-2011 John McCall <rjmccall@apple.com> Whoops.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128621 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
f0c11f7e6848f023ced6a5b51399ba787c7d4d0b 31-Mar-2011 John McCall <rjmccall@apple.com> After much contemplation, I've decided that we probably shouldn't "unique"
__block object copy/dispose helpers for C++ objects with those for
different variables with completely different semantics simply because
they happen to both be no more aligned than a pointer.

Found by inspection.

Also, internalize most of the helper generation logic within CGBlocks.cpp,
and refactor it to fit my peculiar aesthetic sense.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128618 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenFunction.h
odeGenModule.h
5af02db5a48476e0748f135369663080eae87c64 31-Mar-2011 John McCall <rjmccall@apple.com> Move all the significant __block code into CGBlocks.cpp. No functionality
change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128608 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
odeGenFunction.h
8c079ac8f8b36804b5586985449956e0481e2e02 31-Mar-2011 Matt Beaumont-Gay <matthewbg@google.com> Oops, prefer C-style cast here

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128607 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
c362e741cb5664905af8c95ecefd098fb86fb048 31-Mar-2011 Matt Beaumont-Gay <matthewbg@google.com> Silence GCC warning about differing types on the branches of a conditional expression

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


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


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


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128596 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
2d33e423d5091b7d2cb8618952752abd55bba965 31-Mar-2011 Bob Wilson <bob.wilson@apple.com> Use intrinsics for Neon vmull operations. Radar 9208957.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128590 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
68af13f3ca39947e3f285f864fe3b76640fddf69 30-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> Fix IRGen issues related to using property-dot syntax
for prperty reference types. // rdar://9208606.



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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128538 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GClass.cpp
GExpr.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GVTables.cpp
odeGenFunction.cpp
taniumCXXABI.cpp
argetInfo.cpp
6be56729a8a2a97e2a62e4567bc6a21efb8ba53d 30-Mar-2011 Jay Foad <jay.foad@gmail.com> (Almost) always call reserveOperandSpace() on newly created PHINodes.

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


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


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


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


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128516 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
acd723666777b4ac1f79a97b6a300e6cf919d519 30-Mar-2011 Devang Patel <dpatel@apple.com> Fix in r128471 is very broad. Some of the unconditional branches need line number information for better user experience.
Restrict the fix. This fixes break.exp failures from gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128513 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GStmt.cpp
b603c90b75df2141c5722816a13920221eb4faee 29-Mar-2011 Devang Patel <dpatel@apple.com> Do not line number entry for unconditional branches. Usually, users do not want to stop at closing '}'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128471 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
14086764e340267e17803d0f8243070ffae2c76e 29-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> Implements property of reference types. Adding
an executable test to llvm test suite.
// rdar://9070460.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128435 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
969323239f16589329d091a2b8ef200fcfe7c9e9 29-Mar-2011 Daniel Dunbar <daniel@zuster.org> Integrated-As: Support -Wa,-L when using the integrated assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128433 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
6305f721247f13707d9858b17d5696c1e3428a78 28-Mar-2011 Anton Yartsev <anton.yartsev@gmail.com> refactoring

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


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


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


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


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


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


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128383 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
7870b133ac7b03bd53388f51250d009325f43399 27-Mar-2011 Anton Yartsev <anton.yartsev@gmail.com> AltiVec vector comparison logic now affect only vectors of fundamental AltiVec vector types. It fixes bug 9347.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128381 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
d06fea8580658470f92fb5d0d3d7ab5b475728dc 27-Mar-2011 Anton Yartsev <anton.yartsev@gmail.com> supported: AltiVec vector initialization with a single literal according to PIM section 2.5.1 - after initialization all elements have the value specified by the literal

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

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


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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128336 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
odeGenModule.cpp
81a65f576842a1d02b1e3db21c14652c60a36448 26-Mar-2011 David Chisnall <csdavec@swan.ac.uk> Reformatted doc comments so that they are now difficult to edit in any editor that doesn't have explicit doxygen support, as per LLVM style guidelines.



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


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


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


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


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128315 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
3f4cb252832cf14f72d66ed707316d3759c8a689 25-Mar-2011 Devang Patel <dpatel@apple.com> Provide blockDecl's startLoc to startFunction. This fixes hidden bug exposed by recent code gen changes. This is tested by global-blocks-lines.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128303 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
af19ac4b39ea1a545bd279df38ac65144f84e4b2 25-Mar-2011 Daniel Dunbar <daniel@zuster.org> Obj-C/NeXT: Update and reapply 108847, now that changes are more baked.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128300 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
05dc91bc772f6dc46f90d927048bbef05ba03392 25-Mar-2011 David Chisnall <csdavec@swan.ac.uk> Refactor CGObjCMac to use the shared code for EH stuff.

Sanity checked by John McCall.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128287 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
16625e188771891e09b4b906918e27a824f3f6a6 25-Mar-2011 Anders Carlsson <andersca@mac.com> Unbreak CMake build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128276 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
4cc7493bac46a0351f4254b53e87fe962ed54081 25-Mar-2011 David Chisnall <csdavec@swan.ac.uk> Added some doc comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128275 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
9735ca6e01113aec6a825dd5b1cb1b98fb377d31 25-Mar-2011 David Chisnall <csdavec@swan.ac.uk> Continuing work on ObjC tidyup:

- Moved the CGObjCRuntime functions out of CGObjCMac.cpp into CGObjCRuntime.cpp

- Added generic functions in CGObjCRuntime for emitting @try and @synchronize
blocks, usable by any runtime that uses DWARF exceptions.

- Made the GNU runtimes use these functions.

It should now be possible to replace the equivalent functions in
CGObjCNonFragileABIMac with simple calls to these two functions, providing the
runtime functions as arguments. I'll post a diff to the list for review before
making any changes to the Mac runtime stuff.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128274 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.cpp
GObjCRuntime.h
c285372e69f42d95ca638d74abd1f46bd7b77a96 24-Mar-2011 Eli Friedman <eli.friedman@gmail.com> Make sure we aggressively attach nounwind (etc.) to calls to library
functions of the form __builtin_XXX.



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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128190 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
GVTT.cpp
GVTables.cpp
GVTables.h
c7ef46254339450de33125f712c7b99afaf4fbcd 23-Mar-2011 David Chisnall <csdavec@swan.ac.uk> Fixed type error in last commit (forgot that now that selectors are not
accessed via the indirect pointer, they don't need to be pointers to pointers).

Finished moving the message lookup code into separate subclasses for each
runtime. Also performed a few smallish related tidies.

We're now bitcasting the result of the message lookup functions, rather than
casting the lookup functions themselves, so the messages.m test needed updating
to reflect this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128180 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
647cc93d6ee10b744f3084975e626329a6932c47 23-Mar-2011 Andrew Trick <atrick@apple.com> Revert r128156 because of CodeGenObjC/messages.m and Coverage/codegen-gnu.m.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128157 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
961891d6bb24cbf3cffbd0d1489836f2b17149fd 23-Mar-2011 David Chisnall <csdavec@swan.ac.uk> Remove the redundant loads / stores to globals that we were generating for selectors (GNU runtimes).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128156 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
9f6614e3c5d34998dd5a5cc6faf0746dcd611d49 23-Mar-2011 David Chisnall <csdavec@swan.ac.uk> Initial work on refactoring GNU runtime code (long overdue - it's quite obvious
that I hadn't used C++ for several years before writing most of this code).
Still lots more to do. This set of changes includes:

- Remove the distinction between typed and untyped selectors. More accurately
reflect what the runtime does, by using typed selectors everywhere, with an
empty type field if the types are unknown. Now we just store a small list of
types for each selector (in theory, this should always be exactly one, but
this constraint was not enforced back in 1986 when it should have been).

- Add some consistency to how runtime functions are created. These are all
generated via the LazyRuntimeFunction class (which might be useful outside
CGObjCGNU - feel free to move it into a header if it is). This function
stores the types of a function, looks it up the first time it's used, and
caches the result. This means that we're now not wasting time constructing
the llvm::FunctionType every time some of the functions are looked up, but
also not inserting references to runtime functions into the module if they're
not actually used.

- Started separating out the fragile and non-fragile ABI behaviours into two
subclasses of CGObjCGNU: CGObjCGCC for the legacy GCC runtime ABI and
CGObjCGNUstep for the new GNUstep ABI. Not all of the differences in
behaviour are factored out yet, but they will be in future commits.

- Removed all of the CodeGen:: things: we've been using namespace CodeGen in
this file for ages, so having explicit namespace specifiers is just a bit
confusing.

- Added a few more comments.

- Used llvm::StringRef instead of std::string in a few places.

- Finally got around to storing the module path in the module structure. The
ABI says that the compiler should do this, although it's not used in the
runtime or exposed outside the runtime, so it's pretty useless.

Still to do:

- We currently have two code paths for generating try blocks, one for ObjC and
one for ObjC++. Not only are these substantially similar, they are also very
similar to the CGObjCMac version. These need factoring out into a single
parameterised implementation, either in CGObjCRuntime or CodeGenFunction.
The EmitObjCXXTryStmt() function was added so that the changes to fix a bug
in time for the 2.9 release would be self-contained and reduce the chances of
breaking anything else, but these should be done properly as soon as
possible.

- Split up some large functions (e.g. GenerateClass()) into smaller functions
for generating the various data structures.

- The method lookup code into the two subclasses, removing the conditionals in
the message send functions.

- Add doxygen comments on the remaining undocumented functions.

- We seem to be generating global pointer variables for selectors, then storing
a pointer to the selector, then generating a load of this pointer (and then a
load of the real selector later) every time a static selector is used. I can
only assume I was asleep or drunk when I did this - we should just be
referencing the selectors directly in the selector array.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128152 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
e80d56771736c85fd8365c394a6731923b17e91d 23-Mar-2011 Devang Patel <dpatel@apple.com> Update type cache when a type is completed.
Radar 9168773


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128150 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
odeGenModule.cpp
odeGenModule.h
d6fb21fa1053e5d616af55b181bb03c50d4b0d24 23-Mar-2011 Ken Dyck <kd@kendyck.com> Convert OffsetFromNearestVBast parameter of InitializeVTablePointer(s) to
CharUnits. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128129 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
0a0d2b179085a52c10402feebeb6db8b4d96a140 23-Mar-2011 Douglas Gregor <dgregor@apple.com> Implement a new 'availability' attribute, that allows one to specify
which versions of an OS provide a certain facility. For example,

void foo()
__attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6)));

says that the function "foo" was introduced in 10.2, deprecated in
10.4, and completely obsoleted in 10.6. This attribute ties in with
the deployment targets (e.g., -mmacosx-version-min=10.1 specifies that
we want to deploy back to Mac OS X 10.1). There are several concrete
behaviors that this attribute enables, as illustrated with the
function foo() above:

- If we choose a deployment target >= Mac OS X 10.4, uses of "foo"
will result in a deprecation warning, as if we had placed
attribute((deprecated)) on it (but with a better diagnostic)
- If we choose a deployment target >= Mac OS X 10.6, uses of "foo"
will result in an "unavailable" warning (in C)/error (in C++), as
if we had placed attribute((unavailable)) on it
- If we choose a deployment target prior to 10.2, foo() is
weak-imported (if it is a kind of entity that can be weak
imported), as if we had placed the weak_import attribute on it.

Naturally, there can be multiple availability attributes on a
declaration, for different platforms; only the current platform
matters when checking availability attributes.

The only platforms this attribute currently works for are "ios" and
"macosx", since we already have -mxxxx-version-min flags for them and we
have experience there with macro tricks translating down to the
deprecated/unavailable/weak_import attributes. The end goal is to open
this up to other platforms, and even extension to other "platforms"
that are really libraries (say, through a #pragma clang
define_system), but that hasn't yet been designed and we may want to
shake out more issues with this narrower problem first.

Addresses <rdar://problem/6690412>.

As a drive-by bug-fix, if an entity is both deprecated and
unavailable, we only emit the "unavailable" diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128127 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenModule.cpp
9a8ad9b28d54a3adc4cb8061d564f99f80144e30 23-Mar-2011 Ken Dyck <kd@kendyck.com> Convert NonVirtual parameter of ApplyNonVirtualAndVirtualOffset() to
CharUnits. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128126 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
60be607e5d71627bf3dab8f51c3fdca74267c692 22-Mar-2011 David Chisnall <csdavec@swan.ac.uk> Simplify Mac runtime selection - it's the factory function's job to select which class to produce, not CodeGenModule's.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128109 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
ab5824e97666ca7a91ed3013524cee18420866f1 22-Mar-2011 David Chisnall <csdavec@swan.ac.uk> Make the property accessor functions that take a ptrdiff_t actually take a ptrdiff_t instead of a long (should have no impact on any sane platforms, but win64 is not sane).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128104 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
7e02d1aebb3ee0841f398a836ba5d34be5cdb4b3 22-Mar-2011 David Chisnall <csdavec@swan.ac.uk> Make the ivar offset always be a ptrdiff_t, because stuff in CGObjC.cpp expects this. Actually, it expects a long, but that's a bug that will be fixed in the next commit...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128102 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
c3e494047b921529ce01c5b77c0a7f81eec8a300 22-Mar-2011 Nick Lewycky <nicholas@mxc.ca> Fix typo in comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128088 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
3c66d30d513106bb794990c5e4ba36a31ac19f15 22-Mar-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Add a more explicit -backend-option flag for passing backend command
line options, instead of leveraging the blanket -mllvm option.
- This allows using the frontend itself without requiring the backend have
those options available (i.e., if the target wasn't built).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128087 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
97d2d2e368d3ead34d83c328383711c7dabab60a 22-Mar-2011 Logan Chien <tzuhsiang.chien@gmail.com> Merge with clang upstream r127980 (Mar 20th 2011)
e81ac69c5da9fadfac33ee76e98d5fb558c4e389 22-Mar-2011 John McCall <rjmccall@apple.com> The emission of an Objective-C++'s class .cxx_destruct method should be
conditioned on whether it has any destructible ivars, not on whether
it has any non-trivial class-object initializers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128074 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenModule.cpp
5fff46b65389f7e7eb576e47c7bc3ca67326a206 22-Mar-2011 Ken Dyck <kd@kendyck.com> Convert Offset variable in GetAddressOfDirectBaseInCompleteClass() to
CharUnits. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128060 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
55c02585de7b02bcb72352f731d9bc342c8282f3 22-Mar-2011 Ken Dyck <kd@kendyck.com> Change return value of ComputeNonVirtualBaseClassOffset() to CharUnits. No
change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128050 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
c4d68db1397b1c1a0a2fb33464dc65f9c51aec09 22-Mar-2011 Ken Dyck <kd@kendyck.com> Eliminate some literal '8's in FillInNullDataMemberPointers() by switching
to CharUnits. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128047 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
80558d2db10a96eada4d8fb79949b3263b44652b 20-Mar-2011 David Chisnall <csdavec@swan.ac.uk> Fix Objective-C++ exceptions (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127980 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GException.h
GObjCGNU.cpp
GRTTI.cpp
bd4a0732f2f261f8269a71c2090bc3e9d001eca6 20-Mar-2011 Anders Carlsson <andersca@mac.com> __cxa_atexit does not throw.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127977 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
8e02635c9c276720a1e6f926b33303a53cebe9c7 18-Mar-2011 Logan Chien <tzuhsiang.chien@gmail.com> Merge with clang upstream r127869 (Mar 18th 2011)
199c1891e9c5add7867f1eab0bf6e9dde0e7d1d9 19-Mar-2011 Ken Dyck <kd@kendyck.com> Use CharUnits's new increment operator. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127938 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
4f318c080b5ea89e3f7407516fd8ed45b733b99d 19-Mar-2011 Ken Dyck <kd@kendyck.com> Replace literal '8's with CharWidth in AppendBitField. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127927 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.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
GCall.cpp
GDebugInfo.cpp
GDecl.cpp
GExpr.cpp
GExprConstant.cpp
odeGenModule.cpp
odeGenTypes.cpp
32096695c76033a6b0b1747c439f7378a11e8312 18-Mar-2011 John McCall <rjmccall@apple.com> The Darwin kernel does not provide useful guard variable support.
Issue this as an IR-gen error; it's not really worthwhile doing this
"right", i.e. in Sema, because IR gen knows a lot of tricks beyond
what the constant evaluator knows.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127854 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenModule.cpp
odeGenModule.h
7d2f9d54bd99f4b4689cb386b51d1b066c883a9e 18-Mar-2011 Ken Dyck <kd@kendyck.com> Convert alignment values to CharUnits. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127848 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
15c152e4f042eb073ac05e87d588dd8fe3aa9e9e 18-Mar-2011 Ken Dyck <kd@kendyck.com> Convert getSizeInBytes() to getSizeInChars(), which returns its result in
CharUnits. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127846 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
4a5c87ec3b92026523a6459f5b4547c4a9b5ab24 18-Mar-2011 Ken Dyck <kd@kendyck.com> Convert variables to CharUnits in ConvertStructToPacked(). No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127844 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
827bbcc8a9115782693b21030a45378abe5c1862 17-Mar-2011 David Chisnall <csdavec@swan.ac.uk> Remove code that was intentionally generating bad code on the GNU runtime for no reason (failing to emit .cxx_constructor / .cxx_destructor methods).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127806 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
dc496395fb41c5f765045bfc6ed13d57be9a7b9f 17-Mar-2011 Ken Dyck <kd@kendyck.com> Convert NextOffsetInBytes to CharUnits and rename to NextOffsetInChars. No
change in functionality intended.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127787 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
17d12fec91098fd4946c3c3e4f45b84423027407 17-Mar-2011 Matt Beaumont-Gay <matthewbg@google.com> Politely inform GCC that we will never fall off the end of that switch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127783 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
545aa7a0f57d2bb2fc0eef83daa499300273d983 16-Mar-2011 Eli Friedman <eli.friedman@gmail.com> PR9494: Get rid of bitcast which was both unnecessary and written incorrectly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127768 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4d000b322fb1e7ed7fa2de5ab4bfb473bad2edae 16-Mar-2011 David Chisnall <csdavec@swan.ac.uk> Fix foreign exception handling (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127736 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
a5bcb8fec45d127501cd70fe1654b5a08a8aeb35 16-Mar-2011 John McCall <rjmccall@apple.com> Don't emit read barriers for reading __weak __block variables
in non-GC mode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127725 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
8bba1f4ab1f06864fec627befdf7cf8e1ad017be 15-Mar-2011 John McCall <rjmccall@apple.com> Reorganize the emission of (unfoldable) constant casts a bit, and
make sure that upcasts of member pointer types are covered as constants.
Fixed rdar://problem/9130221



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127702 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
a968e97947b1281c3bb3c4d47a952b3801d9bb02 15-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Reintroduce r127617: "Code generation for noexcept." with fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127685 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
6925cc498be5d363ac7fb235dc6650fd7da5f2f2 15-Mar-2011 Ken Dyck <kd@kendyck.com> Introduce a CharUnits FieldOffsetInChars variable in AppendField() to
replace some uses of FieldOffsetInBytes. The remaining uses of
FieldOffsetInBytes will be replaced once NextFieldOffsetInBytes is converted
to CharUnits. No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127641 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
112d5ee15a09f15e597037724e006004b3f2f78f 15-Mar-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Revert r127617: "Code generation for noexcept."

The tests fail in a -Asserts build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127635 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
dc0f137295bc7ec5b231ff1842388f149f43c0c8 14-Mar-2011 Rafael Espindola <rafael.espindola@gmail.com> Switch from internal to linker_private linkage, it is sufficient to please the new linker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127622 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f86d5f2b888573f7d72d7eeae7237cf6c5080958 14-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Code generation for noexcept.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127617 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
8a37c79f03e62aecfa2c58b9179f90dd1fcdb253 14-Mar-2011 Eric Christopher <echristo@apple.com> __clear_cache() is varargs and people will occasionally write it without
arguments. Process only the arguments that people write, but process
all of them.

Fixes rdar://8900346


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127616 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
584acf2ded2c18a18d6da0e1c01f5859a384d99f 14-Mar-2011 Rafael Espindola <rafael.espindola@gmail.com> Fix link of libxul with LTO and the linker in xcode4. It is not clear if this
is working around a bug in ld or if the new linker has a reasonable reason
for wanting the string constant to be linker visible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127594 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b2eb86ff8a02688407df737368d29650a092f25b 14-Mar-2011 David Chisnall <csdavec@swan.ac.uk> Fix incorrect linkage specifiers for selectors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127580 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
8026f6d82f7fa544bc0453714fe94bca62a1196e 13-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Instead of storing an ASTContext* in FunctionProtoTypes with computed noexcept specifiers, unique FunctionProtoTypes with a ContextualFoldingSet, as suggested by John McCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127568 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExprCXX.cpp
f004da49eae567b15240029cdd96617958c6b0c9 12-Mar-2011 Ken Dyck <kd@kendyck.com> Use CharUnits for argument passed to AppendPadding() from AppendBitField().
No change in functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127538 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
60618fa7f88d5162bb5b40988b6b38d4d75d6fc6 12-Mar-2011 Sebastian Redl <sebastian.redl@getdesigned.at> Propagate the new exception information to FunctionProtoType.
Change the interface to expose the new information and deal with the enormous fallout.
Introduce the new ExceptionSpecificationType value EST_DynamicNone to more easily deal with empty throw specifications.
Update the tests for noexcept and fix the various bugs uncovered, such as lack of tentative parsing support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127537 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GException.cpp
GExprCXX.cpp
c29ea8fb903f9f7e3d8bdf8cb57b87eb3713826b 12-Mar-2011 Ken Dyck <kd@kendyck.com> Change parameter to AppendPadding from bytes to CharUnits. No change in
functionality intended.


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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127494 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
GClass.cpp
GExprCXX.cpp
GVTables.cpp
odeGenFunction.h
f4e3cfbe8abd124be6341ef5d714819b4fbd9082 11-Mar-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for the OpenCL vec_step operator, by generalising and
extending the existing support for sizeof and alignof. Original
patch by Guy Benyei.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127475 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
106ca049e9a5b10ba80df1b60c0708b2491b7e18 11-Mar-2011 Ken Dyck <kd@kendyck.com> Convert the RecordSize parameter of AppendTailPadding() to CharUnits to
avoid converting to bits and back again. No change in functionality
intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127455 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
c95a8fcb0a2f4148f1852c52c34ad3a1771d7e5d 10-Mar-2011 NAKAMURA Takumi <geek4civic@gmail.com> lib/CodeGen/CGCall.cpp: Don't invoke multiple Builder.CreateBitCast() on Builder.CreateMemCpy. Or we would see sideeffect incompatibility among gcc and clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127405 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ba877adeb49ed6dc17f27fa3a3bcd0cca713fd68 09-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed InnerLocStart.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127330 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d271e4b0c6c42a0e670226e697963df427e35a56 07-Mar-2011 Logan Chien <tzuhsiang.chien@gmail.com> Apply changes to merge with clang upstream (6th Mar 2011)
ndroid.mk
27d70656d3ce7c9e030b6dea468cfc96687010d5 09-Mar-2011 Logan Chien <tzuhsiang.chien@gmail.com> Merge with clang upstream (Nov 6th 2011)
64cd2328ef55735c910d3d51dd40eafc38d7a504 09-Mar-2011 John McCall <rjmccall@apple.com> Remove a rather egregious use of getFunctionInfo.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127324 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
1f6f961293da9c2b1c23da2411c1b439a9502ed0 09-Mar-2011 John McCall <rjmccall@apple.com> Fix three of the four places where I left breadcrumbs to avoid unnecessary
recomputation.



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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127319 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
d26bc76c98006609002d9930f8840490e88ac5b5 09-Mar-2011 John McCall <rjmccall@apple.com> Use the "undergoes default argument promotion" bit on parameters to
simplify the logic of initializing function parameters so that we don't need
both a variable declaration and a type in FunctionArgList. This also means
that we need to propagate the CGFunctionInfo down in a lot of places rather
than recalculating it from the FAL. There's more we can do to eliminate
redundancy here, and I've left FIXMEs behind to do it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127314 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GCXXABI.cpp
GCall.cpp
GCall.h
GClass.cpp
GDeclCXX.cpp
GObjC.cpp
GVTables.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.h
taniumCXXABI.cpp
df045200e0220f10bf03de05ca878949e0c40a5a 08-Mar-2011 John McCall <rjmccall@apple.com> Emit block capture initializers as if they were normal initializers for a local
variable that just happens to be stored in a wierd place.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127235 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
60d3365b46eb826fba44483583c0051ac5c41fe3 08-Mar-2011 John McCall <rjmccall@apple.com> Extract a function to emit an arbitrary expression as if it were the initializer
for a local variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127227 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.h
ff676cb48fe8bf7be2feaa251dc7c5fb15af4730 08-Mar-2011 Abramo Bagnara <abramo.bagnara@gmail.com> Fixed source range for all DeclaratorDecl's.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127225 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GObjCMac.cpp
0507be662df482b5c67b7905ed7ca368cb5c6b69 07-Mar-2011 Bill Wendling <isanbard@gmail.com> When we adjust the inline ASM type, we need to take into account an early
clobber with the 'y' constraint. Otherwise, we get the wrong return type and an
assert, because it created a '<1 x i64>' vector type instead of the x86_mmx
type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127185 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
6d1155be2aca28659a47fbe612222845811ff2a3 07-Mar-2011 Devang Patel <dpatel@apple.com> CodeGenFunction::GenerateBlockFunction() should initialize DebugInfo just like CodeGenFunction::GenerateCode()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127174 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
aa11289f754d220c9c155b68a4f84cdcfcefef6a 07-Mar-2011 Devang Patel <dpatel@apple.com> DebugInfo can be enabled or disabled at function level (e.g. using an attribute). However, at module level it is determined by command line option and the state of command line option does not change during compilation. Make this layering explicit and fix accidental cases where the code generator was checking whether module has debug info enabled instead of checking whether debug info is enabled for this function or not.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127165 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
GExprScalar.cpp
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
5de7a0e8800b89780e565c1013e566414f11546a 07-Mar-2011 Devang Patel <dpatel@apple.com> Do not emit stop point for CXXDefaultArgExpr. It results in suboptimial user experience.

21 int main() {
22 A a;

For example, here user would expect to stop at line 22, even if A's constructor leads to a call through CXXDefaultArgExpr.

This fixes ostream-defined.exp regression from gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127164 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenModule.cpp
odeGenModule.h
c2f3e7f42c8bf9e8d4393a6e8c4762dafc4f28dd 07-Mar-2011 John McCall <rjmccall@apple.com> The conditional needs to be pushed before the branch. Make the test less
trivial to check this. Adjust for style.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127151 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
a7f633f522af786e80dc08dbd63e222c9414095b 07-Mar-2011 John McCall <rjmccall@apple.com> An operator new with an empty exception specifier returns null on a bad
allocation and therefore requires a null-check. We were doing that, but
we weren't treating the new-initializer as being conditionally executed,
which means it was possible to get ill-formed IR as in PR9298.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127147 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
4707b9acf75c68c90278757ffd6a05b2544bc1eb 07-Mar-2011 Douglas Gregor <dgregor@apple.com> Revert r126422 "Use private linkage to avoid symbol conflicts in
corner cases like the one in PR9301." which caused PR9416.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127136 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
ebc327977645f03e12aaeba82f7f53299e47ad3a 06-Mar-2011 Anders Carlsson <andersca@mac.com> Correctly unwrap 'auto' types. Fixes PR9414.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127121 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9de4342ef79a18c706e46bc23f8f579f5add2375 05-Mar-2011 Benjamin Kramer <benny.kra@googlemail.com> StringRefify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127082 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
e3eb83b93751544a5fab19b3824f56aeac454f82 04-Mar-2011 Bill Wendling <isanbard@gmail.com> Initialize variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127039 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
79bfb4b564dc3636aae15aafa6340f9430881121 04-Mar-2011 Devang Patel <dpatel@apple.com> Emit a stop point before a call expression so that debugger has some chance of getting some footing when user wants to stop at 2nd bar() in following expression when all function calls are inlined.
= bar() + ... + bar() + ...

clang keeps track of column numbers, so we could put location entries for all subexpressions but that will significantly bloat debug info in general, but a location for call expression is helpful here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127018 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
fb4eb9f56c1b7bb4fb632127a5e2d253b65758bf 04-Mar-2011 John McCall <rjmccall@apple.com> Access ivars with inbounds GEPs, even in -fwrapv. It's unlikely that
this can have any optimization effect, given the opacity of objects pointers,
but you never know.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126990 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
604da292483bc94a6a3e4700cd426d4fa7f1a4a8 04-Mar-2011 John McCall <rjmccall@apple.com> Let's do super message sends with static allocas instead of dynamic ones.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126989 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
14aa2175416f79ef17811282afbf425f87d54ebf 04-Mar-2011 John McCall <rjmccall@apple.com> Make AttributedTypes for GC-qualified types and fix some miscellaneous
bugs with such types. Not sure this is quite how I want the desugaring
and a.k.a. logic to go, but it suffices.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126986 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
093ac461b37a573dcf226fa55faed96f318169b9 03-Mar-2011 Devang Patel <dpatel@apple.com> Encode argument numbering in debug info so that code generator can emit them in order.
This fixes few blocks.exp regressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126960 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
odeGenFunction.h
361cf980a7d976ef11a37b49567412b6b63a89d7 02-Mar-2011 Dan Gohman <gohman@apple.com> Fix a typo.


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

This reverts commit 126863.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126886 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCall.cpp
GDeclCXX.cpp
GExpr.cpp
GExprCXX.cpp
GObjC.cpp
GVTables.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenTypes.h
argetInfo.cpp
0483a6fcf8a70f1dd900b634300510c7991a1c7c 02-Mar-2011 Benjamin Kramer <benny.kra@googlemail.com> Only emit string initializers in-place if types match. Fixes PR9373.

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

This reverts commit 126865.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126876 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
41ba26701de859128ebe48a957c286e5dc01475f 02-Mar-2011 Devang Patel <dpatel@apple.com> revert r126858.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126874 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
odeGenFunction.h
180ff3ac073c86bf7b5dbf48cfdfb7fc8252ce5f 02-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> IRGen. Fix IR when message returns reference type.
// rdar://8604515.



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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126863 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCall.cpp
GDeclCXX.cpp
GExpr.cpp
GExprCXX.cpp
GObjC.cpp
GVTables.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenTypes.h
argetInfo.cpp
810b07ccf7b19f532402d24064df543bb0518acd 02-Mar-2011 Devang Patel <dpatel@apple.com> Encode argument numbering in debug info so that code generator can emit them in order.
This fixes few blocks.exp regressions.

Reapply r126795 with a fix (one character change) for gdb testsuite regressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126858 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
odeGenFunction.h
3da5cb2d6e582ab3acb5dd0d2fd8ab31922750be 02-Mar-2011 Devang Patel <dpatel@apple.com> Revert r126794.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126848 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
odeGenFunction.h
d113a6fb6d09778bfc2e6edfd7c8b978a366f013 02-Mar-2011 John McCall <rjmccall@apple.com> Hack in something so that we emit better debug information about
captured __block variables in the block-literal type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126834 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
15c83a246651186661f8bb27715663e5098f4bd8 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Apply changes to merge with clang upstream Nov 10th 2010."
e8f3996b0f2b720280093f7f73865696919bf389 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Simplify some complex emission and implement correct semantics for assignment to volatiles in C. This in effect reverts some of mjs's work in and around r72572. Basically, the C++ standard is quite clear, except that it lies about volatile behavior approximating C's, whereas the C standard is almost actively misleading."
cca64e7773683d9959ef20dcec8f7440ad315505 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Now that we have reliable cast kinds, simplify scalar cast IR gen."
e52e3c3380a571d449422ead558337abe0b4b70f 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Kill CK_Unknown and flesh out the documentation for the existing CastKinds."
c2ddc13ed051f7c002fcf0338151589aecaccb71 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Teach complex compound assignment IR-generation that the RHS of a compound assignment is always already in the computation type."
f1edab36730a57c0b57dd71d80130434a84df0d2 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Change CXXNameMangler::mangleNeonVectorType to require the vector type to be one of the special Neon types. We'll check for invalid Neon vectors when they are created, so there's no point in handling them when mangling."
c2430b24a53732174c94b61e05029790ccb3b332 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Use getTypeSize() method."
db1c88bbdd8ab80940d40b65ff1b3f9ca2629f5f 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add a new expression kind, OpaqueValueExpr, which is useful for certain internal type-checking procedures as well as for representing certain implicitly-generated operations. Uses to follow."
437d8d15b5783dd4158dd193fa9dc9b6259a0523 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Some cleanup of block API code."
503edcf6d07abd6beb0754071deac03b63274725 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Silence an unused variable warning during release builds by folding the expression into the assert."
ca34b8f06d560b4f604934d57b2ad311c4228e32 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Assorted work leading towards the elimination of CK_Unknown."
0ab8e5775ceaadef8cfafd67bec5bf90e779d35b 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Always emit full loads from volatile complex l-values. Return the result of a complex assignment with the original values, not by performing a load from the l-value; this is the correct semantics in C, although not in C++."
fc5395a116a4e92548f99875f5d82786c5ff82ba 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add a few more complex-related cast kinds that arise due to arbitrary implicit conversions; the last batch was specific to promotions. I think this is the full set we need. I do think dividing the cast kinds into floating and integral is probably a good idea."
77340672934c48058c4c1b891545b1bcc1e53d77 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Removed unnecessary initialization of a flag which somehow got several block tests fail with a linux built compiler."
1e6894ed85592a180b411b21319e075d9bc7b535 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Initialize couple of fields."
0e2161613b101bac062d3c645864481d52460f94 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Block API patch to do copy ctor of copied-in cxx objects in copy helper function and dtor of copied cxx objects in dispose helper functions. __block variables TBD next."
38cf267adf22762494a72c82791a491f4ecb6db3 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Introduce five new cast kinds for various conversions into and between complex types."
1472d24d9345f42fb9b4ddee26126599acde930f 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Introduce a null-to-pointer implicit cast kind."
813233570019fc9f4486c80637188ce2ea0887e1 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Reduce string thrashing."
2f0cad408dc21317be11c875a16cc4c257953549 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Use ASTContext::getTypeInfo to find the vector element size."
2c66aff116466318cc5959b55130cf54cc123578 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add a separate NeonPolyVector kind to distinguish polynomial vector types. Add support for mangling those types according to ARM's ABI."
9e9506e56976260efd4204cbf4459f060046e769 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add special-case mangling for Neon vector types."
fe9249c537e81736535615dfc319f0163ffcd34c 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Use a twine."
aa5ffbf00bb9250294963138b9f826f68f0d6a25 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Teach debug-info generation that SourceManager::getPresumedLoc() can produce an invalid location even when given a valid location, if the file system has changed underneath us. Recovery more gracefully."
2098ce232181fe5579f58e9d4dfd1f5bdead3c7c 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Adding couple of Block API, a bug fix and a test change, all for blocks. wip."
026ae918949e2b3a1eddb04a534b72ed50621830 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add a variant of GCC-style vector types for ARM NEON. NEON vector types need to be mangled in a special way to comply with ARM's ABI, similar to some of the AltiVec-specific vector types. This patch is mostly just renaming a bunch of "AltiVecSpecific" things, since they will no longer be specific to AltiVec. Besides that, it just adds the new "NeonVector" enum."
fa0b409ef81f1f70edfa72857c4e211ff50998d5 02-Mar-2011 Eli Friedman <eli.friedman@gmail.com> PR9350: increment/decrement of char (and anything else narrower than int)
can't overflow due to promotion rules; emit a wrapping add for those cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126816 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
8a04585eba8a87a660c9030c9cdef34c8c9f85c6 01-Mar-2011 Devang Patel <dpatel@apple.com> Encode argument numbering in debug info so that code generator can emit them in order.
This fixes few blocks.exp regressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126795 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
odeGenFunction.h
c0ddef23136368ce1bd882f7edd43591c8f30aa6 01-Mar-2011 Fariborz Jahanian <fjahanian@apple.com> objc IRGen for Next runtime message API.
The prototype for objc_msgSend() is technically variadic -
`id objc_msgSend(id, SEL, ...)`.
But all method calls should use a prototype that matches the method,
not the prototype for objc_msgSend itself().
// rdar://9048030


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126754 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GObjCMac.cpp
2cb4222338669a3e70b546ef264fbd5d3f96aef5 01-Mar-2011 Chris Lattner <sabre@nondot.org> -fwrapv should turn off the inbounds markers from geps used for pointer
arithmetic. This is part of PR9256, it would be great if someone else
wired up -fno-strict-overflow in the driver to -fwrapv.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126718 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
5c5b5878d88767500e06a114c53434e637bbba6b 28-Feb-2011 Devang Patel <dpatel@apple.com> Use single code path to handle c++ structs and classes while generating debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126691 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
bf1f826ddadb046add4a9c7d7f7690f43feb55cf 28-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Revert r126678.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126685 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3d04a0e534b43504f6879657d47891625bd63352 28-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> objc IRGen for Next runtime message API.
The prototype for objc_msgSend() is technically variadic -
`id objc_msgSend(id, SEL, ...)`.
But all method calls should use a prototype that matches the method,
not the prototype for objc_msgSend itself().
// rdar://9048030



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126678 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3f06e274736eab9821ce0dc2bd8e166fe0e3aa7e 28-Feb-2011 Chris Lattner <sabre@nondot.org> Make skipping of vardecls more precise: it's ok to skip a decl if the entire
compound stmt containing the decl is skipped.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126639 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
9467110fcef8a3e4caf9e5d022cff0322afe6e8b 28-Feb-2011 Chris Lattner <sabre@nondot.org> make switch constant folding a bit stronger, handling a missed case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126638 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
15348aeb81285c75b2e92b5bf8d2db3445d147c2 28-Feb-2011 Anders Carlsson <andersca@mac.com> Add a -fcxx-exceptions flag to the frontend, which can be used to enable
C++ exceptions, even when exceptions have been turned off using -fno-exceptions.
Make the -fobjc-exceptions flag do the same thing, but for Objective-C exceptions.

C++ and Objective-C exceptions can also be disabled using -fno-cxx-excptions and
-fno-objc-exceptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126630 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
035287d73947320d2ff65b7d9a5c3d990427eee3 28-Feb-2011 Chris Lattner <sabre@nondot.org> remove a bogus assertion, add a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126603 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
3858938b043bac2f046304ff99a54905acdcc6dd 28-Feb-2011 Chris Lattner <sabre@nondot.org> make switch condition constant folding much more aggressive, handling
compound statements and break statements. This implements enough to
handle PR9322 and rdar://6970405.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126602 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
2bef7f5499541e3b68f114cc4d7d197e9a902fe7 28-Feb-2011 Chris Lattner <sabre@nondot.org> fix my containsBreak predicate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126600 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
7a17851eee37f933eb57a5af7e1a0eb455443f6a 28-Feb-2011 Anders Carlsson <andersca@mac.com> Get rid of the areExceptionsEnabled() getter from LangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126598 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDeclCXX.cpp
GException.cpp
fda0f1f5a278548b012401be07e287c1697fc41c 28-Feb-2011 Chris Lattner <sabre@nondot.org> First tiny step to implementing PR9322: build infrastructure for only emitting the
live case of a switch statement when switching on a constant. This is terribly
limited, but enough to handle the trivial example included. Before we would
emit:

define void @test1(i32 %i) nounwind {
entry:
%i.addr = alloca i32, align 4
store i32 %i, i32* %i.addr, align 4
switch i32 1, label %sw.epilog [
i32 1, label %sw.bb
]

sw.bb: ; preds = %entry
%tmp = load i32* %i.addr, align 4
%inc = add nsw i32 %tmp, 1
store i32 %inc, i32* %i.addr, align 4
br label %sw.epilog

sw.epilog: ; preds = %sw.bb, %entry
switch i32 0, label %sw.epilog3 [
i32 1, label %sw.bb1
]

sw.bb1: ; preds = %sw.epilog
%tmp2 = load i32* %i.addr, align 4
%add = add nsw i32 %tmp2, 2
store i32 %add, i32* %i.addr, align 4
br label %sw.epilog3

sw.epilog3: ; preds = %sw.bb1, %sw.epilog
ret void
}

now we emit:

define void @test1(i32 %i) nounwind {
entry:
%i.addr = alloca i32, align 4
store i32 %i, i32* %i.addr, align 4
%tmp = load i32* %i.addr, align 4
%inc = add nsw i32 %tmp, 1
store i32 %inc, i32* %i.addr, align 4
ret void
}

This improves -O0 compile time (less IR to generate and shove through the code
generator) and the clever linux kernel people found a way to fail to build if we
don't do this optimization. This step isn't enough to handle the kernel case
though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126597 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
ef425a69006afaa87751ee41ccf8ff405d9ede70 28-Feb-2011 Chris Lattner <sabre@nondot.org> Add some helper methods that will be used in my next patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126596 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
c2c90011a688c04a4e980282f08c267e081c4b00 28-Feb-2011 Chris Lattner <sabre@nondot.org> Change the interface to ConstantFoldsToSimpleInteger to not encode
a bool + success into one tri-state integer, simplifying things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126592 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
9c64df299df8b565955920c038ce9b8a0244448c 14-Feb-2011 Logan <tzuhsiang.chien@gmail.com> Apply changes to merge with clang upstream Nov 10th 2010.
ndroid.mk
053ec969e3023e4b4a666546476ff74e6bfdfd9a 27-Feb-2011 Logan <tzuhsiang.chien@gmail.com> Merge with clang upstream Nov 10th 2010.
448d2cdce2dd8360c09f4187cd7bbebf16ff964d 26-Feb-2011 John McCall <rjmccall@apple.com> Don't assume that whoever is asking for a message send is going
to give us a non-null return slot.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126544 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a1bcc4ddb1ed8be9be6950232941d80a04f80819 26-Feb-2011 John McCall <rjmccall@apple.com> Zero-initialize the struct-return slot of an Objective-C message
send before making the call. Fixes rdar://problem/7854674



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126543 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
92ee7ca6f42d2bd735f9bfc120c00838c4e469c0 26-Feb-2011 John McCall <rjmccall@apple.com> A much-delayed response to Ken Dyck's review: make this somewhat more
char-width agnostic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126542 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
bc7fbf0d37b286b37d96b033dfaaabf9c729bca8 26-Feb-2011 John McCall <rjmccall@apple.com> Pretty up the emission of field l-values and use volatile and TBAA when
loading references as part of that. Use 'char' TBAA when accessing
(immediate!) fields of a may_alias struct; fixes PR9307.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126540 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenModule.h
27f8d703e65095ca9c8c5d08a5a835b5510a730d 25-Feb-2011 John McCall <rjmccall@apple.com> Tame an assert; the scope depth of a jump destination does not
necessarily enclose the innermost normal cleanup depth, because
the top of the jump scope stack might be an EH cleanup or EH scope.
Fixes PR9303.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126472 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
bab380c2c8b3527e0448eb6252bc75f0de37fbca 24-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Use private linkage to avoid symbol conflicts in corner cases like the one
in PR9301.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126422 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
e9c58163e633afef4eeb7166d00f6dd718ff828a 23-Feb-2011 David Chisnall <csdavec@swan.ac.uk> Fix type mismatch between property function that CGObjCGNU was returning and the one CGObjC was calling. Fixes bug r9294.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126312 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
8178df3b39ab923ff5d24538812628abee33df79 22-Feb-2011 John McCall <rjmccall@apple.com> Emit the structure layout of the block literal parameter to a block
invocation function into the debug info. Rather than faking up a class,
which is tricky because of the custom layout we do, we just emit a struct
directly from the layout information we've already got.

Also, don't emit an unnecessarily parameter alloca for this "variable".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126255 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
odeGenModule.h
3ee36af5bbb8c2cd203a140c3785215539cd56b4 22-Feb-2011 Devang Patel <dpatel@apple.com> A constructor call should force class's debug info even if -flimit-debug-info is enabled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126246 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
16674e887bf0c40e29975f6258a3a2fa096ea45d 22-Feb-2011 Devang Patel <dpatel@apple.com> Use LLVM coding standard.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126232 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
57b3b6a60856eaec30fd876a8a3face8f7e3ad7b 22-Feb-2011 John McCall <rjmccall@apple.com> Establish the iteration variable of an ObjC for-in loop before
emitting the collection expression. Fixes some really, really broken
code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126193 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GObjC.cpp
odeGenFunction.h
34695856c0e67b3765b46304cc71b5d2cd5b71c7 22-Feb-2011 John McCall <rjmccall@apple.com> Reorganize the emission of local variables.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126189 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GException.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
6f17433b2d50262856ab09f52af96c6132b01012 22-Feb-2011 NAKAMURA Takumi <geek4civic@gmail.com> lib/CodeGen/TargetInfo.cpp: On Win64, arg i128 should be emitted as INDIRECT.

mingw-w64's i128 tweak should be done with x86_64-mingw32.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126186 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
05f3a507bb53ed2bd5573d551a26654a604187eb 22-Feb-2011 David Chisnall <csdavec@swan.ac.uk> The instance size of a metaclass should be the size of a class. This is not, in fact, 0, even for very small classes. (GNU runtime)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126161 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
7cc25fe47290dc302157e15b04a1f95395f43ab5 21-Feb-2011 John McCall <rjmccall@apple.com> Bind references to opaque r-values correctly. Add a few test cases
for ?: on record types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126113 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.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
GDebugInfo.cpp
GRTTI.cpp
odeGenTypes.cpp
c1cfdf8647a499b6b3024f4bd14a236cddb23988 20-Feb-2011 Anders Carlsson <andersca@mac.com> Add a LangOptions::areExceptionsEnabled and start using it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126062 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDeclCXX.cpp
GException.cpp
odeGenFunction.cpp
odeGenFunction.h
4b93d660c6326ec79b5e369317d1051cf826c2f3 20-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Re-instate r125819 and r125820 with no functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126060 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenAction.cpp
argetInfo.cpp
argetInfo.h
944ed3b8dba3a129937a4e627d235ad99d225da9 19-Feb-2011 Douglas Gregor <dgregor@apple.com> In addition to in-class member functions marked with the "used"
attribute, we also care about those with the "constructor"
attribute. Fixes PR6521.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126055 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
96b1d4b4eb6b18dd6df7a2c0833332b45840580f 19-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Revert 125820 and 125819 to fix PR9266.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126050 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenAction.cpp
argetInfo.cpp
argetInfo.h
15e310a3b970b64a84cb30f0005bc396b4d978cb 19-Feb-2011 John McCall <rjmccall@apple.com> Warn about code that uses variables and functions with internal linkage
without defining them. This should be an error, but I'm paranoid about
"uses" that end up not actually requiring a definition. I'll revisit later.

Also, teach IR generation to not set internal linkage on variable
declarations, just for safety's sake. Doing so produces an invalid module
if the variable is not ultimately defined.

Also, fix several places in the test suite where we were using internal
functions without definitions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126016 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4a4e2efb908b17e79d95b5b4fccf58b4cd1dddb1 19-Feb-2011 Devang Patel <dpatel@apple.com> Start using enums from DIBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125990 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
98ec3f78b2f4c17e5aeb5f0c5df4b4ffbfc85565 18-Feb-2011 Chris Lattner <sabre@nondot.org> If -fno-builtin is passed, tell TargetLibraryInfo to
turn off all builtin optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125979 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
df61976bd157a7b5483c92c032834e178fb6fd88 18-Feb-2011 Chris Lattner <sabre@nondot.org> install a TargetLibraryInfo configured with the appropriate
target triple. This would be a decent place to add -fno-builtin
info for example.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125971 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
2846b97965e980ad2e7c8d444b82cc21d733a699 18-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Objective-c armv7 API for atomic properties of
scalar types. // rdar://7761305


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125946 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.h
0d3c985ad5b07121149957e5993cf1e3df26a413 18-Feb-2011 John McCall <rjmccall@apple.com> The flags we're supposed to write into a byref struct are *not* the
_Block_object_* flags; it's just BLOCK_HAS_COPY_DISPOSE or not.

Also, we don't need to chase forwarding pointers prior to calling
_Block_object_dispose; _Block_object_dispose in fact already does
this.

rdar://problem/9006315



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125823 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
906c73ffbc78542ad333becb6e013dd9efc299b6 18-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Move CompilerInstance::LLVMContext and LLVMContext ownership to CodeGenAction

This removes the final dependency edge from any lib outside of CodeGen
to core. As a result we can, and do, trim the dependency on core
from libclang, PrintFunctionNames, the unit tests and c-index-test.
While at it, review and trim other unneeded dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125820 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenAction.cpp
ef9a1d0e13662162aa8cdae8732c33b5d751d80c 18-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Move TargetInfo::adjustInlineAsmType to TargetCodeGenInfo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125819 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
argetInfo.cpp
argetInfo.h
4ae493cccbfbf122ec6ebac0e330232c22fa8489 18-Feb-2011 Chris Lattner <sabre@nondot.org> implement basic support for __label__. I wouldn't be shocked if there are
bugs from other clients that don't expect to see a LabelDecl in a DeclStmt,
but if so they should be easy to fix.

This implements most of PR3429 and rdar://8287027



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125817 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
d8df5b65fc76c2f59148e1551f56a8ee26c9607b 17-Feb-2011 Chris Lattner <sabre@nondot.org> improve support for big endian targets, fixing PR8171, patch
by Heikki Kultala!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125784 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GRecordLayoutBuilder.cpp
cf0b2d83666804b377dbe05370a5c9b9bafaaa5a 17-Feb-2011 John McCall <rjmccall@apple.com> Remove the "conditional save" hashtables from IR generation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125761 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
56ca35d396d8692c384c785f9aeebcf22563fe1e 17-Feb-2011 John McCall <rjmccall@apple.com> Change the representation of GNU ?: expressions to use a different expression
class and to bind the shared value using OpaqueValueExpr. This fixes an
unnoticed problem with deserialization of these expressions where the
deserialized form would lose the vital pointer-equality trait; or rather,
it fixes it because this patch also does the right thing for deserializing
OVEs.

Change OVEs to not be a "temporary object" in the sense that copy elision is
permitted.

This new representation is not totally unawkward to work with, but I think
that's really part and parcel with the semantics we're modelling here. In
particular, it's much easier to fix things like the copy elision bug and to
make the CFG look right.

I've tried to update the analyzer to deal with this in at least some
obvious cases, and I think we get a much better CFG out, but the printing
of OpaqueValueExprs probably needs some work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125744 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
0aa205765aec0aa5eed672f8e3cade543372edcd 17-Feb-2011 NAKAMURA Takumi <geek4civic@gmail.com> Triple::MinGW64 is deprecated and removed. We can use Triple::MinGW32 instead.

No one uses *-mingw64. mingw-w64 is represented as {i686|x86_64}-w64-mingw32.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125742 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
125b4cb35536e45201f8f2cb19ee620e3ad67c49 17-Feb-2011 NAKAMURA Takumi <geek4civic@gmail.com> Fix whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125741 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
ad8dcf4a9df0e24051dc31bf9e6f3cd138a34298 17-Feb-2011 Chris Lattner <sabre@nondot.org> Step #1/N of implementing support for __label__: split labels into
LabelDecl and LabelStmt. There is a 1-1 correspondence between the
two, but this simplifies a bunch of code by itself. This is because
labels are the only place where we previously had references to random
other statements, causing grief for AST serialization and other stuff.

This does cause one regression (attr(unused) doesn't silence unused
label warnings) which I'll address next.

This does fix some minor bugs:
1. "The only valid attribute " diagnostic was capitalized.
2. Various diagnostics printed as ''labelname'' instead of 'labelname'
3. This reduces duplication of label checking between functions and blocks.

Review appreciated, particularly for the cindex and template bits.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125733 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
a03733b28b7c0a6dde83561a8a391c1067f404a5 17-Feb-2011 Nick Lewycky <nicholas@mxc.ca> Ensure that the NRVO flag has some block to insert into. Fixes PR9178!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125694 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
bb6f54833cda9197511678d078f7d95d8da6f27e 16-Feb-2011 Devang Patel <dpatel@apple.com> If preprocessed token introduced empty filename then use main translation unit's filename for debug info entries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125672 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
acff696118d98c3acd09a16b96c95807057b5c99 16-Feb-2011 John McCall <rjmccall@apple.com> Remove this FIXME; clear up an unused variable; style.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125662 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
e996ffd240f20a1048179d7727a6ee3227261921 16-Feb-2011 John McCall <rjmccall@apple.com> Save a copy expression for non-trivial copy constructions of catch variables.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125661 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
34753802931fddcf57bd62c5b83bdca1a23017d7 16-Feb-2011 Devang Patel <dpatel@apple.com> Simplify test to check an aggregate argument that has non trivial constructor or destructor.
This patch rewrites r125142.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125632 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
odeGenFunction.h
c20e20498e3d248c754c7c5c8d0277f444d584df 16-Feb-2011 John McCall <rjmccall@apple.com> Don't call objc_read_weak as part of emitting a block literal.
Nobody ever gave me a clear reason for why we were doing this, and
now it's apparently causing serious problems, so if *not* having this
causes problems, we get to solve them the right way this time.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125627 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
6354d68cbbbda2ede44f68bb2cfe0f31795e8844 16-Feb-2011 Devang Patel <dpatel@apple.com> Only c++ class arguments with non trivial constructor or destructor needs a reference.
C struct arguments do not need this adjustment.
This fixes 7 failures in callfuncs.exp from gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125615 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
fd577d6b71d82d16b3c67f307bec948b7a0a84b2 15-Feb-2011 John McCall <rjmccall@apple.com> Refactor CGRecordLayoutBuilder to use CharUnits more consistently.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125605 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
d6c9a0f06ce7e164024d8e4dbf2423a5c5035084 15-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> In -fapple-kext mode, global object construction code
ends up in the text segment. // rdar://8825235.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125585 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
f552c20b3dd21855054010e29882e563fdcccff6 15-Feb-2011 Douglas Gregor <dgregor@apple.com> Emit in-class member function definitions that are marked
"used". Fixes <rdar://problem/8684363>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125579 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
5936e33bf74dd6bf126ceee0f6169a2593d03a69 15-Feb-2011 John McCall <rjmccall@apple.com> Assorted cleanup:
- Have CGM precompute a number of commonly-used types
- Have CGF copy that during initialization instead of recomputing them
- Use TBAA info when initializing a parameter variable
- Refactor the scalar ++/-- code



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125562 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GExpr.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
9b7da1c46d6d2849f9cb51328d7fcddf2c417672 15-Feb-2011 John McCall <rjmccall@apple.com> Perform zero-initialization of virtual base classes when emitting
a zero constant for a complete class. rdar://problem/8424975

To make this happen, track the field indexes for virtual bases
in the complete object. I'm curious whether we might be better
off making CGRecordLayoutBuilder *much* more reliant on
ASTRecordLayout; we're currently duplicating an awful lot of the ABI
layout logic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125555 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
dac54c124e302d6f028ea5723c425b7f66fc7c71 15-Feb-2011 Ken Dyck <kd@kendyck.com> Convert RecordLayout::Alignment to CharUnits from bit units. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125549 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
fb018d153cbf12fd2a4a278cbf7614b9a2e2835e 15-Feb-2011 Chris Lattner <sabre@nondot.org> update for ConstantVector API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125538 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
e69b09955acbde87470eea8bc99b580195569dc0 14-Feb-2011 Chris Lattner <sabre@nondot.org> revert my ConstantVector patch, it seems to have made the llvm-gcc
builders unhappy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125505 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
1970d5fe94889a1c5ded3d821564363eb5c21020 14-Feb-2011 Chris Lattner <sabre@nondot.org> update for ConstantVector::get API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125488 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
f315fa81eef1977b3457fd7a7d4639e060fe7278 14-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> OpenCL: add support for __kernel, kernel keywords and EXTENSION,
FP_CONTRACT pragmas. Patch originally by ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125475 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
7502c1d3ce8bb97bcc4f7bebef507040bd93b26f 13-Feb-2011 John McCall <rjmccall@apple.com> Give some convenient idiomatic accessors to Stmt::child_range and
Stmt::const_child_range, then make a bunch of places use them instead
of the individual iterator accessors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125450 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
0d70d71ccbc4f7f59cadb759f61b7172a149676c 13-Feb-2011 John McCall <rjmccall@apple.com> Look through array types when deciding whether a field requires non-trivial
destruction in the destructor-aliases logic. Fixes PR 9197.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125447 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
0a86d44703fc5cd3cd38ea1708176f5b44321ed8 12-Feb-2011 Jeffrey Yasskin <jyasskin@google.com> Add CMake dependencies so that LLVM_USED_LIBS order doesn't matter.

I also sorted the tools/driver dependencies since their order no
longer matters.


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125360 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GRTTI.cpp
GVTT.cpp
GVTables.cpp
odeGenTBAA.cpp
taniumCXXABI.cpp
ec2990351335f163601b98e39b52425e2e9f931e 11-Feb-2011 Ken Dyck <kd@kendyck.com> Convert RecordLayout::DataSize to CharUnits from bits, eliminating two
unnecessary calls to RoundUpToAlignment. No changes to functionality
intended.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125356 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
dd76a9ab9ea675671200f94b18ce95766841952b 11-Feb-2011 Ken Dyck <kd@kendyck.com> Add a helper function, ASTContext::toBits(), that converts sizes in
CharUnits to sizes in bits, and use it to tidy up the places where the
conversion was done explicitly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125332 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjCMac.cpp
GRecordLayoutBuilder.cpp
c4850c2aa4c281a352e228aafc51fb1e30dcad02 11-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Use raw_svector_ostream in more places in the mangler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125321 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7f6890ebb874cc16320259daef50f1b4cfdc47d5 10-Feb-2011 Daniel Dunbar <daniel@zuster.org> Fix family-friendly-o, tsk tsk.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125293 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
a18652fe1e8233fbf8b67484945c7f7b2bf272be 10-Feb-2011 Daniel Dunbar <daniel@zuster.org> IRgen: Fix an immediate-exit-from-fn style nit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125289 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
be4c8705e499b55548467eb7adaa23cbc6edfef9 10-Feb-2011 Roman Divacky <rdivacky@freebsd.org> Implement mcount profiling, enabled via -pg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125282 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
9186ff310cf0ad92ec7f39b2c9dcb7e848195052 10-Feb-2011 Ken Dyck <kd@kendyck.com> Drop the 'InBits' part from the name of RecordSizeInBits as the value is in
character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125281 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
7198e94d55213222044515d5a83713911d0c6dbb 10-Feb-2011 Ken Dyck <kd@kendyck.com> Eliminate some signed-to-unsigned comparision warnings introduced in
r125156.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125280 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
886e1606c28e970bb288abf4dbc40feb16822a79 10-Feb-2011 NAKAMURA Takumi <geek4civic@gmail.com> CMake: LLVM_NO_RTTI must be obsolete now!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125275 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
0691f93ac23978e2b28b031e5c4a0b3c6dc94798 10-Feb-2011 Devang Patel <dpatel@apple.com> If an aggregate is returned as 'sret' argument then let debugger know about this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125249 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
eb4c45b383b4a8f69d23e4b9cfb6dd3e6f8ff641 09-Feb-2011 Devang Patel <dpatel@apple.com> Do not emit AT_MIPS_linkage_name for Objective-C method static variable i.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125210 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
17d3fea677753e6e3e82ffe2cbdeccbf5f2e7497 09-Feb-2011 Daniel Dunbar <daniel@zuster.org> Driver/Frontend: Wire up -mregparm=.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125201 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
63c00d7f35fa060c0a446c9df3a4402d9c7757fe 09-Feb-2011 John McCall <rjmccall@apple.com> Remove vtables from the Stmt hierarchy; this was pretty easy as
there were only three virtual methods of any significance.

The primary way to grab child iterators now is with
Stmt::child_range children();
Stmt::const_child_range children() const;
where a child_range is just a std::pair of iterators suitable for
being llvm::tie'd to some locals. I've left the old child_begin()
and child_end() accessors in place, but it's probably a substantial
penalty to grab the iterators individually now, since the
switch-based dispatch is kindof inherently slower than vtable
dispatch. Grabbing them together is probably a slight win over the
status quo, although of course we could've achieved that with vtables, too.

I also reclassified SwitchCase (correctly) as an abstract Stmt
class, which (as the first such class that wasn't an Expr subclass)
required some fiddling in a few places.

There are somewhat gross metaprogramming hooks in place to ensure
that new statements/expressions continue to implement
getSourceRange() and children(). I had to work around a recent clang
bug; dgregor actually fixed it already, but I didn't want to
introduce a selfhosting dependency on ToT.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125183 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
6e108ced4a5f199d0f5da09344df2c03caa4b667 09-Feb-2011 Devang Patel <dpatel@apple.com> Emit debug info for objc_selector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125163 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a29bf41b8f49578207ce36f6b21ff9bb7ee77bab 09-Feb-2011 Douglas Gregor <dgregor@apple.com> When IRgen refers to a function declaration that is not a definition,
and we later find the definition, make sure that we add the definition
(not the declaration) to the list of deferred definitions to
emit. Fixes PR8864.

Thanks to Nick Lewycky for testing this patch out



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125157 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
lobalDecl.h
5f022d82696c84e4d127c558871d68ac6273274e 09-Feb-2011 Ken Dyck <kd@kendyck.com> Convert RecordLayout::Size to CharUnits from bits. No changes to
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125156 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
GRecordLayoutBuilder.cpp
570729e71654f0564bf2ce6504f8629a96850914 09-Feb-2011 Devang Patel <dpatel@apple.com> If an aggregate argument is passed indirectly because it has non trivial
destructor or copy constructor than let debug info know about it.

Radar 8945514.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125142 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
odeGenFunction.h
b19c76e857d21b722d0a207cb45b26d7cb20a73f 08-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Fix an IRGen bug in property setter calls when
setter and getter types mismatch. // rdar://8966864


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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125085 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GBuiltin.cpp
GCXX.cpp
GCall.cpp
GClass.cpp
GCleanup.cpp
GDebugInfo.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GObjCMac.cpp
GStmt.cpp
GVTables.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
461c9c1bc39ed8cbe8311f396f7ee3839e9fda53 08-Feb-2011 John McCall <rjmccall@apple.com> Extend the const capture optimization to C++ record types with no
mutable fields and with trivial destructors and copy constructors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125073 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
68cf1a5a01ba43ed56a8624632fd65e0804430ac 08-Feb-2011 Ken Dyck <kd@kendyck.com> Convert RecordLayout::NonVirtualAlign to CharUnits. No change in
functionality intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125069 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
bb699b07426be017056c2c549ac3ffb488cab6e3 07-Feb-2011 John McCall <rjmccall@apple.com> When copy-capturing values for a nested capture, use a BlockDeclRefExpr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125021 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
6b5a61b6dc400027fd793dcadceeb9da944a37ea 07-Feb-2011 John McCall <rjmccall@apple.com> A few more tweaks to the blocks AST representation:
- BlockDeclRefExprs always store VarDecls
- BDREs no longer store copy expressions
- BlockDecls now store a list of captured variables, information about
how they're captured, and a copy expression if necessary

With that in hand, change IR generation to use the captures data in
blocks instead of walking the block independently.

Additionally, optimize block layout by emitting fields in descending
alignment order, with a heuristic for filling in words when alignment
of the end of the block header is insufficient for the most aligned
field.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125005 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
GExpr.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
683564a7a93c952f1fbe573b55c542418d29d859 07-Feb-2011 Anton Yartsev <anton.yartsev@gmail.com> pre/post ++/-- for AltiVec vectors. (with builtins-ppc-altivec.c failure fixed)

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


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



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


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


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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124935 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVTables.cpp
odeGenModule.cpp
odeGenModule.h
53bad4e98ed5e765df4231099bf1c737582908bf 04-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> minor refactoring of -fapple-kext stuff.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124837 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
fd0f89d3d7e4220327abdec1cb115474d70219dc 04-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> What was I thinking?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124835 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
142f9e99018a85105cee570133c111a52f2053ec 04-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> -fapple-kext cannot have 'weak' visibility in this
abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124834 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
771c678c04f5f685b4f188ec6c2fd88ad0f7457f 03-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Clean up of -fapple-kext abi code. No change otherwise.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124807 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
GExprCXX.cpp
odeGenFunction.h
5808ce43f8d7e71f5acacc9ca320268c4f37565a 03-Feb-2011 John McCall <rjmccall@apple.com> More capturing of 'this': implicit member expressions. Getting that
right for anonymous struct/union members led to me discovering some
seemingly broken code in that area of Sema, which I fixed, partly by
changing the representation of member pointer constants so that
IndirectFieldDecls aren't expanded. This led to assorted cleanups with
member pointers in CodeGen, and while I was doing that I saw some random
other things to clean up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124785 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
GValue.h
odeGenModule.h
taniumCXXABI.cpp
01de7a44cea9f77cbcda65faad8edc8b48a3b617 03-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Revert 124768.
This reopens PR99114, but that one at least can be avoided with an #include.
PR9130 cannot.

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

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124768 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVTables.cpp
odeGenModule.cpp
odeGenModule.h
5abec14a235bff4026c030672701a9853350e8cf 03-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> -fapple-kext, elimination of all direct calls to virtual dtors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124757 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
0ce34c6ba0aa79708a62179c0fdf96891b62b5dc 02-Feb-2011 Devang Patel <dpatel@apple.com> Emit debug info for template value parameters.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124756 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
fa275dfad7c4eb053ffef423a863afbe15534476 02-Feb-2011 Devang Patel <dpatel@apple.com> Emit debug info for template type parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124753 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
8e50a96b387dca7525caa8a6add31420dd82a2cd 02-Feb-2011 Benjamin Kramer <benny.kra@googlemail.com> Add NetBSD target support. Patch by Joerg Sonnenberger.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124736 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
ccd5259d33cbbdd6f5fbf7ccab4cb4a2702309ea 02-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> -fapple-kext support for indirect call to virtuals dtors - wip.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124701 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
GExprCXX.cpp
odeGenFunction.h
7143325db76d6c3dabce82500f8cc7c93a941970 01-Feb-2011 John McCall <rjmccall@apple.com> Do the right thing for zero-initializing VLAs that don't have a zero
bit-pattern. It's not clear that this is actually useful given current
language restrictions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124685 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
071d3af0de273b1079d79f7f979264f28d567373 01-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Revert 124633. The linker has been told how to merge available_externally.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124651 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5c3633fa57f27b0909ab5767715c4e66b8920165 01-Feb-2011 Ken Dyck <kd@kendyck.com> Convert RecordLayout::NonVirtualSize from bit units to CharUnits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124646 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
517ebc6e13c41dc9115bc0eece93f6fc1155743e 01-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Set visibility for available_externally globals. This is important for two reasons:

* llvm-link would complains about mismatched visibility
* If we produce a relocation with an available_externally, it is good to know that
it is hidden.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124633 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
0413db4a26b0a1577b75c2979b0eb21f3490d17a 31-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Amazing that there are still issues with the fields of anonymous struct/unions..
Allow taking the address of such a field for a pointer-to-member constant. Fixes rdar://8818236.

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

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

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

This involved four major changes:

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124565 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
GVTables.cpp
odeGenModule.cpp
237f95996c82f63582c13987ce5e64629f7539b0 29-Jan-2011 Anders Carlsson <andersca@mac.com> Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124554 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
907c828b080332854826a87451e838930f4be788 29-Jan-2011 Anders Carlsson <andersca@mac.com> When emitting RTTI for a non-class type, compute the visibility of the RTTI data based on the explicit visibility of the type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124553 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
c7e98fabd852e9dfa7409b7fc664b87322522c43 29-Jan-2011 Anders Carlsson <andersca@mac.com> Move GetLLVMVisibility to CodeGenModule.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124550 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
9a86a137b0872bad25161fb3408a71d919638757 29-Jan-2011 Anders Carlsson <andersca@mac.com> Add RTTIBuilder::GetAddrOfTypeName which uses the newly added CreateOrReplaceCXXRuntimeVariable.

Set the visibility for typeinfo names.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124546 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
GVTT.cpp
GVTables.cpp
odeGenModule.cpp
odeGenModule.h
934176f27552141b5ad113cb3603ffb14906c570 29-Jan-2011 Anders Carlsson <andersca@mac.com> Replace an isa/cast with a dyn_cast.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124541 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
odeGenModule.cpp
odeGenModule.h
691222d5c9de39e785f604c41c872279831a507e 29-Jan-2011 Anders Carlsson <andersca@mac.com> Give VTTs the right visibility.

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


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124538 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
odeGenModule.cpp
3bd6202ea2d5b5f7c8229cd280a846ae3dcf2355 29-Jan-2011 Anders Carlsson <andersca@mac.com> Add a new function, to be used by CGRTTI, CGVTables and CGVTT (which each has their own copy of this code).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124537 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
3b8037a8c6f462e51f75c82b3d7fe1b8dbcf06c0 29-Jan-2011 Ken Dyck <kd@kendyck.com> Replace a literal '8' with getCharWidth().


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124529 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
GVTables.cpp
odeGenModule.cpp
odeGenModule.h
268ab8c6b92dc40c678d8458a335698fa34915c9 29-Jan-2011 Anders Carlsson <andersca@mac.com> When trying to get the most derived class, don't assume that we can ignore all casts. We can only ignore derived-to-base and no-op casts. Fixes selfhost.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124528 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
1679f5a84ae1e578b0de347c89eaf31e0465f33c 29-Jan-2011 Anders Carlsson <andersca@mac.com> When calling a virtual member function on a base class and the most derived class is marked 'final', we can devirtualize the call.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124524 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
336a7dc56871ccfeceecc296c9624f66f7ac01ec 29-Jan-2011 Anders Carlsson <andersca@mac.com> When doing a derived-to-base class through a virtual class, we don't have to get the vbase offset from the vtable if the derived class is marked final.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124507 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprCXX.cpp
GVTables.cpp
21a7dfc48b6323178671a206c6bacda83c9ecd32 28-Jan-2011 John McCall <rjmccall@apple.com> Add my new file to the CMake lists, sorry about that.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124503 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
36f893c1efe367f929d92c8b125f964c22ba189e 28-Jan-2011 John McCall <rjmccall@apple.com> Move all the cleanups framework code into a single file.
Pure motion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124484 91177308-0d34-0410-b5e6-96231b3b80d8
GCleanup.cpp
GCleanup.h
GException.cpp
GException.h
GExprCXX.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
804b807ea918184d6de63bd745e1ff75a9bfc679 28-Jan-2011 John McCall <rjmccall@apple.com> Reorganize the value-dominance metaprogram and introduce a specialization
for CodeGen's RValue type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124483 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
odeGenFunction.h
3ad32c8d93eb65d1d4943d7df567fc9b4f55d137 28-Jan-2011 John McCall <rjmccall@apple.com> Convert the exception-freeing cleanup over to the conditional cleanups code,
fixing a crash which probably nobody was ever going to see. In doing so,
fix a horrendous number of problems with the conditional-cleanups code.
Also, make conditional cleanups re-use the cleanup's activation variable,
which avoids some unfortunate repetitiveness.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124481 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GException.cpp
GExprCXX.cpp
odeGenFunction.h
b3d5e2f181269656c1b2dbc09eab1f449d5074aa 28-Jan-2011 Douglas Gregor <dgregor@apple.com> When producing IR for a lvalue-to-rvalue cast *as an lvalue*, only
non-class prvalues actually require the realization of a
temporary. For everything else, we already have an lvalue (or class
prvalue) in the subexpression.

Note: we're missing some move elision in this case. I'll tackle that next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124453 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
6ec278d1a354517e20f13a877481453ee7940c78 27-Jan-2011 John McCall <rjmccall@apple.com> Do a proper recursive lookup when deciding whether a class's usual
deallocation function has a two-argument form. Store the result of this
check in new[] and delete[] nodes.

Fixes rdar://problem/8913519



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124373 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
GExprCXX.cpp
taniumCXXABI.cpp
fd708265e3b1dcfaae6a6832186aabb0de0c0aef 27-Jan-2011 John McCall <rjmccall@apple.com> Notes on dynamic array cookies in MSVC.
My thanks to chapuni for his help in investigating this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124351 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
52a80e19ad688091723a52ad53337767bb0ac684 27-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> Fixes an IRgen bug where __block variable is
referenced in the block-literal initializer
of that variable. // rdar://8893785


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124332 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
odeGenFunction.h
f99a3915389109a716caafacb41fd9c4a3b8f432 26-Jan-2011 John McCall <rjmccall@apple.com> Un-nest the meat of this function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124310 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4bbcbda302cba8b1b0d88c20d735d09b483bd005 26-Jan-2011 John McCall <rjmccall@apple.com> Fix some obvious bugs in the conditional-cleanup code and then make the
dtor cleanup use it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124309 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GTemporaries.cpp
odeGenFunction.h
150b462afc7a713edd19bcbbbb22381fe060d4f5 26-Jan-2011 John McCall <rjmccall@apple.com> Better framework for conditional cleanups; untested as yet.
I'm separately committing this because it incidentally changes some
block orderings and minor IR issues, like using a phi instead of
an unnecessary alloca.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124277 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GTemporaries.cpp
odeGenFunction.cpp
odeGenFunction.h
5aa74affa5d61d04c4b034b3722ca41aec0cba6e 25-Jan-2011 Nico Weber <nicolasweber@gmx.de> Add -add-plugin flag, which runs plugins in addition to codegen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124227 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenAction.cpp
5af1f066230be7571cffb408048479ad0f06f75e 25-Jan-2011 Eric Christopher <echristo@apple.com> Revert r124146 for now. It appears to be failing on a few platforms.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124153 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
e07ae4ee00baedcfc2c59fb2a7500dbec08371e9 24-Jan-2011 Anton Yartsev <anton.yartsev@gmail.com> pre/post increase/decrease for AltiVec vectors

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124146 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
cb88a1f968c3d4eb451dafb421a8d9578edcbf1a 24-Jan-2011 Anders Carlsson <andersca@mac.com> Use attributes for all the override control specifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124122 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
e34e3aa7b8dfd0794e5f5293a4aef178eed10a16 24-Jan-2011 Anders Carlsson <andersca@mac.com> When building a type info struct for EH, we always want it to have linkonce_odr linkage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124096 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
3a717f7fbb94ec31b826b48c15fdc965b5910df3 24-Jan-2011 Anders Carlsson <andersca@mac.com> Change CodeGenModule::getVTableLinkage to be a non-static member function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124095 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
odeGenModule.h
82a113adf8063baa70251dfa269d039ca22e2537 24-Jan-2011 Anders Carlsson <andersca@mac.com> "Name" a bool parameter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124094 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
f502d93b0ea970bfbd897e657f8d940a20984de2 24-Jan-2011 Anders Carlsson <andersca@mac.com> Mark VTables and RTTI data linkonce_odr instead of weak_odr, with the exception of explicit template instantiations, which have to be weak_odr.

This fixes PR6996.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124089 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
odeGenModule.cpp
f89e0424b8903438179f4a2f16dddd5e5bdc814e 23-Jan-2011 Anders Carlsson <andersca@mac.com> Get rid of the [[final]] C++0x attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124083 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
9577abc63f2c7afe5adf6e4e101ae91d29c3b8a6 23-Jan-2011 Ted Kremenek <kremenek@apple.com> Null initialize a few variables flagged by
clang's -Wuninitialized-experimental warning.
While these don't look like real bugs, clang's
-Wuninitialized-experimental analysis is stricter
than GCC's, and these fixes have the benefit
of being general nice cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124072 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
15f6765f6efd24bec4ec6f54e282c14193ef4014 22-Jan-2011 Benjamin Kramer <benny.kra@googlemail.com> Use a FunctionType::get overload that doesn't require an empty vector.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124029 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
da29e091650dc011df5209578d7c049549e5e34b 22-Jan-2011 Douglas Gregor <dgregor@apple.com> Send code generation for xvalues down the same path as lvalues

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124023 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
36b8ee6325b709dd301681fb281b6cf102a5e51a 22-Jan-2011 Douglas Gregor <dgregor@apple.com> Debug info generation for rvalue references

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124020 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
7ac0ff2a8791280102a557761dbb931deb21a1dc 21-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> Move cheking of kext into canDevirtualizeMemberFunctionCalls().
Improve on test case. Per Doug's comment. wip.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123954 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
2726267f094a0c1f5ac5b501ec5a9898c58876bf 20-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> apple kext abi requires all vf calls, including qualified
vf calls, be made indirect. This patch is towards that goal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123922 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprCXX.cpp
odeGenFunction.h
3dbdb58e2e920ad69fecbd56c25b58577ab693e8 20-Jan-2011 Ken Dyck <kd@kendyck.com> Add CharUnits::RoundUpToAlignment() to simplify rounding in character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123868 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.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
GBlocks.cpp
GDebugInfo.cpp
GExprScalar.cpp
odeGenTBAA.cpp
odeGenTypes.cpp
odeGenTypes.h
150e0efec6302fa5a8c3b5c3c4ecf5778d3a29f5 19-Jan-2011 Logan <tzuhsiang.chien@gmail.com> Add build rules for clang executable.
ndroid.mk
fe71008c2764768f25478b16c1802755189ed7c9 19-Jan-2011 Ken Dyck <kd@kendyck.com> Replace calls to getTypeSize() and getTypeAlign() with their 'InChars'
counterparts where char units are needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123805 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
GExprCXX.cpp
GExprScalar.cpp
GObjC.cpp
bcbd03ac0ac0890a436e1a179d3a285e914d41fa 19-Jan-2011 Devang Patel <dpatel@apple.com> Emit DW_TAG_lexical_scope to surround foreach.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123802 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
ff8be0e08e409af53130d12ce36019b35288fb78 19-Jan-2011 NAKAMURA Takumi <geek4civic@gmail.com> lib/CodeGen/TargetInfo.cpp: Fix coding style and erase an obsolete comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123790 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
c532b502858032f377056dc8cba2fe43cba8702b 18-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Add unnamed_addr in CreateRuntimeVariable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123773 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
dbee3411a22b0dbb03267f5445f7b796104991bb 18-Jan-2011 Francois Pichet <pichet2000@gmail.com> Add support for explicit constructor calls in Microsoft mode.
For example:

class A{
public:
A& operator=(const A& that) {
if (this != &that) {
this->A::~A();
this->A::A(that); // <=== explicit constructor call.
}
return *this;
}
};

More work will be needed to support an explicit call to a template constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123735 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
06f486ecd05bd6788da97c39164c1903a084c26d 18-Jan-2011 Ken Dyck <ken.dyck@onsemi.com> Replace calls to CharUnits::fromQuantity() with ones to
ASTContext::toCharUnitsFromBits() when converting from bit sizes to char units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123720 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
dec0984fce504a39a7f085774fb67cfd9957be58 18-Jan-2011 Jeffrey Yasskin <jyasskin@google.com> Fix warnings found by gcc-4.6, from -Wunused-but-set-variable and
-Wint-to-pointer-cast.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123719 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprComplex.cpp
GObjC.cpp
taniumCXXABI.cpp
a75732201b19059a0e56a88b0eb5a0e5dd3c6ca3 17-Jan-2011 NAKAMURA Takumi <geek4civic@gmail.com> lib/CodeGen/TargetInfo.cpp: Add Win64 calling conversion.

FIXME: It would be incompatible to Microsoft's in one point.
On mingw64-gcc, {i128} is expanded for args and returned as {rax, rdx}.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123692 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
31f7d02f0d46207b077f9687fbfbf273dda4d5f5 17-Jan-2011 Devang Patel <dpatel@apple.com> Simplify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123682 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
d3d4e1ee398748468cbaaddb3b0af5953f043803 17-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> More unnamed_addr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123681 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
803d307a5385059b1a84dfe9706ab158c80a20dc 17-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> merge strings created by
const NSConstantString *appKey = @"MyApp";

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123680 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b266a1fce09ab4ee7033268199509aacfbef056a 17-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Add unnamed_addr to the special strings created by
__builtin___CFStringMakeConstantString
This fixes PR8993. A darwin expert might want to check that this is safe.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123531 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVTables.cpp
5576d9b0a389f6f1f89bdcd37194f4e992b1fbcb 14-Jan-2011 John McCall <rjmccall@apple.com> Support the zero-initialization of VLAs when that really means a zero
bit-pattern. Continue punting on zero-initializing VLAs with a nonzero
pattern.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123439 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
b8424370ff7ebb63db04b2398ddaa92e829582a4 14-Jan-2011 John McCall <rjmccall@apple.com> When simplifying a cleanup's entry by merging it into a single predecessor,
replace all uses of the entry with the predecessor. There are no cleanups
relying on this right now, but if we ever want a cleanup with a phi inside
it, this will be important.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123438 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
0990b00ba0627d76d53432afe729041ca3f4579b 13-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> Save getObjCGCAttrKind and use it in two places
for efficiancy (still part of //rdar://8761767).
Per John's comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123401 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
ec8051276e5ba5eb3f8dcb0ebb96e17495cbc2bf 13-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> Generate write-barriers for global objc
assigns. // rdar://8761767


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123391 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
14110477887e3dc168ffc6c191e72d705051f99e 13-Jan-2011 Peter Collingbourne <peter@pcc.me.uk> Move name mangling support from CodeGen to AST. In the
process, perform a number of refactorings:

- Move MiscNameMangler member functions to MangleContext
- Remove GlobalDecl dependency from MangleContext
- Make MangleContext abstract and move Itanium/Microsoft functionality
to their own classes/files
- Implement ASTContext::createMangleContext and have CodeGen use it

No (intended) functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123386 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GCXX.h
GCXXABI.h
GDecl.cpp
GObjC.cpp
GVTables.h
MakeLists.txt
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTBAA.cpp
odeGenTBAA.h
lobalDecl.h
taniumCXXABI.cpp
angle.cpp
angle.h
icrosoftCXXABI.cpp
255c269f35928a8194fb591656c67ec4ebd846eb 13-Jan-2011 Douglas Gregor <dgregor@apple.com> When your comments and your code are out-of-sync, the test case is wrong.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123379 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
4fc4866945de9b0f1f77a17557060f0ff959b0b1 13-Jan-2011 Douglas Gregor <dgregor@apple.com> Add tests for name mangling of variadic templates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123378 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
8d3d6c93551cc62c6d550f090991bfba1d32d0a4 13-Jan-2011 John McCall <rjmccall@apple.com> Ensure an insertion point at the end of a statement-expression.
Fixes PR8967.



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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123354 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVTables.cpp
9370c8f4af43a98a6f16e65f5d88d58db846e374 12-Jan-2011 Douglas Gregor <dgregor@apple.com> Add IR generation support for SizeOfPackExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123332 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
cd5b22e12b6513163dd131589746c194090f14e6 12-Jan-2011 John McCall <rjmccall@apple.com> Fix a latent bug where, after emitting an expression statement, we would
delete the block we began emitting into if it had no predecessors. We never
want to do this, because there are several valid cases during statement
emission where an existing block has no known predecessors but will acquire
some later. The case in my test case doesn't inherently fall into this
category, because we could safely emit the case-range code before the statement
body, but there are examples with labels that can't be fallen into
that would also demonstrate this bug.

rdar://problem/8837067



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123303 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GException.cpp
GStmt.cpp
57244f69e2e780bb5584a37a12e31be83b1eaadb 12-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Set unnamed_addr in every type info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123293 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
82a0f4e93c055fb12f5ad7c3d146d50eb201308f 11-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Set unnamed_addr in VTTs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123280 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
b1c65ff108de47a89585ad37874bd6cb232664cd 11-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Set unnamed_addr for type infos that we are confortable marking as hidden. I
think it is safe to mark all type infos with unnamed_addr, but I am not sure.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123272 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
29dd67bc59249adef304827d68b094f5b5cfc645 11-Jan-2011 Bob Wilson <bob.wilson@apple.com> Remove special handling for opaque Neon vector types.
Clang does not wrap the vectors in structs anymore so this isn't needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123241 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
b1fd0eb8abe0b972ab793edab1d6f5e976217178 11-Jan-2011 Devang Patel <dpatel@apple.com> Fix debug info for __block variable referenced outside of block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123199 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
c5f657fe308f22243f674fc1dfbe24915944d8bf 11-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Add unnamed_addr to constructors and destructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123197 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
0024f940dd15987b8ffbe6e787dcf860a9ea1eff 11-Jan-2011 Bob Wilson <bob.wilson@apple.com> Move DefaultABIInfo::classifyReturnType where it belongs. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123195 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
1257bc6ee76b931e3f8e51a88298b95379963d24 10-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Add unnamed_addr when creating artificial string globals. For example, in

static const char foo[] = "foo";
static const char *bar = "bar";

the global created to hold "bar" will have it, but foo will not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123192 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
12bbc5c92209e0a7db2f71cfe03b84cb32df6adb 09-Jan-2011 Benjamin Kramer <benny.kra@googlemail.com> Make a helper function static.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123118 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
cbb67480094b3bcb5b715acd827cbad55e2a204c 08-Jan-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Renamed CXXBaseOrMemberInitializer to CXXCtorInitializer. This is both shorter,
more accurate, and makes it make sense for it to hold a delegating constructor
call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123084 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GObjC.cpp
d88687fc8b3b6e0bce1f7cb83d347ef009ab5480 07-Jan-2011 John McCall <rjmccall@apple.com> Rework a few things about how we emit ObjC's for enumeration statement.
In particular, the iteration variable (if present) should be created and
destroyed in a narrow span around the loop body, and the body should
be emitted in a cleanup scope in case it's not a compound statement.
Otherwise, rename a few variables and use phis instead of temporary
variables for the index and buffer count.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122988 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
9d156a7b1b2771e191f2f5a45a7b7a694129463b 06-Jan-2011 John McCall <rjmccall@apple.com> Introduce an AttributedType, but don't actually use it anywhere yet.
The initial TreeTransform is a cop-out, but it's more-or-less equivalent
to what we were doing before, or rather what we're doing now and might
eventually stop doing in favor of using this type.
I am simultaneously intrigued by the possibilities of rebuilding a
dependent Attri



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122942 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a7fc901a2e39bfe55bfcff5934b2d9fdf9656491 05-Jan-2011 Douglas Gregor <dgregor@apple.com> Replace the representation of template template argument pack
expansions with something that is easier to use correctly: a new
template argment kind, rather than a bit on an existing kind. Update
all of the switch statements that deal with template arguments, fixing
a few latent bugs in the process. I"m happy with this representation,
now.

And, oh look! Template instantiation and deduction work for template
template argument pack expansions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122896 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
cbf40f913aa2aa5de6e0540fed209405d00a2c69 05-Jan-2011 Chris Lattner <sabre@nondot.org> fix a -Wself-assign warning


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122894 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
711c52bb20d0c69063b52a99826fb7d2835501f1 05-Jan-2011 John McCall <rjmccall@apple.com> Refactor the application of type attributes so that attributes from
the declaration-specifiers and on the declarator itself are moved
to the appropriate declarator chunk. This permits a greatly
simplified model for how to apply these attributes, as well as
allowing a much more efficient query for the GC attribute.
Now all qualifier queries follow the same basic strategy of
"local qualifiers, local qualifiers on the canonical type,
then look through arrays". This can be easily optimized by
changing the canonical qualified-array-type representation.

Do not process type attributes as decl attributes on declarations
with declarators.

When computing the type of a block, synthesize a prototype
function declarator chunk if the decl-spec type was not a
function. This simplifies the logic for building block signatures.

Change the logic which inserts an objc_read_weak on a block
literal to only fire if the block has a __weak __block variable,
rather than if the return type of the block is __weak qualified,
which is not actually a sensible thing to ask.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122871 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
2e774c4efb24403049f9235c6ce08506cbb8c82a 04-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement name mangling for sizeof...(pack), to silence the last of
the switch-enum warnings. Test is forthcoming, once I've dealt with
some template argument deduction issues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122820 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
f90b27ad077c3339b62befc892382845339f9490 03-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement pack expansions whose pattern is a base-specifier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122782 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
f96bdf409fc9e5570e35aaf8a9167265e63d58d8 03-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> Consider zero-length array of structs when
computing ivar layouts for objc-gc.
Fixes // rdar://8800513


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122762 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
be230c36e32142cbdcdbe9c97511d097beeecbab 03-Jan-2011 Douglas Gregor <dgregor@apple.com> Implement support for pack expansions whose pattern is a non-type
template argument (described by an expression, of course). For
example:

template<int...> struct int_tuple { };

template<int ...Values>
struct square {
typedef int_tuple<(Values*Values)...> type;
};

It also lays the foundation for pack expansions in an initializer-list.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122751 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
33a53440eb025dc511b7dcb27dea8029cc28b34f 02-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Add support for passing variables declared to use a xmm register to asm
statements using the "x" constraint.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122679 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
baf86955a9a390f2643a1ea9806832eb4a92f716 01-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Produce a better error message for invalid register names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122670 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
03117d1b2e32d18652401b12d9049871992bf3ad 01-Jan-2011 Rafael Espindola <rafael.espindola@gmail.com> Fix typo and add comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122669 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
0ec89f928ce5b3294c2ed644ec1a42656e1af39d 30-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for declaring register contraints in variables. They are only used
in asm statements:

register int foo asm("rdi");

asm("..." : ... "r" (foo) ...

We also only accept these variables if the constraint in the asm statement is "r".

This fixes most of PR3933.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122643 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GStmt.cpp
a9de3fa8a9c22dd419eda9be53e8c7c428cce1c0 30-Dec-2010 Nick Lewycky <nicholas@mxc.ca> Correct function name in comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122640 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
9f0c7cc36d29cf591c33962931f5862847145f3e 30-Dec-2010 Benjamin Kramer <benny.kra@googlemail.com> Simplify mem{cpy, move, set} creation with IRBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122634 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCall.cpp
GDecl.cpp
GExprAgg.cpp
GExprCXX.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
8fac25d33b13e25f512dd921d4d5a4b565f5d175 26-Dec-2010 David Chisnall <csdavec@swan.ac.uk> Add support for GNU runtime property set / get structure functions. Minor refactoring of Mac runtime (returns the same function for both, as the Mac runtimes currently only provide a single entry point for setting and getting struct properties, although this will presumably be fixed at some point).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122569 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
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
GRTTI.cpp
odeGenTypes.cpp
angle.cpp
icrosoftCXXABI.cpp
7536dd5e6c99584481b7dab68b7e7d8df9c54054 20-Dec-2010 Douglas Gregor <dgregor@apple.com> Introduce a new type, PackExpansionType, to capture types that are
pack expansions, e.g. given

template<typename... Types> struct tuple;

template<typename... Types>
struct tuple_of_refs {
typedef tuple<Types&...> types;
};

the type of the "types" typedef is a PackExpansionType whose pattern
is Types&.

This commit introduces support for creating pack expansions for
template type arguments, as above, but not for any other kind of pack
expansion, nor for any form of instantiation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122223 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
icrosoftCXXABI.cpp
276fdf408050d205f3a7f34c1e788224a67d2098 19-Dec-2010 Wesley Peck <peckw@wesleypeck.com> 1. Add some ABI information for the Microblaze.
2. Add attibutes "interrupt_handler" and "save_volatiles" for the Microblaze target.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122184 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
9c39acfda88268bcc7fb5521b55ce41942dcb3b0 17-Dec-2010 John McCall <rjmccall@apple.com> Give hidden visibility to RTTI for derived types. This is kindof a hacky
way to do this, but it fixes rdar://problem/8778973



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122033 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
46e392ae6d09979b087d7b1aca3b816ba4199b89 16-Dec-2010 Bob Wilson <bob.wilson@apple.com> Implement builtins for Neon half-precision float conversions.
Also tweak the VCVT_F32_F16 entry in arm_neon.td to be more consistent with
the other floating-point conversion builtins. Radar 8068427.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121916 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
bfdcdc8e26097c9dbb4c40d78296f6ccc3e6684c 15-Dec-2010 John McCall <rjmccall@apple.com> Set the "implicitly inline" bit on a method as soon as we see a definition
within the class. Teach IR gen to look for function definitions in record
lexical contexts when deciding whether to emit a function whose address
was taken. Fixes PR8789.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121833 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
e23cf437fe76b1ed02d63c3f61b456fd48a915f5 14-Dec-2010 John McCall <rjmccall@apple.com> Restore r121752 without modification.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121763 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
5bfe232d1f07a6fd160fcf82c277c055a412a1c0 14-Dec-2010 John McCall <rjmccall@apple.com> Pull out r121752 in case it's causing the selfhost breakage.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121759 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
0e88aa7100da32acc63bc8a4dcb946ed517868f1 14-Dec-2010 John McCall <rjmccall@apple.com> Factor out most of the extra state in a FunctionProtoType into a separate
class to be passed around. The line between argument and return types and
everything else is kindof vague, but I think it's justifiable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121752 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
2ea7e73361c11f061e00caa8d9e71e84e6dd8554 14-Dec-2010 Dan Gohman <gohman@apple.com> Implement CodeGen support for the may_alias attribute.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121734 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
141e489973d1c3f90bfee607e288c56b8dbb5721 11-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add missing switch case for the quad-register version of the Neon vmul builtin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121595 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
a0eb23b79aba48a8141daa4eb1aba66266b41abe 10-Dec-2010 Bob Wilson <bob.wilson@apple.com> Fix clang crashes on Neon vld[234]_dup intrinsics with 64-bit element types.
The 64-bit element vectors need to be handled as a special case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121592 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
075f8f1b6bed4d1b224c74f87508534cc6392ce6 10-Dec-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added ParenType type node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121488 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
odeGenFunction.cpp
49f4e1cbd839da27ff4814b4ea6d85a79f786cbd 10-Dec-2010 John McCall <rjmccall@apple.com> It's kindof silly that ExtQuals has an ASTContext&, and we can use that
space better. Remove this reference. To make that work, change some APIs
(most importantly, getDesugaredType()) to take an ASTContext& if they
need to return a QualType. Simultaneously, diminish the need to return a
QualType by introducing some useful APIs on SplitQualType, which is
just a std::pair<const Type *, Qualifiers>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121478 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
30daefc5b559d4f32683503e36c14eba3c58ea62 10-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add missing switch case to handle builtin for Neon vqnegq.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121468 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
c1fa01b69d9377a69087a6006a65a8fcc526d565 10-Dec-2010 Bob Wilson <bob.wilson@apple.com> LLVM's intrinsics for vpaddl and vpadal have 2 overloaded types.
Clang was only specifying the overloaded result type. PR8483.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121464 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
d185035263b98cdde75a869b26b5e5e2e6b13fdf 10-Dec-2010 Bob Wilson <bob.wilson@apple.com> Neon compare absolute LLVM intrinsics are not overloaded. PR8484.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121447 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
db2b42fb4d43be5af14ba33d49bbd163f01646ec 10-Dec-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix another obscure corner layout case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121436 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
170cef3bff5b5659fac13e13bd824e1d61a64f5d 09-Dec-2010 Devang Patel <dpatel@apple.com> Remove unused parameter. getContextDescriptor() and getOrCreateNameSpace().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121333 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
344ff5d3dee44490abd7f4e767dd7b99c2050780 09-Dec-2010 Devang Patel <dpatel@apple.com> Remove unused parameter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121326 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
823d8e96cf3ff11775b8beb7f4d817a578972dc4 08-Dec-2010 Devang Patel <dpatel@apple.com> Start using DIBuilder. It provides cleaner interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121302 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
db3d4d036037f379f12643e067b229862d61e932 08-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using builtins for the "_lane" variants of saturating multiply intrinsics.
Remove the "splat" parameter from the EmitNeonCall function, since it is no
longer needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121300 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
f187237d916afa97c491ac32fe98be7d335c5b63 08-Dec-2010 Francois Pichet <pichet2000@gmail.com> Remove the TypesCompatibleExprClass AST node. Merge its functionality into BinaryTypeTraitExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121298 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
angle.cpp
a4cc79994b2f12663143dc31ceaf198e703fb914 08-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using clang builtins for Neon vabdl and vabal intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121288 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
a8b988f6ec8e2355c7081b31578843be33027033 08-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using clang builtins for Neon vaba intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121277 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
9d8231afec576559a73b352678b30452e1e83232 08-Dec-2010 Chandler Carruth <chandlerc@gmail.com> Silence an unused variable warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121221 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
f203344728f604b7b95cbc093854d97da411dc6f 08-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using clang builtins for Neon vadd[lw] and vsub[lw] intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121214 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
4064127e722070967289d02f27ee6a6d42cdba63 08-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using clang builtins for Neon vmlal{_n,_lane} and vmlsl{_n,_lane}.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121210 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
cf55652cf668c1402eee0b12edd2e5a1bc34d7a1 07-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using a clang builtin for Neon vdup_lane intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121191 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
c92b7721603484ddf337034c6f291d1b419a0528 07-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using a clang builtin for Neon vmull_lane intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121189 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
ad698dd9bde1cedf559ede34a2f8acad5d8f9391 07-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add a missing parameter, without which clang crashes for vqshlu_n intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121188 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
9f71a8f4c7a182a5236da9e747d57cc1d1bd24c2 07-Dec-2010 Jay Foad <jay.foad@gmail.com> PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method
trunc(), to be const and to return a new value instead of modifying the
object in place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121121 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
GExprConstant.cpp
6ad6f2848d7652ab2991286eb48be440d3493b28 07-Dec-2010 Francois Pichet <pichet2000@gmail.com> Type traits intrinsic implementation: __is_base_of(T, U)
New AST node introduced: BinaryTypeTraitExpr; to be reused for more intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121074 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
angle.cpp
4765fa05b5652fcc4356371c2f481d0ea9a1b007 06-Dec-2010 John McCall <rjmccall@apple.com> Rename CXXExprWithTemporaries -> ExprWithCleanups; there's no theoretical
reason this is limited to C++, and it's certainly not limited to temporaries.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120996 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprScalar.cpp
GTemporaries.cpp
odeGenFunction.h
angle.cpp
cd940a1e13e588a43973cd7ae33b5c33a3062739 06-Dec-2010 John McCall <rjmccall@apple.com> __block variables require us to evaluate the RHS of an assignment before
the LHS, or else the pointer might be invalid. This is kindof dumb, but
go ahead and make sure we're doing that for l-value scalar assignment,
which fixes a miscompile of obj-c++.dg/block-seq.mm.

Leave a FIXME for how to solve this problem for agg __blocks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120992 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
2a41637a995affa1563f4d82a8b026e326a2faa0 05-Dec-2010 John McCall <rjmccall@apple.com> Fix a bug in the emission of __real/__imag l-values on scalar operands.
Fix a bug in the emission of complex compound assignment l-values.
Introduce a method to emit an expression whose value isn't relevant.
Make that method evaluate its operand as an l-value if it is one.
Fixes our volatile compliance in C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120931 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GStmt.cpp
odeGenFunction.h
860453c4b4768e99d72f5833771c508e6ef00cc6 05-Dec-2010 Anders Carlsson <andersca@mac.com> Add a LayoutBase member function. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120924 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
57d2d236d24de0edb7e51b86d88c0eb970330650 05-Dec-2010 Anders Carlsson <andersca@mac.com> Replace calls to AppendBytes with calls to AppendPadding when the bytes appended are padding.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120922 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
fd569004b78124c1041feee75a1e311166268c8d 04-Dec-2010 John McCall <rjmccall@apple.com> Silly special case: never load when dereferencing void*.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120905 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
00eb3f9c5b33e3d99aee1f8b75dd9c9678fdd66b 04-Dec-2010 Francois Pichet <pichet2000@gmail.com> More anonymous struct/union redesign. This one deals with anonymous field used in a constructor initializer list:

struct X {
X() : au_i1(123) {}
union {
int au_i1;
float au_f1;
};
};

clang will now deal with au_i1 explicitly as an IndirectFieldDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120900 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
GObjC.cpp
odeGenFunction.h
0e800c9c20d1a658a91096c756c4a4a9e90264fc 04-Dec-2010 John McCall <rjmccall@apple.com> Remove some defensive calls to EmitLoadOfPropertyRefLValue that shouldn't
be required, and then fix up some missing loads on overloaded-operator
paths which that exposed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120896 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprCXX.cpp
GExprComplex.cpp
f6a1648197562e0b133440d612d9af297d0a86cc 04-Dec-2010 John McCall <rjmccall@apple.com> Although we currently have explicit lvalue-to-rvalue conversions, they're
not actually frequently used, because ImpCastExprToType only creates a node
if the types differ. So explicitly create an ICE in the lvalue-to-rvalue
conversion code in DefaultFunctionArrayLvalueConversion() as well as several
other new places, and consistently deal with the consequences throughout the
compiler.

In addition, introduce a new cast kind for loading an ObjCProperty l-value,
and make sure we emit those nodes whenever an ObjCProperty l-value appears
that's not on the LHS of an assignment operator.

This breaks a couple of rewriter tests, which I've x-failed until future
development occurs on the rewriter.

Ted Kremenek kindly contributed the analyzer workarounds in this patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120890 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
e68b9842d2d6adc2c72c81c845a2c68e58d9d3a4 04-Dec-2010 John McCall <rjmccall@apple.com> Test case for the l-value base only being evaluated once.

Also, move the l-value emission code into CGObjC.cpp and teach it, for
completeness, to store away self for a super send.

Also, inline the super cases for property gets and sets and make them
use the correct result type for implicit getter/setter calls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120887 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjC.cpp
odeGenFunction.h
119a1c6c4029d30cae7b31a2826aa0ff70d01668 04-Dec-2010 John McCall <rjmccall@apple.com> Kill the KVC l-value kind and calculate the base expression when emitting
the l-value.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120884 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GValue.h
odeGenFunction.h
4400cb8c548a90c472444b57690117563f4be195 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Implement -cl-mad-enable

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120881 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
5f67e13fcdc3c33e9cd5d027bfbb677b726c6f6a 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Implement -cl-unsafe-math-optimizations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120879 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
5d729a3d8eeba59ed97119998f2135ad6d45e876 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Implement -cl-finite-math-only

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120878 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
953d513c7ee79b3d9e37597e64317e75c0fbf7f6 03-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add support for vmul_p8 Neon intrinsic. Radar 8446141.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120812 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
7965396d8d6ac23ec4c4f9d01d216f2e73d7fc72 03-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add a separate rightShift flag instead of reusing the existing "poly" variable
to distinguish vsri/vsli.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120806 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
8c00ad1e3897e8a00f41bbd52135be8390d5c15c 02-Dec-2010 Chris Lattner <sabre@nondot.org> Reflow to a style doug prefers, increasing indentation :-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120746 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
d1d56df188e25c633f9bc65d229897b42442b0f7 02-Dec-2010 Chris Lattner <sabre@nondot.org> fix PR8726 by teaching the aggregate init optimization code to handle
structs with references in them correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120722 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
830937bc1100fba7682f7c32c40512085870f50c 02-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> IR Gen. part of API support for __block cxx
objects imported into blocks. //rdar://8594790.
Will have a test case coming (as well as one
sent to llvm test suite).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120713 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
GExprCXX.cpp
odeGenFunction.h
1b726771d00762fb5c4c2638e60d134c385493ae 02-Dec-2010 Chris Lattner <sabre@nondot.org> Improve codegen for initializer lists to use memset more aggressively
when an initializer is variable (I handled the constant case in a previous
patch). This has three pieces:

1. Enhance AggValueSlot to have a 'isZeroed' bit to tell CGExprAgg that
the memory being stored into has previously been memset to zero.
2. Teach CGExprAgg to not emit stores of zero to isZeroed memory.
3. Teach CodeGenFunction::EmitAggExpr to scan initializers to determine
whether they are profitable to emit a memset + inividual stores vs
stores for everything.

The heuristic used is that a global has to be more than 16 bytes and
has to be 3/4 zero to be candidate for this xform. The two testcases
are illustrative of the scenarios this catches. We now codegen test9 into:

call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 400, i32 4, i1 false)
%.array = getelementptr inbounds [100 x i32]* %Arr, i32 0, i32 0
%tmp = load i32* %X.addr, align 4
store i32 %tmp, i32* %.array

and test10 into:

call void @llvm.memset.p0i8.i64(i8* %0, i8 0, i64 392, i32 8, i1 false)
%tmp = getelementptr inbounds %struct.b* %S, i32 0, i32 0
%tmp1 = getelementptr inbounds %struct.a* %tmp, i32 0, i32 0
%tmp2 = load i32* %X.addr, align 4
store i32 %tmp2, i32* %tmp1, align 4
%tmp5 = getelementptr inbounds %struct.b* %S, i32 0, i32 3
%tmp10 = getelementptr inbounds %struct.a* %tmp5, i32 0, i32 4
%tmp11 = load i32* %X.addr, align 4
store i32 %tmp11, i32* %tmp10, align 4

Previously we produced 99 stores of zero for test9 and also tons for test10.
This xforms should substantially speed up -O0 builds when it kicks in as well
as reducing code size and optimizer heartburn on insane cases. This resolves
PR279.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120692 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprAgg.cpp
GValue.h
odeGenFunction.h
c0f31fd08537b65ad92db8ce860747e3402a07e6 02-Dec-2010 Chris Lattner <sabre@nondot.org> attempt to fix a buildbot failure, apparently apache fails to build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120688 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
a6cf1e709b96865210b81bd611d41e9a2d41500a 02-Dec-2010 Eric Christopher <echristo@apple.com> Add support for the common and nocommon attributes.

rdar://8560647


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120650 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
70b02943ddee9ee31e9641ab3f5eb0dc874b7e03 02-Dec-2010 Chris Lattner <sabre@nondot.org> Enhance the init generation logic to emit a memset followed by a few stores when
a global is larger than 32 bytes and has fewer than 6 non-zero values in the
initializer. Previously we'd turn something like this:

char test8(int X) {
char str[10000] = "abc";

into a 10K global variable which we then memcpy'd from. Now we generate:

%str = alloca [10000 x i8], align 16
%tmp = getelementptr inbounds [10000 x i8]* %str, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* %tmp, i8 0, i64 10000, i32 16, i1 false)
store i8 97, i8* %tmp, align 16
%0 = getelementptr [10000 x i8]* %str, i64 0, i64 1
store i8 98, i8* %0, align 1
%1 = getelementptr [10000 x i8]* %str, i64 0, i64 2
store i8 99, i8* %1, align 2

Which is much smaller in space and also likely faster.

This is part of PR279



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120645 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
12f78a6741a4cb3d904340f8d3d2714568b50e7a 02-Dec-2010 John McCall <rjmccall@apple.com> Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ObjCPropertyRefExpr
into the latter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120643 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GValue.h
odeGenFunction.h
angle.cpp
0ae287a498b8cec2086fe6b7e753cbb3df63e74a 01-Dec-2010 John McCall <rjmccall@apple.com> Restore the lvalue-to-rvalue conversion patch with a minimal fix.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120555 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
94cd011edcffdabd3cbc520830ccf8e793e08b62 01-Dec-2010 Chris Lattner <sabre@nondot.org> add some infrastructure that will let us codegen
http://llvm.org/bugs/show_bug.cgi?id=279#c3 better.

No functionality change yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120530 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
4c53dc1ebde9956b3d2ced1a811b49533737549b 01-Dec-2010 Chris Lattner <sabre@nondot.org> get some i32/i8/i1 constants from Builder, which is much less painful than
using ConstantInt::get.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120527 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
d9e0ff273f75de13bd97641a5b77651940946271 01-Dec-2010 John McCall <rjmccall@apple.com> A CGRecordLayout object persists. Since its contained types may
refer to opaque types, they must be held via PATypeHolders. I'm
not sure why this hasn't blown up before.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120491 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayout.h
d0de0ce304b3fcdda0fe081da2974420ee6f14e7 01-Dec-2010 John McCall <rjmccall@apple.com> CGRecordLayoutBuilder does not need to be exported from this module.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120489 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
faa5bfcaaf6fc5a21ae112919d368f2636c58768 01-Dec-2010 Fariborz Jahanian <fjahanian@apple.com> Declaring local static in global block
literal declaration caused crash in CodeGen.
This patch fixes it. pr8707


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120486 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
20fbe7c4772d537c1f779b1ff89cbb57d1d9afff 30-Nov-2010 John McCall <rjmccall@apple.com> L-value to r-value conversion is not ready for prime-time.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120433 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
7e4857931bfe27bb355275bc7ec1eaa44612dfff 30-Nov-2010 John McCall <rjmccall@apple.com> Introduce an r-value to l-value cast kind. I'm not promising anything
about the reliability of this yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120422 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
a6a28972472d002ea9edd095f966c1eaaa9cb69b 30-Nov-2010 Douglas Gregor <dgregor@apple.com> Harden CGDebugInfo::CreateType() a bit for cases where we couldn't generate type info for its component types

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120401 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
03013fa9a0bf1ef4b907f5fec006c8f4000fdd21 29-Nov-2010 Michael J. Spencer <bigcheesegs@gmail.com> Merge System into Support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120297 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
fc86d55b6b20c47f67a61afa4b3903eb0d31f9b8 29-Nov-2010 Anders Carlsson <andersca@mac.com> Don't store the maximum alignment, we can trivially compute it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120268 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
1d7dc2240717eb34672035b13ceb17710ab481c1 28-Nov-2010 Anders Carlsson <andersca@mac.com> More work on laying out virtual bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120257 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
83eedd9fa800c273647c7a90465ea9c110f9d93c 28-Nov-2010 Anders Carlsson <andersca@mac.com> BuildVirtualCall doesn't need to take a reference to a pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120252 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
1af610f8533b8b4a7b0b176aa8082f5b6dde904c 28-Nov-2010 Anders Carlsson <andersca@mac.com> Make the destructor be the 'vtable anchor' of the CGCXXABI class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120251 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
GCXXABI.h
ee7cde2f391cc7c533c919848da09db715cd0a93 28-Nov-2010 Anders Carlsson <andersca@mac.com> Move CGCXXABI functions to CGCXXABI.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120250 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.cpp
4992eaf5f3a1f47cf53f5f187d672e4ff83ceaf7 28-Nov-2010 Anders Carlsson <andersca@mac.com> Add a CGCXXABI.cpp file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120249 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.cpp
MakeLists.txt
54353f48939327a4aa41ea3f3ec07b936bd02ef5 25-Nov-2010 Benjamin Kramer <benny.kra@googlemail.com> Hide a bunch of symbols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120153 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
angle.cpp
8f2c6899dd14023555808dbdcbe7e371c3fb2cc2 25-Nov-2010 Anders Carlsson <andersca@mac.com> Begin work on actually laying out virtual bases.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120132 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
46170f9c7d561d0f94af34a4b5da909d2584370a 24-Nov-2010 Anders Carlsson <andersca@mac.com> Add CXXRecordDecl::getIndirectPrimaryBases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120129 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
8a9dc4fcde8583b0c4389d5a43b88820adbd3022 24-Nov-2010 Anders Carlsson <andersca@mac.com> Simplify code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120118 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.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
odeGenTypes.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
odeGenTypes.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
odeGenTypes.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
GRecordLayoutBuilder.cpp
odeGenTypes.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
odeGenTypes.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
odeGenTypes.cpp
odeGenTypes.h
ba2c2eec87d614b06e194b289627bbfe0642e4ce 24-Nov-2010 Anders Carlsson <andersca@mac.com> CGRecordLayout types are always struct types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120106 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayout.h
GRecordLayoutBuilder.cpp
7eb0a9eb0cde8444b97f9c5b713d9be7a6f1e607 24-Nov-2010 John McCall <rjmccall@apple.com> Switch a lot of call-sites over to using the new value-kind calculations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120084 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
ada4b32749458644272d90e34e4149c307376e59 22-Nov-2010 Anders Carlsson <andersca@mac.com> Refactor the null-initialization for record types and make it handle bases that aren't i8 arrays.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119980 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
a03613d6e3f38e0ea8f5ebf0d7c9039b9fe35a8d 22-Nov-2010 Anders Carlsson <andersca@mac.com> Remove FIXME; we don't ever want to lay out empty bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119957 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
9a5a3f2f3bc7048160b50dadeb7fa56e5e9d8385 22-Nov-2010 Anders Carlsson <andersca@mac.com> Rename BaseLLVMType to NonVirtualBaseLLVMType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119956 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayout.h
GRecordLayoutBuilder.cpp
f4a15b0df4c8e8b012aa33f5f2f182871efb9dd0 22-Nov-2010 Anders Carlsson <andersca@mac.com> Add getCGRecordLayout helper function. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119955 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
41f5e66d44ae1142df82f40d4445c4a5710fa423 21-Nov-2010 Francois Pichet <pichet2000@gmail.com> Fix warning: enumeration value 'IndirectField' not handled in switch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119924 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
75f91d6c5d654cb8570e299e19b18fe8aff4bba6 19-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Minor cleanup. No change otherwise.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119814 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
a762514563bcbf52a016f7e6b6730cac035ac92c 18-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a bug where write-barriers for assignment through reference
types was not being generated for objc pointers.
// rdar://8681766.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119751 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
33e4e70c8c0a17e0ccb7465d96556b077a68ecb1 18-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactoring of Diagnostic class.

-Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class.
-DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units.
-The rest of the state in Diagnostic object is considered related and tied to one translation unit.
-Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a
SourceLocation instead of a FullSourceLoc.
-Reflect the changes to various interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119730 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
odeGenAction.cpp
angle.cpp
f89e55ab1bfb3ea997f8b02997c611a02254eb2d 18-Nov-2010 John McCall <rjmccall@apple.com> Calculate the value kind of an expression when it's created and
store it on the expression node. Also store an "object kind",
which distinguishes ordinary "addressed" l-values (like
variable references and pointer dereferences) and bitfield,
@property, and vector-component l-values.

Currently we're not using these for much, but I aim to switch
pretty much everything calculating l-valueness over to them.
For now they shouldn't necessarily be trusted.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119685 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GObjC.cpp
aa4fe05939ffbfd746b8f0065cc0b5e06ea94fe2 18-Nov-2010 Anton Yartsev <anton.yartsev@gmail.com> comparison of AltiVec vectors now gives bool result (fix for 7533)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119678 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
5d93653247eeedaff5f0712178953b63d71a0b3b 17-Nov-2010 Chris Lattner <sabre@nondot.org> When forming the !srcloc mdnode for an inline asm, add the SourceLocations
of all the lines of the inline asm. With the refactoring and enhancement
of the backend, we can now reports errors on the correct source line when
an asm contains multiple lines of text. For something like this:

void foo() {
asm("push %rax\n"
".code32\n");
}

we used to get this: (note that the line 4 in t.c isn't helpful)

t.c:4:7: error: warning: ignoring directive for now
asm("push %rax\n"
^
<inline asm>:2:1: note: instantiated into assembly here
.code32
^

now we get:

t.c:5:8: error: warning: ignoring directive for now
".code32\n"
^
<inline asm>:2:1: note: instantiated into assembly here
.code32
^

Note that we're pointing to line 5 properly now. This implements
rdar://7839391 - inline asm errors should point to the right line in the asm
and makes the error message in PR8595 much less confusing.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119489 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
063e47667c583433548e3c40a3003bc1aac8cf78 17-Nov-2010 Chris Lattner <sabre@nondot.org> adjust for llvm mainline, yay type safety


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119487 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenAction.cpp
47fc7e93b6af9e6a967231133a2f4bc626eeed26 17-Nov-2010 Chris Lattner <sabre@nondot.org> factor some code out to a helper function, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119464 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
e38be617437ccdcc180c5a49e447cbcd07539292 17-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes synthesis of type for the object which holds info.
about a __block cxx object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119411 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
74fb0edb44b7ed52af9b8053032ccaab29b5c0cc 17-Nov-2010 John McCall <rjmccall@apple.com> Reset the lifetime-managed flag between emission of the agg conditional
branches. Fixes PR8623.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119408 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GValue.h
83ce9d4a552987d34cbd500e983db8d770232379 17-Nov-2010 John McCall <rjmccall@apple.com> Support compound complex operations as l-values in C++. Add a test
case based on CodeGen/volatile-1.c which tests the current C++
semantics, and note the many, many places we fall short of them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119402 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprComplex.cpp
odeGenFunction.h
e220455a059d926953befe72857b9525273717ef 16-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Implements __block API for c++ objects. There is still
issue with runtime which I am discussing it with Blaine.
This is wip (so no test yet).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119368 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenFunction.h
cb49c48960fc2686b5fceff434398f25498f10f4 16-Nov-2010 John McCall <rjmccall@apple.com> Simplify some complex emission and implement correct semantics for
assignment to volatiles in C. This in effect reverts some of mjs's
work in and around r72572. Basically, the C++ standard is quite
clear, except that it lies about volatile behavior approximating
C's, whereas the C standard is almost actively misleading.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119344 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
b418d74c11498b7e1044103131e2e3be4d63512e 16-Nov-2010 John McCall <rjmccall@apple.com> Simplify some complex emission and implement correct semantics for
assignment to volatiles in C. This in effect reverts some of mjs's
work in and around r72572. Basically, the C++ standard is quite
clear, except that it lies about volatile behavior approximating
C's, whereas the C standard is almost actively misleading.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119344 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
98961eb717affed92c87e13babec3b39e85793bd 16-Nov-2010 John McCall <rjmccall@apple.com> Now that we have reliable cast kinds, simplify scalar cast IR gen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119332 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
61ad0e6f40555a6bf589cbc7849c25f2b35efae4 16-Nov-2010 John McCall <rjmccall@apple.com> Now that we have reliable cast kinds, simplify scalar cast IR gen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119332 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
a4ffbd8c8f55681d39dd2be1efa60b9870f6ae34 16-Nov-2010 John McCall <rjmccall@apple.com> Kill CK_Unknown and flesh out the documentation for the existing CastKinds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119331 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
e2b768877b77fa4e00171ee6e6443722e0f3d111 16-Nov-2010 John McCall <rjmccall@apple.com> Kill CK_Unknown and flesh out the documentation for the existing CastKinds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119331 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
270a40268b9e543ae638ea52024b65b5dabfc7b8 16-Nov-2010 John McCall <rjmccall@apple.com> Teach complex compound assignment IR-generation that the RHS of
a compound assignment is always already in the computation type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119330 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
641ca7d01441c34566756744838abb8faf1356aa 16-Nov-2010 John McCall <rjmccall@apple.com> Teach complex compound assignment IR-generation that the RHS of
a compound assignment is always already in the computation type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119330 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
a630ee8281b7af40f7d84a9a298246920922afc3 16-Nov-2010 Bob Wilson <bob.wilson@apple.com> Change CXXNameMangler::mangleNeonVectorType to require the vector type to be
one of the special Neon types. We'll check for invalid Neon vectors when
they are created, so there's no point in handling them when mangling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119299 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
57147a8615bca96e067975fe931baf5d741876a4 16-Nov-2010 Bob Wilson <bob.wilson@apple.com> Change CXXNameMangler::mangleNeonVectorType to require the vector type to be
one of the special Neon types. We'll check for invalid Neon vectors when
they are created, so there's no point in handling them when mangling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119299 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
d29de149d518630b358a2a91dd79d819776be2dc 16-Nov-2010 Bob Wilson <bob.wilson@apple.com> Use getTypeSize() method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119297 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
3a7230218d37de975096280472fa55294024b728 16-Nov-2010 Bob Wilson <bob.wilson@apple.com> Use getTypeSize() method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119297 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
1ebdd533402ce4e115e3a588754032ced20855a3 16-Nov-2010 John McCall <rjmccall@apple.com> Add a new expression kind, OpaqueValueExpr, which is useful for
certain internal type-checking procedures as well as for representing
certain implicitly-generated operations. Uses to follow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119289 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
7cd7d1ad33fdf49eef83942e8855fe20d95aa1b9 16-Nov-2010 John McCall <rjmccall@apple.com> Add a new expression kind, OpaqueValueExpr, which is useful for
certain internal type-checking procedures as well as for representing
certain implicitly-generated operations. Uses to follow.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119289 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
c12094c72fac6abfa8f71a432cb2fb65c226d3eb 15-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Some cleanup of block API code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119174 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
2715b207a6a22970441da162313e1729d54dc24e 15-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Some cleanup of block API code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119174 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
f504e6b13b6000c3ebaa67952cee5c10d45041ee 15-Nov-2010 Chandler Carruth <chandlerc@gmail.com> Silence an unused variable warning during release builds by folding the
expression into the assert.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119143 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
858a546d8fe73b07f2296313bef2e30445ea164b 15-Nov-2010 Chandler Carruth <chandlerc@gmail.com> Silence an unused variable warning during release builds by folding the
expression into the assert.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119143 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
6b4052d120c3ef414a822b3cff063432a1df3186 15-Nov-2010 John McCall <rjmccall@apple.com> Assorted work leading towards the elimination of CK_Unknown.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119138 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
daa8e4e888758d55a7a759dd4a91b83921cef222 15-Nov-2010 John McCall <rjmccall@apple.com> Assorted work leading towards the elimination of CK_Unknown.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119138 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
eb3ad13f35f122b197460f5fc780dfcff5634691 14-Nov-2010 John McCall <rjmccall@apple.com> Always emit full loads from volatile complex l-values.
Return the result of a complex assignment with the original values,
not by performing a load from the l-value; this is the correct
semantics in C, although not in C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119037 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
ff624c195e3a3f8dc697ead40bae78e84ca72c12 14-Nov-2010 John McCall <rjmccall@apple.com> Always emit full loads from volatile complex l-values.
Return the result of a complex assignment with the original values,
not by performing a load from the l-value; this is the correct
semantics in C, although not in C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119037 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
c948dee3af99fe58d4f94a6727b2a7c9f98434fc 14-Nov-2010 John McCall <rjmccall@apple.com> Add a few more complex-related cast kinds that arise due to arbitrary
implicit conversions; the last batch was specific to promotions.
I think this is the full set we need. I do think dividing the cast
kinds into floating and integral is probably a good idea.

Annotate a *lot* more C casts with useful cast kinds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119036 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprComplex.cpp
GExprScalar.cpp
f3ea8cfe6b1c2ef0702efe130561e9e66708d799 14-Nov-2010 John McCall <rjmccall@apple.com> Add a few more complex-related cast kinds that arise due to arbitrary
implicit conversions; the last batch was specific to promotions.
I think this is the full set we need. I do think dividing the cast
kinds into floating and integral is probably a good idea.

Annotate a *lot* more C casts with useful cast kinds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119036 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprComplex.cpp
GExprScalar.cpp
a9e4c2a50564c469bf4a7b9853a3ee6687cb85ad 14-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Removed unnecessary initialization of a flag which
somehow got several block tests fail with a linux built
compiler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119027 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
eec82172dc997a504c2f95a5d38fbe4ea5b37184 14-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Removed unnecessary initialization of a flag which
somehow got several block tests fail with a linux built
compiler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119027 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
8f85c31e259a43a5cb7b8f77949d6af30e488be5 14-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Initialize couple of fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119014 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
bc74764e47f059c4b2e1af4136490b44de381f03 14-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Initialize couple of fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119014 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
4982c4b1d896c87db38489baac69a4bf01026e76 13-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Block API patch to do copy ctor of copied-in cxx objects in
copy helper function and dtor of copied cxx objects
in dispose helper functions. __block variables
TBD next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119011 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GClass.cpp
GExprCXX.cpp
odeGenFunction.h
34999876e215b22febc240b1a6dc054215d12f9c 13-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Block API patch to do copy ctor of copied-in cxx objects in
copy helper function and dtor of copied cxx objects
in dispose helper functions. __block variables
TBD next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119011 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GClass.cpp
GExprCXX.cpp
odeGenFunction.h
0bf22e6c0c3413f491ea179db51a45bcf2381391 13-Nov-2010 John McCall <rjmccall@apple.com> Introduce five new cast kinds for various conversions into and
between complex types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118994 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprComplex.cpp
GExprScalar.cpp
2bb5d00fcf71a7b4d478d478be778fff0494aff6 13-Nov-2010 John McCall <rjmccall@apple.com> Introduce five new cast kinds for various conversions into and
between complex types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118994 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprComplex.cpp
GExprScalar.cpp
4f6199189cdc8acb40d76c24122f57672485baec 13-Nov-2010 John McCall <rjmccall@apple.com> Introduce a null-to-pointer implicit cast kind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118966 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
404cd1669c3ba138a9ae0a619bd689cce5aae271 13-Nov-2010 John McCall <rjmccall@apple.com> Introduce a null-to-pointer implicit cast kind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118966 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
feb33e4bca6c06dfd9ebd57ec86650c77509f64f 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
odeGenTypes.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
odeGenTypes.cpp
e1ed31337692fdf66c3095917d9dd6f1f7b0688f 12-Nov-2010 Bob Wilson <bob.wilson@apple.com> Use ASTContext::getTypeInfo to find the vector element size.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118899 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
4cfaa5d0675f248f7a30ef91f557cc4905d10b69 12-Nov-2010 Bob Wilson <bob.wilson@apple.com> Use ASTContext::getTypeInfo to find the vector element size.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118899 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
1ab6481f698c0995cb294ac1a29d21bfb970c41c 12-Nov-2010 Bob Wilson <bob.wilson@apple.com> Add a separate NeonPolyVector kind to distinguish polynomial vector types.
Add support for mangling those types according to ARM's ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118898 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
491328c90c00ecad6ad27fa0ab3cdf9195a4a820 12-Nov-2010 Bob Wilson <bob.wilson@apple.com> Add a separate NeonPolyVector kind to distinguish polynomial vector types.
Add support for mangling those types according to ARM's ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118898 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
e0d9775cc215c4931e4f8f2080caf76fb9a57007 12-Nov-2010 Bob Wilson <bob.wilson@apple.com> Add special-case mangling for Neon vector types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118897 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
c7df92db2d35e8bf7a585c4701dd95808e3e18c5 12-Nov-2010 Bob Wilson <bob.wilson@apple.com> Add special-case mangling for Neon vector types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118897 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
c9a63a9f9de5e4c5fa73707fbca10192b0057184 12-Nov-2010 Benjamin Kramer <benny.kra@googlemail.com> Use a twine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118892 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
77d6605159dd7b512be8e555f4fe78b2d6c34290 12-Nov-2010 Benjamin Kramer <benny.kra@googlemail.com> Use a twine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118892 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
aa2bcf20941e1e2436849595beed2df9d4f53076 11-Nov-2010 Douglas Gregor <doug.gregor@gmail.com> Teach debug-info generation that SourceManager::getPresumedLoc() can
produce an invalid location even when given a valid location, if the
file system has changed underneath us. Recovery more gracefully.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118834 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
8c457a8395676692225cd4c90bfb54d430199fdf 11-Nov-2010 Douglas Gregor <dgregor@apple.com> Teach debug-info generation that SourceManager::getPresumedLoc() can
produce an invalid location even when given a valid location, if the
file system has changed underneath us. Recovery more gracefully.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118834 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0a23593ad6afe1e0b9b79347504296907a84fd05 11-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Adding couple of Block API, a bug fix and
a test change, all for blocks. wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118745 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
e27e9d673346056e6ff7dca1d7fb1d75dfd42956 11-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Adding couple of Block API, a bug fix and
a test change, all for blocks. wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118745 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
b3e547db227afec80fd921b4dbff66bd91da992f 10-Nov-2010 Bob Wilson <bob.wilson@apple.com> Add a variant of GCC-style vector types for ARM NEON.
NEON vector types need to be mangled in a special way to comply with ARM's ABI,
similar to some of the AltiVec-specific vector types. This patch is mostly
just renaming a bunch of "AltiVecSpecific" things, since they will no longer
be specific to AltiVec. Besides that, it just adds the new "NeonVector" enum.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118724 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
e86d78cf4754a6aef2cf9a33d847aa15338e276f 10-Nov-2010 Bob Wilson <bob.wilson@apple.com> Add a variant of GCC-style vector types for ARM NEON.
NEON vector types need to be mangled in a special way to comply with ARM's ABI,
similar to some of the AltiVec-specific vector types. This patch is mostly
just renaming a bunch of "AltiVecSpecific" things, since they will no longer
be specific to AltiVec. Besides that, it just adds the new "NeonVector" enum.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118724 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
d22d23d26ea72e9f68804cce92133ce3a4e61adc 09-Nov-2010 Charles Davis <cdavis@mines.edu> Use the right calling convention when mangling names in the Microsoft C++
mangler. Now member functions and pointers thereof have their calling
convention mangled as __thiscall if they have the default CC (even though,
they technically still have the __cdecl CC).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118598 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
ee743f903858e337434ac0335f147f4de4ecae05 09-Nov-2010 Charles Davis <cdavis@mines.edu> Use the right calling convention when mangling names in the Microsoft C++
mangler. Now member functions and pointers thereof have their calling
convention mangled as __thiscall if they have the default CC (even though,
they technically still have the __cdecl CC).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118598 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
6bceef1a90fcfe4a51f8062361e33e752c42ad4a 09-Nov-2010 David Chisnall <csdavec@swan.ac.uk> Remove the use of aliases in outputted code from ObjC (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118498 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
0b9c22b61a3c99c8c0e8d898adb0f60afa76584e 09-Nov-2010 David Chisnall <csdavec@swan.ac.uk> Remove the use of aliases in outputted code from ObjC (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118498 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
225ec6ba2e13aba24c104dc01153c88ee6228750 09-Nov-2010 Nick Lewycky <nicholas@mxc.ca> Remove debugging printf.
Fix linux build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118497 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
cb0511cc291a2f1b6ba281b818f3d07184e198b7 09-Nov-2010 Nick Lewycky <nicholas@mxc.ca> Remove debugging printf.
Fix linux build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118497 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
6fd4a0fe500cae003fbda49da3fd240a671a03fe 09-Nov-2010 Anders Carlsson <andersca@mac.com> Introduce the concept of a non-virtual base type to CGRecordLayoutBuilder as a first step towards fixing PR6995.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118491 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayout.h
GRecordLayoutBuilder.cpp
3d155e683a74d3783362ef1865be91544eb8a9fc 09-Nov-2010 Anders Carlsson <andersca@mac.com> Introduce the concept of a non-virtual base type to CGRecordLayoutBuilder as a first step towards fixing PR6995.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118491 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayout.h
GRecordLayoutBuilder.cpp
3a2ea342164d6d52e154290f16d792f84122caa8 09-Nov-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Fix miscompilation regarding VLAs; subscription of VLA pointers was incorrect.
Fixes rdar://8644873 & http://llvm.org/PR8567.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118468 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
981b6fde6992567d8be03ba77dabe1efc3ff33d1 09-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix miscompilation regarding VLAs; subscription of VLA pointers was incorrect.
Fixes rdar://8644873 & http://llvm.org/PR8567.

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

Fixes PR7611.



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

Fixes PR7611.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118466 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
99cb76d06906fd6c126da9c22f7af15c8658457b 08-Nov-2010 Douglas Gregor <doug.gregor@gmail.com> Remove broken support for variadic templates, along with the various
abstractions (e.g., TemplateArgumentListBuilder) that were designed to
support variadic templates. Only a few remnants of variadic templates
remain, in the parser (parsing template type parameter packs), AST
(template type parameter pack bits and TemplateArgument::Pack), and
Sema; these are expected to be used in a future implementation of
variadic templates.

But don't get too excited about that happening now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118385 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
910f8008fea79120489a53593fe971b0b8a4a740 08-Nov-2010 Douglas Gregor <dgregor@apple.com> Remove broken support for variadic templates, along with the various
abstractions (e.g., TemplateArgumentListBuilder) that were designed to
support variadic templates. Only a few remnants of variadic templates
remain, in the parser (parsing template type parameter packs), AST
(template type parameter pack bits and TemplateArgument::Pack), and
Sema; these are expected to be used in a future implementation of
variadic templates.

But don't get too excited about that happening now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118385 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
57a85b3c5c9eb6d2e80708727b5eecf20a4020b5 07-Nov-2010 John McCall <rjmccall@apple.com> ARM EH uses a different personality function in C.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118366 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GException.h
44680786286f4f651603c6811f8412a3ee7fe975 07-Nov-2010 John McCall <rjmccall@apple.com> ARM EH uses a different personality function in C.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118366 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GException.h
3068029d382b741537fcfc5ea00175100eb4b0e0 06-Nov-2010 John McCall <rjmccall@apple.com> Simplify the logic for emitting guard variables for template static
data members by delaying the emission of the initializer until after
linkage and visibility have been set on the global. Also, don't
emit a guard unless the variable actually ends up with vague linkage,
and don't use thread-safe statics in any case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118336 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GDecl.cpp
GDeclCXX.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
3030eb82593097502469a8b3fc26112c79c75605 06-Nov-2010 John McCall <rjmccall@apple.com> Simplify the logic for emitting guard variables for template static
data members by delaying the emission of the initializer until after
linkage and visibility have been set on the global. Also, don't
emit a guard unless the variable actually ends up with vague linkage,
and don't use thread-safe statics in any case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118336 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GDecl.cpp
GDeclCXX.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
2aad72f4e164201fb167638150eeff49bff06ab2 04-Nov-2010 Anders Carlsson <andersca@mac.com> std::nullptr_t is a fundamental type for RTTI purposes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118238 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
2bd6250f8e14750033362664ee298c2cc0e64853 04-Nov-2010 Anders Carlsson <andersca@mac.com> std::nullptr_t is a fundamental type for RTTI purposes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118238 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
0b2560e2d30d33f0a0941ece65160381e723ff9c 04-Nov-2010 Anders Carlsson <andersca@mac.com> Mangle std::nullptr_t as specified by the Itanium C++ ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118236 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
e292368afa63337f5ff64c967857a898d6f868da 04-Nov-2010 Anders Carlsson <andersca@mac.com> Mangle std::nullptr_t as specified by the Itanium C++ ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118236 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
031c547c3f2d7ba544cb295ee9915d97e8ac70ca 03-Nov-2010 David Chisnall <csdavec@swan.ac.uk> Some fixes for synthesized ivar metadata (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118172 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
e0d987626cc11317b36d6d3cc148c9a9d4b35850 03-Nov-2010 David Chisnall <csdavec@swan.ac.uk> Some fixes for synthesized ivar metadata (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118172 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
82cfc983a384d89577681a897df39b9b2b15385f 02-Nov-2010 John McCall <rjmccall@apple.com> Ensure that static local variables in function templates inherit the
visibility of their function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118065 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
taniumCXXABI.cpp
112c967bd5c862a0f5d7913aa06700c048807db8 02-Nov-2010 John McCall <rjmccall@apple.com> Ensure that static local variables in function templates inherit the
visibility of their function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118065 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
taniumCXXABI.cpp
17eb4207e51b520bcc268bc50474405b2d743406 02-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a crash mangling decayed val argument-typed function.
// rdar: //8620510 and PR7666


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118019 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
7281d1fbea62a4549b045bb7dc434904f2b609d8 02-Nov-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a crash mangling decayed val argument-typed function.
// rdar: //8620510 and PR7666


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118019 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
a26d02a0301a78c653a563e703300b742051baf1 01-Nov-2010 Devang Patel <dpatel@apple.com> Simplify. Builtin types' context is always implied.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117928 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
f1d1d9ad72507a8ef1e97d2dccad8445f035e762 01-Nov-2010 Devang Patel <dpatel@apple.com> Simplify. Builtin types' context is always implied.


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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117881 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
GDebugInfo.cpp
GExprConstant.cpp
GExprScalar.cpp
GRTTI.cpp
GRecordLayoutBuilder.cpp
GVTT.cpp
GVTables.cpp
argetInfo.cpp
a14f5979572aa25c03d24750ee4724d2031d4ede 01-Nov-2010 Anders Carlsson <andersca@mac.com> Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117881 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
GDebugInfo.cpp
GExprConstant.cpp
GExprScalar.cpp
GRTTI.cpp
GRecordLayoutBuilder.cpp
GVTT.cpp
GVTables.cpp
argetInfo.cpp
2de759ee4804419e8a58cf81eb4d4fd256f7635d 30-Oct-2010 John McCall <rjmccall@apple.com> Better solution: calculate the visibility of functions and variables
independently of whether they're definitions, then teach IR generation to
ignore non-explicit visibility when emitting declarations. Use this to
make sure that RTTI, vtables, and VTTs get the right visibility.

More of rdar://problem/8613093



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

More of rdar://problem/8613093



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117781 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
GVTT.cpp
GVTables.cpp
odeGenModule.cpp
odeGenModule.h
3a161e5ca07ca0c35ad2b0f73e21ed3b1ea43171 30-Oct-2010 Dale Johannesen <dalej@apple.com> Generate bitcasts going in and out of MMX parameters
in asm's. PR 8501, 8602988.
I don't like including Type.h where it is; the idea was
to get references to X86_MMXTy out of the common code.
Maybe there's a better way?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117736 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
f6e2c2039f76fa58799f6d155892d54fc95755e1 30-Oct-2010 Dale Johannesen <dalej@apple.com> Generate bitcasts going in and out of MMX parameters
in asm's. PR 8501, 8602988.
I don't like including Type.h where it is; the idea was
to get references to X86_MMXTy out of the common code.
Maybe there's a better way?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117736 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
1b8917e2005aef27081d9580524b4d0871dd8c65 30-Oct-2010 Dan Gohman <gohman@apple.com> Use CodeGenFunction's getContext(), for consistency.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117734 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
bc07a55b68342a230aafd8875cc7a26450dd3f64 30-Oct-2010 Dan Gohman <gohman@apple.com> Use CodeGenFunction's getContext(), for consistency.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117734 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
555a1dc275adafe74fd7606617cea0270b242d94 30-Oct-2010 John McCall <rjmccall@apple.com> Restore r117644, this time properly ignoring -fvisibility and type visibility
for namespace-scope variable declarations.

Apply visibility in IR gen to variables that are merely declared
and never defined. We were previously emitting these with default
visibility unless they were declared with private_extern.

Ignore global visibility settings when computing visibility for
a declaration's context, and key several conditions on whether a
visibility attribute exists anywhere in the hierarchy as opposed
to whether it exists at the current level.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117729 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
110e8e56af30363072c140285961592b0107f789 30-Oct-2010 John McCall <rjmccall@apple.com> Restore r117644, this time properly ignoring -fvisibility and type visibility
for namespace-scope variable declarations.

Apply visibility in IR gen to variables that are merely declared
and never defined. We were previously emitting these with default
visibility unless they were declared with private_extern.

Ignore global visibility settings when computing visibility for
a declaration's context, and key several conditions on whether a
visibility attribute exists anywhere in the hierarchy as opposed
to whether it exists at the current level.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117729 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f9b25cdcbfafe620b7ef228a35b471333b03e266 29-Oct-2010 Devang Patel <dpatel@apple.com> After processing named unions do not fall through to handle anonymous unions.
This is tested by funcargs.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117659 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f4dd962e6828f790cefc09a5b15bdbd282ebc1ee 29-Oct-2010 Devang Patel <dpatel@apple.com> After processing named unions do not fall through to handle anonymous unions.
This is tested by funcargs.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117659 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
be866a94beb7bb37034d9e0deddfed221bec2106 29-Oct-2010 Daniel Dunbar <daniel@zuster.org> Revert r117644, "Apply visibility in IR gen to variables that are merely
declared", it breaks things.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117653 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
034f55c1eb93aee61cef5a015eb1d5ba06d3b3d4 29-Oct-2010 Daniel Dunbar <daniel@zuster.org> Revert r117644, "Apply visibility in IR gen to variables that are merely
declared", it breaks things.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117653 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4baf4bed0ee62c19696216da4040af3a0c652d44 29-Oct-2010 John McCall <rjmccall@apple.com> Don't assert on attempts to throw 'bool'. I wonder if in the history of C++
anyone has ever intentionally done this outside of a compiler test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117645 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
14e1bc9201681a52e06b0544ee800b422f6f3efe 29-Oct-2010 John McCall <rjmccall@apple.com> Don't assert on attempts to throw 'bool'. I wonder if in the history of C++
anyone has ever intentionally done this outside of a compiler test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117645 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
b0b83983f7fec52224f78b1fb03e5eaeb93e9a83 29-Oct-2010 John McCall <rjmccall@apple.com> Apply visibility in IR gen to variables that are merely declared
and never defined. We were previously emitting these with default
visibility unless they were declared with private_extern.

Ignore global visibility settings when computing visibility for
a declaration's context, and key several conditions on whether a
visibility attribute exists anywhere in the hierarchy as opposed
to whether it exists at the current level.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117644 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
87a4ed905e2febe64021dcdfcdc7f00b27e92f32 29-Oct-2010 John McCall <rjmccall@apple.com> Apply visibility in IR gen to variables that are merely declared
and never defined. We were previously emitting these with default
visibility unless they were declared with private_extern.

Ignore global visibility settings when computing visibility for
a declaration's context, and key several conditions on whether a
visibility attribute exists anywhere in the hierarchy as opposed
to whether it exists at the current level.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117644 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
739c0a674984a689279ea5d13e926da9c8a617d9 29-Oct-2010 Devang Patel <dpatel@apple.com> Basic types are language defined builtins. They are always defined at top most level.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117613 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
532105f0257ec73e9bf75a3036bac1b37b5a5643 29-Oct-2010 Devang Patel <dpatel@apple.com> Basic types are language defined builtins. They are always defined at top most level.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117613 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
3a38c2e815f35b7d1a1ff06f396e3a5ba697b3e6 28-Oct-2010 John McCall <rjmccall@apple.com> When emitting l-values for bool non-__block decl references, make a pointer
using the memory type; fixes an assert.

Fixes rdar://problem/8605032



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117610 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
46ec70e2e6541a067d33b2513505bec74582b53c 28-Oct-2010 John McCall <rjmccall@apple.com> When emitting l-values for bool non-__block decl references, make a pointer
using the memory type; fixes an assert.

Fixes rdar://problem/8605032



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117610 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
9f97fa6bfc62df9f85ddc83239248971317b46ba 28-Oct-2010 Devang Patel <dpatel@apple.com> Directly use NamespaceDecl->getLocation() to find the source file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117576 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
8c37668762d85ef83e59580bf188ded99179ecc4 28-Oct-2010 Devang Patel <dpatel@apple.com> Directly use NamespaceDecl->getLocation() to find the source file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117576 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
544595e52ce51bbca385864b2681590d518f2a28 28-Oct-2010 Devang Patel <dpatel@apple.com> Stay within 80 columns.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117561 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a2e57698e2af5fd5ff37fde0ea7bcab4761534f3 28-Oct-2010 Devang Patel <dpatel@apple.com> Stay within 80 columns.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117561 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ed022b71b0e1d96d924ad681fd591f65f669503e 28-Oct-2010 John McCall <rjmccall@apple.com> Implement an indirect-goto optimization for goto *&&lbl and respect this
in the scope checker. With that done, turn an indirect goto into a
protected scope into a hard error; otherwise IR generation has to start
worrying about declarations not dominating their scopes, as exemplified
in PR8473.

If this really affects anyone, I can probably adjust this to only hard-error
on possible indirect gotos into VLA scopes rather than arbitrary scopes.
But we'll see how people cope with the aggressive change on the marginal
feature.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117539 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
95c225de9fa3d79f70ef5008c0279580a7d9dcad 28-Oct-2010 John McCall <rjmccall@apple.com> Implement an indirect-goto optimization for goto *&&lbl and respect this
in the scope checker. With that done, turn an indirect goto into a
protected scope into a hard error; otherwise IR generation has to start
worrying about declarations not dominating their scopes, as exemplified
in PR8473.

If this really affects anyone, I can probably adjust this to only hard-error
on possible indirect gotos into VLA scopes rather than arbitrary scopes.
But we'll see how people cope with the aggressive change on the marginal
feature.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117539 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
55a9b0e035097549d95b46c79c79e1b6e35bc0ed 28-Oct-2010 Devang Patel <dpatel@apple.com> Fix context info for enums.
Radar 8595129


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117507 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4bc48877db95b2afd6207fdb54ce271169c994f9 28-Oct-2010 Devang Patel <dpatel@apple.com> Fix context info for enums.
Radar 8595129


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117507 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e5e84aedb480de50018baf1e4cee0d3245b6710b 27-Oct-2010 John McCall <rjmccall@apple.com> Restore r117403 (fixing IR gen for bool atomics), this time being less
aggressive about the form we expect bools to be in. I don't really have
time to fix all the sources right now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117486 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
odeGenFunction.h
26815d97c5743481e317f17a8d53a6819d061862 27-Oct-2010 John McCall <rjmccall@apple.com> Restore r117403 (fixing IR gen for bool atomics), this time being less
aggressive about the form we expect bools to be in. I don't really have
time to fix all the sources right now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117486 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
odeGenFunction.h
347e07aad9b6dfb83aa5cce3f7ca174d3fc38f8e 27-Oct-2010 Rafael Espindola <rafael.espindola@gmail.com> Revert r117403 as it caused PR8480.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117456 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
odeGenFunction.h
11893327d056a7ebd820da8f00a3286e7430a91c 27-Oct-2010 Rafael Espindola <rafael.espindola@gmail.com> Revert r117403 as it caused PR8480.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117456 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
odeGenFunction.h
f985399d7b473a615a0611c2fd59643de6e50a63 27-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Do the guarding of instantiated static data members
on if its linkage is weak. Currently this is the
case but may change in the future. (part of radar
8562966).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117452 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenModule.cpp
odeGenModule.h
354e712c81fbb07c0ce5f06180788b25fffa1b56 27-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Do the guarding of instantiated static data members
on if its linkage is weak. Currently this is the
case but may change in the future. (part of radar
8562966).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117452 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenModule.cpp
odeGenModule.h
a6d7c2c6a032849763d1c9c8644a5cbbc8a063bc 27-Oct-2010 Anders Carlsson <andersca@mac.com> Also devirtualize calls to a member functions where the containing class has been marked final.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117445 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
d66f42856539bf1c764c13fba41758228fc4cb9b 27-Oct-2010 Anders Carlsson <andersca@mac.com> Also devirtualize calls to a member functions where the containing class has been marked final.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117445 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
d055f0b54eea6fe4004a0b5e98ca33bb9645b1c1 27-Oct-2010 Anders Carlsson <andersca@mac.com> If a virtual member function has the 'final' attribute, we can devirtualize calls to it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117444 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
bd2bfae2a6e5dc264e1f13183ad2ac11095766bb 27-Oct-2010 Anders Carlsson <andersca@mac.com> If a virtual member function has the 'final' attribute, we can devirtualize calls to it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117444 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
8069c5b9c7efb2ddbdd312943f76bece98142a7e 27-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to provide guard when initializing instances
of static data member of a class template.
Fixes //rdar :// 8562966 and pr8409.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117410 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
taniumCXXABI.cpp
92d835a86ac334768d0b75936201e4fea3941c1f 27-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to provide guard when initializing instances
of static data member of a class template.
Fixes //rdar :// 8562966 and pr8409.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117410 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
taniumCXXABI.cpp
55d2bfe498289ff70041f8ca78c2c7231cae9e2d 27-Oct-2010 John McCall <rjmccall@apple.com> Extract procedures to do scalar-to-memory and memory-to-scalar conversions
in IR gen, and use those to fix a correctness issue with bool atomic
intrinsics. rdar://problem/8461234



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117403 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
odeGenFunction.h
789a1597250e57d7f35f253467165913c68979ad 27-Oct-2010 John McCall <rjmccall@apple.com> Extract procedures to do scalar-to-memory and memory-to-scalar conversions
in IR gen, and use those to fix a correctness issue with bool atomic
intrinsics. rdar://problem/8461234



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117403 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
odeGenFunction.h
d99541dac6bbbc637764353ce7849e6d022eed1a 26-Oct-2010 Dan Gohman <gohman@apple.com> Factor out the code for emitting code to load vtable pointer members
so that it's done in one place.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117386 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
GExprCXX.cpp
odeGenFunction.h
043fb9a1fc0609285f60f0f87e5a18195408f34c 26-Oct-2010 Dan Gohman <gohman@apple.com> Factor out the code for emitting code to load vtable pointer members
so that it's done in one place.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117386 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
GExprCXX.cpp
odeGenFunction.h
693022f6843425223596f4fc7979e6be12443258 26-Oct-2010 Dan Gohman <gohman@apple.com> Add infrastructure for emitting TBAA metadata with the "constant" flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117328 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
odeGenTBAA.h
455553b7e5d5233acf48967874c43b4a5d7e24d1 26-Oct-2010 Dan Gohman <gohman@apple.com> Add infrastructure for emitting TBAA metadata with the "constant" flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117328 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
odeGenTBAA.h
69995ac5a5a520c39697d7069157f8c4cd36a5ca 25-Oct-2010 Dan Gohman <gohman@apple.com> Trim an unnecessary #include.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117321 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
b31c289678a3fe0f062656015dbcd57272f60742 25-Oct-2010 Dan Gohman <gohman@apple.com> Trim an unnecessary #include.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117321 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
d3428029df5bc646ac5bf1af1be1f45a644b980b 25-Oct-2010 Dan Gohman <gohman@apple.com> Factor out the code for creating the Root and Char nodes, so that
they can be used outside of the main getTBAAInfo function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117320 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
odeGenTBAA.h
224d75972a836b06e2ca708d1eafdac6f762c487 25-Oct-2010 Dan Gohman <gohman@apple.com> Factor out the code for creating the Root and Char nodes, so that
they can be used outside of the main getTBAAInfo function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117320 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
odeGenTBAA.h
88c22ff0809f9d8b2f39f9799a1f92b02906699f 23-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> After discussion with Doug and John, I am reverting
the patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117159 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprCXX.cpp
GValue.h
8a97005f97a2a93fc2cd942c040668c5d4df7537 23-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> After discussion with Doug and John, I am reverting
the patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117159 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprCXX.cpp
GValue.h
82254439b368de855d1e66440071017a1f2d4f0a 22-Oct-2010 John McCall <rjmccall@apple.com> Substantially revise how clang computes the visibility of a declaration to
more closely parallel the computation of linkage. This gets us to a state
much closer to what gcc emits, modulo bugs, which will undoubtedly arise in
abundance.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117147 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GObjCMac.cpp
GRTTI.cpp
odeGenModule.cpp
odeGenModule.h
1fb0caaa7bef765b85972274e3b434af2572c141 22-Oct-2010 John McCall <rjmccall@apple.com> Substantially revise how clang computes the visibility of a declaration to
more closely parallel the computation of linkage. This gets us to a state
much closer to what gcc emits, modulo bugs, which will undoubtedly arise in
abundance.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117147 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GObjCMac.cpp
GRTTI.cpp
odeGenModule.cpp
odeGenModule.h
1c5c1abea842b958128f86c24f2850220534ec05 22-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Patch fixes miscompile with non-trivial copy constructors and
statement expressions, //rdar: //8540501


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117146 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprCXX.cpp
GValue.h
07ed93f378a8868c9a7c04ca7ae685b85c55e5ea 22-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Patch fixes miscompile with non-trivial copy constructors and
statement expressions, //rdar: //8540501


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117146 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprCXX.cpp
GValue.h
b6d2aa652e31d370e073e34fa4de98700a62a85c 22-Oct-2010 Devang Patel <dpatel@apple.com> Delay record type's debug info emission, in -flimit-debug-info mode, if member expression's base is call expr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117127 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
6802027338b8af1d54ba94d7ed9722f1b327b645 22-Oct-2010 Devang Patel <dpatel@apple.com> Delay record type's debug info emission, in -flimit-debug-info mode, if member expression's base is call expr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117127 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
636c845b60dea2b763415819d07097fc4034d0cb 22-Oct-2010 Devang Patel <dpatel@apple.com> Revert unintentional check-in.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117120 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
33133579550f97f33f05dad257b18b7961ff1ef1 22-Oct-2010 Devang Patel <dpatel@apple.com> Revert unintentional check-in.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117120 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b654e8edbc602712b8b45f80e7b7bee7ce1605b2 22-Oct-2010 Devang Patel <dpatel@apple.com> Tidy up MIPS_linkage name. Provide it only if it does not match regular name, otherwise it confuses debugger.
This is tested by local.C in llvmgcc testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117107 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
58faf20b459f33c33f752d6d9ee910e59e0ea1bb 22-Oct-2010 Devang Patel <dpatel@apple.com> Tidy up MIPS_linkage name. Provide it only if it does not match regular name, otherwise it confuses debugger.
This is tested by local.C in llvmgcc testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117107 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2dbeb0032513d78361e58e37cd3d7026841e75eb 22-Oct-2010 Benjamin Kramer <benny.kra@googlemail.com> More class anonymization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117106 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
GExprScalar.cpp
GRTTI.cpp
79ba2a6379f87fa137377c3f55ff993b9e5cc144 22-Oct-2010 Benjamin Kramer <benny.kra@googlemail.com> More class anonymization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117106 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
GExprScalar.cpp
GRTTI.cpp
09eae0ddd5905b6d96fb371b708c0a4a1e61f7bf 21-Oct-2010 Dan Gohman <gohman@apple.com> Rename clang's TBAA tree root from "experimental" to "simple".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117046 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
31da5456e614dc107085b1b2a5a377e9170f2971 21-Oct-2010 Dan Gohman <gohman@apple.com> Rename clang's TBAA tree root from "experimental" to "simple".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117046 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
1a38ec1306d3c9364ae3b96a1e3b12c29d36cf92 21-Oct-2010 Dan Gohman <gohman@apple.com> Add some more comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117043 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
odeGenTBAA.h
565cc44bea707ff3865fbeb731e4790dd9874786 21-Oct-2010 Dan Gohman <gohman@apple.com> Add some more comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117043 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
odeGenTBAA.h
82690692019a119902cc075c208dd5324fbe672a 19-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> This patch implements Next's IRGen for -fconstant-string-class=class-name.
PR6056, //rdar: //8564463



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116819 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
4c73307c74764ba99e1379677fe92af72f676531 19-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> This patch implements Next's IRGen for -fconstant-string-class=class-name.
PR6056, //rdar: //8564463



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116819 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
4ca41bfed562b33c5fb28cd705933699c73c32b3 19-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116798 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
odeGenFunction.h
odeGenTypes.h
argetInfo.cpp
9cac4942b920d4c5514e71949e3062ed626bfbdf 19-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116798 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
odeGenFunction.h
odeGenTypes.h
argetInfo.cpp
d8937c4b7479e4313c4d5ba4c1e368804726cdc3 19-Oct-2010 Bill Wendling <isanbard@gmail.com> We shouldn't keep track of MMX registers "needed" separately from the SSE
registers needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116772 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
99aaae87ae972ac2dd4cccd8b4886537aabaff43 19-Oct-2010 Bill Wendling <isanbard@gmail.com> We shouldn't keep track of MMX registers "needed" separately from the SSE
registers needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116772 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
df9c8c8a20cb254a54e8a1f52d4a8cd2dab56d31 18-Oct-2010 John McCall <rjmccall@apple.com> Fix some bugs in local class mangling brought up in PR8355.
Patch by Richard Smith!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116752 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
82b7d7bc723051d8db4e21883e9072fe3ad99305 18-Oct-2010 John McCall <rjmccall@apple.com> Fix some bugs in local class mangling brought up in PR8355.
Patch by Richard Smith!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116752 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
c04f9eab3bc5a9eabaaef2ef3d2fe89c2eff6b94 18-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> patch fixes class names missing from method names in debug information for
synthesized property. // rdar: //8498026


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116717 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1a4c93777982210306223e9f92bc30c27625208e 18-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> patch fixes class names missing from method names in debug information for
synthesized property. // rdar: //8498026


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116717 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5c54b0034a2510b0c5f5e2ba8f38c225a58614d6 18-Oct-2010 Bill Wendling <isanbard@gmail.com> Reapply r116684 with fixes. The test cases needed to be updated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116696 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
bb465d7d0489a6605bb1eb82dea87350066ac5e2 18-Oct-2010 Bill Wendling <isanbard@gmail.com> Reapply r116684 with fixes. The test cases needed to be updated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116696 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
efac864f2ca4c0998aab6696af2ee7146b5db330 17-Oct-2010 Bill Wendling <isanbard@gmail.com> Temporarily revert r116684. It was causing failures with

Clang :: CodeGen/x86_32-arguments-darwin.c
Clang :: CodeGen/x86_32-arguments-linux.c


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116687 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
b70fba451e5a92df6f77ca288caf80b0c5572593 17-Oct-2010 Bill Wendling <isanbard@gmail.com> Temporarily revert r116684. It was causing failures with

Clang :: CodeGen/x86_32-arguments-darwin.c
Clang :: CodeGen/x86_32-arguments-linux.c


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116687 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
54f3395cc289adf199cb103c95170a99bc04c2b9 17-Oct-2010 Bill Wendling <isanbard@gmail.com> The "gcc.dg/compat/vector-1 -m32" test was broken after the MMX rewrite. The
function parameters weren't converted to use the correct type (x86_mmx). Add a
check, similar to the one in llvm-gcc, to see if we need the x86_mmx type for
that function parameter. If so, it coerces the type to be that.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116684 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
51a9f5309a025f5c54e7dc373eb7d11daabee6df 17-Oct-2010 Bill Wendling <isanbard@gmail.com> The "gcc.dg/compat/vector-1 -m32" test was broken after the MMX rewrite. The
function parameters weren't converted to use the correct type (x86_mmx). Add a
check, similar to the one in llvm-gcc, to see if we need the x86_mmx type for
that function parameter. If so, it coerces the type to be that.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116684 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
c0eb7c0a149215d61716cdb6a03346c380e84fb4 16-Oct-2010 John McCall <rjmccall@apple.com> Coding by inspection has its problems.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116672 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
fd186ac63b427ed65bf5972ef225961afe7893ff 16-Oct-2010 John McCall <rjmccall@apple.com> Coding by inspection has its problems.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116672 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a17bcc6d3350d60cd3a0631bed6475b9975f8fa5 16-Oct-2010 John McCall <rjmccall@apple.com> objc_exception_rethrow does not take an exception argument.
rdar://problem/8535238



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116663 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7ec404c40e42ce274d956a289ffa91e8f4befc43 16-Oct-2010 John McCall <rjmccall@apple.com> objc_exception_rethrow does not take an exception argument.
rdar://problem/8535238



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116663 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
55d1e28842f711f70c2180aaf45e14b6296f19b8 16-Oct-2010 Daniel Dunbar <daniel@zuster.org> Revert r116656, "IRgen/Obj-C/NeXT: Fix the IR signature for
objc_exception_rethrow, so we don't...", since something is actually trying to
call this with the wrong signature (!). Unfortunately I don't understand the new
EH infrastructure well enough to fix it immediately.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116660 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b10ce9f4fcff51bebc9efaeda2fa15b6478c6aec 16-Oct-2010 Daniel Dunbar <daniel@zuster.org> Revert r116656, "IRgen/Obj-C/NeXT: Fix the IR signature for
objc_exception_rethrow, so we don't...", since something is actually trying to
call this with the wrong signature (!). Unfortunately I don't understand the new
EH infrastructure well enough to fix it immediately.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116660 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ebbb550fdfa78db24750a4787f34c7d8f49ec7df 16-Oct-2010 Daniel Dunbar <daniel@zuster.org> IRgen/Obj-C/NeXT: Fix the IR signature for objc_exception_rethrow, so we don't
generate unnecessary %al clear on x86_64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116656 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
338ebcc57e116c2ca8c968d202ec81681a835748 16-Oct-2010 Daniel Dunbar <daniel@zuster.org> IRgen/Obj-C/NeXT: Fix the IR signature for objc_exception_rethrow, so we don't
generate unnecessary %al clear on x86_64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116656 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
8684c6f2974cb9ce6aff4984d49ee96ccfce96d2 15-Oct-2010 Dan Gohman <gohman@apple.com> Mention the paragraphs in the standards which sanction TBAA.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116617 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
780658af93b996bb58f333905d458b6462262afb 15-Oct-2010 Dan Gohman <gohman@apple.com> Mention the paragraphs in the standards which sanction TBAA.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116617 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
d9e8769c796739b63659b91f9b880235703fec43 15-Oct-2010 Dan Gohman <gohman@apple.com> Use a different name for pointer types in tbaa, to be a little
more consistent with other names, and to look less like a magic name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116616 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
dc491118b3ad2b35f047df611107b8a069176ce5 15-Oct-2010 Dan Gohman <gohman@apple.com> Use a different name for pointer types in tbaa, to be a little
more consistent with other names, and to look less like a magic name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116616 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
c44bc846c8fcfb382430a17755589ddcba0fd0a9 15-Oct-2010 Dan Gohman <gohman@apple.com> Add a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116615 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
2f8c21d880e64fa13372ce978009b65a49f0040f 15-Oct-2010 Dan Gohman <gohman@apple.com> Add a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116615 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
16669299dfb8338e9892416004c2232d135e5be4 15-Oct-2010 Dan Gohman <gohman@apple.com> Fix a typo in a comment Frits van Bommel spotted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116614 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
0a53198149d26a908bd89ca945ee3f12b4acc949 15-Oct-2010 Dan Gohman <gohman@apple.com> Fix a typo in a comment Frits van Bommel spotted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116614 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
855fd3aaa7e60fc34146cd021add0030e2e6f875 15-Oct-2010 Dan Gohman <gohman@apple.com> Experimental TBAA support for enum types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116613 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenTBAA.cpp
odeGenTBAA.h
0b5c4fc2ae3b503c2b1f354bf52b718aa50a6aee 15-Oct-2010 Dan Gohman <gohman@apple.com> Experimental TBAA support for enum types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116613 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenTBAA.cpp
odeGenTBAA.h
ad8eb5e25ff6b06c802007c690b5d0801dc4e523 15-Oct-2010 Dan Gohman <gohman@apple.com> Don't leak the TBAA object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116595 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4376c85fb0ac9e7fd779d246efc77e1169179138 15-Oct-2010 Dan Gohman <gohman@apple.com> Don't leak the TBAA object.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116595 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d1387d67ac89fa71d15740e147e23a7d280fb6fc 15-Oct-2010 Dan Gohman <gohman@apple.com> Add a comment about odd "signed char" incompatibility between C++ and C.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116593 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
8562348b3d0de524342c1e36ff3cd83f7490bba2 15-Oct-2010 Dan Gohman <gohman@apple.com> Add a comment about odd "signed char" incompatibility between C++ and C.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116593 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
68790944c3bb21baf8d3d28c9d4da5027f1bd229 15-Oct-2010 John McCall <rjmccall@apple.com> Death to blocks, or at least the word "block" in one particular obnoxiously
ambiguous context.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116567 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDecl.cpp
GException.cpp
GExpr.cpp
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.h
b6bbcc9995186799a60ce17d0c1acff31601653a 15-Oct-2010 John McCall <rjmccall@apple.com> Death to blocks, or at least the word "block" in one particular obnoxiously
ambiguous context.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116567 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDecl.cpp
GException.cpp
GExpr.cpp
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.h
a85fb0ae1d18907edb643cbd35de573b42b46827 15-Oct-2010 Daniel Dunbar <daniel@zuster.org> Update CMake.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116548 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
5259e7e7413d91ee5692652f1d2f7b1404f46dc0 15-Oct-2010 Daniel Dunbar <daniel@zuster.org> Update CMake.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116548 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
fdc636cb493ce251c02169a1462ef36fbe878f73 15-Oct-2010 Dan Gohman <gohman@apple.com> Add a TBAA type for pointer types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116544 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
c1028f45ea061455b144ab42d0311aba5838c29c 15-Oct-2010 Dan Gohman <gohman@apple.com> Add a TBAA type for pointer types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116544 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
2fc306d02c188ed39d447983e42b2e98518795fa 15-Oct-2010 Dan Gohman <gohman@apple.com> Unsigned types are TBAA-compatible with their signed counterparts.
Also, handle unknown types conservatively.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116541 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
9af2f83863eb27840a4eb17abefec906c078d8ea 15-Oct-2010 Dan Gohman <gohman@apple.com> Unsigned types are TBAA-compatible with their signed counterparts.
Also, handle unknown types conservatively.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116541 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTBAA.cpp
45a57c5e67931bd85031afa8fb1fa165c7c17456 15-Oct-2010 Dan Gohman <gohman@apple.com> Experimental TBAA support.

This enables metadata generation by default, however the TBAA pass
in the optimizer is still disabled for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116536 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTBAA.cpp
odeGenTBAA.h
3d5aff5d3036b0ff09d114857cd2276134b3d8c9 15-Oct-2010 Dan Gohman <gohman@apple.com> Experimental TBAA support.

This enables metadata generation by default, however the TBAA pass
in the optimizer is still disabled for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116536 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTBAA.cpp
odeGenTBAA.h
b175c396c392c0a452d462716facc6ec84462849 15-Oct-2010 Devang Patel <dpatel@apple.com> Use root non-virtual primary base class, not just immediate primary base class, for AT_containing_type.
This is tested by virtfunc.exp in gdb testsuite.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116535 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5bc794ff3034bad2b231b0841ea6d0a711c4af59 15-Oct-2010 Devang Patel <dpatel@apple.com> Use root non-virtual primary base class, not just immediate primary base class, for AT_containing_type.
This is tested by virtfunc.exp in gdb testsuite.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116535 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7241e85cb216e6d122511c74cd96d98d0fd77e30 14-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Eliminate usage of ObjCSuperExpr used for
'super' as receiver of property or a setter/getter
methods. //rdar: //8525788



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116483 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
GObjC.cpp
odeGenFunction.h
angle.cpp
8ac2d449820fd0df00fcbde5bf82165c1f49854d 14-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Eliminate usage of ObjCSuperExpr used for
'super' as receiver of property or a setter/getter
methods. //rdar: //8525788



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116483 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
GObjC.cpp
odeGenFunction.h
angle.cpp
abe76dffabf085b98d394f7fa3d574f9a8932c37 13-Oct-2010 Devang Patel <dpatel@apple.com> Fix debug info for anon union.
This is tested by anon-union.exp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116372 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
cebbedd237d4560099de3b5b7f7c03a1689b700e 13-Oct-2010 Devang Patel <dpatel@apple.com> Fix debug info for anon union.
This is tested by anon-union.exp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116372 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
884791011433093bf02059f2f21d4b9f27993aa7 12-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a typo which caused byte offset in debug info
for ivars to be 0. Fixes pr8353.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116273 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
fe8fdba52d89ea72aba6efbb6346394277224db4 12-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a typo which caused byte offset in debug info
for ivars to be 0. Fixes pr8353.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116273 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
6da889b97606718f7a9a6bc428e01b4b0750eba8 11-Oct-2010 Devang Patel <dpatel@apple.com> Fix debug info for functions whose context is a namespace.
This is tested by namespace.exp in gdb testsuite.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116248 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0692f838794fc8d2d5692dd31209af891c40ebf1 11-Oct-2010 Devang Patel <dpatel@apple.com> Fix debug info for functions whose context is a namespace.
This is tested by namespace.exp in gdb testsuite.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116248 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2473b4b5e19eb58080b3986062ef941b97c33039 11-Oct-2010 Chris Lattner <sabre@nondot.org> Per discussion with Sanjiv, remove the PIC16 target from mainline. When/if
it comes back, it will be largely a rewrite, so keeping the old codebase
in tree isn't helping anyone.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116191 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
757e685512b8616c9de918b3d3fad8247562dce2 11-Oct-2010 Chris Lattner <sabre@nondot.org> Per discussion with Sanjiv, remove the PIC16 target from mainline. When/if
it comes back, it will be largely a rewrite, so keeping the old codebase
in tree isn't helping anyone.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116191 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
0675018d2f10f24ce82369e7f86976a4c05ccb69 11-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Make sure the VTables for template instantiations are emitted even if the key function doesn't have a body.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116186 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
GVTables.cpp
GVTables.h
e1c39e5bad15af52e1c1c22414760c8490c51f39 11-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Don't let typeinfo name symbols be 'internal hidden', it can lead to linker conflicts
with similarly named classes in anonymous namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116185 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
6d576051b9ca56fe962077fb194ed2917539989a 11-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't let typeinfo name symbols be 'internal hidden', it can lead to linker conflicts
with similarly named classes in anonymous namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116185 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
b9309daf749dec7f9c7ae62e28f80feb3c964516 11-Oct-2010 NAKAMURA Takumi <geek4civic@gmail.com> lib/CodeGen/CodeGenModule.cpp: DLLImportLinkage should be processed also on declaration.

It enables clang to compile Mingw's headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116184 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2c6899fa1a748fe211280de3dfb478be56a9be6a 11-Oct-2010 NAKAMURA Takumi <geek4civic@gmail.com> lib/CodeGen/CodeGenModule.cpp: DLLImportLinkage should be processed also on declaration.

It enables clang to compile Mingw's headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116184 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
925c6166e2143d20d683ba814fde37b0969a37db 10-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Implement __builtin_ia32_vec_ext_v2si function (required by Qt).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116162 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
1944ec188408aff1931c62c79a069e30f2549ec2 10-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement __builtin_ia32_vec_ext_v2si function (required by Qt).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116162 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
b592b45285eda571c9ec03aada1c7784ee079f65 09-Oct-2010 Bill Wendling <isanbard@gmail.com> Add target implementations for the X86 builtins:

__builtin_ia32_vec_init_v8qi
__builtin_ia32_vec_init_v4hi
__builtin_ia32_vec_init_v2si

They are lowered to bitcasts. (These are all ready tested by the gcc testsuite.)
<rdar://problem/8529957>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116147 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
aa51e513850688b7963efc62abf1eface7037602 09-Oct-2010 Bill Wendling <isanbard@gmail.com> Add target implementations for the X86 builtins:

__builtin_ia32_vec_init_v8qi
__builtin_ia32_vec_init_v4hi
__builtin_ia32_vec_init_v2si

They are lowered to bitcasts. (These are all ready tested by the gcc testsuite.)
<rdar://problem/8529957>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116147 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
b6d627c62b09f33f7d390132b662cbf5828b90d7 09-Oct-2010 John McCall <rjmccall@apple.com> Permit constant evaluation of const floating-point variables with
constant initializers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116138 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
189d6ef40eff11b83b2cda941d5ed89a5cef09b2 09-Oct-2010 John McCall <rjmccall@apple.com> Permit constant evaluation of const floating-point variables with
constant initializers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116138 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
df8e391abb083ea901108528cbd505980dccf695 09-Oct-2010 Douglas Gregor <doug.gregor@gmail.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
GExpr.cpp
odeGenTypes.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
GExpr.cpp
odeGenTypes.cpp
200a8e54d6b2f50ffd4aa852787ec2e1a3eea7ee 08-Oct-2010 Douglas Gregor <doug.gregor@gmail.com> Revert the hack Chris Lattner added in r97981 to work around
brokenness in the designated-initializer ASTs. The ASTs were fixed by
Alp Toker's patch (r116098) for PR6955. Fixes PR6537.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116101 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
c56bb5df5e917236e45edf1f96cf8c34cbaf97dd 08-Oct-2010 Douglas Gregor <dgregor@apple.com> Revert the hack Chris Lattner added in r97981 to work around
brokenness in the designated-initializer ASTs. The ASTs were fixed by
Alp Toker's patch (r116098) for PR6955. Fixes PR6537.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116101 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
fcf91391f95c7cf9278241c29b69ce37770bdca9 08-Oct-2010 Devang Patel <dpatel@apple.com> Tighter check in r116060 blcoked enums also. Emit enum const's debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116071 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
cedbf43c90d8850106ec3d0da5dca65267137a0b 08-Oct-2010 Devang Patel <dpatel@apple.com> Tighter check in r116060 blcoked enums also. Emit enum const's debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116071 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
f72d7a7c5d81a63b54c2f0470d82132926f52750 08-Oct-2010 Devang Patel <dpatel@apple.com> Do not repeat debug info for file variable constants.
This is tested by file-statics.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116060 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
67c32268c0891b539fe9da26d10579e2ebfc9b38 08-Oct-2010 Devang Patel <dpatel@apple.com> Do not repeat debug info for file variable constants.
This is tested by file-statics.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116060 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
c96d6bdc0d94dcef24e3a5eeed96366785a2c7b8 08-Oct-2010 Devang Patel <dpatel@apple.com> Identify functions with prototype appropriately in debug info.
This is tested by callfuncs.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115989 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3951e7106c849db72301a1ef05f99511e4818ef0 08-Oct-2010 Devang Patel <dpatel@apple.com> Identify functions with prototype appropriately in debug info.
This is tested by callfuncs.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115989 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b0406ccde76ee9b4f8601a693f4cd49388873a73 06-Oct-2010 Stephen Hines <srhines@google.com> Add LOCAL_MODULE_TAGS to clang Android.mk files.

Change-Id: Iba0dd9023388948d2c3fcb3522cea5d5d9a264a7
ndroid.mk
d8bafb4384f8f26f46b5b9cdf6f5f6ba2cd110a8 06-Oct-2010 Devang Patel <dpatel@apple.com> Mark FunctionNoProtoType's argument as unspecified parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115834 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
af164bbd5acc20c6f20ff4cf11b654c342d31eaa 06-Oct-2010 Devang Patel <dpatel@apple.com> Mark FunctionNoProtoType's argument as unspecified parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115834 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ad42400912b31faf1eabac55a00af47fe3ca49a1 06-Oct-2010 John McCall <rjmccall@apple.com> Re-enable EH cleanups to destroy __block variables, now that we have a moment to
deal with the consequences. Fixes rdar://problem/8224178.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115816 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
34fdee3771efcfc02333d0d99f29d01a7d2e2d27 06-Oct-2010 John McCall <rjmccall@apple.com> Re-enable EH cleanups to destroy __block variables, now that we have a moment to
deal with the consequences. Fixes rdar://problem/8224178.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115816 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
c5fa7b62dde9b3d8ea351f5289fd3e8c2e704d36 06-Oct-2010 Devang Patel <dpatel@apple.com> Do not emit subrange for incomplete array type.
This is tested by ptype.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115805 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
cdf523ca1fc81c18fccb4757714f7cd27288a580 06-Oct-2010 Devang Patel <dpatel@apple.com> Do not emit subrange for incomplete array type.
This is tested by ptype.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115805 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7832a40d68a06212b7d5ebe34903ac4863fb38a0 06-Oct-2010 Devang Patel <dpatel@apple.com> Remove unused argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115789 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
odeGenFunction.cpp
d2829b76a87a70791184b3cac89900d2cda46ce4 06-Oct-2010 Devang Patel <dpatel@apple.com> Remove unused argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115789 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
odeGenFunction.cpp
8cb9c1cc5e93baa80f9f2e376200545ac16180eb 05-Oct-2010 John McCall <rjmccall@apple.com> Teach PopCleanupBlock to correctly handle the possibility of branching through
a EH-only cleanup as part of a fallthrough branch-through. That this happens
for this test case is actually a separate bug.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115668 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
e71d60d2c948bef21443c3370a9922a2f58bcc3a 05-Oct-2010 John McCall <rjmccall@apple.com> Teach PopCleanupBlock to correctly handle the possibility of branching through
a EH-only cleanup as part of a fallthrough branch-through. That this happens
for this test case is actually a separate bug.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115668 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
4cd26dc79e4d7f9b0914235b2f8e324b457de3bd 05-Oct-2010 John McCall <rjmccall@apple.com> If we're resolving all outstanding fixups, and there are multiple fixups
for the same destination, then we must potentially rewrite the initial branch
of every fixup. Without this patch, a short-circuit check meant to prevent
a switch case from being redundantly added was preventing later fixups from
being processed. Fixes PR8175 (again).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115586 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
0680e97465a5d0ef78fd71ea7b806d9df239b3ca 05-Oct-2010 John McCall <rjmccall@apple.com> If we're resolving all outstanding fixups, and there are multiple fixups
for the same destination, then we must potentially rewrite the initial branch
of every fixup. Without this patch, a short-circuit check meant to prevent
a switch case from being redundantly added was preventing later fixups from
being processed. Fixes PR8175 (again).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115586 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
1f1362771b315715692795bde123bc870d239e9d 05-Oct-2010 John McCall <rjmccall@apple.com> In the fragile ObjC ABI, save the caught exception to the side if there are
both @catches and a @finally, because the second call to @objc_exception_try_enter
will clobber the exception slot. Fixes rdar://problem/8440970.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115575 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9e2213ddd5b3510fa48e3175e9d098db4224cc30 05-Oct-2010 John McCall <rjmccall@apple.com> In the fragile ObjC ABI, save the caught exception to the side if there are
both @catches and a @finally, because the second call to @objc_exception_try_enter
will clobber the exception slot. Fixes rdar://problem/8440970.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115575 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c8435c4387bc9a4cad661d8d3e2811fc3c1aa59a 05-Oct-2010 Devang Patel <dpatel@apple.com> dyn_cast is more appropriate here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115569 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
49c8465f14fc3b2e1a32c7016ad3fb4e2cf8d466 05-Oct-2010 Devang Patel <dpatel@apple.com> dyn_cast is more appropriate here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115569 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
09b3cf2bd12c59e390981a76499db88ec9a56e74 05-Oct-2010 Devang Patel <dpatel@apple.com> Add missing '}' :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115568 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
7fa8ab2e77f5703d0adf14e4d98f1edc1e66505d 05-Oct-2010 Devang Patel <dpatel@apple.com> Add missing '}' :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115568 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
dcc40ab9e844bdd91cb3f2f49e9ad01d70cc3274 04-Oct-2010 Devang Patel <dpatel@apple.com> Emit debug info for an aggregate while processing MemberExpr if the aggregate's debug info was delayed untill now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115564 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
78ba3d46388f17b4fc5e63ed23b746dd4dea9547 04-Oct-2010 Devang Patel <dpatel@apple.com> Emit debug info for an aggregate while processing MemberExpr if the aggregate's debug info was delayed untill now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115564 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
bd9c2d3e95b96bd66c833cd61af1d96d6558c249 04-Oct-2010 Devang Patel <dpatel@apple.com> Fix filename in header comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115561 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
daaf1de7c5f975b77798c551aaefeb36349e5ca7 04-Oct-2010 Devang Patel <dpatel@apple.com> Fix filename in header comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115561 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
2b44ccfa46e148a73057dc6373d201100f8558f5 02-Oct-2010 Chris Lattner <sabre@nondot.org> when expanding a builtin, if the argument is required to be a constant,
force it to be a constant instead of emitting with EmitScalarExpr. In
-ftrapv mode, they are not the same.

This fixes rdar://8478728 + PR8221


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115388 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
46c5591f0fa2e35367e44234e59bb041d15b778e 02-Oct-2010 Chris Lattner <sabre@nondot.org> when expanding a builtin, if the argument is required to be a constant,
force it to be a constant instead of emitting with EmitScalarExpr. In
-ftrapv mode, they are not the same.

This fixes rdar://8478728 + PR8221


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115388 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
760ade451000d962baa3b8b21f9725289845d361 02-Oct-2010 Chris Lattner <sabre@nondot.org> tidy


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115383 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
a1aa9e36e6e21f74c56cf9e72cb5bd9aa2a92fd4 02-Oct-2010 Chris Lattner <sabre@nondot.org> tidy


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115383 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
18e06c0b3627951b9cbbc7e46529448d8f308898 02-Oct-2010 Devang Patel <dpatel@apple.com> Mark explict methods as explict in debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115379 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d78a01906d2a1edb572a99c11f0901beddbcd8c0 02-Oct-2010 Devang Patel <dpatel@apple.com> Mark explict methods as explict in debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115379 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ebe93c5cb3077368de03227b634e5649ce282b33 01-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Output debug info. for ivars declared in class
extension and implementation.
Fixes rdar://8493239.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115248 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9747739d0dd3077763100c28a134cc1f332df3d4 01-Oct-2010 Fariborz Jahanian <fjahanian@apple.com> Output debug info. for ivars declared in class
extension and implementation.
Fixes rdar://8493239.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115248 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
20bbddf97ff0fbaa171310567b9bee78155d50f9 30-Sep-2010 Devang Patel <dpatel@apple.com> Introduce -flimit-debug-info.
In this experimental mode try avoiding debug info emission for classes as much as possible. The goal is to reduce size of produced debuginfo without reducing quality of debug info in general. This is a work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115188 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GExprCXX.cpp
c69e1cf04323f2e786d40e8a5ba84e77ee1c6827 30-Sep-2010 Devang Patel <dpatel@apple.com> Introduce -flimit-debug-info.
In this experimental mode try avoiding debug info emission for classes as much as possible. The goal is to reduce size of produced debuginfo without reducing quality of debug info in general. This is a work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115188 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GExprCXX.cpp
5cbf5e2f7194361962169a23cf2ac994d6fbce50 30-Sep-2010 Devang Patel <dpatel@apple.com> Attach aritifical attribute with implicit parameters.
Radar 8493141.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115104 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
aca745b8b2eb58dc149ea7e65dfe133df2b0ab93 30-Sep-2010 Devang Patel <dpatel@apple.com> Attach aritifical attribute with implicit parameters.
Radar 8493141.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115104 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
92ea74d0a8ba82233cb19b9cf56ae8dd7a455549 29-Sep-2010 Devang Patel <dpatel@apple.com> Emit method access specifier.
Radar 8490416.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115090 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
10a7a6a7ec20179b51544f093aee816a1a41793e 29-Sep-2010 Devang Patel <dpatel@apple.com> Emit method access specifier.
Radar 8490416.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115090 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5dacc9de5923e2527a5269188c5fd22e96ee7a83 29-Sep-2010 Devang Patel <dpatel@apple.com> Update to reflect DIFactory::CreateSubprogram() interface change from r115084.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115085 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e24724893a2f9cb1d660b2e1d5b7b8b899aedb3d 29-Sep-2010 Devang Patel <dpatel@apple.com> Update to reflect DIFactory::CreateSubprogram() interface change from r115084.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115085 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
24762958c1833d66c78da2ac83a1c82d7d2c09cb 29-Sep-2010 Devang Patel <dpatel@apple.com> Remove dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115079 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
43228a4f6723856c22c610d70a8d46006ce65902 29-Sep-2010 Devang Patel <dpatel@apple.com> Remove dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115079 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
27933bf89fd147c770a03315b7ceeceaf6e5b76f 29-Sep-2010 Daniel Dunbar <daniel@zuster.org> Add support for attribute((naked)), patch by Zoxc on cfe-commits!
- Minor style tweaks by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115056 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
dd0cb22bd62e1e835327f478a2dbf0b8fa439713 29-Sep-2010 Daniel Dunbar <daniel@zuster.org> Add support for attribute((naked)), patch by Zoxc on cfe-commits!
- Minor style tweaks by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115056 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a0ce776ed336b64ae51e6df09c767e57dd20a856 28-Sep-2010 Bill Wendling <isanbard@gmail.com> Accidentally committed some temporary changes on my branch when reverting patches.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114936 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
28cab383fd9e7647d2186340eca769303cc4fbdb 28-Sep-2010 Bill Wendling <isanbard@gmail.com> Accidentally committed some temporary changes on my branch when reverting patches.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114936 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
99c210e3c34130c08b1ce86ffc2b594a087cb354 28-Sep-2010 Bill Wendling <isanbard@gmail.com> Temporarily revert 114929 114925 114924 114921. It looked like they (or at least
one of them) was causing a series of failures:

http://google1.osuosl.org:8011/builders/clang-x86_64-darwin10-selfhost/builds/4518

svn merge -c -114929 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114929 into '.':
U include/clang/Sema/Sema.h
U include/clang/AST/DeclCXX.h
U lib/Sema/SemaDeclCXX.cpp
U lib/Sema/SemaTemplateInstantiateDecl.cpp
U lib/Sema/SemaDecl.cpp
U lib/Sema/SemaTemplateInstantiate.cpp
U lib/AST/DeclCXX.cpp
svn merge -c -114925 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114925 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/AST/DeclCXX.cpp
svn merge -c -114924 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114924 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/Sema/SemaDecl.cpp
G lib/AST/DeclCXX.cpp
U lib/AST/ASTContext.cpp
svn merge -c -114921 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114921 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/Sema/SemaDecl.cpp
G lib/AST/DeclCXX.cpp



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114933 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
2a674e8e443b7a3e77957078248fb52b3b1ec321 28-Sep-2010 Bill Wendling <isanbard@gmail.com> Temporarily revert 114929 114925 114924 114921. It looked like they (or at least
one of them) was causing a series of failures:

http://google1.osuosl.org:8011/builders/clang-x86_64-darwin10-selfhost/builds/4518

svn merge -c -114929 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114929 into '.':
U include/clang/Sema/Sema.h
U include/clang/AST/DeclCXX.h
U lib/Sema/SemaDeclCXX.cpp
U lib/Sema/SemaTemplateInstantiateDecl.cpp
U lib/Sema/SemaDecl.cpp
U lib/Sema/SemaTemplateInstantiate.cpp
U lib/AST/DeclCXX.cpp
svn merge -c -114925 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114925 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/AST/DeclCXX.cpp
svn merge -c -114924 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114924 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/Sema/SemaDecl.cpp
G lib/AST/DeclCXX.cpp
U lib/AST/ASTContext.cpp
svn merge -c -114921 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114921 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/Sema/SemaDecl.cpp
G lib/AST/DeclCXX.cpp



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114933 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
d01c4c7e227fce7200b84349859b8c50ee0a35bb 28-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Kill FunctionDecl's IsCopyAssignment bit; it duplicated what could
already be determined by isCopyAssignmentOperator(), and was set too
late in the process for all clients to see the appropriate
value. Cleanup only; no functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114916 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
odeGenModule.cpp
3e9438b5251a547253d64169863c2909b9b2772a 28-Sep-2010 Douglas Gregor <dgregor@apple.com> Kill FunctionDecl's IsCopyAssignment bit; it duplicated what could
already be determined by isCopyAssignmentOperator(), and was set too
late in the process for all clients to see the appropriate
value. Cleanup only; no functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114916 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
odeGenModule.cpp
65cd57b69ac24d9fc8a33181500d01dff8d2ceb2 27-Sep-2010 Bill Wendling <isanbard@gmail.com> Revert my patch changing the MMX "shift" intrinsics that take immediates into
"shift with non-immediate" intrinsics. It gets here because we they aren't
immediates anymore.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114890 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
df4d4825050f8b0eedcfc70c461a21160e48d993 27-Sep-2010 Bill Wendling <isanbard@gmail.com> Revert my patch changing the MMX "shift" intrinsics that take immediates into
"shift with non-immediate" intrinsics. It gets here because we they aren't
immediates anymore.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114890 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
0f881c3735a8f5962943d799105adb63a873a2c2 24-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Patch implements passing arrays to functions expecting
vla. Implements pr7827.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114737 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
745da3a5bb4ea35f93f50301e7fbbb7d78d3b6bb 24-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Patch implements passing arrays to functions expecting
vla. Implements pr7827.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114737 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
b6ab7e97e8e8e2fc379a33d8342f3965c551427e 23-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/ABI/ARM: Return large vectors in memory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114619 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
f554b1cc3083d9ed1fb9b52a305025f744e90d08 23-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/ABI/ARM: Return large vectors in memory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114619 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
92bf452c2c1174e0531a82baf9c1b95721506c70 23-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/ABI/ARM: Trust the backend to pass vectors correctly for the given ABI.
- Therefore, we can lower out the NEON wrapper structs and pass the vectors
directly. This makes a huge difference in the cleanliness of the IR after
optimization.
- I will trust, but verify, via future ABITest testing (for APCS-GNU, at
least).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114618 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
8aa87c71d9bfec14e135c683b0d7b9de999dbcb0 23-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/ABI/ARM: Trust the backend to pass vectors correctly for the given ABI.
- Therefore, we can lower out the NEON wrapper structs and pass the vectors
directly. This makes a huge difference in the cleanliness of the IR after
optimization.
- I will trust, but verify, via future ABITest testing (for APCS-GNU, at
least).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114618 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
9b628bb3b176d39861c4bc09aa34da0b431728c1 22-Sep-2010 Chris Lattner <sabre@nondot.org> fix the rest of rdar://8461279 - clang miscompiles address-space qualified atomics


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114503 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
4f209445c06a43283c6f72dda7c925538b1578e9 22-Sep-2010 Chris Lattner <sabre@nondot.org> fix the rest of rdar://8461279 - clang miscompiles address-space qualified atomics


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114503 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
70add13b64bc2f1c91ced9e51c96f31106dd263e 22-Sep-2010 Chris Lattner <sabre@nondot.org> same bug as before, this time with __sync_val_compare_and_swap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114502 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
780a2eb227c3f395a390a143f61bba1724913817 22-Sep-2010 Chris Lattner <sabre@nondot.org> same bug as before, this time with __sync_val_compare_and_swap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114502 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
bef62c2ce5905da2fcff1a3b0ef0c1d213563c48 22-Sep-2010 Chris Lattner <sabre@nondot.org> fix __sync_bool_compare_and_swap to work with address-space qualified types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114498 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
f2b95277be59f7d2a82cef8ea9f4cf6a36074593 22-Sep-2010 Chris Lattner <sabre@nondot.org> fix __sync_bool_compare_and_swap to work with address-space qualified types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114498 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
69712e34c88c29de0080a79cde8d4e76dfaf17f4 22-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes an IRgen ICE due to cast of null pointer to
a vla type (fixes pr7827).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114495 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
f4435703872acb6eb0ff01b52414584e08d9ee35 22-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes an IRgen ICE due to cast of null pointer to
a vla type (fixes pr7827).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114495 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
8cfea1c40502466615be25fc4cc74011b69199b1 21-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> IRgen for gnu extension's conditional lvalue expression
with missing LHS. radar 8453812. Executable test is checked
into llvm test suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114457 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
0b78710636671eeb2c5c4dedffa4ad1d58fa4bb8 21-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> IRgen for gnu extension's conditional lvalue expression
with missing LHS. radar 8453812. Executable test is checked
into llvm test suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114457 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
e0ef1bbc04a7caa0ab0c792012ad38f654eaad30 21-Sep-2010 Benjamin Kramer <benny.kra@googlemail.com> Adjust for debug info API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114438 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3475cfeebe00908af47396d5a055237a0ad7cb8d 21-Sep-2010 Benjamin Kramer <benny.kra@googlemail.com> Adjust for debug info API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114438 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7750590d45953514b2a9546abf2208630fee70a1 21-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Implements in IRgen gnu extensions missing LHS for
complex conditionals. Radar 8453812.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114376 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
odeGenFunction.h
aa3b57ee9e36a805371e2a543383225cdd2a5d83 21-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Implements in IRgen gnu extensions missing LHS for
complex conditionals. Radar 8453812.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114376 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
odeGenFunction.h
0e23bda3536664f90b13194f48e5d16910e713f8 21-Sep-2010 Nate Begeman <natebegeman@mac.com> Check in support for OpenCL conditional operator on vector types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114371 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
6155d73ad1668be5335b1a060f6c49c03d4dca05 21-Sep-2010 Nate Begeman <natebegeman@mac.com> Check in support for OpenCL conditional operator on vector types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114371 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
0981445cf2f9511b58c241729b3dd2da593679a5 18-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes IRgen bug in objc++ reference binding of a
getter expression.
Fixes // rdar://8437240


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114299 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
dc5ea09c4d0a23b1cd28f763869ef2bcb5dc119a 18-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes IRgen bug in objc++ reference binding of a
getter expression.
Fixes // rdar://8437240


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114299 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
d598aeeb5a980dff0cb69a0c664cfa87738bf751 18-Sep-2010 Gabor Greif <ggreif@gmail.com> do not rely on the implicit-dereference semantics of dyn_cast_or_null

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114281 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
38c9b1765c56406e97510889b465b7885ccb59f3 18-Sep-2010 Gabor Greif <ggreif@gmail.com> do not rely on the implicit-dereference semantics of dyn_cast_or_null

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114281 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a2f8a2f9ddb6714f98f39ac26927ca7798bd1bcb 18-Sep-2010 John McCall <rjmccall@apple.com> Adjust a fixup's starting branch if it's being resolved because
it reached the outermost scope and it hasn't yet been forwarded
to a cleanup. Fixed PR8175.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114259 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
8abdbd8118e37e759d1ce3f5814ee0a24b1589e8 18-Sep-2010 John McCall <rjmccall@apple.com> Adjust a fixup's starting branch if it's being resolved because
it reached the outermost scope and it hasn't yet been forwarded
to a cleanup. Fixed PR8175.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114259 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
f3795b338ddcd51721955e29ae3e2efd7f00c4c4 18-Sep-2010 John Thompson <john.thompson.jtsoftware@gmail.com> Added '|' delimiter to separate inline asm multiple alternative constraints for Clang side of support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114253 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
2f474ea9ef7505df5d092287c48c19974222293b 18-Sep-2010 John Thompson <John.Thompson.JTSoftware@gmail.com> Added '|' delimiter to separate inline asm multiple alternative constraints for Clang side of support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114253 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
11e8ae5f37d2c21002a0afa102284d88141efc79 18-Sep-2010 John McCall <rjmccall@apple.com> Fix a bug with binding l-values to elided temporaries, and leave a couple
helpful asserts behind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114250 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprCXX.cpp
fc1e6c79bbfe0e9a58bb792996d51f42e36e3d6a 18-Sep-2010 John McCall <rjmccall@apple.com> Fix a bug with binding l-values to elided temporaries, and leave a couple
helpful asserts behind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114250 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprCXX.cpp
227d26e0eb378fef42c1a3d346bb190d4d8b0710 18-Sep-2010 Bill Wendling <isanbard@gmail.com> The MMX shift-with-immediate builtins require the equivalent
shift-with-immediate LLVM intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114239 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
c6c8b3355da96bd0519632196b28fe57c5159d39 18-Sep-2010 Bill Wendling <isanbard@gmail.com> The MMX shift-with-immediate builtins require the equivalent
shift-with-immediate LLVM intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114239 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
a38c11f3fb24329bddb1e6ac720b82216642e8bc 17-Sep-2010 David Chisnall <csdavec@swan.ac.uk> Add a -ftrapv-handler= option which allows a handler to invoke instead of simply aborting when a signed operation overflows. This mirrors the (GCC-incompatible) behaviour from clang 1.0 and 1.1 when -ftrapv was specified, but allows the handler to be defined for each compilation unit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114192 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
7f18e67e1b577a50402e8b43508ab2311a5c45b5 17-Sep-2010 David Chisnall <csdavec@swan.ac.uk> Add a -ftrapv-handler= option which allows a handler to invoke instead of simply aborting when a signed operation overflows. This mirrors the (GCC-incompatible) behaviour from clang 1.0 and 1.1 when -ftrapv was specified, but allows the handler to be defined for each compilation unit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114192 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
95ba42ce79fd65004de5aabe5e49f885c2a44190 17-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to add IRgen support for Gnu's conditional operator
extension when missing LHS. This patch covers scalar
conditionals only. Others are wip.
(pr7726, radar 8353567).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114182 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
odeGenFunction.h
af9b96828f9126d993c3e155b8453be62013b735 17-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to add IRgen support for Gnu's conditional operator
extension when missing LHS. This patch covers scalar
conditionals only. Others are wip.
(pr7726, radar 8353567).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114182 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
odeGenFunction.h
b2894cdaab9c097602751575c1cb745a397441b5 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Change CodeGenPasses to be a PassManager, so it can have CallGraphSCC or
Module. Patch by Mike Gist!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114171 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
db2f237956122fb54b45c988ed9cffeee48e17f9 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Change CodeGenPasses to be a PassManager, so it can have CallGraphSCC or
Module. Patch by Mike Gist!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114171 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
065f52513499b46b640fe0dc119c87dab5e22406 17-Sep-2010 John McCall <rjmccall@apple.com> Currently we're initializing the vtable pointers of a class only after
the bases are completely initialized. This won't work --- base
initializer expressions can rely on the vtables having been set up.
Check for uses of 'this' in the initializers and force a vtable
initialization if found.

This might not be good enough; we might need to extend this to handle
the possibility of arbitrary code finding an external reference to this
(not yet completely-constructed!) object and accessing through it,
in which case we'll probably find ourselves doing a lot more unnecessary
stores.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114153 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
7e1dff7a68a4d00e71debafa7f5c259473091746 17-Sep-2010 John McCall <rjmccall@apple.com> Currently we're initializing the vtable pointers of a class only after
the bases are completely initialized. This won't work --- base
initializer expressions can rely on the vtables having been set up.
Check for uses of 'this' in the initializers and force a vtable
initialization if found.

This might not be good enough; we might need to extend this to handle
the possibility of arbitrary code finding an external reference to this
(not yet completely-constructed!) object and accessing through it,
in which case we'll probably find ourselves doing a lot more unnecessary
stores.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114153 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
51d8c0f0972268579063d1459cee2eb1c62b0036 17-Sep-2010 John McCall <rjmccall@apple.com> When emitting a new-expression inside a conditional expression,
the cleanup might not be dominated by the allocation code.
In this case, we have to store aside all the delete arguments
in case we need them later. There's room for optimization here
in cases where we end up not actually needing the cleanup in
different branches (or being able to pop it after the
initialization code).

Also make sure we only call this operator delete along the path
where we actually allocated something.

Fixes rdar://problem/8439196.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114145 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
3019c444c672938c57f5573840071ecd73425ee7 17-Sep-2010 John McCall <rjmccall@apple.com> When emitting a new-expression inside a conditional expression,
the cleanup might not be dominated by the allocation code.
In this case, we have to store aside all the delete arguments
in case we need them later. There's room for optimization here
in cases where we end up not actually needing the cleanup in
different branches (or being able to pop it after the
initialization code).

Also make sure we only call this operator delete along the path
where we actually allocated something.

Fixes rdar://problem/8439196.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114145 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
043f361f9ba25feedf5ce00632ed5a9b46c1f871 16-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/ABI/x86-32: Realign indirect arguments when the ABI requires us to pass
them with a smaller alignment than the rest of codegen expects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114115 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
e59d8585bb40a8bae6b847ad258536a2c01f20ea 16-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/ABI/x86-32: Realign indirect arguments when the ABI requires us to pass
them with a smaller alignment than the rest of codegen expects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114115 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
e331d07d783c4073fb4abaf2ee7b893a1b29c6f6 16-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/ABI: Add support for realigning structures which are passed by indirect
reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114114 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetInfo.cpp
cf3b6f2504596812db1fcef0df8ce5b3449c4aac 16-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/ABI: Add support for realigning structures which are passed by indirect
reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114114 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetInfo.cpp
d0f84049cd0733c7c055409106fb83f30bf0a033 16-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/ABI/x86_32/Darwin: On Darwin, only structures with SSE vector types get passed
with a non-default-stack-ABI-alignment (of 16).
- This fixes the ABI convenient, but breaks codegen since we now have
underaligned arguments. Marginal improvement overall though, and will be
fixed in next commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114113 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
93ae947df36133c7a26a0c7d325c0679916ed2ed 16-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/ABI/x86_32/Darwin: On Darwin, only structures with SSE vector types get passed
with a non-default-stack-ABI-alignment (of 16).
- This fixes the ABI convenient, but breaks codegen since we now have
underaligned arguments. Marginal improvement overall though, and will be
fixed in next commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114113 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
5c772eed37efc58fc7639c99b572f150c0774e0c 16-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/x86_32/Linux: Linux seems to align all stack objects to 4 bytes, unlike
Darwin. Checked vs the handiest Linux llvm-gcc I had around, someone on Linux is
welcome to investigate more.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114112 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
fb67d6c3814524fdd43bd2fb159f7c594eae581c 16-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/x86_32/Linux: Linux seems to align all stack objects to 4 bytes, unlike
Darwin. Checked vs the handiest Linux llvm-gcc I had around, someone on Linux is
welcome to investigate more.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114112 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
95c763ba30451cd024cb8a956d2d91bd33737c42 16-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Removes unused setter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114085 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
da531344723a0533230a7551dd12d6b7e464dc82 16-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Removes unused setter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114085 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
d885cad61a3417deba1391d903e411affbee2eb8 16-Sep-2010 John McCall <rjmccall@apple.com> Opportunistically use the C++ personality function in ObjC++
translation units that don't catch ObjC types. rdar://problem/8434851



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114070 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GException.h
odeGenModule.cpp
odeGenModule.h
b25938303de0976b9f189363d43033e5788e3d36 16-Sep-2010 John McCall <rjmccall@apple.com> Opportunistically use the C++ personality function in ObjC++
translation units that don't catch ObjC types. rdar://problem/8434851



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114070 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GException.h
odeGenModule.cpp
odeGenModule.h
4f31cf1ef92ad2af247ce0be3dde5ad52208f734 16-Sep-2010 John McCall <rjmccall@apple.com> Further beautification: this pointer can now be typed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114061 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
6fa291673f1a9f3e72a26caa39f6e9d7562a9754 16-Sep-2010 John McCall <rjmccall@apple.com> Further beautification: this pointer can now be typed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114061 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
79040ff9f7d79011ae863be8dd46a173441e669c 16-Sep-2010 John McCall <rjmccall@apple.com> Initialize AggValueSlot's flags along all paths, plus minor beautification.
Prospective fix for broken commit in r114045.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114060 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GValue.h
d1a5f13140a5bfcf9107b28de906518d2313fdf0 16-Sep-2010 John McCall <rjmccall@apple.com> Initialize AggValueSlot's flags along all paths, plus minor beautification.
Prospective fix for broken commit in r114045.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114060 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GValue.h
885a5ec02238f625502232cc7c26a7e39397a16f 16-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to move RequiresGCollection bit to
AggValueSlot slot.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114045 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GValue.h
odeGenFunction.h
474e2fe4957e6e72cee36ed189eaf21878ad0e91 16-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to move RequiresGCollection bit to
AggValueSlot slot.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114045 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GValue.h
odeGenFunction.h
a5667aec8354958422f69d5dc5fe185ab9abda3e 15-Sep-2010 Devang Patel <dpatel@apple.com> While handling change of file, check if _current_ file is already seen or not. If current file is seen then it indicates that end of previous file's lexical scope.
This fixes radar 8396182.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114018 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
424a5c63bb337926f3a1bfa20cc9f7c944aacbb0 15-Sep-2010 Devang Patel <dpatel@apple.com> While handling change of file, check if _current_ file is already seen or not. If current file is seen then it indicates that end of previous file's lexical scope.
This fixes radar 8396182.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114018 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
c1226787962c6550878b4e0df3c4bbb0fbf4b3a2 15-Sep-2010 John McCall <rjmccall@apple.com> one piece of code is responsible for the lifetime of every aggregate
slot. The easiest way to do that was to bundle up the information
we care about for aggregate slots into a new structure which demands
that its creators at least consider the question.

I could probably be convinced that the ObjC 'needs GC' bit should
be rolled into this structure.
Implement generalized copy elision. The main obstacle here is that
IR-generation must be much more careful about making sure that exactly



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113962 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprScalar.cpp
GObjC.cpp
GStmt.cpp
GTemporaries.cpp
GValue.h
odeGenFunction.h
558d2abc7f9fd6801cc7677200992313ae90b5d8 15-Sep-2010 John McCall <rjmccall@apple.com> one piece of code is responsible for the lifetime of every aggregate
slot. The easiest way to do that was to bundle up the information
we care about for aggregate slots into a new structure which demands
that its creators at least consider the question.

I could probably be convinced that the ObjC 'needs GC' bit should
be rolled into this structure.
Implement generalized copy elision. The main obstacle here is that
IR-generation must be much more careful about making sure that exactly



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113962 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprScalar.cpp
GObjC.cpp
GStmt.cpp
GTemporaries.cpp
GValue.h
odeGenFunction.h
3049ec9961d1a1f0570a24dc601e6a362129b35d 10-Sep-2010 Shih-wei Liao <sliao@google.com> Merge changes from upstream repository (r112367)

Change-Id: Ib88c8fd890e7c8c5597ea2b86cfa934438965c08
64671170ba3f966d7ce6ec638f83e1ef57b209ab 14-Sep-2010 John McCall <rjmccall@apple.com> Tweak this assert.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113863 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
c384636f9a405b687990564b204b98e360c81587 14-Sep-2010 John McCall <rjmccall@apple.com> Tweak this assert.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113863 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
bbd170440253ab9fc37fee01c4030ac3c99dda71 14-Sep-2010 John McCall <rjmccall@apple.com> Implement the EH cleanup to call 'operator delete' if a new-expression throws
(but not if destructors associated with the full-expression throw).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113836 91177308-0d34-0410-b5e6-96231b3b80d8
GException.h
GExprCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
7d8647f194ae4f2499e5bcd40dcfea34cd21ebc6 14-Sep-2010 John McCall <rjmccall@apple.com> Implement the EH cleanup to call 'operator delete' if a new-expression throws
(but not if destructors associated with the full-expression throw).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113836 91177308-0d34-0410-b5e6-96231b3b80d8
GException.h
GExprCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
0175ef42cc7cdc4212d59ebdeeebbafaef39a0bf 14-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Fix VLA miscompilation.

llvm.stacksave/llvm.stackrestore wasn't emitted for VLAs in inner scopes.
Fixes r8403108.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113822 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
4ada2ca7d82dab68d3646f3eb6dcdfee072e8ea4 14-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix VLA miscompilation.

llvm.stacksave/llvm.stackrestore wasn't emitted for VLAs in inner scopes.
Fixes r8403108.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113822 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
fe0fb28bcfc69003c77765352186302b6ba30a90 14-Sep-2010 Michael J. Spencer <bigcheesegs@gmail.com> Revert "CMake: Update to use standard CMake dependency tracking facilities instead"

This reverts commit r113631

Conflicts:

CMakeLists.txt
lib/CodeGen/CMakeLists.txt

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113817 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
560a921b85773ac7c2d1a7a4aec4682c822c5cb4 14-Sep-2010 Michael J. Spencer <bigcheesegs@gmail.com> Revert "CMake: Update to use standard CMake dependency tracking facilities instead"

This reverts commit r113631

Conflicts:

CMakeLists.txt
lib/CodeGen/CMakeLists.txt

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113817 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
8510a307c69112f0df8805501c0682e28513b527 13-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Eagerly evaluate type traits in Sema instead of lazily in AST. They actually need Sema access to be correct, fixes coming up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113782 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
0dfd848fa4c9664852ba8c929a8bd3fce93ddca2 13-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Eagerly evaluate type traits in Sema instead of lazily in AST. They actually need Sema access to be correct, fixes coming up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113782 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
2838bde4d5462b6f73a5b7e7d1f6db9f316b028d 13-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Block description for trivial block literals have
their 'isa' field scanned regardless.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113749 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
fb550312e74e2a04e93963891aa517d7acfc971b 13-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Block description for trivial block literals have
their 'isa' field scanned regardless.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113749 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
531bb979e58af6d4b999edfcbacc05c2044cf5da 11-Sep-2010 Chris Lattner <sabre@nondot.org> Augment -ftrapv to check for divide by zero, mod by zero, and INT_MIN % -1.

Patch by John Regehr!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113705 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
8023030f76d334355b73d9c675d3870858aaf4fd 11-Sep-2010 Chris Lattner <sabre@nondot.org> Augment -ftrapv to check for divide by zero, mod by zero, and INT_MIN % -1.

Patch by John Regehr!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113705 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
eeed529360d33d80f026c1864dc0fd6792af7088 11-Sep-2010 Michael J. Spencer <bigcheesegs@gmail.com> CMake: Fix mingw32 build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113677 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
28709c14ac027d505eff42f9b7a48f415241fd24 11-Sep-2010 Michael J. Spencer <bigcheesegs@gmail.com> CMake: Fix mingw32 build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113677 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
0fb0791d37a94ac59d082708a892f8668cb115d0 11-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes an obscure bug in importd block variable layout
information when imported variable is used
more than once. Originally though to be a bug in importing
block varibles. Fixes radar 8417746.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113675 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
c5904b40c3d76b612fb09c6d2717f646a0af6670 11-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes an obscure bug in importd block variable layout
information when imported variable is used
more than once. Originally though to be a bug in importing
block varibles. Fixes radar 8417746.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113675 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
42591fac8f92efab995608d36060579a9b688d66 10-Sep-2010 Michael J. Spencer <bigcheesegs@gmail.com> CMake: Update to use standard CMake dependency tracking facilities instead
of whatever we were using before...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113631 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
5a7f34958ca6f2fa8a52e9921cf521cbb92ae070 10-Sep-2010 Michael J. Spencer <bigcheesegs@gmail.com> CMake: Update to use standard CMake dependency tracking facilities instead
of whatever we were using before...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113631 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
6b9a72196813f713850965959c6dcde92c048861 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Implement CXXNoexceptExpr codegen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113629 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
98294def01c97e127fa6d812ebd944d37212828a 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Implement CXXNoexceptExpr codegen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113629 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
287e188b96e61b218be777ade96ff894e8c01a99 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Define and implement CXXNoexceptExpr. Create it in Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113623 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
2e156225a29407a50dd19041aa5750171ad44ea3 10-Sep-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Define and implement CXXNoexceptExpr. Create it in Sema.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113623 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
560cb21648a32e184c7d1c72e5df0c4236b15404 10-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> IRGen fix for using property-dot syntax to pass
reference object to a c++ member function.
fixes radar 8409336.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113602 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
GObjC.cpp
0339d72d7f853d90088a4d8639fb50810533e791 10-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> IRGen fix for using property-dot syntax to pass
reference object to a c++ member function.
fixes radar 8409336.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113602 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
GObjC.cpp
a38512534c7e4455907c202408362c1d0b265e85 09-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Clean up CMake dependencies

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113489 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ec9bf475657e4fd7c8e920ff816a4e3cdb2ea213 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Clean up CMake dependencies

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113489 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
be4abbd5191b04a843b5182576d5892bfd212213 09-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Block ivar layout must assume that the 'isa'
field of the block descriptor is GC'able (scanned)
as this what the runtime expects (one can send it
messages). Radar 8394947.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113454 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
81979822cbf6347116d06dac0e5b06c451bcff05 09-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Block ivar layout must assume that the 'isa'
field of the block descriptor is GC'able (scanned)
as this what the runtime expects (one can send it
messages). Radar 8394947.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113454 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0d4739a839520772aab5652dd1dcd5009ddc1969 09-Sep-2010 Francois Pichet <pichet2000@gmail.com> Fix warnings caused by new CXXUuidofExprClass enumerator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113444 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
9be88403e965cc49af76c9d33d818781d44b333e 09-Sep-2010 Francois Pichet <pichet2000@gmail.com> Fix warnings caused by new CXXUuidofExprClass enumerator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113444 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
4184990d3b5abcf9b16902e8f30269704a76cb8f 08-Sep-2010 John McCall <rjmccall@apple.com> Implement ARM static local initialization guards, which are more compact than
Itanium guards and use a slightly different compiled-in API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113330 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GDecl.cpp
GDeclCXX.cpp
odeGenFunction.h
taniumCXXABI.cpp
angle.cpp
angle.h
icrosoftCXXABI.cpp
5cd91b513455fd7753e8815b54f0a49bbca6602d 08-Sep-2010 John McCall <rjmccall@apple.com> Implement ARM static local initialization guards, which are more compact than
Itanium guards and use a slightly different compiled-in API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113330 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GDecl.cpp
GDeclCXX.cpp
odeGenFunction.h
taniumCXXABI.cpp
angle.cpp
angle.h
icrosoftCXXABI.cpp
0cb8e3fdfa6f06d0d7995efbbc60b4f228d4c21e 08-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Local static block variable referecned in its
block-literal initializer expression causes IRgen to crash.
This patch fixes by saving it in StaticLocalDecl map
already used for such purposes. (radar 8390455).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113307 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
09349145d7e9b2142a9cef94e30eb8b70ce99bdc 08-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Local static block variable referecned in its
block-literal initializer expression causes IRgen to crash.
This patch fixes by saving it in StaticLocalDecl map
already used for such purposes. (radar 8390455).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113307 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
dab222e65198872d921f58a03fdfc1a20b040dcd 07-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> get rid of a warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113256 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
e7ddfb974884ec75ffd66953b79511ea457493ba 07-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> get rid of a warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113256 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8fee33e7925d771f4b410744735a52122ce5b315 07-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Have Sema check for validity of CGString literal
instead of asserting in IRGen. Fixes radar 8390459.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113253 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7da71020b97c69b95831bd03d35e8e8404bfdea0 07-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Have Sema check for validity of CGString literal
instead of asserting in IRGen. Fixes radar 8390459.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113253 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7497ea5f6d994385a1818a2ce5bf0923fed4745c 06-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> LastFieldBitfield in CGObjCCommonMac::BuildAggrIvarLayout keeps bitfields or unnamed fields but later the code
assumes that it's always a bitfield. This can lead to a crash (reported at rdar://8368320).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113154 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0dc7509ed7f775f74106fbac37473da39b6c8e3a 06-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> LastFieldBitfield in CGObjCCommonMac::BuildAggrIvarLayout keeps bitfields or unnamed fields but later the code
assumes that it's always a bitfield. This can lead to a crash (reported at rdar://8368320).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113154 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
374018a11a29695fac24dac48eb58bf082ca11c1 06-Sep-2010 Chris Lattner <sabre@nondot.org> move the hackaround for PR6537 to catch unions as well,
fixing the ICE in PR7151


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113130 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
bd7de38eae1fc20ee88db63f469c54241bc240f8 06-Sep-2010 Chris Lattner <sabre@nondot.org> move the hackaround for PR6537 to catch unions as well,
fixing the ICE in PR7151


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113130 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
92e65b1ab581cff33371e9df6bc98a0298c8bd29 06-Sep-2010 Chris Lattner <sabre@nondot.org> clean up some formatting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113129 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
d0db03a561671b8b466b07026cc8fbbb037bb639 06-Sep-2010 Chris Lattner <sabre@nondot.org> clean up some formatting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113129 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
6dd9ed2a5e3a004bdfa7f1db59d8f813f875897e 05-Sep-2010 Nick Lewycky <nicholas@mxc.ca> No functional change. Replace Out << 'a' << 'b' with Out << "ab" and spell
David Vandevoorde's name correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113103 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
271b665c4e357809d245c1ab811f20bf1f0dfc1f 05-Sep-2010 Nick Lewycky <nicholas@mxc.ca> No functional change. Replace Out << 'a' << 'b' with Out << "ab" and spell
David Vandevoorde's name correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113103 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
849d139a0caca1651771307ed7d41568f4c24f46 04-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Casting of a property reference to 'void' did not
generate the necessary code. This patch fixes it.
// rdar://8389655


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113079 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
699c06068dab18efd37897659ec120d211827607 04-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Casting of a property reference to 'void' did not
generate the necessary code. This patch fixes it.
// rdar://8389655


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113079 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
4de5454c467cf542b3422f4eade1fe25fd25f4ac 04-Sep-2010 John McCall <rjmccall@apple.com> Petty optimization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113049 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
26fc28d88e6ff0279e37074cc304e0cfe3e31714 04-Sep-2010 John McCall <rjmccall@apple.com> Petty optimization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113049 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
a43894f091df18975facadda53d41e912ce3f454 04-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Truncate block variable of bool type to i1 when its
value is used. This matches with non-block variable
use of bool type. (Fixes radar 8390062).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113027 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
GExprScalar.cpp
469a20de757ff872c90ff6b1134f6346909ff652 04-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Truncate block variable of bool type to i1 when its
value is used. This matches with non-block variable
use of bool type. (Fixes radar 8390062).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113027 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
GExprScalar.cpp
54679d3e0473346a6fc7ce3aabd48c9d484977de 03-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Cope with llvm's reference to bool type of 'i1' vs. clang's
type of 'i8' for the same for __block variables of
type bool. refixes radar 8382559.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113015 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
7925561e702430c0d632c5e5db1a74673b44ea18 03-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Cope with llvm's reference to bool type of 'i1' vs. clang's
type of 'i8' for the same for __block variables of
type bool. refixes radar 8382559.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113015 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
9a1fd60f20db656e935de1eac13830d4b21016e0 03-Sep-2010 John McCall <rjmccall@apple.com> A constant initializer never matches the type of the variable it's
initializing; it at best matches the element type of the variable
it's initializing. Fixes PR8073.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112992 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
9c20fa9d46645480872f239a2fc631996ba7dc23 03-Sep-2010 John McCall <rjmccall@apple.com> A constant initializer never matches the type of the variable it's
initializing; it at best matches the element type of the variable
it's initializing. Fixes PR8073.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112992 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
1571b8768e9ebe73f0e293375e15eadc18291f5f 03-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix silly thinko in r112021, which was generating code for the same expr
twice. This showed up as an assert on the odd test case because we generated the
decl map entry twice.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112943 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
db50547fd526329d00fa1fee4e7ac90f2624c6e0 03-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix silly thinko in r112021, which was generating code for the same expr
twice. This showed up as an assert on the odd test case because we generated the
decl map entry twice.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112943 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
23cf1f9d0f258b16fb5c07a14ceb7aba4562903e 03-Sep-2010 Dawn Perchik <dawn@burble.org> Add symantic support for the Pascal calling convention via
"__attribute((pascal))" or "__pascal" (and "_pascal" under
-fborland-extensions). Support still needs to be added to llvm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112939 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
icrosoftCXXABI.cpp
52fc314e1b5e1baee6305067cf831763d02bd243 03-Sep-2010 Dawn Perchik <dawn@burble.org> Add symantic support for the Pascal calling convention via
"__attribute((pascal))" or "__pascal" (and "_pascal" under
-fborland-extensions). Support still needs to be added to llvm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112939 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
icrosoftCXXABI.cpp
cf4889dbd15fbbd5e9dec84b9c5d2f5046340551 03-Sep-2010 Bob Wilson <bob.wilson@apple.com> Translate NEON vabdl, vaba, and vabal builtins to be implemented using the
vabd intrinsic combined with zext and add operations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112937 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
47a88fa2efdaf40449b7e7e28252c7c6f410b37f 03-Sep-2010 Bob Wilson <bob.wilson@apple.com> Translate NEON vabdl, vaba, and vabal builtins to be implemented using the
vabd intrinsic combined with zext and add operations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112937 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
0fc8f4237ef811ad0f2661755e6b584b6e240137 03-Sep-2010 John McCall <rjmccall@apple.com> Re-commit r112916 with an additional fix for the self-host failures.
I've audited the remaining getFunctionInfo call sites.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112936 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExprCXX.cpp
fc4002872864e3c29c896000519ae989b6fdb7dd 03-Sep-2010 John McCall <rjmccall@apple.com> Re-commit r112916 with an additional fix for the self-host failures.
I've audited the remaining getFunctionInfo call sites.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112936 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExprCXX.cpp
ca1780dbbd0d3f913ca8674856ed72bc25120dee 03-Sep-2010 John McCall <rjmccall@apple.com> Revert r112916, it's breaking selfhost pretty badly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112925 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExprCXX.cpp
2b8d60dfdfbbf19f6e2dcfb5c438f8eda8a7ecb4 03-Sep-2010 John McCall <rjmccall@apple.com> Revert r112916, it's breaking selfhost pretty badly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112925 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExprCXX.cpp
5753c295b6e5ed2b2dfccd6cd58bdee4d0a84e95 03-Sep-2010 Daniel Dunbar <daniel@zuster.org> Revert "Another i1 vs. i8 type mismatch issue. This time", it breaks some projects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112922 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
3e7cf38810ec39be938b635ddd41e3cefde86883 03-Sep-2010 Daniel Dunbar <daniel@zuster.org> Revert "Another i1 vs. i8 type mismatch issue. This time", it breaks some projects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112922 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
2230501adc01deb464fbb201c31d4e0e9b14dcd7 03-Sep-2010 John McCall <rjmccall@apple.com> It's not safe to use the generic CXXMethodDecl overload of CGT::getFunctionInfo
to set up a destructor call, because ABIs can tweak these conventions.
Fixes rdar://problem/8386802.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112916 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExprCXX.cpp
52968abd2aaf36f17d9858581563bf80475fb178 03-Sep-2010 John McCall <rjmccall@apple.com> It's not safe to use the generic CXXMethodDecl overload of CGT::getFunctionInfo
to set up a destructor call, because ABIs can tweak these conventions.
Fixes rdar://problem/8386802.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112916 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExprCXX.cpp
2b4eff2dbe9d938ca8b5ba8cb43e19cb259be6ae 03-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/Obj-C: Rewrite Objective-C bit-field access to compute the access strategy
using the same methods as used for normal structures.
- This fixes problems with reading past the end of the structure and with
handling straddled bit-field access.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112914 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c5c446ccadddd541e9aa6c1c609b114080710498 03-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/Obj-C: Rewrite Objective-C bit-field access to compute the access strategy
using the same methods as used for normal structures.
- This fixes problems with reading past the end of the structure and with
handling straddled bit-field access.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112914 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0b0ba182ad84d79ac175fa4687358c6b6ccb808b 03-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move CGBitFieldInfo strategy computation helpers to static member
functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112913 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayout.h
GRecordLayoutBuilder.cpp
e7a80bd66a80ce509de9b50f32cdd402914edd2e 03-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move CGBitFieldInfo strategy computation helpers to static member
functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112913 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayout.h
GRecordLayoutBuilder.cpp
1a83965aa401639519a6894113fb3cba4570bd02 03-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Fix a few more ConvertTypes that should be ConvertTypeForMems, fixing
two regressions in Boost.Config.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112908 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
cc09c022bebcabd5f222d410bb6695af0ea93257 03-Sep-2010 Douglas Gregor <dgregor@apple.com> Fix a few more ConvertTypes that should be ConvertTypeForMems, fixing
two regressions in Boost.Config.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112908 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
088756b2fa0ec01dcb23052dbddb4b18e6052b0c 03-Sep-2010 Bob Wilson <bob.wilson@apple.com> Add a bunch of missing bitcasts for clang NEON builtin expansions.
Radar 8388233


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112890 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
2235941293353325835d182da4470f61828fe789 03-Sep-2010 Bob Wilson <bob.wilson@apple.com> Add a bunch of missing bitcasts for clang NEON builtin expansions.
Radar 8388233


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112890 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
499d0f4b4f76328812ed192cb9800791dc333170 02-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate CXXBindReferenceExpr, which was used in a ton of
well-intentioned but completely unused code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112868 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
e2ca6d4a2f41876930fbd304caa706452d2569d8 02-Sep-2010 Douglas Gregor <dgregor@apple.com> Eliminate CXXBindReferenceExpr, which was used in a ton of
well-intentioned but completely unused code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112868 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
70bcaaed75993465d7c8516b64dce4a12b506fa5 02-Sep-2010 David Chisnall <csdavec@swan.ac.uk> Tidy up last commit, as per Devang's comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112840 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
52044a2cb6d33705cb69577e5f202e794123ce81 02-Sep-2010 David Chisnall <csdavec@swan.ac.uk> Tidy up last commit, as per Devang's comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112840 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
6fde6b9d7d1909aa2e2be8f9a32af6534fd02530 02-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Revert my two IRgen fixes for "bool", then use a far simpler approach
based on ConvertTypeForMem. Thanks to John for pointing out the right
solution.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112838 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
taniumCXXABI.cpp
eede61a83e90f3cb03ef8665b67d648dccd6ce42 02-Sep-2010 Douglas Gregor <dgregor@apple.com> Revert my two IRgen fixes for "bool", then use a far simpler approach
based on ConvertTypeForMem. Thanks to John for pointing out the right
solution.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112838 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
taniumCXXABI.cpp
ec239ac72e13058f596656c0a77939bdedb89e60 02-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Another i1 vs. i8 type mismatch issue. This time
a 'bool' byref variable in memory. Fixes radar 8382559.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112835 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
73556e0d961e2d58eae232e647c9def8da1caecf 02-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Another i1 vs. i8 type mismatch issue. This time
a 'bool' byref variable in memory. Fixes radar 8382559.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112835 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
aec64216a7c54ed0b8cf203b9fc7f45fc2064e73 02-Sep-2010 David Chisnall <csdavec@swan.ac.uk> Use the unmangled name for the display name in Objective-C debug info. This should have no effect with the Mac runtime where clang (unlike GCC) uses the display name symbol name.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112833 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
70b9b448efbebddddb3faa3a68b31ee1682bcd5c 02-Sep-2010 David Chisnall <csdavec@swan.ac.uk> Use the unmangled name for the display name in Objective-C debug info. This should have no effect with the Mac runtime where clang (unlike GCC) uses the display name symbol name.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112833 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1a5d9eda5c51249f562daa75ae5cfefcf4f4444e 02-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Fix more i1/i8 pointer madness. Here, an overactive assertion
complains when the element type of a C++ "delete" expression is
different from what we would expect from the pointer type. When
deleting a bool*, we end up with an i1 on one side (where we compute
the LLVM type from the Clang bool type) and i8 on the other (where we
grab the LLVM type from the LLVM pointer type). I've weakened the
assertion appropriately, and the Boost Parallel Graph Library now
passes its regression tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112821 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
f9cce31a1c71e2949cd5f47616a5624f5fedd84d 02-Sep-2010 Douglas Gregor <dgregor@apple.com> Fix more i1/i8 pointer madness. Here, an overactive assertion
complains when the element type of a C++ "delete" expression is
different from what we would expect from the pointer type. When
deleting a bool*, we end up with an i1 on one side (where we compute
the LLVM type from the Clang bool type) and i8 on the other (where we
grab the LLVM type from the LLVM pointer type). I've weakened the
assertion appropriately, and the Boost Parallel Graph Library now
passes its regression tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112821 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
7d36aa2e96d6b771069d9e4a7b596faaec762171 02-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Fix a crash involving pointer-to-data-members of boolean type. We were
constructing an LLVM PointerType directly from the "bool"'s LLVM type
(i1), which resulted in unfortunate pointer type i1*. The fix is to
build the LLVM PointerType from the corresponding Clang PointerType,
so that we get i8* in the case of a bool.

John, please review. I also left a FIXME there because we seem to be
dropping "volatile", which would be rather unfortunate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112819 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
b61e2a328c5c2552b0bb3a8d3c4bc9389f34a321 02-Sep-2010 Douglas Gregor <dgregor@apple.com> Fix a crash involving pointer-to-data-members of boolean type. We were
constructing an LLVM PointerType directly from the "bool"'s LLVM type
(i1), which resulted in unfortunate pointer type i1*. The fix is to
build the LLVM PointerType from the corresponding Clang PointerType,
so that we get i8* in the case of a bool.

John, please review. I also left a FIXME there because we seem to be
dropping "volatile", which would be rather unfortunate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112819 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
d46a00220ced0d428fc8e4c1e838d80815ef76ef 02-Sep-2010 John McCall <rjmccall@apple.com> Simplify some random accesses to the ASTContext from the ABI classes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112816 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
9cb2cee212d708220c52249ceac4cdd9f2b8aeb0 02-Sep-2010 John McCall <rjmccall@apple.com> Simplify some random accesses to the ASTContext from the ABI classes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112816 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
637039a7aa8106936f64b1d4748b19658fa9ccab 02-Sep-2010 John McCall <rjmccall@apple.com> Abstract IR generation of array cookies into the C++ ABI class and
implement ARM array cookies. Also fix a few unfortunate bugs:
- throwing dtors in deletes prevented the allocation from being deleted
- adding the cookie to the new[] size was not being considered for
overflow (and, more seriously, was screwing up the earlier checks)
- deleting an array via a pointer to array of class type was not
causing any destructors to be run and was passing the unadjusted
pointer to the deallocator
- lots of address-space problems, in case anyone wants to support
free store in a variant address space :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112814 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GExprCXX.cpp
odeGenFunction.h
taniumCXXABI.cpp
1e7fe751466ea82665fd21e9162fd7cc9c5f412d 02-Sep-2010 John McCall <rjmccall@apple.com> Abstract IR generation of array cookies into the C++ ABI class and
implement ARM array cookies. Also fix a few unfortunate bugs:
- throwing dtors in deletes prevented the allocation from being deleted
- adding the cookie to the new[] size was not being considered for
overflow (and, more seriously, was screwing up the earlier checks)
- deleting an array via a pointer to array of class type was not
causing any destructors to be run and was passing the unadjusted
pointer to the deallocator
- lots of address-space problems, in case anyone wants to support
free store in a variant address space :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112814 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GExprCXX.cpp
odeGenFunction.h
taniumCXXABI.cpp
87a59ee5e66d35254280f3ea07558b867a759698 02-Sep-2010 Bob Wilson <bob.wilson@apple.com> Translate NEON vmull, vmlal, and vmlsl builtins to llvm multiply-add/sub
with zext/sext operations, instead of to llvm intrinsics. I have a plan to
avoid the clang builtins for these, but it is going to take a little longer
and I want to get the NEON intrinsics updated before the 2.8 release.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112764 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
bf346e95f1d60f37fb37d89c288e1daa7839fc01 02-Sep-2010 Bob Wilson <bob.wilson@apple.com> Translate NEON vmull, vmlal, and vmlsl builtins to llvm multiply-add/sub
with zext/sext operations, instead of to llvm intrinsics. I have a plan to
avoid the clang builtins for these, but it is going to take a little longer
and I want to get the NEON intrinsics updated before the 2.8 release.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112764 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
55fd8358b1dd0ccaf009f1dac05113c2f2ab7d8d 01-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Fix IRGen when property-dot syntax used to access
a c++ class object 'ivar'. Fixes radar 8366604.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112729 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprCXX.cpp
98c9d1fa3776204a94c013f1dc25f62d75c00573 01-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Fix IRGen when property-dot syntax used to access
a c++ class object 'ivar'. Fixes radar 8366604.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112729 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprCXX.cpp
51e8eea95cb6886b76e9d72eadce34aba72dd35a 01-Sep-2010 Ted Kremenek <kremenek@apple.com> Split ObjCInterfaceDecl::ReferencedProtocols into two lists: ReferencedProtocols and AllReferencedProtocols. ReferencedProtocols
(and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in
an @interface declaration. 'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced
in both the @interface and class extensions. The latter is needed for semantic analysis/codegen, while the former is
needed to maintain the lexical information of the original source.

Fixes <rdar://problem/8380046>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112691 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
53b9441b5a81a24fa1f66f3f6416f1e36baa9c2f 01-Sep-2010 Ted Kremenek <kremenek@apple.com> Split ObjCInterfaceDecl::ReferencedProtocols into two lists: ReferencedProtocols and AllReferencedProtocols. ReferencedProtocols
(and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in
an @interface declaration. 'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced
in both the @interface and class extensions. The latter is needed for semantic analysis/codegen, while the former is
needed to maintain the lexical information of the original source.

Fixes <rdar://problem/8380046>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112691 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
848e6bf6b8a1e50a0351a6797375f6367818abf5 01-Sep-2010 Chris Lattner <sabre@nondot.org> fix rdar://8360877 a really nasty miscompilation in Boost.Xpressive
caused by my ABI work. Passing:

struct outer {
int x;
struct epsilon_matcher {} e;
int f;
};

as {i32,i32} isn't safe, because the offset of the second element
needs to be at 8 when it is interpreted as a memory value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112686 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
66e7b68b0016aeebe349e21ace93ff0178665d69 01-Sep-2010 Chris Lattner <sabre@nondot.org> fix rdar://8360877 a really nasty miscompilation in Boost.Xpressive
caused by my ABI work. Passing:

struct outer {
int x;
struct epsilon_matcher {} e;
int f;
};

as {i32,i32} isn't safe, because the offset of the second element
needs to be at 8 when it is interpreted as a memory value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112686 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
9c696873a9037e5b9c9308f4ab8b3809e4337dbf 01-Sep-2010 Chris Lattner <sabre@nondot.org> same refactoring as before, this time on the argument side.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112684 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
645406a3d3405ad0f4b5a0e46a34ae92d9d23bd3 01-Sep-2010 Chris Lattner <sabre@nondot.org> same refactoring as before, this time on the argument side.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112684 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
ee70b76b28b93ff061dead83fa76ef4be14548db 01-Sep-2010 Chris Lattner <sabre@nondot.org> refactor some code to cut down on redundancy, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112683 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
3db4dde12de84269c8f803f9dfca37a2d14f9898 01-Sep-2010 Chris Lattner <sabre@nondot.org> refactor some code to cut down on redundancy, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112683 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
80585533d08a8c56748e1bd95deedc58793443c9 31-Aug-2010 John McCall <rjmccall@apple.com> Amusingly, I missed this point of abstraction in all my earlier
member-pointer refactoring: dereferencing a member data pointer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112640 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GExpr.cpp
taniumCXXABI.cpp
6c2ab1d578c6cc1f3ddcc948532cd625f1092ef2 31-Aug-2010 John McCall <rjmccall@apple.com> Amusingly, I missed this point of abstraction in all my earlier
member-pointer refactoring: dereferencing a member data pointer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112640 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GExpr.cpp
taniumCXXABI.cpp
b979e7a58d8bf64a7353ae158a7a01bbdb25d6fc 31-Aug-2010 Chris Lattner <sabre@nondot.org> Add support for windows x86-64 varargs, patch by Cameron Esfahani!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112603 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
f13721dd91dda7675e499331a2770308ad20ca61 31-Aug-2010 Chris Lattner <sabre@nondot.org> Add support for windows x86-64 varargs, patch by Cameron Esfahani!


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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112588 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GCall.cpp
GDeclCXX.cpp
GExpr.cpp
GExprCXX.cpp
GExprConstant.cpp
GExprScalar.cpp
GRTTI.cpp
GVTT.cpp
GVTables.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
4c40d98ab7acf5f27fa89b17bd8fc0ef7683df37 31-Aug-2010 John McCall <rjmccall@apple.com> Teach IR generation to return 'this' from constructors and destructors
under the ARM ABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112588 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GCall.cpp
GDeclCXX.cpp
GExpr.cpp
GExprCXX.cpp
GExprConstant.cpp
GExprScalar.cpp
GRTTI.cpp
GVTT.cpp
GVTables.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
92ae2b40f721121f8944a1bb3c69b23d96bcff31 31-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename DeclContext::getLookupContext to getRedeclContext and change its semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112563 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
7a126a474fdde06382b315b4e3d8ef0a21d4dc31 31-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename DeclContext::getLookupContext to getRedeclContext and change its semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112563 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
d852a5455eba4e2c70202854c55ea3ed0ef2c8ad 31-Aug-2010 Chris Lattner <sabre@nondot.org> Fix PR8029, a x86-32 ABI regression in introduced in r112211


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112537 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
4599f346cb90bef15e1afd5c66f20c18703e41ae 31-Aug-2010 Chris Lattner <sabre@nondot.org> Fix PR8029, a x86-32 ABI regression in introduced in r112211


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112537 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
10928651d086e9f4ef5bbc78a78902db6bfe5b21 30-Aug-2010 Bob Wilson <bob.wilson@apple.com> Translate NEON vmovn builtin to a vector truncation instead of using an llvm
intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112504 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
3b6081bf49b7506cb96131247f209d1e03610df8 30-Aug-2010 Bob Wilson <bob.wilson@apple.com> Translate NEON vmovn builtin to a vector truncation instead of using an llvm
intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112504 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
28a209c7deee1ce5b6f101fabbedf74fa626e557 30-Aug-2010 Sean Hunt <rideau3@gmail.com> Revert my user-defined literal commits - r1124{58,60,67} pending
some issues being sorted out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112493 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
angle.cpp
6cf750298d3621d8a10a6dd07fcee8e274b9d94d 30-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Revert my user-defined literal commits - r1124{58,60,67} pending
some issues being sorted out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112493 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
angle.cpp
67c0315750719a35e43b1d174b7128a8ab53efbf 30-Aug-2010 Sean Hunt <rideau3@gmail.com> Two minor fixes to user-defined literals:

- Zero-initialize UDLData so that crashes stop
- Stop complaining that we can't emit them (we most certainly can)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112467 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
75b8508380e6d44276a8fafe5cafcedb9cf532d3 30-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Two minor fixes to user-defined literals:

- Zero-initialize UDLData so that crashes stop
- Stop complaining that we can't emit them (we most certainly can)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112467 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
0fd5a8586deed8910d4e62ef0df12f0e6f48f24b 29-Aug-2010 Sean Hunt <rideau3@gmail.com> Implement C++0x user-defined string literals.

The extra data stored on user-defined literal Tokens is stored in extra
allocated memory, which is managed by the PreprocessorLexer because there isn't
a better place to put it that makes sure it gets deallocated, but only after
it's used up. My testing has shown no significant slowdown as a result, but
independent testing would be appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112458 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
0016d519b831859526b79405cdae4c64c73731c8 29-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement C++0x user-defined string literals.

The extra data stored on user-defined literal Tokens is stored in extra
allocated memory, which is managed by the PreprocessorLexer because there isn't
a better place to put it that makes sure it gets deallocated, but only after
it's used up. My testing has shown no significant slowdown as a result, but
independent testing would be appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112458 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
6ece084273ec0dc6dba108e8fac1d4d5196eec01 29-Aug-2010 Bob Wilson <bob.wilson@apple.com> Translate NEON vaddl, vaddw, vsubl, and vsubw builtins to llvm add/sub
with zext/sext operations, instead of to llvm intrinsics. (We can also
get rid of the clang builtins and handle these entirely in the arm_neon.h
header if there is a way to express vector sext/zext in C.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112413 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
54160c6d95f475035545206d13f967da87ab5243 29-Aug-2010 Bob Wilson <bob.wilson@apple.com> Translate NEON vaddl, vaddw, vsubl, and vsubw builtins to llvm add/sub
with zext/sext operations, instead of to llvm intrinsics. (We can also
get rid of the clang builtins and handle these entirely in the arm_neon.h
header if there is a way to express vector sext/zext in C.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112413 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
daa7e8b76bbaa502bf6ff8b5988156c349b568e3 27-Aug-2010 Devang Patel <dpatel@apple.com> Debug info for friends!
Patch originally by Alexander Herz.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112275 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
2ed8f000869103b1adc05d6bc4c635604b6e66a7 27-Aug-2010 Devang Patel <dpatel@apple.com> Debug info for friends!
Patch originally by Alexander Herz.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112275 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
7d7a9d7c6f9264e293efce9546a49ae211e70ec9 27-Aug-2010 Bob Wilson <bob.wilson@apple.com> Add the new alignment arguments for NEON load/store intrinsics, based on the
types of the pointer address expressions used with those intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112272 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
06b6c589a5fff8e5476fe2b4cd6a660af71bfddd 27-Aug-2010 Bob Wilson <bob.wilson@apple.com> Add the new alignment arguments for NEON load/store intrinsics, based on the
types of the pointer address expressions used with those intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112272 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
4b16988d4f2db0accd2cc81cf9787e4a748a3f00 26-Aug-2010 Chris Lattner <sabre@nondot.org> improve comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112214 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
7b733505defd34f1bb7e74d9526be0bc41e76693 26-Aug-2010 Chris Lattner <sabre@nondot.org> improve comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112214 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
dae7b3ec91fbfa83d2f4086db417c59ca50147d6 26-Aug-2010 Chris Lattner <sabre@nondot.org> fix 2xi16 to pass as i32 instead of <2 x i16>. The former passes in
memory (as required) the later now passes in an xmm register. This
fixes gcc.dg/compat/vector_1 on x86-32.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112211 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
bbae8b40cd37d5b2815f8450cb588a41da89d7e5 26-Aug-2010 Chris Lattner <sabre@nondot.org> fix 2xi16 to pass as i32 instead of <2 x i16>. The former passes in
memory (as required) the later now passes in an xmm register. This
fixes gcc.dg/compat/vector_1 on x86-32.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112211 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
99ee5278675bfd532f393430b8b53878ecc57b48 26-Aug-2010 Chris Lattner <sabre@nondot.org> vector of long and ulong are also classified as INTEGER in x86-64 abi,
this fixes rdar://8358475 a failure of the gcc.dg/compat/vector_1 abi
test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112205 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
0fefa4175b0c9101564946f6a975ee9946c16d4b 26-Aug-2010 Chris Lattner <sabre@nondot.org> vector of long and ulong are also classified as INTEGER in x86-64 abi,
this fixes rdar://8358475 a failure of the gcc.dg/compat/vector_1 abi
test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112205 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
7befad773143eabbdda70730cc90e3e3600b625f 26-Aug-2010 Chris Lattner <sabre@nondot.org> 1 x ulonglong needs to be classified as INTEGER, just like 1 x longlong,
this fixes a miscompilation on the included testcase, rdar://8359248


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112201 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
473f8e723be93d84bd5fd15b094f4184802d4676 26-Aug-2010 Chris Lattner <sabre@nondot.org> 1 x ulonglong needs to be classified as INTEGER, just like 1 x longlong,
this fixes a miscompilation on the included testcase, rdar://8359248


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112201 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
bfb15ca26fe6e7bb94463a51538e91dcc710a900 26-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Fix miscompilation. The cookie was not used when new'ing arrays with multiple dimensions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112188 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
e7ab92e1d62f9c243bbd1f42f72a7b3c2666d33e 26-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fix miscompilation. The cookie was not used when new'ing arrays with multiple dimensions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112188 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
44df5092398bdc78bb855c8faec4e1c73e98bf4b 26-Aug-2010 Chris Lattner <sabre@nondot.org> tame an assertion, fixing rdar://8357396


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112174 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
a8b7a7d3eaa51dd200cba1e5541f2542d24d7a6e 26-Aug-2010 Chris Lattner <sabre@nondot.org> tame an assertion, fixing rdar://8357396


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112174 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
9ec5b4f73d9d3aff0d608bd71d0c6cf849b89c19 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> CGValue: Increase width of allowed alignment. We could switch to log2, but we
don't currently need the bits anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112173 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
77c059060f9c8c121d5e8b76957d187223677558 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> CGValue: Increase width of allowed alignment. We could switch to log2, but we
don't currently need the bits anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112173 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
f680d9ef70e596ada56e0fc91a3f17dad2a81e5a 26-Aug-2010 John McCall <rjmccall@apple.com> De-memberify the VarDecl and FunctionDecl StorageClass enums.
This lets us remove Sema.h's dependency on Expr.h and Decl.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112156 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
odeGenModule.cpp
d931b086984257de68868a64a235c2b4b34003fb 26-Aug-2010 John McCall <rjmccall@apple.com> De-memberify the VarDecl and FunctionDecl StorageClass enums.
This lets us remove Sema.h's dependency on Expr.h and Decl.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112156 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
odeGenModule.cpp
b6bde610e2aab3df4f3c6d914db2c2cb95b0a75f 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen/NEON: Fix codegen of vzip and vzipq.
- Will be adding an executable test case to test-suite repo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112126 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
e361cc3daa6c22e4413d48bd8b8934ea9fd5a55f 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen/NEON: Fix codegen of vzip and vzipq.
- Will be adding an executable test case to test-suite repo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112126 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
5e596ec4f1c9a4210cf58671489fc15e40ec46e8 26-Aug-2010 Chris Lattner <sabre@nondot.org> Finally pass "two floats in a 64-bit unit" as a <2 x float> instead of
as a double in the x86-64 ABI. This allows us to generate much better
code for certain things, e.g.:

_Complex float f32(_Complex float A, _Complex float B) {
return A+B;
}

Used to compile into (look at the integer silliness!):

_f32: ## @f32
## BB#0: ## %entry
movd %xmm1, %rax
movd %eax, %xmm1
movd %xmm0, %rcx
movd %ecx, %xmm0
addss %xmm1, %xmm0
movd %xmm0, %edx
shrq $32, %rax
movd %eax, %xmm0
shrq $32, %rcx
movd %ecx, %xmm1
addss %xmm0, %xmm1
movd %xmm1, %eax
shlq $32, %rax
addq %rdx, %rax
movd %rax, %xmm0
ret

Now we get:

_f32: ## @f32
movdqa %xmm0, %xmm2
addss %xmm1, %xmm2
pshufd $16, %xmm2, %xmm2
pshufd $1, %xmm1, %xmm1
pshufd $1, %xmm0, %xmm0
addss %xmm1, %xmm0
pshufd $16, %xmm0, %xmm1
movdqa %xmm2, %xmm0
unpcklps %xmm1, %xmm0
ret

and compile stuff like:

extern float _Complex ccoshf( float _Complex ) ;
float _Complex ccosf ( float _Complex z ) {
float _Complex iz;
(__real__ iz) = -(__imag__ z);
(__imag__ iz) = (__real__ z);
return ccoshf(iz);
}

into:

_ccosf: ## @ccosf
## BB#0: ## %entry
pshufd $1, %xmm0, %xmm1
xorps LCPI4_0(%rip), %xmm1
unpcklps %xmm0, %xmm1
movaps %xmm1, %xmm0
jmp _ccoshf ## TAILCALL

instead of:

_ccosf: ## @ccosf
## BB#0: ## %entry
movd %xmm0, %rax
movq %rax, %rcx
shlq $32, %rcx
shrq $32, %rax
xorl $-2147483648, %eax ## imm = 0xFFFFFFFF80000000
addq %rcx, %rax
movd %rax, %xmm0
jmp _ccoshf ## TAILCALL


There is still "stuff to be done" here for the struct case,
but this resolves rdar://6379669 - [x86-64 ABI] Pass and return
_Complex float / double efficiently



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112111 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
22fd4baf2eba2103e2b41e463f1a5f6486c398fb 26-Aug-2010 Chris Lattner <sabre@nondot.org> Finally pass "two floats in a 64-bit unit" as a <2 x float> instead of
as a double in the x86-64 ABI. This allows us to generate much better
code for certain things, e.g.:

_Complex float f32(_Complex float A, _Complex float B) {
return A+B;
}

Used to compile into (look at the integer silliness!):

_f32: ## @f32
## BB#0: ## %entry
movd %xmm1, %rax
movd %eax, %xmm1
movd %xmm0, %rcx
movd %ecx, %xmm0
addss %xmm1, %xmm0
movd %xmm0, %edx
shrq $32, %rax
movd %eax, %xmm0
shrq $32, %rcx
movd %ecx, %xmm1
addss %xmm0, %xmm1
movd %xmm1, %eax
shlq $32, %rax
addq %rdx, %rax
movd %rax, %xmm0
ret

Now we get:

_f32: ## @f32
movdqa %xmm0, %xmm2
addss %xmm1, %xmm2
pshufd $16, %xmm2, %xmm2
pshufd $1, %xmm1, %xmm1
pshufd $1, %xmm0, %xmm0
addss %xmm1, %xmm0
pshufd $16, %xmm0, %xmm1
movdqa %xmm2, %xmm0
unpcklps %xmm1, %xmm0
ret

and compile stuff like:

extern float _Complex ccoshf( float _Complex ) ;
float _Complex ccosf ( float _Complex z ) {
float _Complex iz;
(__real__ iz) = -(__imag__ z);
(__imag__ iz) = (__real__ z);
return ccoshf(iz);
}

into:

_ccosf: ## @ccosf
## BB#0: ## %entry
pshufd $1, %xmm0, %xmm1
xorps LCPI4_0(%rip), %xmm1
unpcklps %xmm0, %xmm1
movaps %xmm1, %xmm0
jmp _ccoshf ## TAILCALL

instead of:

_ccosf: ## @ccosf
## BB#0: ## %entry
movd %xmm0, %rax
movq %rax, %rcx
shlq $32, %rcx
shrq $32, %rax
xorl $-2147483648, %eax ## imm = 0xFFFFFFFF80000000
addq %rcx, %rax
movd %rax, %xmm0
jmp _ccoshf ## TAILCALL


There is still "stuff to be done" here for the struct case,
but this resolves rdar://6379669 - [x86-64 ABI] Pass and return
_Complex float / double efficiently



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112111 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
4f884360cc2d9bd92d09ad95bf4a90a6e8803690 25-Aug-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix horrible white space errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112067 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
8bea82f6699e4384ef823cdc8800ad5db271177c 25-Aug-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix horrible white space errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112067 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
aeb70b12ab1af1ba7e5e48cee3903d1a768bca90 25-Aug-2010 John McCall <rjmccall@apple.com> GCC didn't care for my attempt at API compatibility, so brute-force everything
to the new constants.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112047 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
odeGenFunction.cpp
taniumCXXABI.cpp
2de56d1d0c3a504ad1529de2677628bdfbb95cd4 25-Aug-2010 John McCall <rjmccall@apple.com> GCC didn't care for my attempt at API compatibility, so brute-force everything
to the new constants.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112047 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
odeGenFunction.cpp
taniumCXXABI.cpp
6f072329e9c9b7d44f0fa2a34528193a6f478414 25-Aug-2010 John McCall <rjmccall@apple.com> More incremental progress towards not including Expr.h in Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112044 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjC.cpp
5baba9d98364a3525d6afa15a04cdad82fd6dd30 25-Aug-2010 John McCall <rjmccall@apple.com> More incremental progress towards not including Expr.h in Sema.h.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112044 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjC.cpp
dd4c41ff17f85e60ee3278c1e71298d8240b5ea0 25-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix a horrible bug in pointer to bool conversion, which we were treating
as a truncation not a comparison to null.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112021 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
89f176d89aefe8a23bbf0ace9b329562f4970d5f 25-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix a horrible bug in pointer to bool conversion, which we were treating
as a truncation not a comparison to null.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112021 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
9fb8a84dbad2e494bdd692c0f09290d5abf98b79 25-Aug-2010 John McCall <rjmccall@apple.com> Expression statements undergo lvalue-to-rvalue conversion in C,
but not in C++, so don't emit aggregate loads of volatile references
in null context in C++. Happens to have been caught by an assertion.
We do not get the scalar case right. Volatiles are really broken.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112019 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
a8f28da6265950eea768f7e4ade15e4ebaddd56f 25-Aug-2010 John McCall <rjmccall@apple.com> Expression statements undergo lvalue-to-rvalue conversion in C,
but not in C++, so don't emit aggregate loads of volatile references
in null context in C++. Happens to have been caught by an assertion.
We do not get the scalar case right. Volatiles are really broken.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112019 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
fbdc7659711c98da25b7ec270417160099526eba 25-Aug-2010 Devang Patel <dpatel@apple.com> Fix 'for' loop variables' scope.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112002 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
0554e0e30d24d9ad7d5e12f8e7583ebb5c9715bf 25-Aug-2010 Devang Patel <dpatel@apple.com> Fix 'for' loop variables' scope.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112002 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
5a68d1f6ef2dde1833515469fc3dd4e6dfb7d815 24-Aug-2010 Devang Patel <dpatel@apple.com> Fix enum size and align. Tested by setvar.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111936 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ffc52e78a27564d0512d42ed5c98a5588cf906b5 24-Aug-2010 Devang Patel <dpatel@apple.com> Fix enum size and align. Tested by setvar.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111936 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
37908e6267aa0448184e70e7dc057d1e7d7602a3 24-Aug-2010 Daniel Dunbar <daniel@zuster.org> Debug Info: Put full Clang version into the debug info, to make it easier to
identify what version of the compiler was used to build something.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111927 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
19f1983c425ccf2b66b5e301daaef6086108d917 24-Aug-2010 Daniel Dunbar <daniel@zuster.org> Debug Info: Put full Clang version into the debug info, to make it easier to
identify what version of the compiler was used to build something.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111927 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a20dfe89d1af64290b9f407cf122a5dee4aca984 24-Aug-2010 Devang Patel <dpatel@apple.com> Emit debug info for enum constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111852 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
6237cea785144d4cdbe2a5e722788e0b4b9b30f9 24-Aug-2010 Devang Patel <dpatel@apple.com> Emit debug info for enum constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111852 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
3b8de94bd3dd8ceea50281ca389c59c4abf77220 23-Aug-2010 Dan Gohman <gohman@apple.com> Reinstate the code for emitting an initial debug type for a struct,
to handle the case where the struct is only forward-declared. In
this case, a temporary MDNode is not needed and not desired.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111842 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
45f7c78ea33e0b1b1575ca6e6f7a094be5f77e32 23-Aug-2010 Dan Gohman <gohman@apple.com> Reinstate the code for emitting an initial debug type for a struct,
to handle the case where the struct is only forward-declared. In
this case, a temporary MDNode is not needed and not desired.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111842 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
693a734a0661bb432d95442fd9b459e6e37293e2 23-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Support for IRGen of synthesize bitfield ivars in
objc-nonfragile-abi2 (radar 7824380).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111823 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
000835d0b04345c0014c603fe6339b3bc154050e 23-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Support for IRGen of synthesize bitfield ivars in
objc-nonfragile-abi2 (radar 7824380).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111823 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
522c511121f1ac940a0e57816ca62c6f70bb3b63 23-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Emit an error noting that Clang does not support code generation for
the ternary operator without a left-hand side in C++ (PR7726), from
Jean-Daniel Dupas!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111809 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
5d743fa747281dbecbc0d557035ca44f8a26a342 23-Aug-2010 Douglas Gregor <dgregor@apple.com> Emit an error noting that Clang does not support code generation for
the ternary operator without a left-hand side in C++ (PR7726), from
Jean-Daniel Dupas!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111809 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
3a312d561ac8766b127d086bf8eb8556b8cfc9be 23-Aug-2010 John McCall <rjmccall@apple.com> chandlerc pointed out that ending a line with /\ is not very friendly. :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111797 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
de719f7131e1ece5c9d6b5ffe21b83286d29f10f 23-Aug-2010 John McCall <rjmccall@apple.com> chandlerc pointed out that ending a line with /\ is not very friendly. :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111797 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
ccc1f487ceef9a92b52cf16f490ac0641dc34d88 23-Aug-2010 Chris Lattner <sabre@nondot.org> fix rdar://8340348, a miscompile of boost that was exposed by r109848.
That revision started classifying truly empty structs like "Y" and "X"
as being NoClass/NoClass and turning them into 'ignore'. The call code
turns around and allocates space for the ignored argument with
GetUndefRValue. The bug is that GetUndefRValue would return the address
as undef, instead of returning an object with a defined address but
undefined contents.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111794 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
b6c504b9101251bcb364dd9becbb887c97db27d3 23-Aug-2010 Chris Lattner <sabre@nondot.org> fix rdar://8340348, a miscompile of boost that was exposed by r109848.
That revision started classifying truly empty structs like "Y" and "X"
as being NoClass/NoClass and turning them into 'ignore'. The call code
turns around and allocates space for the ignored argument with
GetUndefRValue. The bug is that GetUndefRValue would return the address
as undef, instead of returning an object with a defined address but
undefined contents.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111794 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
6ae2325ec3b27aae178267de58fe35acf2027b91 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
GCXX.cpp
GCXXABI.h
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenModule.h
odeGenTypes.cpp
taniumCXXABI.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
GCXX.cpp
GCXXABI.h
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenModule.h
odeGenTypes.cpp
taniumCXXABI.cpp
9f8e0faec92c42e5e51a6fd8379e5e2c572992c0 23-Aug-2010 John McCall <rjmccall@apple.com> Extract a method to check whether a function is the global placement
operator new[].



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111788 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
5172ed92b42f0bc6a022542a08f7b18af821bcb3 23-Aug-2010 John McCall <rjmccall@apple.com> Extract a method to check whether a function is the global placement
operator new[].



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111788 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
ebc1790f1d4551124174af9146dc54f6ec1214a8 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
GCXX.cpp
GCXXABI.h
GExprCXX.cpp
GExprConstant.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
taniumCXXABI.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
GCXX.cpp
GCXXABI.h
GExprCXX.cpp
GExprConstant.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
taniumCXXABI.cpp
d401c08eaebd14b9fa6440513c764a7342d0adea 22-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate a stale assertion. Fixes Clang self-host.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111782 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
db68e28c05a67735211e688009890cf834c22e75 22-Aug-2010 Douglas Gregor <dgregor@apple.com> Eliminate a stale assertion. Fixes Clang self-host.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111782 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
28db0e08d9780ccfb169af4c04dd09a7be11946d 22-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> When performing value-initialization for a class with a non-trivial,
implicitly-defined default constructor, zero-initialize the memory
before calling the default constructor. Previously, we would only
zero-initialize in the case of a trivial default constructor.

Also, simplify the hideous logic that determines when we have a
trivial default constructor and, therefore, don't need to emit any
call at all.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111779 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprCXX.cpp
759e41baf6a95c3a265970b6bf1c97c233fd28b0 22-Aug-2010 Douglas Gregor <dgregor@apple.com> When performing value-initialization for a class with a non-trivial,
implicitly-defined default constructor, zero-initialize the memory
before calling the default constructor. Previously, we would only
zero-initialize in the case of a trivial default constructor.

Also, simplify the hideous logic that determines when we have a
trivial default constructor and, therefore, don't need to emit any
call at all.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111779 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprCXX.cpp
cb9ecff34ec10f7b452638473e0a2763b79775f3 22-Aug-2010 John McCall <rjmccall@apple.com> Clean up a very silly use of first-class aggregates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111777 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
e14add4a275318e7a9cafd3a01f79fb15a5a08bc 22-Aug-2010 John McCall <rjmccall@apple.com> Clean up a very silly use of first-class aggregates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111777 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
337f494bf975df1f94cb99762cdfdd82633cbbd7 22-Aug-2010 John McCall <rjmccall@apple.com> Experiment with using first-class aggregates to represent member function
pointers. I find the resulting code to be substantially cleaner, and it
makes it very easy to use the same APIs for data member pointers (which I have
conscientiously avoided here), and it avoids a plethora of potential
inefficiencies due to excessive memory copying, but we'll have to see if it
actually works.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111776 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenFunction.cpp
taniumCXXABI.cpp
icrosoftCXXABI.cpp
argetInfo.cpp
d608cdb7c044365cf4e8764ade1e11e99c176078 22-Aug-2010 John McCall <rjmccall@apple.com> Experiment with using first-class aggregates to represent member function
pointers. I find the resulting code to be substantially cleaner, and it
makes it very easy to use the same APIs for data member pointers (which I have
conscientiously avoided here), and it avoids a plethora of potential
inefficiencies due to excessive memory copying, but we'll have to see if it
actually works.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111776 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenFunction.cpp
taniumCXXABI.cpp
icrosoftCXXABI.cpp
argetInfo.cpp
cc2df096bf1d483531afa556ee12f1ba642c470b 22-Aug-2010 John McCall <rjmccall@apple.com> Extract member function pointer comparison and null comparison into
the ABI code. Implement correct semantics for these on ARM.

I believe this completes the implementation of member function pointers
on ARM.

I think I'm going to switch member function pointers over to be
non-aggregates while I have all this in mind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111774 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GExpr.cpp
GExprScalar.cpp
taniumCXXABI.cpp
e9fd7eb6c67676dc27e84eac429aec4f3be51f26 22-Aug-2010 John McCall <rjmccall@apple.com> Extract member function pointer comparison and null comparison into
the ABI code. Implement correct semantics for these on ARM.

I believe this completes the implementation of member function pointers
on ARM.

I think I'm going to switch member function pointers over to be
non-aggregates while I have all this in mind.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111774 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GExpr.cpp
GExprScalar.cpp
taniumCXXABI.cpp
f426ebb119fdd3f6ec97bf4500a0f0a826d25e52 22-Aug-2010 John McCall <rjmccall@apple.com> Abstract out member-pointer creation. I'm really unhappy about the current
duplication between the constant and non-constant paths in all of this.

Implement ARM ABI semantics for member pointer constants and conversion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111772 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GExprAgg.cpp
GExprConstant.cpp
odeGenModule.h
taniumCXXABI.cpp
875ab10245d3bf37252dd822aa1616bb0a391095 22-Aug-2010 John McCall <rjmccall@apple.com> Abstract out member-pointer creation. I'm really unhappy about the current
duplication between the constant and non-constant paths in all of this.

Implement ARM ABI semantics for member pointer constants and conversion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111772 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GExprAgg.cpp
GExprConstant.cpp
odeGenModule.h
taniumCXXABI.cpp
55e77808ad438cce61c1d910a48e7b4546c5450b 22-Aug-2010 John McCall <rjmccall@apple.com> Abstract more member-pointerness out.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111771 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GExprAgg.cpp
GExprCXX.cpp
GExprConstant.cpp
odeGenFunction.cpp
taniumCXXABI.cpp
cf2c85e76fdafe7e634810a292321a6c8322483d 22-Aug-2010 John McCall <rjmccall@apple.com> Abstract more member-pointerness out.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111771 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GExprAgg.cpp
GExprCXX.cpp
GExprConstant.cpp
odeGenFunction.cpp
taniumCXXABI.cpp
310d8f23c86d38675148d630d9e0cf3bc84220c4 22-Aug-2010 John McCall <rjmccall@apple.com> Abstract out member-pointer conversions.

Pretty much everything having to do with member pointers is ABI-specific.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111770 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GExprAgg.cpp
taniumCXXABI.cpp
3023def6bea3af6dbb51eea51f8cb8ea892d26cf 22-Aug-2010 John McCall <rjmccall@apple.com> Abstract out member-pointer conversions.

Pretty much everything having to do with member pointers is ABI-specific.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111770 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GExprAgg.cpp
taniumCXXABI.cpp
08f845b775c7be1a417b1b20b445d47b5c72a1bb 22-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Detabify.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111768 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GExprConstant.cpp
GRTTI.cpp
GStmt.cpp
angle.cpp
a7e6845660f91ec611427e1db842780e1ec12bdb 22-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Detabify.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111768 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GExprConstant.cpp
GRTTI.cpp
GStmt.cpp
angle.cpp
b336a8bcb4f9aadabea9d76642014a5ec5ef8647 22-Aug-2010 John McCall <rjmccall@apple.com> Implement the call parts of the member-function-pointer ARM C++ ABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111766 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
babc9a9ecc3fbc04edaac5a1f4fb3e869815b25c 22-Aug-2010 John McCall <rjmccall@apple.com> Implement the call parts of the member-function-pointer ARM C++ ABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111766 91177308-0d34-0410-b5e6-96231b3b80d8
taniumCXXABI.cpp
d2b44ca9d283222b796f261a348c8c35db0b8926 22-Aug-2010 John McCall <rjmccall@apple.com> Extract calls to method pointers out as an ABI routine.
No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111752 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GExprCXX.cpp
taniumCXXABI.cpp
93d557bc1867b7d7b102f87290194b4be7932c92 22-Aug-2010 John McCall <rjmccall@apple.com> Extract calls to method pointers out as an ABI routine.
No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111752 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
GExprCXX.cpp
taniumCXXABI.cpp
68086b9ad26c471322449ea1c030c2ac8397fd07 22-Aug-2010 John McCall <rjmccall@apple.com> The ARM C++ ABI is sufficiently different from the Itanium C++ ABI that
it deserves its own enumerator. Obviously the implementations should
closely follow the Itanium ABI except in cases of divergence.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111749 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
odeGenModule.cpp
taniumCXXABI.cpp
ee79a4c30e5d1c5285551c9a25b8ec6d45d46aa7 22-Aug-2010 John McCall <rjmccall@apple.com> The ARM C++ ABI is sufficiently different from the Itanium C++ ABI that
it deserves its own enumerator. Obviously the implementations should
closely follow the Itanium ABI except in cases of divergence.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111749 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
odeGenModule.cpp
taniumCXXABI.cpp
f8e66242f624f180e32362e4057f876f259d9c05 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Set the alignment correctly when creating LValue for a decls.
- Fixes PR5598.
- Review appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111726 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
983e3d7dac99aed376939f1a4daadef98e09c3b9 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Set the alignment correctly when creating LValue for a decls.
- Fixes PR5598.
- Review appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111726 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
c03c726b41445389a931db33d9bcb45de6668a7f 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> CodeGenFunction: Eliminate unused MakeQualifiers() function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111725 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
f2c737c5b89e5ba3e2a64595930ab894df206bd2 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> CodeGenFunction: Eliminate unused MakeQualifiers() function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111725 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
765520434e55a6526be292067c3c26489e6e43f5 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111724 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
76695ca7ae85f164865c3650ca44720217aa78b3 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111724 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
24a6e1341f950ba86782181ffade981dce9af3ab 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen/CGValue: Give MakeAddrLValue() an alignment argument, and eliminate old form of MakeAddr().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111723 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
odeGenFunction.h
f1fbda380b200923ea6275c61cd22cc99d4d75c0 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen/CGValue: Give MakeAddrLValue() an alignment argument, and eliminate old form of MakeAddr().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111723 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
odeGenFunction.h
c86cb8bbf0b5420e3345dcc54373e1a5a6cc018d 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move remaining LValue::Set... methods to LValue::set... (non-static) methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111722 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
3491b3d38b9569ab19f417ed2c3c8a86885345a2 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move remaining LValue::Set... methods to LValue::set... (non-static) methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111722 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
5b758ff48377351dce6d1a5930ec247518548624 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move remaining MakeAddr() calls to MakeAddrLValue().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111721 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
6d5eb76059c6251ffbb8f0cbac8d7fe9a3efabce 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move remaining MakeAddr() calls to MakeAddrLValue().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111721 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
8aa7cf26b0467fffa2eb7cff6a404422d079f3fc 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: The CVR qualifiers in a subobject adjustment should just come from the
field (I think).
- Doug, please check.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111720 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
333d42d5d7eeafd84e620a263be7a4689e673c30 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: The CVR qualifiers in a subobject adjustment should just come from the
field (I think).
- Doug, please check.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111720 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
39de63cfd7c864969c2d56d58530eddbc91f82c9 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen/CGValue: Add getQuals(), so qualifiers can be modified on an LValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111719 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
99ad7df957b2dc24df55ceff3e05a07ab5959fbd 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen/CGValue: Add getQuals(), so qualifiers can be modified on an LValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111719 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
548731e5efd80123a513b1334b1437c086abbe39 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen/LValue: Add LValue::setNonGC instead of SetObjCNonGC, for consistency with isNonGC().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111718 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GValue.h
ea619177353e0a9f35b7d926a92df0e103515dbe 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen/LValue: Add LValue::setNonGC instead of SetObjCNonGC, for consistency with isNonGC().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111718 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GValue.h
db87f196f6875fb502ccab21ad8e42fc4b777b20 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Switch more MakeAddr() users to MakeAddrLValue; this time for calls which were previously not computing the qualifier list. In most cases, I don't think it matters, but I believe this is conservatively more correct / consistent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111717 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
GExprAgg.cpp
79c3928d816f317dd27109fb92e7d190c1c68329 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Switch more MakeAddr() users to MakeAddrLValue; this time for calls which were previously not computing the qualifier list. In most cases, I don't think it matters, but I believe this is conservatively more correct / consistent.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111717 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
GExprAgg.cpp
6c566c61e51dc20f6337d4bc4b374f5a84dcb0bd 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Switch a bunch of trivial MakeAddr calls to use MakeAddrLValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111716 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
9f553f5b3bd45304dfda6bdc5cd2baac64b3315b 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Switch a bunch of trivial MakeAddr calls to use MakeAddrLValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111716 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
ad431429337969422258809c7c014f5536b7e9e5 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Eliminate EmitPredefinedFunctionName(), it doesn't need to be factored out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111715 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
odeGenFunction.h
3ec0bafda37da00aac370e24f9fff9efb90861d2 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Eliminate EmitPredefinedFunctionName(), it doesn't need to be factored out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111715 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
odeGenFunction.h
aae95a71f2a74fa818c7f2578d256e1db45f540c 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Add an LValue::MakeAddr variant which takes a type and uses that to build
the qualifiers.

Also, add CodeGenFunction::MakeAddrLValue() helper function which passes in the
ASTContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111714 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
odeGenFunction.h
5cf8bfec711116b3c4acc70a00717b2e119e7550 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Add an LValue::MakeAddr variant which takes a type and uses that to build
the qualifiers.

Also, add CodeGenFunction::MakeAddrLValue() helper function which passes in the
ASTContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111714 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
odeGenFunction.h
97ec018c502adb7f8b946d431dcdca8757af6883 21-Aug-2010 Dan Gohman <gohman@apple.com> Delete an obsolete comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111711 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e60586297dbe976653d42f15ef2089a13c64d951 21-Aug-2010 Dan Gohman <gohman@apple.com> Delete an obsolete comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111711 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3a87992b9ab6b658b41076e77400cdd4903c3700 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen/CGValue: Add alignment to LValue, and use that alignment when generating lvalue load/stores.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111710 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
9f4f7cfe40edd5ed9d8ea7b8ce7c3dd988c7e310 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen/CGValue: Add alignment to LValue, and use that alignment when generating lvalue load/stores.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111710 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
b22959398a2ac546010d64996085fa437146081f 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen/LValue: Rename SetQualifiers() to Initialize().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111708 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
de988818f4960cae954c6727cb1251142a03d750 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen/LValue: Rename SetQualifiers() to Initialize().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111708 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
899a87189270f81f41f8ccc6d6d784e741493a85 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Change Emit{Load,Store}OfScalar to take a required Alignment argument and
update callers as best I can.
- This is a work in progress, our alignment handling is very horrible / sketchy -- I am just aiming for monotonic improvement.
- Serious review appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111707 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprCXX.cpp
odeGenFunction.h
91a16fa3265686b90054715eea504d9b4a13438b 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Change Emit{Load,Store}OfScalar to take a required Alignment argument and
update callers as best I can.
- This is a work in progress, our alignment handling is very horrible / sketchy -- I am just aiming for monotonic improvement.
- Serious review appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111707 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprCXX.cpp
odeGenFunction.h
c7757a5d9d29ab9c08802353be01411133d096af 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Use Ty consistently in this function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111705 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
4cac2a157c5a3d7c8f6cd79b52e891184623f29e 21-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Use Ty consistently in this function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111705 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
81ce48738a2abe6ca63b25f0e1a837e523d50252 21-Aug-2010 Dan Gohman <gohman@apple.com> CreateTemporaryType doesn't needs its Context argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111688 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
869683782e0da7a5fb7aca04b681a31d1b7ae355 21-Aug-2010 Dan Gohman <gohman@apple.com> CreateTemporaryType doesn't needs its Context argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111688 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7feedebe542874d1bd403035a76b3908c553a37e 21-Aug-2010 Dan Gohman <gohman@apple.com> Introduce a new temporary MDNode concept. Temporary MDNodes are
not part of the IR, are not uniqued, and may be safely RAUW'd.
This replaces a variety of alternate mechanisms for achieving
the same effect.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111682 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
4cac5b48e379a209d87aa9df191e6bb418e44a0f 21-Aug-2010 Dan Gohman <gohman@apple.com> Introduce a new temporary MDNode concept. Temporary MDNodes are
not part of the IR, are not uniqued, and may be safely RAUW'd.
This replaces a variety of alternate mechanisms for achieving
the same effect.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111682 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
d74787f07ed2c35f61f437960b9182f256f6b45a 20-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> objective-c ivar refactoring patch. Iterations
over ivars for a varienty of puposes is now
consolidated into two small routines; DeepCollectObjCIvars
and ShallowCollectObjCIvars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111679 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
2c18bb7c9fca66c30b6eabbdcbc6399d24a54fa9 20-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> objective-c ivar refactoring patch. Iterations
over ivars for a varienty of puposes is now
consolidated into two small routines; DeepCollectObjCIvars
and ShallowCollectObjCIvars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111679 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f8240e142b06754a31146ab2f771a7ce74f771eb 20-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Fix a major regression with value-initialization of class types with
trivial default constructors. We're weren't zero-initializing them,
which manifested as <rdar://problem/8320532> (a regression in the GCC
test suite) and is likely to have caused significant other breakage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111650 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
452b7f22d75d1838df72653dcaacbf92b6c34e71 20-Aug-2010 Douglas Gregor <dgregor@apple.com> Fix a major regression with value-initialization of class types with
trivial default constructors. We're weren't zero-initializing them,
which manifested as <rdar://problem/8320532> (a regression in the GCC
test suite) and is likely to have caused significant other breakage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111650 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
006b9d817df58a4686ab187060599ad8075cfa67 20-Aug-2010 Bob Wilson <bob.wilson@apple.com> Translate NEON vmovl intrinsics to zero/sign-extend operations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111612 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
7cea322bf019b0d38867a27e20e3771d84dbb1af 20-Aug-2010 Bob Wilson <bob.wilson@apple.com> Translate NEON vmovl intrinsics to zero/sign-extend operations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111612 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
94123d2d6164c19fe11d639459a054455f2ee887 20-Aug-2010 Ying Wang <wangying@google.com> Fix sim build.

Note that this only makes the sim build green, but the built images won't work for sure:
No libbcc.so, which depends on something else that can not build in sim mode.
No x86 bitcode is generated as well, I believe.

Change-Id: Idca8378427196622ac77cd56a38c6a160f03ba22
ndroid.mk
deff0b09a9c30b41eaefee04b1132dbd6a696555 20-Aug-2010 John McCall <rjmccall@apple.com> Mangle explicit template arguments in dependent or overloaded names.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111591 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
6dbce19fdae4cfae4eb5f826284978e723a04e61 20-Aug-2010 John McCall <rjmccall@apple.com> Mangle explicit template arguments in dependent or overloaded names.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111591 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
c63a11dd0d93a5e86b8bc7fdac107e2d706c76c6 19-Aug-2010 Charles Davis <cdavis@mines.edu> Add some enum goodness as requested by Chris. Now instead of storing the
active C++ ABI as a raw string, we store it as an enum. This should improve
performance somewhat.

And yes, this time, I started from a clean build directory, and
all the tests passed. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111507 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
20cf717034ba1f20fc47c025ecb72ed9b631ad13 19-Aug-2010 Charles Davis <cdavis@mines.edu> Add some enum goodness as requested by Chris. Now instead of storing the
active C++ ABI as a raw string, we store it as an enum. This should improve
performance somewhat.

And yes, this time, I started from a clean build directory, and
all the tests passed. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111507 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
c8a316e75b46cbfaa7303b3b0e749e666ea4b3a9 19-Aug-2010 Sean Hunt <rideau3@gmail.com> Generate Attr subclasses with TableGen.

Now all classes derived from Attr are generated from TableGen.
Additionally, Attr* is no longer its own linked list; SmallVectors or
Attr* are used. The accompanying LLVM commit contains the updates to
TableGen necessary for this.

Some other notes about newly-generated attribute classes:

- The constructor arguments are a SourceLocation and a Context&,
followed by the attributes arguments in the order that they were
defined in Attr.td

- Every argument in Attr.td has an appropriate accessor named getFoo,
and there are sometimes a few extra ones (such as to get the length
of a variadic argument).

Additionally, specific_attr_iterator has been introduced, which will
iterate over an AttrVec, but only over attributes of a certain type. It
can be accessed through either Decl::specific_attr_begin/end or
the global functions of the same name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111455 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
cf807c4dfdb23e8fa3f400e0b24ef5b79db7a530 19-Aug-2010 Sean Hunt <scshunt@csclub.uwaterloo.ca> Generate Attr subclasses with TableGen.

Now all classes derived from Attr are generated from TableGen.
Additionally, Attr* is no longer its own linked list; SmallVectors or
Attr* are used. The accompanying LLVM commit contains the updates to
TableGen necessary for this.

Some other notes about newly-generated attribute classes:

- The constructor arguments are a SourceLocation and a Context&,
followed by the attributes arguments in the order that they were
defined in Attr.td

- Every argument in Attr.td has an appropriate accessor named getFoo,
and there are sometimes a few extra ones (such as to get the length
of a variadic argument).

Additionally, specific_attr_iterator has been introduced, which will
iterate over an AttrVec, but only over attributes of a certain type. It
can be accessed through either Decl::specific_attr_begin/end or
the global functions of the same name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111455 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8555b723610b36ddbdcced8449d2bcffaa5581ae 18-Aug-2010 John McCall <rjmccall@apple.com> Contextual arity is a feature of mangling expressions; kill off
mangleCallExpression. Also, operator names with unknown arity should
be mangled as binary operators; this is actually covered by an oddly-
positioned sentence in the ABI document. Fixes PR7891.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111395 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
5e1e89b8af283af34943a477dc6378f1a641df26 18-Aug-2010 John McCall <rjmccall@apple.com> Contextual arity is a feature of mangling expressions; kill off
mangleCallExpression. Also, operator names with unknown arity should
be mangled as binary operators; this is actually covered by an oddly-
positioned sentence in the ABI document. Fixes PR7891.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111395 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
5e00c3e6efcd477e366de7b24a6472bb1425bbde 18-Aug-2010 Chris Lattner <sabre@nondot.org> zap dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111365 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
icrosoftCXXABI.cpp
9b7d6701dabc24387cc152e4d13bf9aec6aa461a 18-Aug-2010 Chris Lattner <sabre@nondot.org> zap dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111365 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
icrosoftCXXABI.cpp
b468ef770e338de741630ce820ca99f6d197c9de 18-Aug-2010 Chris Lattner <sabre@nondot.org> fix typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111334 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
5990b5455b5e309a029a6a44889ded4e9d549f24 18-Aug-2010 Chris Lattner <sabre@nondot.org> fix typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111334 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
aa4aa00ba7489742cf688c1e33fc077035c51f53 18-Aug-2010 Chris Lattner <sabre@nondot.org> Fix PR7889 by generalizing some over specialized code. There is no
reason that this should be limited to simple lvalues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111331 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
d7241c77d388f798c5db29848396109ea1aa83d2 18-Aug-2010 Chris Lattner <sabre@nondot.org> Fix PR7889 by generalizing some over specialized code. There is no
reason that this should be limited to simple lvalues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111331 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
c7855c6447efc16dd49685d81288edb061e6808e 18-Aug-2010 Chris Lattner <sabre@nondot.org> fix PR7892, a crash on valid in c++ codegen of __PRETTY_FUNCTION__


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111330 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
5c12c7bde7e39758fb127ac7089ac88097408e8e 18-Aug-2010 Chris Lattner <sabre@nondot.org> fix PR7892, a crash on valid in c++ codegen of __PRETTY_FUNCTION__


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111330 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
184fbd446d81db7e83904b2f98757abcb6c95a6b 18-Aug-2010 Daniel Dunbar <daniel@zuster.org> StringRef'ication of lots stuff, patch by Peter Davies!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111314 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
4087f27e5416c799bcb6be072f905be752acb61c 18-Aug-2010 Daniel Dunbar <daniel@zuster.org> StringRef'ication of lots stuff, patch by Peter Davies!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111314 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
03fd54d670d167a9e3637e52760e8f5f61502d3f 17-Aug-2010 John McCall <rjmccall@apple.com> Whoops. Don't fall through into the overload case when mangling a
dependent call expression.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111300 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
6f615bc52bd5513019c32b378834a3c1b8425bf8 17-Aug-2010 John McCall <rjmccall@apple.com> Whoops. Don't fall through into the overload case when mangling a
dependent call expression.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111300 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
07f1c636bc60ee0c863003e37257f59d4fa978f4 17-Aug-2010 Benjamin Kramer <benny.kra@googlemail.com> Convert all uses of StringLiteral::getStrData() to StringLiteral::getString()
and remove getStrData(). Patch by Peter Davies (with some tweaks).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111229 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
odeGenModule.cpp
2f4eaef37476ae6891ede8ba215d0f6fd093629b 17-Aug-2010 Benjamin Kramer <benny.kra@googlemail.com> Convert all uses of StringLiteral::getStrData() to StringLiteral::getString()
and remove getStrData(). Patch by Peter Davies (with some tweaks).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111229 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
odeGenModule.cpp
2e71feebc8f0b3a5a168e9bb79e5ea92f931f9b3 16-Aug-2010 Charles Davis <cdavis@mines.edu> Implement support for member pointers under the Microsoft C++ ABI in the
AST library.

This also adds infrastructure for supporting multiple C++ ABIs in the AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111117 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
odeGenModule.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
071cc7deffad608165b1ddd5263e8bf181861520 16-Aug-2010 Charles Davis <cdavis@mines.edu> Implement support for member pointers under the Microsoft C++ ABI in the
AST library.

This also adds infrastructure for supporting multiple C++ ABIs in the AST.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111117 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
odeGenModule.h
taniumCXXABI.cpp
icrosoftCXXABI.cpp
a256f5f41fbc9723df79ce52bf6c0855df786f06 15-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Remove dead code, caught by unused function warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111091 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ba6f816d633e3b88c38c6896c2d78d19489650f2 15-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove dead code, caught by unused function warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111091 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
4f8463b138b056b34a9cacf2e5d67d6af0e488d9 15-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Explicitly handle every case in the switch in RTTIBuilder::BuildTypeInfo.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111085 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
f2aabe199a9a2c794faf6ec16c26a340d18e9eb8 15-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Explicitly handle every case in the switch in RTTIBuilder::BuildTypeInfo.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111085 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
2f45ecb285472c7eabd6a827468519a87c6b2fe3 14-Aug-2010 John McCall <rjmccall@apple.com> More cleanup enabling.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111070 91177308-0d34-0410-b5e6-96231b3b80d8
GException.h
odeGenFunction.cpp
odeGenFunction.h
838d796d020f6a8cd2b2d1e2a0a85c83bbf29543 14-Aug-2010 John McCall <rjmccall@apple.com> More cleanup enabling.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111070 91177308-0d34-0410-b5e6-96231b3b80d8
GException.h
odeGenFunction.cpp
odeGenFunction.h
0db19a9a5b97d4324c5c9d8ca6a0a817de92257b 13-Aug-2010 John McCall <rjmccall@apple.com> Sketch out a framework for delaying the activation of a cleanup.
Not yet complete or used.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111044 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GException.h
odeGenFunction.cpp
odeGenFunction.h
cd2d2b7814e0104ed41a8da159a06a8ca77b70d8 13-Aug-2010 John McCall <rjmccall@apple.com> Sketch out a framework for delaying the activation of a cleanup.
Not yet complete or used.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111044 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GException.h
odeGenFunction.cpp
odeGenFunction.h
1b21c5748eeb17fbe28d96c73e96f70001495043 13-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Zap unused UnaryOperator::OffsetOf.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110996 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
de7e66256b1bdfcf6526994825a8c8fced52a31c 13-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Zap unused UnaryOperator::OffsetOf.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110996 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
27517568213c2115b0475ada241c9dd5c1ab4bcf 13-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Make use of __func__ in a block actually refer to
block's helper function. Fixes radar 7860965.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110988 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
8404f670f5bda1efb60076c701613b86b576533d 13-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Make use of __func__ in a block actually refer to
block's helper function. Fixes radar 7860965.


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



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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110979 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
GVTables.cpp
odeGenModule.cpp
979310a08f229faa370ecb588c85383f8b0e5a2a 12-Aug-2010 John McCall <rjmccall@apple.com> Implement RTTI generation for Objective C types. Fixes PR7864.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110900 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
e8dc53e5857ac1cf65fa4e9d87e3d88d4452b9d4 12-Aug-2010 John McCall <rjmccall@apple.com> Implement RTTI generation for Objective C types. Fixes PR7864.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110900 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
0479ef59e04663f5f9a39ab456175975229d37fb 12-Aug-2010 Devang Patel <dpatel@apple.com> Emit debug info for static const class member.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110885 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
dabc3e90cc385214a53064d8c44edbece9891ddf 12-Aug-2010 Devang Patel <dpatel@apple.com> Emit debug info for static const class member.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110885 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
473c5bc515f3b31a018d6fe3e409ea4a12daa342 12-Aug-2010 John McCall <rjmccall@apple.com> Revise r110163: don't mark weak functions nounwind, because the optimizer
treats that as a contract to be fulfilled by any replacements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110864 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
b3a29f132794f67108bccc9c7cc3795365e8a965 12-Aug-2010 John McCall <rjmccall@apple.com> Revise r110163: don't mark weak functions nounwind, because the optimizer
treats that as a contract to be fulfilled by any replacements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110864 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
74ada7ed004f96be38cce92e91c370a9de081c3c 11-Aug-2010 Devang Patel <dpatel@apple.com> Emit a stop point for delegate constructor call. This gives user a chance to step into constructor body.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110853 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
d67ef0eed463b43980f04a444155f423114be34b 11-Aug-2010 Devang Patel <dpatel@apple.com> Emit a stop point for delegate constructor call. This gives user a chance to step into constructor body.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110853 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
160f324edf7fad9410537310a4bde096b897c402 11-Aug-2010 John McCall <rjmccall@apple.com> When re-raising an exception after a cleanup, we need to call _Unwind_Resume_or_Rethrow
instead of _Unwind_Resume. With SJLJ exceptions, this is spelled
"_Unwind_SjLj_Resume_or_Rethrow", not "_Unwind_SjLj_Resume", which has
significantly different semantics.

We should actually never be generating a call to _Unwind_SjLj_Resume directly;
even if we were generating true cleanups (which we aren't because of the
horrible hack), we should be calling __cxa_end_cleanup() on ARM. I
haven't implemented this because there's little point as long as the HH is
present.

I believe this fixes <rdar://problem/8281377>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110851 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
a5f2de2e49e25ece82dd9fd63d8f390a7cda6417 11-Aug-2010 John McCall <rjmccall@apple.com> When re-raising an exception after a cleanup, we need to call _Unwind_Resume_or_Rethrow
instead of _Unwind_Resume. With SJLJ exceptions, this is spelled
"_Unwind_SjLj_Resume_or_Rethrow", not "_Unwind_SjLj_Resume", which has
significantly different semantics.

We should actually never be generating a call to _Unwind_SjLj_Resume directly;
even if we were generating true cleanups (which we aren't because of the
horrible hack), we should be calling __cxa_end_cleanup() on ARM. I
haven't implemented this because there's little point as long as the HH is
present.

I believe this fixes <rdar://problem/8281377>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110851 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
13e130255db88000aaf2179fa942005d98e34f31 11-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Work in progress for PR7864. Someone more familiar with ObjC++ needs to fill
in the code after the "FIXME: Needs to be written".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110849 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
1cf26f5c103cd2d6d1e14d4d6b72df477d8bf107 11-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Work in progress for PR7864. Someone more familiar with ObjC++ needs to fill
in the code after the "FIXME: Needs to be written".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110849 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
4dce59ced76d0b5cf548e996524aad884b73c17c 11-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> IRGen support for functions returning objc object
types. Fixes PR7865.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110832 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
faa3449a0f8b61ff25bd6aba78c50cabab213c24 11-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> IRGen support for functions returning objc object
types. Fixes PR7865.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110832 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
8e129c8b6e514bf3615d6c1ab66169cb07837de5 11-Aug-2010 John McCall <rjmccall@apple.com> Fix a bug in @finally emission in both the fragile and non-fragile EH schemes
where we weren't accounting for the possibility that a @finally block might
have internal cleanups and therefore might write to the cleanup destination slot.

Fixes <rdar://problem/8293901>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110760 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCMac.cpp
d96a8e771ca9f406f0fa1dd4639997335ae444a7 11-Aug-2010 John McCall <rjmccall@apple.com> Fix a bug in @finally emission in both the fragile and non-fragile EH schemes
where we weren't accounting for the possibility that a @finally block might
have internal cleanups and therefore might write to the cleanup destination slot.

Fixes <rdar://problem/8293901>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110760 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCMac.cpp
eb66adf31d16075cd010313a717c1adb9b965481 10-Aug-2010 Devang Patel <dpatel@apple.com> Simplify


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110716 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4c4acc0352037528c710d798c0d2bc771a6782ac 10-Aug-2010 Devang Patel <dpatel@apple.com> Simplify


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110716 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b6e73d494139924080889ff90d6976f13693eca2 10-Aug-2010 John Thompson <john.thompson.jtsoftware@gmail.com> Slightly revised handling of mult-alt constraints, to avoid an assert, until we have the full fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110706 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
ef44e1110711276ffffe4b22d4ba0cebd49cb330 10-Aug-2010 John Thompson <John.Thompson.JTSoftware@gmail.com> Slightly revised handling of mult-alt constraints, to avoid an assert, until we have the full fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110706 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
162f6b7e664cf5fa115450f0940589aaf6d4d3f4 10-Aug-2010 John McCall <rjmccall@apple.com> When initializing a static local, pop the guard-abort EH cleanup after
the variable is fully initialized.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110704 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
224124c7b85596157201a67a7ba12d2b0f5c153c 10-Aug-2010 John McCall <rjmccall@apple.com> When initializing a static local, pop the guard-abort EH cleanup after
the variable is fully initialized.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110704 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
fdd4775be25efa81fe7bbc591e630f28c9ff5c34 10-Aug-2010 Devang Patel <dpatel@apple.com> Do not use DIGlobalVariable to emit debugging information for enums.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110697 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0317ab0f54e7884b072ed359447e078d067fc9e9 10-Aug-2010 Devang Patel <dpatel@apple.com> Do not use DIGlobalVariable to emit debugging information for enums.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110697 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3e708eec9d6c5f220a0f017a67db245c949ccfec 10-Aug-2010 Devang Patel <dpatel@apple.com> Simplify code and add comments, in code that generate debug info for constant integer globals, based on Chris's feedback.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110694 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
25c2c8fb9309050612009a6571e2660e75531348 10-Aug-2010 Devang Patel <dpatel@apple.com> Simplify code and add comments, in code that generate debug info for constant integer globals, based on Chris's feedback.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110694 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
1a626e66b1510eb6e7b691489a10f9e794c10753 10-Aug-2010 Devang Patel <dpatel@apple.com> Even if a constant's evaluated value is used, emit debug info for the constant variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110660 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
8d308384a220c7dc81755c47cdcbdd87dac25d5b 10-Aug-2010 Devang Patel <dpatel@apple.com> Even if a constant's evaluated value is used, emit debug info for the constant variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110660 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
b38704938e9fea65d2754b16fb8af4642e9b010f 09-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Support ObjC implementation decls for PCH.

Strictly speaking, implementations don't go in headers but there's no law against it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110567 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9d50c0635fb213b2a1857e3f8488580f0dab2f98 09-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Support ObjC implementation decls for PCH.

Strictly speaking, implementations don't go in headers but there's no law against it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110567 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
e0277e755432fabc94c2e2edd6fd418d20ed67ee 08-Aug-2010 Eric Christopher <echristo@apple.com> Thread local variables aren't considered common linkage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110530 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
91f31dc234bbc98f3dd20e6741a7b0b98c7916bf 08-Aug-2010 Eric Christopher <echristo@apple.com> Thread local variables aren't considered common linkage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110530 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
e004547e55aa2e69d1a7ee3d037605c5b1e9f6c3 07-Aug-2010 Douglas Gregor <doug.gregor@gmail.com> Allow reference binding of a reference of Objective-C object type to
an lvalue of another, compatible Objective-C object type (e.g., a
subclass). Introduce a new initialization sequence step kind to
describe this binding, along with a new cast kind. Fixes PR7741.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110513 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
569c3166874324c24011f8ade6978421f0d39b3c 07-Aug-2010 Douglas Gregor <dgregor@apple.com> Allow reference binding of a reference of Objective-C object type to
an lvalue of another, compatible Objective-C object type (e.g., a
subclass). Introduce a new initialization sequence step kind to
describe this binding, along with a new cast kind. Fixes PR7741.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110513 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
fac1cb00c91cdb153d6e97eecec19556d6bc2c86 07-Aug-2010 John McCall <rjmccall@apple.com> Inline a special case of EmitAggregateCopy into EmitNullInitialization
to avoid the awesome-but-wrong-in-this-case assertion in the canon EAC.
Fixes PR7834.

Also fix a subtle address-space bug in the memset path.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110511 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
9021718882441dd391a1960084580d3cd19c423a 07-Aug-2010 John McCall <rjmccall@apple.com> Inline a special case of EmitAggregateCopy into EmitNullInitialization
to avoid the awesome-but-wrong-in-this-case assertion in the canon EAC.
Fixes PR7834.

Also fix a subtle address-space bug in the memset path.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110511 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
0cf5885d618c1de7806e691c328c1540fa040a19 07-Aug-2010 John McCall <rjmccall@apple.com> Store inheritance paths after CastExprs instead of inside them.
This takes some trickery since CastExpr has subclasses (and indeed,
is abstract).

Also, smoosh the CastKind into the bitfield from Expr.

Drops two words of storage from Expr in the common case of expressions
which don't need inheritance paths. Avoids a separate allocation and
another word of overhead in cases needing inheritance paths. Also has
the advantage of not leaking memory, since destructors for AST nodes are
never run.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110507 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
odeGenFunction.h
odeGenModule.h
f871d0cc377a1367b519a6cce26be74607566eba 07-Aug-2010 John McCall <rjmccall@apple.com> Store inheritance paths after CastExprs instead of inside them.
This takes some trickery since CastExpr has subclasses (and indeed,
is abstract).

Also, smoosh the CastKind into the bitfield from Expr.

Drops two words of storage from Expr in the common case of expressions
which don't need inheritance paths. Avoids a separate allocation and
another word of overhead in cases needing inheritance paths. Also has
the advantage of not leaking memory, since destructors for AST nodes are
never run.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110507 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
odeGenFunction.h
odeGenModule.h
766c37af7b472bcbb306cd7c9526b9a7727ad1e3 07-Aug-2010 Chris Lattner <sabre@nondot.org> Correct -ftrapv to trap on errors, instead of calling the
__overflow_handler entrypoint that David Chisnall made up.
Calling __overflow_handler is not part of the contract of
-ftrapv provided by GCC, and should never have been checked
in in the first place.

According to:
http://permalink.gmane.org/gmane.comp.compilers.clang.devel/8699

David is using this for some of arbitrary precision integer stuff
or something, which is not an appropriate thing to implement on
this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110490 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
93a00357f2795404c6709d9e06b4f717c82e6efb 07-Aug-2010 Chris Lattner <sabre@nondot.org> Correct -ftrapv to trap on errors, instead of calling the
__overflow_handler entrypoint that David Chisnall made up.
Calling __overflow_handler is not part of the contract of
-ftrapv provided by GCC, and should never have been checked
in in the first place.

According to:
http://permalink.gmane.org/gmane.comp.compilers.clang.devel/8699

David is using this for some of arbitrary precision integer stuff
or something, which is not an appropriate thing to implement on
this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110490 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
755e4a65f65f32b061cfe033392127d8a51894b8 06-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Initialize variable to work around warning; unfortunately, there isn't any
way to tell gcc "really, values outside the enum aren't valid".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110450 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
16fd39fb11cce33d58ecdd39f25540b85c1542b4 06-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Initialize variable to work around warning; unfortunately, there isn't any
way to tell gcc "really, values outside the enum aren't valid".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110450 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1a19fccb528d891e6ed682f6be5637f547dda23b 06-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Finishing up block variable layout API by supporting
union type variables and their nesting inside other
aggregate types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110448 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a1f024c1a5c49f87ee1d0767afc0437c4e4dbecf 06-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Finishing up block variable layout API by supporting
union type variables and their nesting inside other
aggregate types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110448 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d6927d5e9b4394c74a43a5d7561d910d9be2cc6d 06-Aug-2010 Nate Begeman <natebegeman@mac.com> vdup_lane was missing
<rdar://problem/8278732>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110420 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
cd480ad90ff4c144084805761d2dfa52ee9e1c92 06-Aug-2010 Nate Begeman <natebegeman@mac.com> vdup_lane was missing
<rdar://problem/8278732>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110420 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
8aafd5cfc8c1ea5ce65d7aa1f64b528c4ffdf801 06-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Attempt to fix uninitialized value warning reported on cfe-commits.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110418 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
6d4e44b462fe9e870a40358522379400ccc6e3c2 06-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Attempt to fix uninitialized value warning reported on cfe-commits.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110418 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1bbc7563e2a95183a8a3b812fc152d6640a7d088 06-Aug-2010 John McCall <rjmccall@apple.com> Don't crash when mangling empty anonymous unions. We never actually *need*
these, but it's convenient to mangle them when deferring them (in the 99.99%
case where it's not an anonymous union, of course).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110381 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
7121c8f551d9c91c0cf0e5e1f7f9aafa97241b17 06-Aug-2010 John McCall <rjmccall@apple.com> Don't crash when mangling empty anonymous unions. We never actually *need*
these, but it's convenient to mangle them when deferring them (in the 99.99%
case where it's not an anonymous union, of course).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110381 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
ba8da445f184df43089d00a962942635f7b3ec80 05-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Add support for block imported struct variable layout info.
(objc gc and blocks in NeXt runtime).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110377 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
e1a48984f91cd8a65932f69be25f8330737e9842 05-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Add support for block imported struct variable layout info.
(objc gc and blocks in NeXt runtime).


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

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



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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110374 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
odeGenModule.cpp
d3b05490857723aed7dcfc4d7839ca4679e95121 05-Aug-2010 John McCall <rjmccall@apple.com> Argument evaluation order is not guaranteed. Split these out to force an order.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110354 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
3bd94d6d1e8879f072f92e341f2c557ac91ab853 05-Aug-2010 John McCall <rjmccall@apple.com> Argument evaluation order is not guaranteed. Split these out to force an order.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110354 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
82a76fc4cee92e0a8cca727b8fffea94e077a73c 05-Aug-2010 John McCall <rjmccall@apple.com> Fix a major bug with -ftrapv and ++/--. Patch by David Keaton!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110347 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
401be6bddcf05ac2828730e0bb4e8b81931f8296 05-Aug-2010 John McCall <rjmccall@apple.com> Fix a major bug with -ftrapv and ++/--. Patch by David Keaton!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110347 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
bf050f397045c65ea54da13afe05dc84f43fa37e 05-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> For now skip over aggregate non-byref block variables.
(objc gc specific).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110340 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
8ada8eb194773fb22560925a1b726971b1f76128 05-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> For now skip over aggregate non-byref block variables.
(objc gc specific).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110340 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
adcbf6372a28df4197b92d5b48258f649d368543 05-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Trying to unbreak buildbot.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110339 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
5af1235d48d7bde471eb63fe6e1729be7c0308b8 05-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Trying to unbreak buildbot.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110339 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
868715a3973e8e7973af20d163c251f9831265b0 05-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Add IRGen support for non-constant OffsetOfExpr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110326 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
0027d2bb24db629a33a71d04a5fb90a14c15a680 05-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Add IRGen support for non-constant OffsetOfExpr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110326 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
0629e6403126369d15585aeed9a7f6faf7f5cf17 05-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Implement #pragma GCC visibility.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110315 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
aa8b0d19244a6e7e8e5798fcc6aef003c274d3e0 05-Aug-2010 Eli Friedman <eli.friedman@gmail.com> Implement #pragma GCC visibility.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110315 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
c420ebbe3c6507e9163e9b7df3feccfb28007add 05-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Clean up of my last patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110290 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b8fd2eb42a9f21c1ea65a5be37f3ce814c5cf745 05-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Clean up of my last patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110290 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f472e7fad69ebe231d8a3826d78fbb6db8b134eb 05-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Block variable layout bitmap API generation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110287 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
93ce50d0e6fda37a74033596d8c1c08e6ec27ab1 05-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Block variable layout bitmap API generation.



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

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



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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110285 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
583784cab947bf2c2c78f3395b48f2f693381420 04-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> More objc block variable layout info. work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110239 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GObjCMac.cpp
odeGenFunction.h
44034db24bf59a53aa7699f4bbf59b939710bb3c 04-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> More objc block variable layout info. work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110239 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GObjCMac.cpp
odeGenFunction.h
630f43411b3e63a49c1899316429b14d437c9757 04-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Some early work for providing block layout info.
for objective-c/c++ blocks (NeXt runtime).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110213 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
89ecd41e0a6bfb3b0913dbe41c3c666340b308c7 04-Aug-2010 Fariborz Jahanian <fjahanian@apple.com> Some early work for providing block layout info.
for objective-c/c++ blocks (NeXt runtime).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110213 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
6247b75c709c25b117c79b4b762d53715f796bc4 04-Aug-2010 John McCall <rjmccall@apple.com> Emit standard-library RTTI with external linkage, not weak_odr.

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

Fixes PR5962.



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

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

Fixes PR5962.



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



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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110189 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
cec40a59147a07c9ac8a68c5ee0c95caf4be597b 04-Aug-2010 John McCall <rjmccall@apple.com> Some more correctness fixes and code-size optimizations for fragile-ABI
ObjC exceptions:
- don't enter a try for the catch blocks unless there's a finally
- put the setjmp buffer in the locals set for liveness reasons
- dump the sync object into an alloca in the locals set for liveness reasons
Some of this can go away if the backend starts to properly calculate liveness
in the presence of setjmp (which would also be a *much* stabler solution).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110188 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0b2517299415ab1c28b9cb87d536ccea84317a10 04-Aug-2010 John McCall <rjmccall@apple.com> Some more correctness fixes and code-size optimizations for fragile-ABI
ObjC exceptions:
- don't enter a try for the catch blocks unless there's a finally
- put the setjmp buffer in the locals set for liveness reasons
- dump the sync object into an alloca in the locals set for liveness reasons
Some of this can go away if the backend starts to properly calculate liveness
in the presence of setjmp (which would also be a *much* stabler solution).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110188 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b5b0caa0399612782f1c0b64b31f3f67f63479c1 04-Aug-2010 John McCall <rjmccall@apple.com> Do a very simple pass over every function we emit to infer whether we can
mark it nounwind based on whether it contains any non-nounwind calls.
<rdar://problem/8087431>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110163 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
39dad53772c42eb36ebec1c81c56ba99d038fb94 04-Aug-2010 John McCall <rjmccall@apple.com> Do a very simple pass over every function we emit to infer whether we can
mark it nounwind based on whether it contains any non-nounwind calls.
<rdar://problem/8087431>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110163 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
eaf2382b16f01a328174d92be05a2e084895533a 03-Aug-2010 Nate Begeman <natebegeman@mac.com> Add support for VFP status & control operations for ARM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110153 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
99c40bb13b523d58d7aeb6446e4f486d6918ca58 03-Aug-2010 Nate Begeman <natebegeman@mac.com> Add support for VFP status & control operations for ARM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110153 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
225be7fc1f1bd15b587c4c72cecb62bd9dcef245 03-Aug-2010 John McCall <rjmccall@apple.com> Emit weak vtables of non-template classes with hidden visibility.



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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110107 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
d1fbcf83ba134e32a48362e4e8349ba86bf6409c 02-Aug-2010 John McCall <rjmccall@apple.com> Further adjustments to -Wglobal-constructors; works for references and direct
initializations now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110063 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
4204f07fc8bffe6d320b2de95fea274ccf37a17b 02-Aug-2010 John McCall <rjmccall@apple.com> Further adjustments to -Wglobal-constructors; works for references and direct
initializations now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110063 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
43fd82f060839f397e27ba32d28db8ee3d359a11 01-Aug-2010 John McCall <rjmccall@apple.com> Fix fragile-ABI ObjC exceptions in the presence of optimization with
the magic of inline assembly. Essentially we use read and write hazards
on the set of local variables to force flushing locals to memory
immediately before any protected calls and to inhibit optimizing locals
across the setjmp->catch edge. Fixes rdar://problem/8160285



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109960 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
87bb5822bfa4baea23a3d9273df266777f3ab796 01-Aug-2010 John McCall <rjmccall@apple.com> Fix fragile-ABI ObjC exceptions in the presence of optimization with
the magic of inline assembly. Essentially we use read and write hazards
on the set of local variables to force flushing locals to memory
immediately before any protected calls and to inhibit optimizing locals
across the setjmp->catch edge. Fixes rdar://problem/8160285



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109960 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
2264ca4d52f9fd9ba396e90d31b856c7a158b1ed 30-Jul-2010 John McCall <rjmccall@apple.com> Emit global destructors even if the destroyed object has no initializers or has
an initializer requiring temporary object disposal.

Fixes rdar:://problem/8246444.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109849 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
85aca0f6a9da02bda705690fd56d0aa713604f08 30-Jul-2010 John McCall <rjmccall@apple.com> Emit global destructors even if the destroyed object has no initializers or has
an initializer requiring temporary object disposal.

Fixes rdar:://problem/8246444.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109849 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
dfda9b10a9356563e626ec43f7eb14249963ccd7 30-Jul-2010 Chris Lattner <sabre@nondot.org> fix PR5179 and correctly fix PR5831 to not miscompile.

The X86-64 ABI code didn't handle the case when a struct
would get classified and turn up as "NoClass INTEGER" for
example. This is perfectly possible when the first slot
is all padding (e.g. due to empty base classes). In this
situation, the first 8-byte doesn't take a register at all,
only the second 8-byte does.

This fixes this by enhancing the x86-64 abi stuff to allow
and handle this case, reverts the broken fix for PR5831,
and enhances the target independent stuff to be able to
handle an argument value in registers being accessed at an
offset from the memory value.

This is the last x86-64 calling convention related miscompile
that I'm aware of.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109848 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetInfo.cpp
117e3f4cd4d6ea41c3202da8729f94168c5c8239 30-Jul-2010 Chris Lattner <sabre@nondot.org> fix PR5179 and correctly fix PR5831 to not miscompile.

The X86-64 ABI code didn't handle the case when a struct
would get classified and turn up as "NoClass INTEGER" for
example. This is perfectly possible when the first slot
is all padding (e.g. due to empty base classes). In this
situation, the first 8-byte doesn't take a register at all,
only the second 8-byte does.

This fixes this by enhancing the x86-64 abi stuff to allow
and handle this case, reverts the broken fix for PR5831,
and enhances the target independent stuff to be able to
handle an argument value in registers being accessed at an
offset from the memory value.

This is the last x86-64 calling convention related miscompile
that I'm aware of.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109848 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetInfo.cpp
9803e6013afa4070022b094add55e3775abd0e6c 30-Jul-2010 Daniel Dunbar <daniel@zuster.org> Revert "Re-apply fixed version of 108749, correctly conditionalizing the new
sections on", this change uncovered a possible linker bug which resulted in the
wrong messages getting dispatched. Backing this out while we investigate...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109817 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6633e3c5b33c10ebfc5a369e412bb3d3f2cb3899 30-Jul-2010 Daniel Dunbar <daniel@zuster.org> Revert "Re-apply fixed version of 108749, correctly conditionalizing the new
sections on", this change uncovered a possible linker bug which resulted in the
wrong messages getting dispatched. Backing this out while we investigate...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109817 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
25242a5ea93028688a80ecd5981815efa349e9cb 30-Jul-2010 Nate Begeman <natebegeman@mac.com> Wire up sema checking for __builtin_arm_usat and __builtin_arm_ssat immediates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109814 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
bb37f50c2d0d72e1fa5b349d5f6a11fdc5acb86e 30-Jul-2010 Nate Begeman <natebegeman@mac.com> Wire up sema checking for __builtin_arm_usat and __builtin_arm_ssat immediates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109814 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
d61b5bb1993825b264eded735baea9b18eaa7d26 29-Jul-2010 Chris Lattner <sabre@nondot.org> move the last hunk of getCoerceResult into the place
that needs it and remove getCoerceResult.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109807 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
argetInfo.cpp
eb518b4b89e4134b21975530809697142f69b779 29-Jul-2010 Chris Lattner <sabre@nondot.org> move the last hunk of getCoerceResult into the place
that needs it and remove getCoerceResult.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109807 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
argetInfo.cpp
66d26510d09f2475c0e8f6370e2d42d3b5dfb853 29-Jul-2010 Chris Lattner <sabre@nondot.org> now that direct and coerce are merged, getCoerceResult gets simpler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109805 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
1cce1958b127f1722a18825b2cd793ce21246911 29-Jul-2010 Chris Lattner <sabre@nondot.org> now that direct and coerce are merged, getCoerceResult gets simpler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109805 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
371a3d7f907e648949658bfc06debacaedd4e42f 29-Jul-2010 Chris Lattner <sabre@nondot.org> now that GetSSETypeAtOffset handles passing SSE class values as
float, the special case hack in getCoerceResult can go away.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109804 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
1b32ae9537186c021409bebeaa308db886ed98a2 29-Jul-2010 Chris Lattner <sabre@nondot.org> now that GetSSETypeAtOffset handles passing SSE class values as
float, the special case hack in getCoerceResult can go away.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109804 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
8fac2eb1ee050aaf6cab1fb5e944c2b20c5a8b7b 29-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Change the name to something less terrible; suggestion by Doug. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109797 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4ac7c0bb39696e92fd220118fedc484c09a69870 29-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Change the name to something less terrible; suggestion by Doug. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109797 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8401003c6d246242a82a5b24a0799926d2af87ac 29-Jul-2010 Chris Lattner <sabre@nondot.org> Implement the clang-side of detection for when to pass as
<2 x float> instead of double. This works but can't be turned
on until I teach codegen to pass <2 x float> as one XMM register
instead of two.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109790 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
0b3620066bfbb33004bed1816c851a923b9301af 29-Jul-2010 Chris Lattner <sabre@nondot.org> Implement the clang-side of detection for when to pass as
<2 x float> instead of double. This works but can't be turned
on until I teach codegen to pass <2 x float> as one XMM register
instead of two.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109790 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
3b4aabee720e81a745b51529fbb54fb9f2a96c3f 29-Jul-2010 Chris Lattner <sabre@nondot.org> Look at me, I can count!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109786 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
cba8d310163f84630fd140fbfa9b6fdad9d26587 29-Jul-2010 Chris Lattner <sabre@nondot.org> Look at me, I can count!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109786 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
1ac53087c7b810990070ff80e5953669d339c55d 29-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function,
DeclIsRequiredFunctionOrFileScopedVar.

This is essentially a CodeGen predicate that is also needed by the PCH mechanism to determine whether a decl
needs to be deserialized during PCH loading for codegen purposes.
Since this logic is shared by CodeGen and the PCH mechanism, move it to the ASTContext,
thus CodeGenModule's GetLinkageForFunction/GetLinkageForVariable and the GVALinkage enum is moved out of CodeGen.

This fixes current (and avoids future) codegen-from-PCH bugs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109784 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
90e99a84ddd020e8fda79643748243725a2ed071 29-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function,
DeclIsRequiredFunctionOrFileScopedVar.

This is essentially a CodeGen predicate that is also needed by the PCH mechanism to determine whether a decl
needs to be deserialized during PCH loading for codegen purposes.
Since this logic is shared by CodeGen and the PCH mechanism, move it to the ASTContext,
thus CodeGenModule's GetLinkageForFunction/GetLinkageForVariable and the GVALinkage enum is moved out of CodeGen.

This fixes current (and avoids future) codegen-from-PCH bugs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109784 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
1465ef3bffc3b991af3a3da81422d305704283e1 29-Jul-2010 Chris Lattner <sabre@nondot.org> fix rdar://8251384, another case where we could access beyond the
end of a struct. This improves the case when the struct being passed
contains 3 floats, either due to a struct or array of 3 things. Before
we'd generate this IR for the testcase:

define float @bar(double %X.coerce0, double %X.coerce1) nounwind {
entry:
%X = alloca %struct.foof, align 8 ; <%struct.foof*> [#uses=2]
%0 = bitcast %struct.foof* %X to %1* ; <%1*> [#uses=2]
%1 = getelementptr %1* %0, i32 0, i32 0 ; <double*> [#uses=1]
store double %X.coerce0, double* %1
%2 = getelementptr %1* %0, i32 0, i32 1 ; <double*> [#uses=1]
store double %X.coerce1, double* %2
%tmp = getelementptr inbounds %struct.foof* %X, i32 0, i32 2 ; <float*> [#uses=1]
%tmp1 = load float* %tmp ; <float> [#uses=1]
ret float %tmp1
}

which compiled (with optimization) to:

_bar: ## @bar
## BB#0: ## %entry
movd %xmm1, %rax
movd %eax, %xmm0
ret

Now we produce:

define float @bar(double %X.coerce0, float %X.coerce1) nounwind {
entry:
%X = alloca %struct.foof, align 8 ; <%struct.foof*> [#uses=2]
%0 = bitcast %struct.foof* %X to %0* ; <%0*> [#uses=2]
%1 = getelementptr %0* %0, i32 0, i32 0 ; <double*> [#uses=1]
store double %X.coerce0, double* %1
%2 = getelementptr %0* %0, i32 0, i32 1 ; <float*> [#uses=1]
store float %X.coerce1, float* %2
%tmp = getelementptr inbounds %struct.foof* %X, i32 0, i32 2 ; <float*> [#uses=1]
%tmp1 = load float* %tmp ; <float> [#uses=1]
ret float %tmp1
}

and:

_bar: ## @bar
## BB#0: ## %entry
movaps %xmm1, %xmm0
ret



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109776 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
f47c944b5710a545d564b4d4b641a2f8bac96af3 29-Jul-2010 Chris Lattner <sabre@nondot.org> fix rdar://8251384, another case where we could access beyond the
end of a struct. This improves the case when the struct being passed
contains 3 floats, either due to a struct or array of 3 things. Before
we'd generate this IR for the testcase:

define float @bar(double %X.coerce0, double %X.coerce1) nounwind {
entry:
%X = alloca %struct.foof, align 8 ; <%struct.foof*> [#uses=2]
%0 = bitcast %struct.foof* %X to %1* ; <%1*> [#uses=2]
%1 = getelementptr %1* %0, i32 0, i32 0 ; <double*> [#uses=1]
store double %X.coerce0, double* %1
%2 = getelementptr %1* %0, i32 0, i32 1 ; <double*> [#uses=1]
store double %X.coerce1, double* %2
%tmp = getelementptr inbounds %struct.foof* %X, i32 0, i32 2 ; <float*> [#uses=1]
%tmp1 = load float* %tmp ; <float> [#uses=1]
ret float %tmp1
}

which compiled (with optimization) to:

_bar: ## @bar
## BB#0: ## %entry
movd %xmm1, %rax
movd %eax, %xmm0
ret

Now we produce:

define float @bar(double %X.coerce0, float %X.coerce1) nounwind {
entry:
%X = alloca %struct.foof, align 8 ; <%struct.foof*> [#uses=2]
%0 = bitcast %struct.foof* %X to %0* ; <%0*> [#uses=2]
%1 = getelementptr %0* %0, i32 0, i32 0 ; <double*> [#uses=1]
store double %X.coerce0, double* %1
%2 = getelementptr %0* %0, i32 0, i32 1 ; <float*> [#uses=1]
store float %X.coerce1, float* %2
%tmp = getelementptr inbounds %struct.foof* %X, i32 0, i32 2 ; <float*> [#uses=1]
%tmp1 = load float* %tmp ; <float> [#uses=1]
ret float %tmp1
}

and:

_bar: ## @bar
## BB#0: ## %entry
movaps %xmm1, %xmm0
ret



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109776 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
5ef99c437c7d04a3a4f51bec9fe1fc8e98dd486f 29-Jul-2010 Chris Lattner <sabre@nondot.org> start setting up infrastructure for passing multi-floats
as <2 x float> instead of as double. The backend isn't ready
yet, but infrastructure in the frontend can come up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109768 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
603519d269d48dca99927f0ad65e92099bd76161 29-Jul-2010 Chris Lattner <sabre@nondot.org> start setting up infrastructure for passing multi-floats
as <2 x float> instead of as double. The backend isn't ready
yet, but infrastructure in the frontend can come up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109768 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
fba3b6af412b53f7063bf8f5202804f4586292c8 29-Jul-2010 Chris Lattner <sabre@nondot.org> rename Get8ByteTypeAtOffset -> GetINTEGERTypeAtOffset to
make it clear that this function should only return a type
that the codegen will classify the same as an INTEGER type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109763 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
0d2656d77053cc2ed6f3a3acdf12d67807c7f3a2 29-Jul-2010 Chris Lattner <sabre@nondot.org> rename Get8ByteTypeAtOffset -> GetINTEGERTypeAtOffset to
make it clear that this function should only return a type
that the codegen will classify the same as an INTEGER type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109763 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
fb2a04edb69e475a99960719d68950fcadcefce6 29-Jul-2010 Chris Lattner <sabre@nondot.org> handle a case where we could access off the end of a function
that Eli pointed out, rdar://8249586


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109762 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
9e45a3de3f462785a86bba77dee168ab354d9704 29-Jul-2010 Chris Lattner <sabre@nondot.org> handle a case where we could access off the end of a function
that Eli pointed out, rdar://8249586


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109762 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
6dbf30b59a4b803985f40ed6d7bf47b360490db6 29-Jul-2010 Chris Lattner <sabre@nondot.org> fix PR7742 / rdar://8250764, a miscompilation of struct
return where the struct has a base but no fields. This
was because the x86-64 abi logic was checking the wrong
predicate in one place.

This was introduced in r91874, which was a fix for PR5831,
which lacked a CHECK line, so I verified and added it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109759 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
a7206c5367c2e5879fe6d9a07ed50aa003a56976 29-Jul-2010 Chris Lattner <sabre@nondot.org> fix PR7742 / rdar://8250764, a miscompilation of struct
return where the struct has a base but no fields. This
was because the x86-64 abi logic was checking the wrong
predicate in one place.

This was introduced in r91874, which was a fix for PR5831,
which lacked a CHECK line, so I verified and added it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109759 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
807405b26f134148100841c6a7348cdddfc8e5d2 29-Jul-2010 Chris Lattner <sabre@nondot.org> This is a little bit far, but optimize cases like:

struct a {
struct c {
double x;
int y;
} x[1];
};

void foo(struct a A) {
}

into:

define void @foo(double %A.coerce0, i32 %A.coerce1) nounwind {
entry:
%A = alloca %struct.a, align 8 ; <%struct.a*> [#uses=1]
%0 = bitcast %struct.a* %A to %struct.c* ; <%struct.c*> [#uses=2]
%1 = getelementptr %struct.c* %0, i32 0, i32 0 ; <double*> [#uses=1]
store double %A.coerce0, double* %1
%2 = getelementptr %struct.c* %0, i32 0, i32 1 ; <i32*> [#uses=1]
store i32 %A.coerce1, i32* %2

instead of:

define void @foo(double %A.coerce0, i64 %A.coerce1) nounwind {
entry:
%A = alloca %struct.a, align 8 ; <%struct.a*> [#uses=1]
%0 = bitcast %struct.a* %A to %0* ; <%0*> [#uses=2]
%1 = getelementptr %0* %0, i32 0, i32 0 ; <double*> [#uses=1]
store double %A.coerce0, double* %1
%2 = getelementptr %0* %0, i32 0, i32 1 ; <i64*> [#uses=1]
store i64 %A.coerce1, i64* %2

I only do this now because I never want to look at this code again :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109738 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
021c3a349d4f55cc2c7970268758bcf37b924493 29-Jul-2010 Chris Lattner <sabre@nondot.org> This is a little bit far, but optimize cases like:

struct a {
struct c {
double x;
int y;
} x[1];
};

void foo(struct a A) {
}

into:

define void @foo(double %A.coerce0, i32 %A.coerce1) nounwind {
entry:
%A = alloca %struct.a, align 8 ; <%struct.a*> [#uses=1]
%0 = bitcast %struct.a* %A to %struct.c* ; <%struct.c*> [#uses=2]
%1 = getelementptr %struct.c* %0, i32 0, i32 0 ; <double*> [#uses=1]
store double %A.coerce0, double* %1
%2 = getelementptr %struct.c* %0, i32 0, i32 1 ; <i32*> [#uses=1]
store i32 %A.coerce1, i32* %2

instead of:

define void @foo(double %A.coerce0, i64 %A.coerce1) nounwind {
entry:
%A = alloca %struct.a, align 8 ; <%struct.a*> [#uses=1]
%0 = bitcast %struct.a* %A to %0* ; <%0*> [#uses=2]
%1 = getelementptr %0* %0, i32 0, i32 0 ; <double*> [#uses=1]
store double %A.coerce0, double* %1
%2 = getelementptr %0* %0, i32 0, i32 1 ; <i64*> [#uses=1]
store i64 %A.coerce1, i64* %2

I only do this now because I never want to look at this code again :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109738 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
f3eba20f9cd08f14688e009f2badf1e8fd04e4fc 29-Jul-2010 Chris Lattner <sabre@nondot.org> implement a todo: pass a eight-byte that consists of a
small integer + padding as that small integer. On code
like:

struct c { double x; int y; };
void bar(struct c C) { }

This means that we compile to:

define void @bar(double %C.coerce0, i32 %C.coerce1) nounwind {
entry:
%C = alloca %struct.c, align 8 ; <%struct.c*> [#uses=2]
%0 = getelementptr %struct.c* %C, i32 0, i32 0 ; <double*> [#uses=1]
store double %C.coerce0, double* %0
%1 = getelementptr %struct.c* %C, i32 0, i32 1 ; <i32*> [#uses=1]
store i32 %C.coerce1, i32* %1

instead of:

define void @bar(double %C.coerce0, i64 %C.coerce1) nounwind {
entry:
%C = alloca %struct.c, align 8 ; <%struct.c*> [#uses=3]
%0 = bitcast %struct.c* %C to %0* ; <%0*> [#uses=2]
%1 = getelementptr %0* %0, i32 0, i32 0 ; <double*> [#uses=1]
store double %C.coerce0, double* %1
%2 = getelementptr %0* %0, i32 0, i32 1 ; <i64*> [#uses=1]
store i64 %C.coerce1, i64* %2

which gives SRoA heartburn.

This implements rdar://5711709, a nice low number :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109737 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
e2962be11e8894329d37985eccaa4f4a12dea402 29-Jul-2010 Chris Lattner <sabre@nondot.org> implement a todo: pass a eight-byte that consists of a
small integer + padding as that small integer. On code
like:

struct c { double x; int y; };
void bar(struct c C) { }

This means that we compile to:

define void @bar(double %C.coerce0, i32 %C.coerce1) nounwind {
entry:
%C = alloca %struct.c, align 8 ; <%struct.c*> [#uses=2]
%0 = getelementptr %struct.c* %C, i32 0, i32 0 ; <double*> [#uses=1]
store double %C.coerce0, double* %0
%1 = getelementptr %struct.c* %C, i32 0, i32 1 ; <i32*> [#uses=1]
store i32 %C.coerce1, i32* %1

instead of:

define void @bar(double %C.coerce0, i64 %C.coerce1) nounwind {
entry:
%C = alloca %struct.c, align 8 ; <%struct.c*> [#uses=3]
%0 = bitcast %struct.c* %C to %0* ; <%0*> [#uses=2]
%1 = getelementptr %0* %0, i32 0, i32 0 ; <double*> [#uses=1]
store double %C.coerce0, double* %1
%2 = getelementptr %0* %0, i32 0, i32 1 ; <i64*> [#uses=1]
store i64 %C.coerce1, i64* %2

which gives SRoA heartburn.

This implements rdar://5711709, a nice low number :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109737 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
e9b9fed4431dfc54678c791b5e68b0aa9f2fb6f0 29-Jul-2010 Chris Lattner <sabre@nondot.org> fix a builder, why didn't clang++ catch this?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109735 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
1ed72678b41c6038b08f48cb7e2a7b61e2dd9179 29-Jul-2010 Chris Lattner <sabre@nondot.org> fix a builder, why didn't clang++ catch this?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109735 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
5b7aebd4ddc0e2ad38c8897c6a5d9f0cd5690237 29-Jul-2010 Chris Lattner <sabre@nondot.org> Kill off the 'coerce' ABI passing form. Now 'direct' and 'extend' always
have a "coerce to" type which often matches the default lowering of Clang
type to LLVM IR type, but the coerce case can be handled by making them
not be the same.

This simplifies things and fixes issues where X86-64 abi lowering would
return coerce after making preferred types exactly match up. This caused
us to compile:

typedef float v4f32 __attribute__((__vector_size__(16)));
v4f32 foo(v4f32 X) {
return X+X;
}

into this code at -O0:

define <4 x float> @foo(<4 x float> %X.coerce) nounwind {
entry:
%retval = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=2]
%coerce = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=2]
%X.addr = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=3]
store <4 x float> %X.coerce, <4 x float>* %coerce
%X = load <4 x float>* %coerce ; <<4 x float>> [#uses=1]
store <4 x float> %X, <4 x float>* %X.addr
%tmp = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1]
%tmp1 = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1]
%add = fadd <4 x float> %tmp, %tmp1 ; <<4 x float>> [#uses=1]
store <4 x float> %add, <4 x float>* %retval
%0 = load <4 x float>* %retval ; <<4 x float>> [#uses=1]
ret <4 x float> %0
}

Now we get:

define <4 x float> @foo(<4 x float> %X) nounwind {
entry:
%X.addr = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=3]
store <4 x float> %X, <4 x float>* %X.addr
%tmp = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1]
%tmp1 = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1]
%add = fadd <4 x float> %tmp, %tmp1 ; <<4 x float>> [#uses=1]
ret <4 x float> %add
}

This implements rdar://8248065



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109733 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
odeGenTypes.h
argetInfo.cpp
800588fd230d2c37ddce8fbf4a3881352715d700 29-Jul-2010 Chris Lattner <sabre@nondot.org> Kill off the 'coerce' ABI passing form. Now 'direct' and 'extend' always
have a "coerce to" type which often matches the default lowering of Clang
type to LLVM IR type, but the coerce case can be handled by making them
not be the same.

This simplifies things and fixes issues where X86-64 abi lowering would
return coerce after making preferred types exactly match up. This caused
us to compile:

typedef float v4f32 __attribute__((__vector_size__(16)));
v4f32 foo(v4f32 X) {
return X+X;
}

into this code at -O0:

define <4 x float> @foo(<4 x float> %X.coerce) nounwind {
entry:
%retval = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=2]
%coerce = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=2]
%X.addr = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=3]
store <4 x float> %X.coerce, <4 x float>* %coerce
%X = load <4 x float>* %coerce ; <<4 x float>> [#uses=1]
store <4 x float> %X, <4 x float>* %X.addr
%tmp = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1]
%tmp1 = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1]
%add = fadd <4 x float> %tmp, %tmp1 ; <<4 x float>> [#uses=1]
store <4 x float> %add, <4 x float>* %retval
%0 = load <4 x float>* %retval ; <<4 x float>> [#uses=1]
ret <4 x float> %0
}

Now we get:

define <4 x float> @foo(<4 x float> %X) nounwind {
entry:
%X.addr = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=3]
store <4 x float> %X, <4 x float>* %X.addr
%tmp = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1]
%tmp1 = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1]
%add = fadd <4 x float> %tmp, %tmp1 ; <<4 x float>> [#uses=1]
ret <4 x float> %add
}

This implements rdar://8248065



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109733 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
odeGenTypes.h
argetInfo.cpp
9cb2a98a90beabe39f5c21dc97576e7fe911c633 29-Jul-2010 Chris Lattner <sabre@nondot.org> ignore structs that wrap vectors in IR, the abstraction shouldn't add penalty.

Before we'd compile the example into something like:

%coerce.dive2 = getelementptr %struct.v4f32wrapper* %retval, i32 0, i32 0 ; <<4 x float>*> [#uses=1]
%1 = bitcast <4 x float>* %coerce.dive2 to <2 x double>* ; <<2 x double>*> [#uses=1]
%2 = load <2 x double>* %1, align 1 ; <<2 x double>> [#uses=1]
ret <2 x double> %2

Now we produce:

%coerce.dive2 = getelementptr %struct.v4f32wrapper* %retval, i32 0, i32 0 ; <<4 x float>*> [#uses=1]
%0 = load <4 x float>* %coerce.dive2, align 1 ; <<4 x float>> [#uses=1]
ret <4 x float> %0



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109732 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
15842bd05bd6d3b7450385ac8f73aaee5f807e19 29-Jul-2010 Chris Lattner <sabre@nondot.org> ignore structs that wrap vectors in IR, the abstraction shouldn't add penalty.

Before we'd compile the example into something like:

%coerce.dive2 = getelementptr %struct.v4f32wrapper* %retval, i32 0, i32 0 ; <<4 x float>*> [#uses=1]
%1 = bitcast <4 x float>* %coerce.dive2 to <2 x double>* ; <<2 x double>*> [#uses=1]
%2 = load <2 x double>* %1, align 1 ; <<2 x double>> [#uses=1]
ret <2 x double> %2

Now we produce:

%coerce.dive2 = getelementptr %struct.v4f32wrapper* %retval, i32 0, i32 0 ; <<4 x float>*> [#uses=1]
%0 = load <4 x float>* %coerce.dive2, align 1 ; <<4 x float>> [#uses=1]
ret <4 x float> %0



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109732 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
d93e816f2ce09dd5c82a80feb3c7cc66eca639a4 29-Jul-2010 Chris Lattner <sabre@nondot.org> move the 'pretty 16-byte vector' inferring code up to be shared
with return values, improving stuff that returns __m128 etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109731 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
0f408f5242522cbede304472e17931357c1b573d 29-Jul-2010 Chris Lattner <sabre@nondot.org> move the 'pretty 16-byte vector' inferring code up to be shared
with return values, improving stuff that returns __m128 etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109731 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
95332e6e96b666a56289518cd89e1a912d7abb05 29-Jul-2010 Chris Lattner <sabre@nondot.org> simplify code by eliminating a premature optimization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109730 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
fe12d1ee8be8b8023c0c60b299ae957ea0df5d21 29-Jul-2010 Chris Lattner <sabre@nondot.org> simplify code by eliminating a premature optimization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109730 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
c2673f6cf0b176369c7c7563b59a9a24ef4e15c1 29-Jul-2010 Chris Lattner <sabre@nondot.org> now that we have CGT around, we can start using preferred types
for return values too. Instead of compiling something like:

struct foo {
int *X;
float *Y;
};

struct foo test(struct foo *P) { return *P; }

to:

%1 = type { i64, i64 }

define %1 @test(%struct.foo* %P) nounwind {
entry:
%retval = alloca %struct.foo, align 8 ; <%struct.foo*> [#uses=2]
%P.addr = alloca %struct.foo*, align 8 ; <%struct.foo**> [#uses=2]
store %struct.foo* %P, %struct.foo** %P.addr
%tmp = load %struct.foo** %P.addr ; <%struct.foo*> [#uses=1]
%tmp1 = bitcast %struct.foo* %retval to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.foo* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 16, i32 8, i1 false)
%0 = bitcast %struct.foo* %retval to %1* ; <%1*> [#uses=1]
%1 = load %1* %0, align 1 ; <%1> [#uses=1]
ret %1 %1
}

We now get the result more type safe, with:

define %struct.foo @test(%struct.foo* %P) nounwind {
entry:
%retval = alloca %struct.foo, align 8 ; <%struct.foo*> [#uses=2]
%P.addr = alloca %struct.foo*, align 8 ; <%struct.foo**> [#uses=2]
store %struct.foo* %P, %struct.foo** %P.addr
%tmp = load %struct.foo** %P.addr ; <%struct.foo*> [#uses=1]
%tmp1 = bitcast %struct.foo* %retval to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.foo* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 16, i32 8, i1 false)
%0 = load %struct.foo* %retval ; <%struct.foo> [#uses=1]
ret %struct.foo %0
}

That memcpy is completely terrible, but I don't know how to fix it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109729 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
4711cb065922d46bfe80383b2001ae681f74780a 29-Jul-2010 Chris Lattner <sabre@nondot.org> now that we have CGT around, we can start using preferred types
for return values too. Instead of compiling something like:

struct foo {
int *X;
float *Y;
};

struct foo test(struct foo *P) { return *P; }

to:

%1 = type { i64, i64 }

define %1 @test(%struct.foo* %P) nounwind {
entry:
%retval = alloca %struct.foo, align 8 ; <%struct.foo*> [#uses=2]
%P.addr = alloca %struct.foo*, align 8 ; <%struct.foo**> [#uses=2]
store %struct.foo* %P, %struct.foo** %P.addr
%tmp = load %struct.foo** %P.addr ; <%struct.foo*> [#uses=1]
%tmp1 = bitcast %struct.foo* %retval to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.foo* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 16, i32 8, i1 false)
%0 = bitcast %struct.foo* %retval to %1* ; <%1*> [#uses=1]
%1 = load %1* %0, align 1 ; <%1> [#uses=1]
ret %1 %1
}

We now get the result more type safe, with:

define %struct.foo @test(%struct.foo* %P) nounwind {
entry:
%retval = alloca %struct.foo, align 8 ; <%struct.foo*> [#uses=2]
%P.addr = alloca %struct.foo*, align 8 ; <%struct.foo**> [#uses=2]
store %struct.foo* %P, %struct.foo** %P.addr
%tmp = load %struct.foo** %P.addr ; <%struct.foo*> [#uses=1]
%tmp1 = bitcast %struct.foo* %retval to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.foo* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 16, i32 8, i1 false)
%0 = load %struct.foo* %retval ; <%struct.foo> [#uses=1]
ret %struct.foo %0
}

That memcpy is completely terrible, but I don't know how to fix it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109729 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
fd01f15252d2c6ba6ae5cb7c79836854dc753d31 29-Jul-2010 Chris Lattner <sabre@nondot.org> sink preferred type stuff lower. It's possible that this might
improve codegen for vaarg or something, because its codepath is
getting preferred types now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109728 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
5868ca2eb7f00d815f62e46f5a171eb6e5f91b5b 29-Jul-2010 Chris Lattner <sabre@nondot.org> sink preferred type stuff lower. It's possible that this might
improve codegen for vaarg or something, because its codepath is
getting preferred types now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109728 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
1e3b6247b84f7171b3f217439217731f12a0d163 29-Jul-2010 Chris Lattner <sabre@nondot.org> dissolve some more complexity: make the x86-64 abi lowering code
compute its own preferred types instead of having CGT compute
them then pass them (circuituously) down into ABIInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109726 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetInfo.cpp
ee5dcd064a811edc90f6c1fb31a837b6c961fed7 29-Jul-2010 Chris Lattner <sabre@nondot.org> dissolve some more complexity: make the x86-64 abi lowering code
compute its own preferred types instead of having CGT compute
them then pass them (circuituously) down into ABIInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109726 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetInfo.cpp
8e36ae6a00313ced833b0fc871f1c4105a5659b9 29-Jul-2010 Chris Lattner <sabre@nondot.org> simplify Get8ByteTypeAtOffset by making it a member of X86_64ABIInfo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109724 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
44f0fd2804e9952a8dbf85bb60ee3501aa9f5ee7 29-Jul-2010 Chris Lattner <sabre@nondot.org> simplify Get8ByteTypeAtOffset by making it a member of X86_64ABIInfo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109724 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
ffbf4932b5c89b22232c4e8985804d1df3e29a51 29-Jul-2010 Chris Lattner <sabre@nondot.org> now that ABIInfo depends on CGT, it has trivial access to such
things as TargetData, ASTContext, LLVMContext etc. Stop passing
them through so many APIs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109723 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetInfo.cpp
a3c109bbf6e198f463fbe204da4d25b40dab65c4 29-Jul-2010 Chris Lattner <sabre@nondot.org> now that ABIInfo depends on CGT, it has trivial access to such
things as TargetData, ASTContext, LLVMContext etc. Stop passing
them through so many APIs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109723 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetInfo.cpp
a08ebd5aee05d13524043c82f6cc6fe90a06cf9d 29-Jul-2010 Chris Lattner <sabre@nondot.org> cave in to reality and make ABIInfo depend on CodeGenTypes.

This will simplify a bunch of code, coming up next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109722 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
odeGenModule.h
argetInfo.cpp
ea0443212e7ec6ff82e2f174e8e948a6eb0e0876 29-Jul-2010 Chris Lattner <sabre@nondot.org> cave in to reality and make ABIInfo depend on CodeGenTypes.

This will simplify a bunch of code, coming up next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109722 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
odeGenModule.h
argetInfo.cpp
87a4f083133027414663bd7217f4e31d2c6539b6 29-Jul-2010 Chris Lattner <sabre@nondot.org> pass argument vectors in a type that corresponds to the user type if
possible. This improves the example to pass <4 x float> instead of
<2 x double> but we still get awful code, and still don't get the
return value right.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109700 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
ab5722e67794b3954c874a369086fc5f41ac46a5 29-Jul-2010 Chris Lattner <sabre@nondot.org> pass argument vectors in a type that corresponds to the user type if
possible. This improves the example to pass <4 x float> instead of
<2 x double> but we still get awful code, and still don't get the
return value right.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109700 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
abc168e84ef291279e1c81103280d598b7da74b8 29-Jul-2010 Chris Lattner <sabre@nondot.org> tidy up


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109699 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
2eb9cdd5922c6fe48af185bee1988dabb5bd644e 29-Jul-2010 Chris Lattner <sabre@nondot.org> tidy up


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109699 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
5e9c6e038bc87bf7f894ddbe98511d18cc2f0c65 29-Jul-2010 Devang Patel <dpatel@apple.com> Override selected builtin names (e.g. "long int" instead of "long") to match names used by gcc in debug info. This makes gdb testsuite happy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109694 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
05127ca8559d28e1a56742fed3ebecbf711c8a31 29-Jul-2010 Devang Patel <dpatel@apple.com> Override selected builtin names (e.g. "long int" instead of "long") to match names used by gcc in debug info. This makes gdb testsuite happy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109694 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
11e532dde7114ab1c23cb21a33365162910bf4bc 29-Jul-2010 Chris Lattner <sabre@nondot.org> fix some break statements to be formatted more consistently,
remove some now-dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109690 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
0b30c67132f00c667512a65cfe1fe81ae54c2383 29-Jul-2010 Chris Lattner <sabre@nondot.org> fix some break statements to be formatted more consistently,
remove some now-dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109690 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
912b6b14c1747b28044e526d4e1d0bc01e725892 29-Jul-2010 Chris Lattner <sabre@nondot.org> use Get8ByteTypeAtOffset for the return value path as well so we
don't get errors similar to PR7714 on the return path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109689 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
519f68cd26777c755763a644a7f7ed7ac389beb9 29-Jul-2010 Chris Lattner <sabre@nondot.org> use Get8ByteTypeAtOffset for the return value path as well so we
don't get errors similar to PR7714 on the return path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109689 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
3b902e7ab5332d25e8d8d549c3d0149218abb45f 29-Jul-2010 Chris Lattner <sabre@nondot.org> refactor the autosizing code, eliminating duplication
and making Get8ByteTypeAtOffset always succeed and documented.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109685 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
49382de42c2a411bfd772408e987cb399071241d 29-Jul-2010 Chris Lattner <sabre@nondot.org> refactor the autosizing code, eliminating duplication
and making Get8ByteTypeAtOffset always succeed and documented.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109685 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
9c303293dd4ed8c5c8a15ba3668da71cea6fe8d5 29-Jul-2010 Chris Lattner <sabre@nondot.org> fix PR7714 by not referencing off the end of a struct when passed by value in
x86-64 abi. This also improves codegen as well. Some refactoring is needed of
this code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109681 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
1daf808a48d26328dd31a3275ce599cee326c957 29-Jul-2010 Chris Lattner <sabre@nondot.org> fix PR7714 by not referencing off the end of a struct when passed by value in
x86-64 abi. This also improves codegen as well. Some refactoring is needed of
this code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109681 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
a9d82832d37fff7608c113bb1b4c1b1bcb747d8d 28-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Fix flags in global block descriptor when
block returns structs. Fies radar 8241648.
Executable test added to llvm test suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109620 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
7edddb896e10d7ab494927842f7402583d9fa02d 28-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Fix flags in global block descriptor when
block returns structs. Fies radar 8241648.
Executable test added to llvm test suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109620 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
af0e7f9f85ecd47666e0e868b2ef2736902d0eb5 28-Jul-2010 Chris Lattner <sabre@nondot.org> some cleanups and get alignments correct for various coerce cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109607 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
deabde24e1712253e483a46d24c0e10f25ebba99 28-Jul-2010 Chris Lattner <sabre@nondot.org> some cleanups and get alignments correct for various coerce cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109607 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
44294bd937a18966103baad5d5be00ea91c016c7 28-Jul-2010 Gabor Greif <ggreif@gmail.com> we are not supposed to create an improper callsite using a CallInstr; leave a fixme mentioning the simplification when CallSite can clone itself

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109575 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8670cd3ea4dfbf86caacd270ec2441e9949bbb6a 28-Jul-2010 Gabor Greif <ggreif@gmail.com> we are not supposed to create an improper callsite using a CallInstr; leave a fixme mentioning the simplification when CallSite can clone itself

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109575 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6202f6ea6514ea1bbd69ee1ac9a6d656283f6a41 28-Jul-2010 Devang Patel <dpatel@apple.com> construct debug info for "id" by hand.
Tested by mi1-var-obj.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109571 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
c8972c61d13c67e69eb7d992560aac7613eacd37 28-Jul-2010 Devang Patel <dpatel@apple.com> construct debug info for "id" by hand.
Tested by mi1-var-obj.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109571 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5261c53ddacb1161b6cf687f0305b7147e836b0a 28-Jul-2010 John McCall <rjmccall@apple.com> When creating a jump destination, its scope should be the scope of the
enclosing normal cleanup, not the top of the EH stack. I'm *really*
surprised this hasn't been causing more problems.

Fixes rdar://problem/8231514.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109569 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
413e67778d593215d2f2161a4e712c8568f1ddd0 28-Jul-2010 John McCall <rjmccall@apple.com> When creating a jump destination, its scope should be the scope of the
enclosing normal cleanup, not the top of the EH stack. I'm *really*
surprised this hasn't been causing more problems.

Fixes rdar://problem/8231514.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109569 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
a915993c76603465b3def06980568a439b01be57 28-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Revert r109546, it broke linux build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109550 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a6d6af308bfc9b72467b432a045a9fc6673e3821 28-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r109546, it broke linux build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109550 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2720313679e66d9ef60cef891cedce6423348ac5 28-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function,
DeclIsRequiredFunctionOrFileScopedVar.

This function is part of the public CodeGen interface since it's essentially a CodeGen predicate that is also
needed by the PCH mechanism to determine whether a decl needs to be deserialized during PCH loading for codegen purposes.
This fixes current (and avoids future) codegen-from-PCH bugs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109546 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ee94e2d10728d1b6a87a11aeee122e8759f58c63 28-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Merge PCHWriterDecl.cpp's isRequiredDecl and CodeGenModule::MayDeferGeneration into a new function,
DeclIsRequiredFunctionOrFileScopedVar.

This function is part of the public CodeGen interface since it's essentially a CodeGen predicate that is also
needed by the PCH mechanism to determine whether a decl needs to be deserialized during PCH loading for codegen purposes.
This fixes current (and avoids future) codegen-from-PCH bugs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109546 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f99a404bc73abcfa6d5a16ad8a449c797a407c36 27-Jul-2010 Devang Patel <dpatel@apple.com> Always use current working directory for DW_AT_comp_dir.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109535 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
58115009ba6406c2a0bcc5a5033592bd5f2fad30 27-Jul-2010 Devang Patel <dpatel@apple.com> Always use current working directory for DW_AT_comp_dir.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109535 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
8e4ca07d7151b343f6b36941690cbf7698b5f03a 27-Jul-2010 Devang Patel <dpatel@apple.com> Reapply 109303.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109507 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
ac4d13c0cc78a3b28a8af8001e4da6b18fa9029d 27-Jul-2010 Devang Patel <dpatel@apple.com> Reapply 109303.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109507 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
09db54c16d2ab73578f8acdec53e0ff68a4e8d8c 27-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> 2nd argument of __builtin_expect must be evaluated
if it hs side-effect to matchgcc's behaviour.
Addresses radar 8172109.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109467 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
e42b8a596886fc98e367c73e54d761446700029e 27-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> 2nd argument of __builtin_expect must be evaluated
if it hs side-effect to matchgcc's behaviour.
Addresses radar 8172109.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109467 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
94e079445c55ae7942868f00dcae13b3cb977e99 27-Jul-2010 John McCall <rjmccall@apple.com> Test for the presence of EH branch-throughs instead of normal branch-throughs.
I knew this code duplication would bite me.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109463 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
7cd4b060f1e59f6d29126383ceee614e4772f859 27-Jul-2010 John McCall <rjmccall@apple.com> Test for the presence of EH branch-throughs instead of normal branch-throughs.
I knew this code duplication would bite me.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109463 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
83f0ac328b5045dac5358141e3a8e24a55205f5c 26-Jul-2010 Devang Patel <dpatel@apple.com> Revert 109303.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109426 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
e9b711c39827d7dcba0fc4cb787a4a7395285634 26-Jul-2010 Devang Patel <dpatel@apple.com> Revert 109303.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109426 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
1994615488b9c729eb7c3c854a6d5e1c1ca78bde 25-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Remove the vast majority of the Destroy methods from the AST library,
since we aren't going to be calling them ever.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109377 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
odeGenFunction.cpp
00a8046f14097ef54bba884e706b224e14330177 24-Jul-2010 John McCall <rjmccall@apple.com> Mangle enum constant expressions. Fixes rdar://problem/8204122



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109315 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
3dc7e7b9c59b9a2ed4f530b32e710a3738611df7 24-Jul-2010 John McCall <rjmccall@apple.com> Mangle enum constant expressions. Fixes rdar://problem/8204122



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109315 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
5e45e70006c6d5c343cfaef54fac29762f49723c 24-Jul-2010 Devang Patel <dpatel@apple.com> Untangle filename/dirname confusion. Store constructed strings on the side. Avoid use of Path.makeAbsolute().

DW_TAG_compile_unit uses two attributes DW_AT_name and DW_AT_comp_dir. Their expected values are:

$ clang foo.c -g
DW_AT_name - foo.c
DW_AT_comp_dir - `pwd`

$ clang one/two/foo.c -g
DW_AT_name - one/two/foo.c
DW_AT_comp_dir - `pwd`

$ clang /tmp/one/foo.c -g
DW_AT_name - /tmp/one/foo.c
DW_AT_comp_dir - empty



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109303 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
05b0f4195edf62af76795c92703a1d0c0fa936d9 24-Jul-2010 Devang Patel <dpatel@apple.com> Untangle filename/dirname confusion. Store constructed strings on the side. Avoid use of Path.makeAbsolute().

DW_TAG_compile_unit uses two attributes DW_AT_name and DW_AT_comp_dir. Their expected values are:

$ clang foo.c -g
DW_AT_name - foo.c
DW_AT_comp_dir - `pwd`

$ clang one/two/foo.c -g
DW_AT_name - one/two/foo.c
DW_AT_comp_dir - `pwd`

$ clang /tmp/one/foo.c -g
DW_AT_name - /tmp/one/foo.c
DW_AT_comp_dir - empty



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109303 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
b4a5c049da5e66d6f9214520fb5c00fe68b7289b 24-Jul-2010 John McCall <rjmccall@apple.com> Support catching Objective C pointers in C++ under the non-fragile NeXT runtime.
Diagnose attempts to do this under the GNU or fragile NeXT runtimes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109298 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
5a180397870944548aaadeaebf58e415885b9489 24-Jul-2010 John McCall <rjmccall@apple.com> Support catching Objective C pointers in C++ under the non-fragile NeXT runtime.
Diagnose attempts to do this under the GNU or fragile NeXT runtimes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109298 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
584e8e96e8178c155e8e110a8308266f93bc5203 24-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Return type of a setter call caused by
use of property-dot syntax using 'super' as receiver
is 'void'. This fixes a bug in generating correct
API for setter call. Fixes radar 8203426.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109297 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
3d4aeda910f465052a0350798e08cdb50a65feb4 24-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Return type of a setter call caused by
use of property-dot syntax using 'super' as receiver
is 'void'. This fixes a bug in generating correct
API for setter call. Fixes radar 8203426.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109297 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
e20c6d23ad268a1df3df08fb32a6566adf2e6471 24-Jul-2010 Devang Patel <dpatel@apple.com> Revert r109263.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109284 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
6e6bc39acd7a1f05fe8ce562cae643aaa40c31b7 24-Jul-2010 Devang Patel <dpatel@apple.com> Revert r109263.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109284 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
6e62fe2c1d35de915138589f0f371f0a21730e04 23-Jul-2010 John McCall <rjmccall@apple.com> Revise cleanup IR generation to fix a major bug with cleanups (PR7686)
as well as some significant asymptotic inefficiencies with threading
multiple jumps through deep cleanups.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109274 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GException.h
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
ff8e11579fc904aa4032d90d2be6ce1ac5fc9fe1 23-Jul-2010 John McCall <rjmccall@apple.com> Revise cleanup IR generation to fix a major bug with cleanups (PR7686)
as well as some significant asymptotic inefficiencies with threading
multiple jumps through deep cleanups.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109274 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GException.h
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
19fa429934492de4ef0bf2da20786a4fb5c2f378 23-Jul-2010 Devang Patel <dpatel@apple.com> There is no need to use separate dir name for AT_comp_dir attribute. Using absolute path for filename allows clients to query complete file location info from gdb breakpoints. Save constructed full file name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109263 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ab2e020d80afb6d8c88515f6a7e9d371dcc6f2e4 23-Jul-2010 Devang Patel <dpatel@apple.com> There is no need to use separate dir name for AT_comp_dir attribute. Using absolute path for filename allows clients to query complete file location info from gdb breakpoints. Save constructed full file name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109263 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
57cff32124cd5b95f3e1a5da12d3fff7e8892943 23-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Vectors are not integer types, so the type system should not classify
them as such. Type::is(Signed|Unsigned|)IntegerType() now return false
for vector types, and new functions
has(Signed|Unsigned|)IntegerRepresentation() cover integer types and
vector-of-integer types. This fixes a bunch of latent bugs.

Patch from Anton Yartsev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109229 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExprScalar.cpp
f60946222721d9ba3c059563935c17b84703187a 23-Jul-2010 Douglas Gregor <dgregor@apple.com> Vectors are not integer types, so the type system should not classify
them as such. Type::is(Signed|Unsigned|)IntegerType() now return false
for vector types, and new functions
has(Signed|Unsigned|)IntegerRepresentation() cover integer types and
vector-of-integer types. This fixes a bunch of latent bugs.

Patch from Anton Yartsev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109229 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExprScalar.cpp
9268c9e48e3c5e06be66342225efb0ac8aff6616 23-Jul-2010 Devang Patel <dpatel@apple.com> Keep track of artificial scopes introduced by line directives. For example,

#line 41 "bar.c"
dummy (1, i);
#line 24 "bar.h"
i = f2 (i);
#line 44 "bar.c"

This is tested by step-line.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109189 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GStmt.cpp
odeGenFunction.cpp
5a6fbcfd8c15a2296f94a0473a68ec09d429827f 23-Jul-2010 Devang Patel <dpatel@apple.com> Keep track of artificial scopes introduced by line directives. For example,

#line 41 "bar.c"
dummy (1, i);
#line 24 "bar.h"
i = f2 (i);
#line 44 "bar.c"

This is tested by step-line.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109189 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GStmt.cpp
odeGenFunction.cpp
704c3d15b43f1fb9de9ad19f12f6ac6670f148c6 22-Jul-2010 John McCall <rjmccall@apple.com> Turn off EH cleanups for __block variables; they caused some internal buildbot
failures. There's a radar tracking this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109170 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
db2cfecf0eb6683be103b8550026817426da2d42 22-Jul-2010 John McCall <rjmccall@apple.com> Turn off EH cleanups for __block variables; they caused some internal buildbot
failures. There's a radar tracking this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109170 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
c3024bdaee612382a1eee67b77aff7a6450feaa6 22-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> atch for implementation of objective-c's -Wselector
warning flag in clang. Little more to do
for a PCH issue. Radar 6507158.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109129 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
3fe104154dd2e8ffb351142d74f308938b5c99bf 22-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> atch for implementation of objective-c's -Wselector
warning flag in clang. Little more to do
for a PCH issue. Radar 6507158.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109129 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
0af343f3ac131016131b728c338bdb31058ae20a 22-Jul-2010 Devang Patel <dpatel@apple.com> ObjCId is special "struct objc_object". Make this explicit in debug info.
This is tested by objc-rbreak.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109050 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
eaf5ee9ba8d46aba90b4e824c04e8ed8affb1bd4 22-Jul-2010 Devang Patel <dpatel@apple.com> ObjCId is special "struct objc_object". Make this explicit in debug info.
This is tested by objc-rbreak.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109050 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f1d4035536a1f6e71b215b44ce1ecc4823815b3c 21-Jul-2010 Devang Patel <dpatel@apple.com> Fix regression caused by r108911.
Do not override known debug loc with unknown debug loc.
This is tested by sections.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109022 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
d3f265d68b2609a29acddb6de0b7e3b4dbe16204 21-Jul-2010 Devang Patel <dpatel@apple.com> Fix regression caused by r108911.
Do not override known debug loc with unknown debug loc.
This is tested by sections.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109022 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
e15f9fd88b9eebbed0666925c958d606eb7875f7 21-Jul-2010 David Chisnall <csdavec@swan.ac.uk> Don't crash when sending a message inside a block with the non-fragile ABI (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109012 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
f69ea958964ab0452299f1df68ce469b67d18d3a 21-Jul-2010 David Chisnall <csdavec@swan.ac.uk> Don't crash when sending a message inside a block with the non-fragile ABI (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109012 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
1611a351d633eab59d97d837a7353a8dd782945a 21-Jul-2010 David Chisnall <csdavec@swan.ac.uk> Mark the load after calling objc_msg_lookup_sender() so that it doesn't get optimised away (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109010 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
41d0c7a2355c1a47b33f5e528c5f815ca5b52e9e 21-Jul-2010 David Chisnall <csdavec@swan.ac.uk> Mark the load after calling objc_msg_lookup_sender() so that it doesn't get optimised away (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109010 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
28e49b01c4c99da00580897ef99e207f7ac2cfeb 21-Jul-2010 John McCall <rjmccall@apple.com> Rename LazyCleanup -> Cleanup. No functionality change for these last three
commits.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109000 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GException.h
GObjCGNU.cpp
GObjCMac.cpp
GTemporaries.cpp
odeGenFunction.cpp
odeGenFunction.h
1f0fca54676cfa8616e7f3cd7a26788ab937e3cd 21-Jul-2010 John McCall <rjmccall@apple.com> Rename LazyCleanup -> Cleanup. No functionality change for these last three
commits.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109000 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GException.h
GObjCGNU.cpp
GObjCMac.cpp
GTemporaries.cpp
odeGenFunction.cpp
odeGenFunction.h
7ca451bfe78bf78505b4389e3c04c602a2f3d281 21-Jul-2010 John McCall <rjmccall@apple.com> Rip out EHCleanupScope.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108999 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GException.h
odeGenFunction.cpp
odeGenFunction.h
7495f22934d577c71b4b5bae82142ad54ccb1d59 21-Jul-2010 John McCall <rjmccall@apple.com> Rip out EHCleanupScope.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108999 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GException.h
odeGenFunction.cpp
odeGenFunction.h
ebc471e08f33cbe856af8ddb4028a3cd1e62b6fb 21-Jul-2010 John McCall <rjmccall@apple.com> Kill the CleanupBlock API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108998 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.h
6962f8d156735172146ae812732f4c4ddc13e91b 21-Jul-2010 John McCall <rjmccall@apple.com> Kill the CleanupBlock API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108998 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.h
c2181d5e6c7ee57f37dfd1896d58d97e2b42bb82 21-Jul-2010 John McCall <rjmccall@apple.com> Switch the fragile-ABI @finally/@synchronized cleanup over to using a lazy
cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108997 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
cc5052999cd064584492ba15a808b6e1cee6d931 21-Jul-2010 John McCall <rjmccall@apple.com> Switch the fragile-ABI @finally/@synchronized cleanup over to using a lazy
cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108997 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6690e14f064059fff0f8f1a7f8b055366f12e956 21-Jul-2010 John McCall <rjmccall@apple.com> Code simplification.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108996 91177308-0d34-0410-b5e6-96231b3b80d8
GTemporaries.cpp
df054dbc15c19e38e8d5b60c51b6e601f502bc3e 21-Jul-2010 John McCall <rjmccall@apple.com> Code simplification.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108996 91177308-0d34-0410-b5e6-96231b3b80d8
GTemporaries.cpp
223f7607dc42856e93935abd360559758686fe1e 21-Jul-2010 John McCall <rjmccall@apple.com> Switch the main possibly-conditional temporary cleanup over to being lazy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108995 91177308-0d34-0410-b5e6-96231b3b80d8
GTemporaries.cpp
45483b4e0c129bdba43eaf8b22d23efa8dd8b9bc 21-Jul-2010 John McCall <rjmccall@apple.com> Switch the main possibly-conditional temporary cleanup over to being lazy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108995 91177308-0d34-0410-b5e6-96231b3b80d8
GTemporaries.cpp
3f0204ff4d861276b5ef4885a5830ac3f2ad9f44 21-Jul-2010 John McCall <rjmccall@apple.com> Switch the destructor for a temporary arising from a reference binding over to
using a lazy cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108994 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
odeGenFunction.h
81407d404a3fc8d24d0e2a052d85cae183033e2b 21-Jul-2010 John McCall <rjmccall@apple.com> Switch the destructor for a temporary arising from a reference binding over to
using a lazy cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108994 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
odeGenFunction.h
f367cb747ad55766c5099069b7f85a6ee7dfd89c 21-Jul-2010 John McCall <rjmccall@apple.com> Switch the __cxa_guard_abort cleanup to being a lazy cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108993 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
e540e637cbb9e3963c512b179779b8afcc190026 21-Jul-2010 John McCall <rjmccall@apple.com> Switch the __cxa_guard_abort cleanup to being a lazy cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108993 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
bbe867da592239eb6be4bf2b908eda8ed9540a03 21-Jul-2010 John McCall <rjmccall@apple.com> Switch some random local-decl cleanups over to using lazy cleanups. Turn on
the block-release unwind cleanup: we're never going to test it if we don't turn
it on.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108992 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
d87150999833d756269d84ca6e4127dc99fdcf63 21-Jul-2010 John McCall <rjmccall@apple.com> Switch some random local-decl cleanups over to using lazy cleanups. Turn on
the block-release unwind cleanup: we're never going to test it if we don't turn
it on.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108992 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
e22da0a8cad85d8dd03e84a5b0cfdacd27f9fec1 21-Jul-2010 John McCall <rjmccall@apple.com> Switch finally cleanups over to being lazy cleanups. We get basically nothing
from the laziness features here except better block ordering, but it removes yet
another CleanupBlock use.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108990 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.h
77199713ab56f87ffad9a535ff2a0877704eed87 21-Jul-2010 John McCall <rjmccall@apple.com> Switch finally cleanups over to being lazy cleanups. We get basically nothing
from the laziness features here except better block ordering, but it removes yet
another CleanupBlock use.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108990 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.h
d8e6be1f191eb48f86d9edc7363735e4580204e1 21-Jul-2010 John McCall <rjmccall@apple.com> Implement proper base/member destructor EH chaining.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108989 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
50da2cadcc6da86abff6772de65280ace2cabc94 21-Jul-2010 John McCall <rjmccall@apple.com> Implement proper base/member destructor EH chaining.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108989 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
23a105c7796e96eb1022fb0df9f51cbcdfb71db6 21-Jul-2010 John McCall <rjmccall@apple.com> Change PushDestructorCleanup to use lazy cleanups.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108979 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
291ae949612e371c41bf771a483b407d49372a4f 21-Jul-2010 John McCall <rjmccall@apple.com> Change PushDestructorCleanup to use lazy cleanups.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108979 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
83f41a460d4ad02704666311bb5f9a33e55c8441 21-Jul-2010 John McCall <rjmccall@apple.com> Convert the EH cleanups for base and member destructors in a constructor into
lazy cleanups.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108978 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
182ab5112650d3228291c4dadd64a9f77f5aeb51 21-Jul-2010 John McCall <rjmccall@apple.com> Convert the EH cleanups for base and member destructors in a constructor into
lazy cleanups.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108978 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
30e9602cbef6f6fdd9da907824b9124dde553414 21-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Implement zero-initialization for array new when there is an
initializer of (). Make sure to use a simple memset() when we can, or
fall back to generating a loop when a simple memset will not
suffice. Fixes <rdar://problem/8212208>, a regression due to my work
in r107857.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108977 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
odeGenFunction.h
59174c0633fb5cde41735cfbff5744bdf837e8d9 21-Jul-2010 Douglas Gregor <dgregor@apple.com> Implement zero-initialization for array new when there is an
initializer of (). Make sure to use a simple memset() when we can, or
fall back to generating a loop when a simple memset will not
suffice. Fixes <rdar://problem/8212208>, a regression due to my work
in r107857.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108977 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
odeGenFunction.h
7bd539dc133fb4de3023cde2ed987caa35fb39a2 21-Jul-2010 John McCall <rjmccall@apple.com> Convert the end-catch call for finally blocks to a lazy cleanup. This kills off
the last of the shared-code cleanups.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108975 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
55b20fc514678ff8ae1627cd9aef047d1f780119 21-Jul-2010 John McCall <rjmccall@apple.com> Convert the end-catch call for finally blocks to a lazy cleanup. This kills off
the last of the shared-code cleanups.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108975 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
64bada782401a09415b46b67c8e369d9ced43dde 21-Jul-2010 John McCall <rjmccall@apple.com> Convert the ObjC @synchronized cleanups to laziness. This is not actually
a big deal, except that I want to eliminate the shared-code EH cleanups
in preparation for a significant algorithmic fix.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108973 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
740e807eee153348f50a86f4a6eac49f324467ab 21-Jul-2010 John McCall <rjmccall@apple.com> Convert the ObjC @synchronized cleanups to laziness. This is not actually
a big deal, except that I want to eliminate the shared-code EH cleanups
in preparation for a significant algorithmic fix.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108973 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
da53400bb0e8954e0298e4f5bd4250da90c7b293 21-Jul-2010 John McCall <rjmccall@apple.com> Add a little helper method which will be useful soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108972 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
1bda662cb37d9fe24be4b3cf8ea0f4e550e1f889 21-Jul-2010 John McCall <rjmccall@apple.com> Add a little helper method which will be useful soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108972 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
febc79752041b27e446ba395a736ddfd6977b9ba 21-Jul-2010 Devang Patel <dpatel@apple.com> Remove unintended code that was checked in as part of r108916.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108951 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ec5ea2bc6d81c2e896ffff64821c7993ee74060e 21-Jul-2010 Devang Patel <dpatel@apple.com> Remove unintended code that was checked in as part of r108916.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108951 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4e03ac9d69fd69930cfdccb3c84eaa11b2ff582b 21-Jul-2010 Devang Patel <dpatel@apple.com> Remove unused argument.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108946 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GStmt.cpp
odeGenFunction.cpp
4d939e64142126b872e39c11dc995aa993f137fe 21-Jul-2010 Devang Patel <dpatel@apple.com> Remove unused argument.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108946 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GStmt.cpp
odeGenFunction.cpp
bf6d2093e95fbb207b9a2ec64fe6701bdb8b2840 21-Jul-2010 John McCall <rjmccall@apple.com> Fix the IR generation for catching pointers by references.
Fixes <rdar://problem/8212123>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108944 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
argetInfo.h
204b075fcc47c3f2aa7276dfba9b42eb25840b53 21-Jul-2010 John McCall <rjmccall@apple.com> Fix the IR generation for catching pointers by references.
Fixes <rdar://problem/8212123>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108944 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
argetInfo.h
6b04653a7020fe7cc8b0030989e8b680b747f3bb 20-Jul-2010 Chris Lattner <sabre@nondot.org> in 'new int[4]', constant fold the 4*4=16 instead of
doing an overflow check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108943 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
806941eab5e1d62d7676e5cdc0e1d9e397ea78b4 20-Jul-2010 Chris Lattner <sabre@nondot.org> in 'new int[4]', constant fold the 4*4=16 instead of
doing an overflow check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108943 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
ed67d7f7ae957406edf92c5fe541fc24dac6f235 20-Jul-2010 Chris Lattner <sabre@nondot.org> Follow the implementation approach suggested by PR6687,
which generates more efficient and more obviously conformant
code. We now test for overflow of the multiply then force
the result to -1 if so. On X86, this generates nice code
like this:

__Z4testl: ## @_Z4testl
## BB#0: ## %entry
subl $12, %esp
movl $4, %eax
mull 16(%esp)
testl %edx, %edx
movl $-1, %ecx
cmovel %eax, %ecx
movl %ecx, (%esp)
call __Znam
addl $12, %esp
ret



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108927 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
83252dcfe61aaebcb6bc117e71dc12968729513f 20-Jul-2010 Chris Lattner <sabre@nondot.org> Follow the implementation approach suggested by PR6687,
which generates more efficient and more obviously conformant
code. We now test for overflow of the multiply then force
the result to -1 if so. On X86, this generates nice code
like this:

__Z4testl: ## @_Z4testl
## BB#0: ## %entry
subl $12, %esp
movl $4, %eax
mull 16(%esp)
testl %edx, %edx
movl $-1, %ecx
cmovel %eax, %ecx
movl %ecx, (%esp)
call __Znam
addl $12, %esp
ret



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108927 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
479507636a5bdf00eb4b14dd334dfca0dd0890ce 20-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Adopt objc_assign_threadlocal() for __thread variables of GC types.
Implements radar 8203301.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108917 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GValue.h
021a7a63984f0f912dc9e9dae2a1b3e1509a40ce 20-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> Adopt objc_assign_threadlocal() for __thread variables of GC types.
Implements radar 8203301.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108917 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GValue.h
fac50b992023b409a04e003c3e52c64aaecdd5c9 20-Jul-2010 Devang Patel <dpatel@apple.com> Print template argument names for template class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108916 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
700a1cb1d207e660fcd9c234cccfc78553f06802 20-Jul-2010 Devang Patel <dpatel@apple.com> Print template argument names for template class.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108916 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
08fe4c00ee3c2e62eb27acc38d13610d75b90b4a 20-Jul-2010 Chris Lattner <sabre@nondot.org> implement rdar://5739832 - operator new should check for overflow in multiply,
causing clang to compile this code into something that correctly throws a
length error, fixing a potential integer overflow security attack:

void *test(long N) {
return new int[N];
}

int main() {
test(1L << 62);
}

We do this even when exceptions are disabled, because it is better for the
code to abort than for the attack to succeed.

This is heavily based on a patch that Fariborz wrote.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108915 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
6c552c1d5f47fbba00e6268d96a26ad026f2da2a 20-Jul-2010 Chris Lattner <sabre@nondot.org> implement rdar://5739832 - operator new should check for overflow in multiply,
causing clang to compile this code into something that correctly throws a
length error, fixing a potential integer overflow security attack:

void *test(long N) {
return new int[N];
}

int main() {
test(1L << 62);
}

We do this even when exceptions are disabled, because it is better for the
code to abort than for the attack to succeed.

This is heavily based on a patch that Fariborz wrote.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108915 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
a03c387f5ad5a5f5e910808d59c6a4f331bfdab4 20-Jul-2010 Dan Gohman <gohman@apple.com> Use getDebugLoc and setDebugLoc instead of getDbgMetadata and setDbgMetadata,
avoiding MDNode overhead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108911 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
4751a53c5e5fed4bf2271e29cae7411c93a77df7 20-Jul-2010 Dan Gohman <gohman@apple.com> Use getDebugLoc and setDebugLoc instead of getDbgMetadata and setDbgMetadata,
avoiding MDNode overhead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108911 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
13ac3591e0ea1caaf09a6a3df8570feb7fa045a7 20-Jul-2010 Chris Lattner <sabre@nondot.org> delete a loop that just generates dead code. In an example
like this:

void *test(long N) {
return new int[N][42][42];
}

the loop generates two dead mul instructions:

%tmp = load i64* %N.addr ; <i64> [#uses=2]
%0 = mul i64 %tmp, 7056 ; <i64> [#uses=1]
%1 = mul i64 %tmp, 42 ; <i64> [#uses=1]
%2 = mul i64 %1, 42 ; <i64> [#uses=0]
%call = call noalias i8* @_Znam(i64 %0) ; <i8*> [#uses=1]

The scale of these multiplies is already handled by the typesize stuff.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108884 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
6ba9aaed5eb612402d69117a0b63351272b4ae2e 20-Jul-2010 Chris Lattner <sabre@nondot.org> delete a loop that just generates dead code. In an example
like this:

void *test(long N) {
return new int[N][42][42];
}

the loop generates two dead mul instructions:

%tmp = load i64* %N.addr ; <i64> [#uses=2]
%0 = mul i64 %tmp, 7056 ; <i64> [#uses=1]
%1 = mul i64 %tmp, 42 ; <i64> [#uses=1]
%2 = mul i64 %1, 42 ; <i64> [#uses=0]
%call = call noalias i8* @_Znam(i64 %0) ; <i8*> [#uses=1]

The scale of these multiplies is already handled by the typesize stuff.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108884 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
f99a8dad4942cc0627b5ef24ce5f1992c82a8e55 20-Jul-2010 Chris Lattner <sabre@nondot.org> remove the special case for constant array sizes from
EmitCXXNewAllocSize. This code uses IRBuilder, which does
constant folding already.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108882 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
defe8b263aebd0dfdbe15478ad7bd832b4345ac9 20-Jul-2010 Chris Lattner <sabre@nondot.org> remove the special case for constant array sizes from
EmitCXXNewAllocSize. This code uses IRBuilder, which does
constant folding already.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108882 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
33a416ecac88f1f194386970e99f2c13efb793d1 20-Jul-2010 Jim Grosbach <grosbach@apple.com> Re-apply fixed version of 108749, correctly conditionalizing the new sections on
ObjC ABI version 2 this time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108847 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
35eee091f90496f5d59db62b83bfdae8258f4dc1 20-Jul-2010 Jim Grosbach <grosbach@apple.com> Re-apply fixed version of 108749, correctly conditionalizing the new sections on
ObjC ABI version 2 this time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108847 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a7a77ab274626a371e240b9e49c9231bdb7df092 20-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Update ImplicitCastExpr to be able to represent an XValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108807 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjC.cpp
906082edf2aea1c6de2926f93a8d7121e49d2a54 20-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Update ImplicitCastExpr to be able to represent an XValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108807 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjC.cpp
dc69c202fb71c435f5a3180a139db0a624ee9c94 20-Jul-2010 Stuart Hastings <stuart@apple.com> Correct line info for declarations/definitions. Radar 8063111.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108785 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
257d1d360282ad075f762991707f07525e898758 20-Jul-2010 Stuart Hastings <stuart@apple.com> Correct line info for declarations/definitions. Radar 8063111.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108785 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9d6c14927c274bef34f778a33101f4915793239f 20-Jul-2010 Jim Grosbach <grosbach@apple.com> Temporarily revert. Some odd internal breakage is likely related.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108764 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
af0bbea0d1ac9a79ed20845204059ed9c089d492 20-Jul-2010 Jim Grosbach <grosbach@apple.com> Temporarily revert. Some odd internal breakage is likely related.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108764 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
e2e493f813393ad61578a265c3c0fc4a6bb44544 19-Jul-2010 Jim Grosbach <grosbach@apple.com> Put ObjC method names, method types and class names in separate string literal
sections. rdar://8207705



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108749 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
2543dbb9d05c73dce758e48701807c8cf3714ed8 19-Jul-2010 Jim Grosbach <grosbach@apple.com> Put ObjC method names, method types and class names in separate string literal
sections. rdar://8207705



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108749 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9fc997d65b96ae6ded452c006d0d6271a609836b 18-Jul-2010 Eli Friedman <eli.friedman@gmail.com> Fix mangling for static member variables of classes inside an extern "C"
linkage specification. Not sure if this is the ideal fix, but I'm reasonably
sure it's correct vs. gcc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108656 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
c00cb6409307846a9bbcd86d307a1a91aab659d0 18-Jul-2010 Eli Friedman <eli.friedman@gmail.com> Fix mangling for static member variables of classes inside an extern "C"
linkage specification. Not sure if this is the ideal fix, but I'm reasonably
sure it's correct vs. gcc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108656 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
b075f1de60c17bd36ec1eaaf9e560224f8dbf7e4 18-Jul-2010 Chandler Carruth <chandlerc@gmail.com> Improve the representation of the atomic builtins in a few ways. First, we make
their call expressions synthetically have the "deduced" types based on their
first argument. We only insert conversions in the AST for arguments whose
values require conversion to match the value type expected. This keeps PR7600
closed by maintaining the return type, but avoids assertions due to unexpected
implicit casts making the type unsigned (test case added from Daniel).

The magic is moved into the codegen for the atomic builtin which inserts the
casts as needed at the IR level to raise the type to an integer suitable for
the LLVM intrinsic. This shouldn't cause any real change in functionality, but
now we can make the builtin be more truly polymorphic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108638 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
db4325b098eff5e9e660db19f0148423fb21f27f 18-Jul-2010 Chandler Carruth <chandlerc@gmail.com> Improve the representation of the atomic builtins in a few ways. First, we make
their call expressions synthetically have the "deduced" types based on their
first argument. We only insert conversions in the AST for arguments whose
values require conversion to match the value type expected. This keeps PR7600
closed by maintaining the return type, but avoids assertions due to unexpected
implicit casts making the type unsigned (test case added from Daniel).

The magic is moved into the codegen for the atomic builtin which inserts the
casts as needed at the IR level to raise the type to an integer suitable for
the LLVM intrinsic. This shouldn't cause any real change in functionality, but
now we can make the builtin be more truly polymorphic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108638 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
ef006823ecd2344aa0b47065d6d2b2bcbe95a853 18-Jul-2010 Chris Lattner <sabre@nondot.org> BUILD_ARCHIVE is the default for libraries, no need to set it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108633 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
9638eef7e3b2ca30406c5d369a44aa49ff26b201 18-Jul-2010 Chris Lattner <sabre@nondot.org> BUILD_ARCHIVE is the default for libraries, no need to set it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108633 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
d9fcc9a6f9bdc6f0af660d4af81bc4edcfb6d7e4 18-Jul-2010 Eli Friedman <eli.friedman@gmail.com> Fix crash initializing a bit-field with a non-constant in a place where we
try to evaluate the initializer as a constant.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108632 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
f0ca0ee66e5b1f3fc4d98e0d8795fa92559ce491 18-Jul-2010 Eli Friedman <eli.friedman@gmail.com> Fix crash initializing a bit-field with a non-constant in a place where we
try to evaluate the initializer as a constant.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108632 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
a407f871b97692644226053d6439b9b4a8ed6ade 17-Jul-2010 John McCall <rjmccall@apple.com> The GNU-runtime ObjC personality function doesn't let us rethrow with URR for
multiple reasons. Rethrow with _objc_exception_throw instead. Fixes PR7656.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108595 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GException.h
8262b6a44c98cf14e1d5f347a01e6bf44858198f 17-Jul-2010 John McCall <rjmccall@apple.com> The GNU-runtime ObjC personality function doesn't let us rethrow with URR for
multiple reasons. Rethrow with _objc_exception_throw instead. Fixes PR7656.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108595 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GException.h
91d93efc081233c9452b9a1db0d95c25b9a8e81c 16-Jul-2010 Eli Friedman <eli.friedman@gmail.com> Fix for PR3800: make sure not to evaluate the expression for a read-write
asm operand twice.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108489 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
6d7cfd7ef82e42ff30ee1dafd2883fd94e9f8294 16-Jul-2010 Eli Friedman <eli.friedman@gmail.com> Fix for PR3800: make sure not to evaluate the expression for a read-write
asm operand twice.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108489 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
8357c18d1d4678cbb892d0af5f774ff9de8309ca 16-Jul-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Support user defined attributes on block runtime functions.
- This issue here is that /usr/include/Blocks.h wants to define some of the
block runtime globals as weak, depending on the target. This doesn't work in
Clang because we aren't using the AST decl for these globals.

- The fix is a pretty gross hack which just watches all the decls for the
specific blocks globals we need to know about; if we see one we use it,
otherwise we use the hand coded type.

In time, I would like to clean this up by changing IRgen to ask Sema/AST for
the decl, which would then be lazily loaded from the builtin table if
necessary. This could be used in a whole host of places in IRgen and would
get rid of a lot of grotty hand coding of LLVM IR; however, we need some
extra Sema support for this as well as support for builtin global variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108482 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
754b9fbaa13749c61393cc613eec7c79efe60ddf 16-Jul-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Support user defined attributes on block runtime functions.
- This issue here is that /usr/include/Blocks.h wants to define some of the
block runtime globals as weak, depending on the target. This doesn't work in
Clang because we aren't using the AST decl for these globals.

- The fix is a pretty gross hack which just watches all the decls for the
specific blocks globals we need to know about; if we see one we use it,
otherwise we use the hand coded type.

In time, I would like to clean this up by changing IRgen to ask Sema/AST for
the decl, which would then be lazily loaded from the builtin table if
necessary. This could be used in a whole host of places in IRgen and would
get rid of a lot of grotty hand coding of LLVM IR; however, we need some
extra Sema support for this as well as support for builtin global variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108482 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
2b5f95dc0299cad0a9005e3d349a7478c00abb06 16-Jul-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move blocks runtime interfaces to CodeGenModule.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108481 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
odeGenModule.cpp
odeGenModule.h
673431a2986f750b4d8fadb57abf3f00db27bbbd 16-Jul-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move blocks runtime interfaces to CodeGenModule.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108481 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
odeGenModule.cpp
odeGenModule.h
85bd3f8b5697dabd99730561da2e427374bf1d8b 16-Jul-2010 John McCall <rjmccall@apple.com> When deferring the emission of declarations with initializers in C++, remember
the order they appeared in the translation unit. If they get emitted, put them
in their proper order. Fixes rdar://problem/7458115



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108477 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GDeclCXX.cpp
odeGenModule.cpp
odeGenModule.h
bf40cb518312dde1c07e44fcae59bc4eec65589c 16-Jul-2010 John McCall <rjmccall@apple.com> When deferring the emission of declarations with initializers in C++, remember
the order they appeared in the translation unit. If they get emitted, put them
in their proper order. Fixes rdar://problem/7458115



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108477 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GDeclCXX.cpp
odeGenModule.cpp
odeGenModule.h
03c719a2b7d9781df711c683e9d8c5a8d8a3f8e9 16-Jul-2010 Devang Patel <dpatel@apple.com> Set "optimization is ON" and supply other optional parameters. This helps codegenerator preserve info in case the symbol is deleted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108471 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
15a3d7df1ad667c6c09e34def34d546124c9efac 16-Jul-2010 Devang Patel <dpatel@apple.com> Set "optimization is ON" and supply other optional parameters. This helps codegenerator preserve info in case the symbol is deleted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108471 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
78f3fb8b23038684eb8cbab25f574aef7cb6830a 16-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Don't suppress the emission of available_externally functions marked
with always_inline attribute. Thanks to Howard for the tip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108469 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7feaeeed1789fbf357fc81072966fe8f62fb4a81 16-Jul-2010 Douglas Gregor <dgregor@apple.com> Don't suppress the emission of available_externally functions marked
with always_inline attribute. Thanks to Howard for the tip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108469 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5ace12f1d04602c824629d55d5e1e001260532a7 16-Jul-2010 Devang Patel <dpatel@apple.com> Mark implementation generated methods as artificial.
Tested by namespace.exp and virtfunc.exp from gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108468 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4089491e354a8718f3953b0ef72da0ad6ca98d89 16-Jul-2010 Devang Patel <dpatel@apple.com> Mark implementation generated methods as artificial.
Tested by namespace.exp and virtfunc.exp from gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108468 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b6251d41f637bfa9f0d5e8956f9dc1cde39e57c0 15-Jul-2010 John McCall <rjmccall@apple.com> After some discussion, the ABI list settled on a much more sensible mangling
for string literals.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108464 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
1658c39227fe0dc53e6365799a579eeb22b478d2 15-Jul-2010 John McCall <rjmccall@apple.com> After some discussion, the ABI list settled on a much more sensible mangling
for string literals.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108464 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
ad4b991edfb4a72e2c2b0ed0ab1527398dace0a3 15-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Reinstate the scalar-cast-to-const-reference improvements, this time
with the proper spelling of "non-class prvalue". Silly me, I think
class rvalues were xvalues rather than prvalues!

Hah hah hah.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108443 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
7c7a79303b62f51c1ff02f9ce41d81211a69d3b4 15-Jul-2010 Douglas Gregor <dgregor@apple.com> Reinstate the scalar-cast-to-const-reference improvements, this time
with the proper spelling of "non-class prvalue". Silly me, I think
class rvalues were xvalues rather than prvalues!

Hah hah hah.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108443 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
e42d1111dc5ea93c78d9c16e3f0573673674c7e8 15-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Revert r108431 and r108433 (the cast-to-const-reference fixes), which
broke nightlytest.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108439 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
928d69f2927c32e2f57a882a96c2bef1de79aa4b 15-Jul-2010 Douglas Gregor <dgregor@apple.com> Revert r108431 and r108433 (the cast-to-const-reference fixes), which
broke nightlytest.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108439 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
107cc3c5408dbdc65839aef69b562295ca0ccf57 15-Jul-2010 Devang Patel <dpatel@apple.com> Revert 108220 and subsequent patch.
This is not required (I am not 100% sure why) but method.exp from gdb testsuite flagged regression due to this patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108434 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
db30c0f5cfcda4483bf4d2a02d6a94289984a4a9 15-Jul-2010 Devang Patel <dpatel@apple.com> Revert 108220 and subsequent patch.
This is not required (I am not 100% sure why) but method.exp from gdb testsuite flagged regression due to this patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108434 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
09bd899b26ef11f25200d0c8e2a1fc5da389de9b 15-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Spell isPRValue() properly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108433 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
06de03756380413c1137dd2ccee5348d206f71b2 15-Jul-2010 Douglas Gregor <dgregor@apple.com> Spell isPRValue() properly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108433 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
e2da3b5059e40969702b367c4a8fdaa38ae4fcc7 15-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Teach CodeGenFunction::EmitCastLValue() to handle casts to an lvalue
that involve binding a reference to a pure rvalue temporary (e.g., not
a class temporary), by creating a new temporary and copying the result
there. Fixes PR6024.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108431 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
5467209f23097d5b0fc628c18aaa85e73d386598 15-Jul-2010 Douglas Gregor <dgregor@apple.com> Teach CodeGenFunction::EmitCastLValue() to handle casts to an lvalue
that involve binding a reference to a pure rvalue temporary (e.g., not
a class temporary), by creating a new temporary and copying the result
there. Fixes PR6024.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108431 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
9e7e35d709b64ab1a0c67ba355616e342dbb4db2 15-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> CK_BitCast is not an lvalue bitcast any longer

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108428 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
24978863d13e12278799df62edaa2ddf33ff2fba 15-Jul-2010 Douglas Gregor <dgregor@apple.com> CK_BitCast is not an lvalue bitcast any longer

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108428 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
fd03b0329494b6d46a05848ef0f6aaa9c6b7c6c0 15-Jul-2010 Daniel Dunbar <daniel@zuster.org> CodeGen: Tweak ABI handling for Minix, patch by Kees van Reeuwijk!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108423 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
3852f34eaa50908debfa03b450b3e68376efd852 15-Jul-2010 Daniel Dunbar <daniel@zuster.org> CodeGen: Tweak ABI handling for Minix, patch by Kees van Reeuwijk!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108423 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
6f94dbb24b4bda547bf7492cf707aeadef311ddf 15-Jul-2010 Daniel Dunbar <daniel@zuster.org> CodeGen/ObjC/NeXT: Fix Obj-C message send to match llvm-gcc when choosing
whether to use objc_msgSend_fpret; the choice is target dependent, not Obj-C ABI
dependent.
- <rdar://problem/8139758> arm objc _objc_msgSend_fpret bug

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108379 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCall.cpp
GObjCMac.cpp
odeGenModule.h
dacf9dda17346c628fdd8c5df53c681738db0dc5 15-Jul-2010 Daniel Dunbar <daniel@zuster.org> CodeGen/ObjC/NeXT: Fix Obj-C message send to match llvm-gcc when choosing
whether to use objc_msgSend_fpret; the choice is target dependent, not Obj-C ABI
dependent.
- <rdar://problem/8139758> arm objc _objc_msgSend_fpret bug

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108379 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCall.cpp
GObjCMac.cpp
odeGenModule.h
992592a80b0e48c9da15336a1f89cd5bf0786a8a 14-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Add lvalue-bitcast support for complex numbers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108363 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
77d439a4d69ffe30a7607c07b3ec5113824fd53e 14-Jul-2010 Douglas Gregor <dgregor@apple.com> Add lvalue-bitcast support for complex numbers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108363 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
d4ef045490044c1bb0030ceee66c664c85414316 14-Jul-2010 John McCall <rjmccall@apple.com> Fix the mangling of template template arguments, which do not always
follow <name>; instead they follow <type>, which has <name> as a subset.

Fixes PR7446.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108326 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
b6f532e2b03dbbfd97a37a7bb845fe23f8136889 14-Jul-2010 John McCall <rjmccall@apple.com> Fix the mangling of template template arguments, which do not always
follow <name>; instead they follow <type>, which has <name> as a subset.

Fixes PR7446.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108326 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
c234246d23486282655063f00c666e7aa4daf58f 14-Jul-2010 John McCall <rjmccall@apple.com> Remove a few mangling FIXMEs:
- TSTs whose template is a template template parameter already work
- we don't provide an imaginary type, so we can't mangle one
- we don't need a generic FIXME for vendor type qualifiers



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108317 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
f1adcddef211b6605eb7fe5341cc110a801b4f5f 14-Jul-2010 John McCall <rjmccall@apple.com> Remove a few mangling FIXMEs:
- TSTs whose template is a template template parameter already work
- we don't provide an imaginary type, so we can't mangle one
- we don't need a generic FIXME for vendor type qualifiers



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108317 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
efd5ff37b56898d44c38883ffe34703755787479 14-Jul-2010 John McCall <rjmccall@apple.com> Implement the standard mangling for array-subscript expressions, and implement
the current proposals from David Vandervoorde for new, delete, throw, typeid,
imaginary literals, string literals, and null literals.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108315 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
0512e48ea1664dd0d3af0dd29bb46bbded040d56 14-Jul-2010 John McCall <rjmccall@apple.com> Implement the standard mangling for array-subscript expressions, and implement
the current proposals from David Vandervoorde for new, delete, throw, typeid,
imaginary literals, string literals, and null literals.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108315 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
d2e41f61d3ac407f275eb00a1f20d925fc76abd8 14-Jul-2010 John McCall <rjmccall@apple.com> Work around an obnoxious GCC warning by changing semantics in a hopefully-
harmless way.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108295 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.h
3e29f96988b0438e42dba3790f61fb3df42d90cb 14-Jul-2010 John McCall <rjmccall@apple.com> Work around an obnoxious GCC warning by changing semantics in a hopefully-
harmless way.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108295 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.h
8c90b02120e2f49bf695e6013049ab9d3caac2e7 14-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce a new cast kind for an "lvalue bitcast", which handles
reinterpret_casts (possibly indirectly via C-style/functional casts)
on values, e.g.,

int i;
reinterpret_cast<short&>(i);

The IR generated for this is essentially the same as for

*reinterpret_cast<short*>(&i).

Fixes PR6437, PR7593, and PR7344.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108294 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
e39a3894513349908cdb3beba2614e53cb288e6c 14-Jul-2010 Douglas Gregor <dgregor@apple.com> Introduce a new cast kind for an "lvalue bitcast", which handles
reinterpret_casts (possibly indirectly via C-style/functional casts)
on values, e.g.,

int i;
reinterpret_cast<short&>(i);

The IR generated for this is essentially the same as for

*reinterpret_cast<short*>(&i).

Fixes PR6437, PR7593, and PR7344.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108294 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
12f236689611e7ef276ba30ebb2ce28e030afffb 14-Jul-2010 John McCall <rjmccall@apple.com> Switch the __cxa_rethrow cleanup to be lazy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108288 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
fcd5c0c62ef3d86ecd991753bb43c88c861470e7 14-Jul-2010 John McCall <rjmccall@apple.com> Switch the __cxa_rethrow cleanup to be lazy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108288 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
bcc1d422aa7fbf634cb5fd58b6a46a9e06e0bd74 14-Jul-2010 John McCall <rjmccall@apple.com> Allow for the possibility that __cxa_end_catch might throw for a catch-all block
or a catch of a record type by value or reference. Also convert this to a
lazy cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108287 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCMac.cpp
odeGenFunction.h
8e3f86193995c47ee0d229e4336c3382410f09f5 14-Jul-2010 John McCall <rjmccall@apple.com> Allow for the possibility that __cxa_end_catch might throw for a catch-all block
or a catch of a record type by value or reference. Also convert this to a
lazy cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108287 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCMac.cpp
odeGenFunction.h
36797014afd04aa5b4a76d74f24b8aab520a5e6d 13-Jul-2010 John McCall <rjmccall@apple.com> Switch the __cxa_free_exception cleanup to be lazy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108276 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
09faeabf39a6fab2e2beb6bf03da970c17d2049a 13-Jul-2010 John McCall <rjmccall@apple.com> Switch the __cxa_free_exception cleanup to be lazy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108276 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
413f835cae6bca2621b9bddad54c8d15120be1ee 13-Jul-2010 John McCall <rjmccall@apple.com> Teach IR generation how to lazily emit cleanups. This has a lot of advantages,
mostly in avoiding unnecessary work at compile time but also in producing more
sensible block orderings.

Move the destructor cleanups for local variables over to use lazy cleanups.
Eventually all cleanups will do this; for now we have some awkward code
duplication.

Tell IR generation just to never produce landing pads in -fno-exceptions.
This is a much more comprehensive solution to a problem which previously was
half-solved by checks in most cleanup-generation spots.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108270 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDecl.cpp
GException.cpp
GException.h
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenFunction.h
da65ea86482bc116906edfb9ba1d7124f76cc867 13-Jul-2010 John McCall <rjmccall@apple.com> Teach IR generation how to lazily emit cleanups. This has a lot of advantages,
mostly in avoiding unnecessary work at compile time but also in producing more
sensible block orderings.

Move the destructor cleanups for local variables over to use lazy cleanups.
Eventually all cleanups will do this; for now we have some awkward code
duplication.

Tell IR generation just to never produce landing pads in -fno-exceptions.
This is a much more comprehensive solution to a problem which previously was
half-solved by checks in most cleanup-generation spots.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108270 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDecl.cpp
GException.cpp
GException.h
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenFunction.h
2350fb26d59692c6006ec5d33b8215e96055bdb6 13-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Whenever we're creating an expression that is typically an rvalue
(e.g., a call, cast, etc.), immediately adjust the expression's type
to strip cv-qualifiers off of all non-class types (in C++) or all
types (in C). This effectively extends my previous fix for PR7463,
which was restricted to calls, to other kinds of expressions within
similar characteristics. I've audited every use of
getNonReferenceType() in the code base, switching to the newly-renamed
getNonLValueExprType() where necessary.

Big thanks to Eli for pointing out just how incomplete my original fix
for PR7463 actually was. We've been handling cv-qualifiers on rvalues
wrong for a very, very long time. Fixes PR7463.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108253 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
6398235d7890a81b785ea5af3b6e66d86bf184cc 13-Jul-2010 Douglas Gregor <dgregor@apple.com> Whenever we're creating an expression that is typically an rvalue
(e.g., a call, cast, etc.), immediately adjust the expression's type
to strip cv-qualifiers off of all non-class types (in C++) or all
types (in C). This effectively extends my previous fix for PR7463,
which was restricted to calls, to other kinds of expressions within
similar characteristics. I've audited every use of
getNonReferenceType() in the code base, switching to the newly-renamed
getNonLValueExprType() where necessary.

Big thanks to Eli for pointing out just how incomplete my original fix
for PR7463 actually was. We've been handling cv-qualifiers on rvalues
wrong for a very, very long time. Fixes PR7463.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108253 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
0d94c89b1e25d8bde826e845c82ff58584dd067a 13-Jul-2010 Devang Patel <dpatel@apple.com> Add volatile qualifiers for "this".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108245 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2ecebc2232d73efa80dd65bb176053f98899d069 13-Jul-2010 Devang Patel <dpatel@apple.com> Add volatile qualifiers for "this".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108245 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
241bc8b3ff47602c70e1aebae2c92208bee139ba 13-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Reinstate the optimization suppressing available_externally functions
at -O0. The only change from the previous patch is that we don't try
to generate virtual method thunks for an available_externally
function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108230 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
44eac33ae12df384f3f002102f919f603bee330f 13-Jul-2010 Douglas Gregor <dgregor@apple.com> Reinstate the optimization suppressing available_externally functions
at -O0. The only change from the previous patch is that we don't try
to generate virtual method thunks for an available_externally
function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108230 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5185a42edd244975611c6903ffedc1357981cd21 13-Jul-2010 Devang Patel <dpatel@apple.com> const qualify debug info for "this" for const methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108220 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
769640e30d1e8ec2a6667daff1c2d0a28811138b 13-Jul-2010 Devang Patel <dpatel@apple.com> const qualify debug info for "this" for const methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108220 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
bc6ad60c3c20ae9b1dfc15838069a207c77836c7 13-Jul-2010 Devang Patel <dpatel@apple.com> While collecting members for a class, always create delcaration entry for methods. Debug info for method definition will be generated while generating code for method body.
Tested by classes.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108205 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a5c5babb9974aaf07568e90086af52b91edc2c16 13-Jul-2010 Devang Patel <dpatel@apple.com> While collecting members for a class, always create delcaration entry for methods. Debug info for method definition will be generated while generating code for method body.
Tested by classes.exp in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108205 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7f6fca317ff9231adeff4c24538d83f5de7d3d02 12-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Speculatively revert r108156; it appears to be breaking self-host.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108194 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
27cc6331e33efac4020058d2fda36c9060ec5afa 12-Jul-2010 Douglas Gregor <dgregor@apple.com> Speculatively revert r108156; it appears to be breaking self-host.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108194 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
70d2bf44165b213c047a63be4add603663d71cb9 12-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Do not generate LLVM IR for available_externally function bodies at
-O0, since we won't be using the definitions for anything anyway. For
lib/System/Path.o when built in Debug+Asserts mode, this leads to a 4%
improvement in compile time (and suppresses 440 function bodies).

<rdar://problem/7987644>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108156 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7ce1f2714ac0f33210bab14650bce2078ebf343e 12-Jul-2010 Douglas Gregor <dgregor@apple.com> Do not generate LLVM IR for available_externally function bodies at
-O0, since we won't be using the definitions for anything anyway. For
lib/System/Path.o when built in Debug+Asserts mode, this leads to a 4%
improvement in compile time (and suppresses 440 function bodies).

<rdar://problem/7987644>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108156 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
06c441caac49e9a50f41b7ff58e726cb7cb5903e 08-Jul-2010 Devang Patel <dpatel@apple.com> Handle forward declarations properly in debug info.
Patch by Alexander Kabaev.
PR 7595.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107900 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0b89799b6fdc6bf88f4800bd0801fe6ed5dffc59 08-Jul-2010 Devang Patel <dpatel@apple.com> Handle forward declarations properly in debug info.
Patch by Alexander Kabaev.
PR 7595.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107900 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
6a9b452e7761d8585a86ab7a4e0e07a42ec7347e 08-Jul-2010 John McCall <rjmccall@apple.com> Mark calls to 'throw()' functions as nounwind, and mark the functions nounwind
as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107858 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
9c0c1f333ab8f5a3da055b99ee94778689face17 08-Jul-2010 John McCall <rjmccall@apple.com> Mark calls to 'throw()' functions as nounwind, and mark the functions nounwind
as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107858 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
0ec494632efdc9cd55608bc98d175a68084acbad 08-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Reinstate the fix for PR7556. A silly use of isTrivial() was
suppressing copies of objects with trivial copy constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107857 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
ed8abf18329df67b0abcbb3a10458bd8c1d2a595 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Reinstate the fix for PR7556. A silly use of isTrivial() was
suppressing copies of objects with trivial copy constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107857 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
0d52612333d6dd8d5ad77806a86ac7590619dfa6 08-Jul-2010 Chris Lattner <sabre@nondot.org> fix the clang side of PR7437: EmitAggregateCopy
was not producing a memcpy with the right address
spaces because of two places in it doing casts of
the arguments to i8, one of which that didn't
preserve the address space.

There is also an optimizer bug here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107842 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
098432c3119cd4e421a2b906d06187b004d3a86b 08-Jul-2010 Chris Lattner <sabre@nondot.org> fix the clang side of PR7437: EmitAggregateCopy
was not producing a memcpy with the right address
spaces because of two places in it doing casts of
the arguments to i8, one of which that didn't
preserve the address space.

There is also an optimizer bug here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107842 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
fa0b6fca56fc75c359c07a5fb1a6f328c93e61ca 08-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Revert r107828 and r107827, the fix for PR7556, which seems to be
breaking bootstrap on Linux.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107837 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
84745677f64863e025a6733cb29d0b94bc3a6ae2 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Revert r107828 and r107827, the fix for PR7556, which seems to be
breaking bootstrap on Linux.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107837 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
38c8fe9cdead9e73d84548a6e3c8a9fb680bcb98 08-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Rename CXXZeroInitValueExpr to CXXScalarValueInitExpr, to reflect its
newly-narrowed scope. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107828 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
016a4a90c8e75d59de731fa3aa98f0a55656e66c 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Rename CXXZeroInitValueExpr to CXXScalarValueInitExpr, to reflect its
newly-narrowed scope. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107828 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
9448d6386902e18259ccbf440e0d3787fc340b0f 08-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Do not use CXXZeroValueInitExpr for class types. Instead, use
CXXConstructExpr/CXXTemporaryObjectExpr/CXXNewExpr as
appropriate. Fixes PR7556, and provides a slide codegen improvement
when copy-initializing a POD class type from a value-initialized
temporary. Previously, we weren't eliding the copy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107827 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
63ef464c3fad1e8b9f9360baa6c81f974b712e90 08-Jul-2010 Douglas Gregor <dgregor@apple.com> Do not use CXXZeroValueInitExpr for class types. Instead, use
CXXConstructExpr/CXXTemporaryObjectExpr/CXXNewExpr as
appropriate. Fixes PR7556, and provides a slide codegen improvement
when copy-initializing a POD class type from a value-initialized
temporary. Previously, we weren't eliding the copy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107827 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
6f4bed50c076d7c8dd115c4c8af150d44bb6b379 07-Jul-2010 Chris Lattner <sabre@nondot.org> add driver support for minix, patch by Kees van Reeuwijk
from PR7583


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107788 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
38e317d6dce161b249508686cc67eb7176958762 07-Jul-2010 Chris Lattner <sabre@nondot.org> add driver support for minix, patch by Kees van Reeuwijk
from PR7583


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107788 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
faf20822f9376a4d1bd676b23ac8a209b0e47266 07-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> getBody() -> hasBody()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107773 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
4aedb1cab1a731bfa5c82459669320a72b0d6e66 07-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> getBody() -> hasBody()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107773 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
327727783bbdf4a7f2bc08b6aa7d3a58a5ee412c 07-Jul-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH.

Makes de-serialization of the function body even more "lazier".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107768 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVTables.h
odeGenModule.cpp
06a54a38be5054c910ffc92db60edab23f9ea105 07-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH.

Makes de-serialization of the function body even more "lazier".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107768 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVTables.h
odeGenModule.cpp
f52c07259c962b9802f67e05ecbe5ed7e0d3e8ff 07-Jul-2010 John McCall <rjmccall@apple.com> Teach function-try-blocks on constructors and destructors to implicitly
rethrow. Fixes rdar://problem/7696603



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107757 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GException.cpp
odeGenFunction.h
59a7000a79118e4c140885ccbb2ac6a686a73092 07-Jul-2010 John McCall <rjmccall@apple.com> Teach function-try-blocks on constructors and destructors to implicitly
rethrow. Fixes rdar://problem/7696603



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107757 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GException.cpp
odeGenFunction.h
c762367d52191a7e2a64cf623ba300df9ffb7209 07-Jul-2010 John McCall <rjmccall@apple.com> Provide a hook for the benefit of clients using clang IR gen as a subroutine:
emit metadata associating allocas and global values with a Decl*. This feature
is controlled by an option that (intentionally) cannot be enabled on the command
line.

To use this feature, simply set
CodeGenOptions.EmitDeclMetadata = true;
and then interpret the completely underspecified metadata. :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107739 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
744016dde06fcffd50931e94a98c850f8b12cd87 07-Jul-2010 John McCall <rjmccall@apple.com> Provide a hook for the benefit of clients using clang IR gen as a subroutine:
emit metadata associating allocas and global values with a Decl*. This feature
is controlled by an option that (intentionally) cannot be enabled on the command
line.

To use this feature, simply set
CodeGenOptions.EmitDeclMetadata = true;
and then interpret the completely underspecified metadata. :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107739 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
21d7ab85164167c34651ffa0cb83a9b67fe0e23c 06-Jul-2010 John McCall <rjmccall@apple.com> Make CGBuilderTy a typedef again; its functionality has been rolled back
into IRBuilder.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107687 91177308-0d34-0410-b5e6-96231b3b80d8
GBuilder.h
df921aef355ce15179f17cba839ada6347d50406 06-Jul-2010 John McCall <rjmccall@apple.com> Make CGBuilderTy a typedef again; its functionality has been rolled back
into IRBuilder.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107687 91177308-0d34-0410-b5e6-96231b3b80d8
GBuilder.h
0b7ecde65d8a21c9cf077ce23ffd34752f0b0c5c 06-Jul-2010 John McCall <rjmccall@apple.com> When destroying a cleanup, kill any references to instructions in the entry
block before deleting it. Fixes PR7575.

This really just a short-term fix before implementing lazy cleanups.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107676 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
66d80a9c99ef781f0fd56dfcd060e30d4d673c93 06-Jul-2010 John McCall <rjmccall@apple.com> When destroying a cleanup, kill any references to instructions in the entry
block before deleting it. Fixes PR7575.

This really just a short-term fix before implementing lazy cleanups.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107676 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
939e63fce26525fc4de6ff98306fc651ee3537cc 06-Jul-2010 John McCall <rjmccall@apple.com> When creating functions to run global initializers and destructors, mark them
as nounwind in -fno-exceptions. Fixes rdar://problem/8090834.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107639 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
044cc54a7d83c90857187c4cd4a0fd33664a7f7f 06-Jul-2010 John McCall <rjmccall@apple.com> When creating functions to run global initializers and destructors, mark them
as nounwind in -fno-exceptions. Fixes rdar://problem/8090834.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107639 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
6ef8adf4fa48332952ec1ac4663ef6fa25bfeda4 06-Jul-2010 John McCall <rjmccall@apple.com> Validated by nightly-test runs on x86 and x86-64 darwin, including after
self-host. Hopefully these results hold up on different platforms.

I tried to keep the GNU ObjC runtime happy, but it's hard for me to test.
Reimplement how clang generates IR for exceptions. Instead of creating new
invoke destinations which sequentially chain to the previous destination,
push a more semantic representation of *why* we need the cleanup/catch/filter
behavior, then collect that information into a single landing pad upon request.

Also reorganizes how normal cleanups (i.e. cleanups triggered by non-exceptional
control flow) are generated, since it's actually fairly closely tied in with
the former. Remove the need to track which cleanup scope a block is associated
with.

Document a lot of previously poorly-understood (by me, at least) behavior.

The new framework implements the Horrible Hack (tm), which requires every
landing pad to have a catch-all so that inlining will work. Clang no longer
requires the Horrible Hack just to make exceptions flow correctly within
a function, however. The HH is an unfortunate requirement of LLVM's EH IR.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107631 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GCall.cpp
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GException.h
GExpr.cpp
GExprAgg.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GStmt.cpp
GTemporaries.cpp
odeGenFunction.cpp
odeGenFunction.h
f1549f66a8216a78112286e3978cea2c29d6334c 06-Jul-2010 John McCall <rjmccall@apple.com> Validated by nightly-test runs on x86 and x86-64 darwin, including after
self-host. Hopefully these results hold up on different platforms.

I tried to keep the GNU ObjC runtime happy, but it's hard for me to test.
Reimplement how clang generates IR for exceptions. Instead of creating new
invoke destinations which sequentially chain to the previous destination,
push a more semantic representation of *why* we need the cleanup/catch/filter
behavior, then collect that information into a single landing pad upon request.

Also reorganizes how normal cleanups (i.e. cleanups triggered by non-exceptional
control flow) are generated, since it's actually fairly closely tied in with
the former. Remove the need to track which cleanup scope a block is associated
with.

Document a lot of previously poorly-understood (by me, at least) behavior.

The new framework implements the Horrible Hack (tm), which requires every
landing pad to have a catch-all so that inlining will work. Clang no longer
requires the Horrible Hack just to make exceptions flow correctly within
a function, however. The HH is an unfortunate requirement of LLVM's EH IR.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107631 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GCall.cpp
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GException.h
GExpr.cpp
GExprAgg.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GStmt.cpp
GTemporaries.cpp
odeGenFunction.cpp
odeGenFunction.h
5c0441b6927e4f3462c627784e2737021151c838 05-Jul-2010 Chris Lattner <sabre@nondot.org> Generate fewer first class aggregate values for other
coerce cases (e.g. {double,int}) which avoids fastisel
bailing out at -O0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107628 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
9282688a296b306c4ae2d115f55101647056d1da 05-Jul-2010 Chris Lattner <sabre@nondot.org> Generate fewer first class aggregate values for other
coerce cases (e.g. {double,int}) which avoids fastisel
bailing out at -O0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107628 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
28f80f134dc061a482845927d3e4f8e0827b60a1 05-Jul-2010 Chris Lattner <sabre@nondot.org> in the "coerce" case, the ABI handling code ends up making the
alloca for an argument. Make sure the argument gets the proper
decl alignment, which may be different than the type alignment.

This fixes PR7567


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107627 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
odeGenFunction.h
121b3facb4e0585d23766f9c1e4fdf9018a4b217 05-Jul-2010 Chris Lattner <sabre@nondot.org> in the "coerce" case, the ABI handling code ends up making the
alloca for an argument. Make sure the argument gets the proper
decl alignment, which may be different than the type alignment.

This fixes PR7567


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107627 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
odeGenFunction.h
ce01c74d3abc500c5cc426f040741dc8015b8371 05-Jul-2010 Chris Lattner <sabre@nondot.org> fix PR7564 a cast where the bitfield struct init code
wasn't handling array padding elements right.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107621 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
2bc00252d7597af32c84599076e4d14e678aaa8a 05-Jul-2010 Chris Lattner <sabre@nondot.org> fix PR7564 a cast where the bitfield struct init code
wasn't handling array padding elements right.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107621 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
5cd1fa87f8636016c150ff75203c6bf5556cb3fa 05-Jul-2010 Chris Lattner <sabre@nondot.org> AppendBitField really can never fail, so return its return value.
Everyone knows that no bugs are ever possible with bitfields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107620 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
1880666c13b909f858ddec9c2a7784c5a0c04041 05-Jul-2010 Chris Lattner <sabre@nondot.org> AppendBitField really can never fail, so return its return value.
Everyone knows that no bugs are ever possible with bitfields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107620 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
fca053daa3d922043e821cd2b7e0ae2853a64d23 03-Jul-2010 Charles Davis <cdavis@mines.edu> Mangle Objective-C pointers and block pointers in the Microsoft C++ Mangler.

ObjC pointers were easy enough (as far as the ABI is concerned, they're
just pointers to structs), but I had to invent a new mangling for block
pointers. This is particularly worrying with the Microsoft ABI, because
it is a vendor-specific ABI; extending it could come back to bite us
later when MS extends it on their own (and you know they will).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107572 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
4d254836f4a6a03fb3c77d0636c3cb5475540eb0 03-Jul-2010 Charles Davis <cdavis@mines.edu> Mangle Objective-C pointers and block pointers in the Microsoft C++ Mangler.

ObjC pointers were easy enough (as far as the ABI is concerned, they're
just pointers to structs), but I had to invent a new mangling for block
pointers. This is particularly worrying with the Microsoft ABI, because
it is a vendor-specific ABI; extending it could come back to bite us
later when MS extends it on their own (and you know they will).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107572 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
28a24db57b5e68f8adb2c16d4fee1f1b5db6898b 03-Jul-2010 John McCall <rjmccall@apple.com> Provide convenience routines to save and restore the current insertion
point.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107570 91177308-0d34-0410-b5e6-96231b3b80d8
GBuilder.h
c7d209fb2442a63d328a25e1036b4726b0c4a49d 03-Jul-2010 John McCall <rjmccall@apple.com> Provide convenience routines to save and restore the current insertion
point.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107570 91177308-0d34-0410-b5e6-96231b3b80d8
GBuilder.h
809c80c159cfe9085b442b5d74fb8154adfce7a3 03-Jul-2010 Charles Davis <cdavis@mines.edu> Fix mangling of array dimensions in the Microsoft C++ Mangler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107568 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
08778269cfbf803fb216870060c60eb2adb25ef6 03-Jul-2010 Charles Davis <cdavis@mines.edu> Fix mangling of array dimensions in the Microsoft C++ Mangler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107568 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
6e273ba667863a98577cd3daa09ee243f8be7c94 03-Jul-2010 Charles Davis <cdavis@mines.edu> Mangle member pointer types in the Microsoft C++ Mangler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107567 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
cd712cb5711b597bf3a2a67a4027e2238c8b9828 03-Jul-2010 Charles Davis <cdavis@mines.edu> Mangle member pointer types in the Microsoft C++ Mangler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107567 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
cc4e65e4768d28fcd9b7c5534a9cfcf8c123736a 03-Jul-2010 Charles Davis <cdavis@mines.edu> Fix mangling of function pointers in the Microsoft C++ Mangler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107564 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
1139da148e44193a71585f418be96ef9c5f6defa 03-Jul-2010 Charles Davis <cdavis@mines.edu> Fix mangling of function pointers in the Microsoft C++ Mangler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107564 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
32372d8bb1dedc8d1dc79d912f7b0cce176a3023 03-Jul-2010 Charles Davis <cdavis@mines.edu> Fix mangling of array parameters for functions in the Microsoft C++ Mangler.
Only actual functions get mangled correctly; I don't know how to fix it for
function pointers yet. Thanks to John McCall for the hint.

Also, mangle anonymous tag types. I don't have a suitable testcase yet; I have
a feeling that that's going to need support for static locals, and I haven't
figured out exactly how MSVC's scheme for mangling those works.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107561 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
4f0a3376a5e5c9028b0c736ac935895aabdb5fcd 03-Jul-2010 Charles Davis <cdavis@mines.edu> Fix mangling of array parameters for functions in the Microsoft C++ Mangler.
Only actual functions get mangled correctly; I don't know how to fix it for
function pointers yet. Thanks to John McCall for the hint.

Also, mangle anonymous tag types. I don't have a suitable testcase yet; I have
a feeling that that's going to need support for static locals, and I haven't
figured out exactly how MSVC's scheme for mangling those works.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107561 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
5ece84ce202e7747e58ccacf24f1a7b85f9a2335 01-Jul-2010 Douglas Gregor <doug.gregor@gmail.com> Remove unnecessary ASTContext parameter from
CXXRecordDecl::getDestructor(); no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107394 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprCXX.cpp
GObjC.cpp
1d110e05e0ff48c1c7a483d6b7fd094cdf28316a 01-Jul-2010 Douglas Gregor <dgregor@apple.com> Remove unnecessary ASTContext parameter from
CXXRecordDecl::getDestructor(); no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107394 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprCXX.cpp
GObjC.cpp
1ff0ea92991caabbba86fd21a27aa0b1e01125e3 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
GCall.cpp
odeGenTypes.cpp
odeGenTypes.h
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
GCall.cpp
odeGenTypes.cpp
odeGenTypes.h
a0173ee552a235c935e2df51cb90f44298f9e385 01-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/IRgen: Add support for -momit-leaf-frame-pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107367 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
1ad6648cce57bd187f1853f58fef26cd9bf4934f 01-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/IRgen: Add support for -momit-leaf-frame-pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107367 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
9531c5e66b23dd90ce0fd2cec5ba637724348c3f 01-Jul-2010 Daniel Dunbar <daniel@zuster.org> Revert "IRgen: Make sure any prolog instructions get debug info.", the lexical
scope hasn't been set up yet so this isn't valid. It was just a cleanup to the
IR, so I'm going to ignore it for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107356 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
34161996e5bec20bcc3a97894a3a38f2d0f56c72 01-Jul-2010 Daniel Dunbar <daniel@zuster.org> Revert "IRgen: Make sure any prolog instructions get debug info.", the lexical
scope hasn't been set up yet so this isn't valid. It was just a cleanup to the
IR, so I'm going to ignore it for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107356 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
d0e6e2499592213ba6ec9510ca11b4de362e7961 30-Jun-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix debug info regression in r106970; when we eliminate the return value
store make sure to move the debug metadata from the store (which is actual
'return' statement location) to the return instruction (which otherwise would
have the function end location as its debug info).
- Tested by gdb test suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107322 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
21fcc8f01246b91dbef65e7af85f2f0947758a00 30-Jun-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix debug info regression in r106970; when we eliminate the return value
store make sure to move the debug metadata from the store (which is actual
'return' statement location) to the return instruction (which otherwise would
have the function end location as its debug info).
- Tested by gdb test suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107322 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
90b781f5fc31019b0699ffef8b3c64bdb2808bda 30-Jun-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Make sure any prolog instructions get debug info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107320 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
727bd9731c4d9f8a369dc82afae39ad9877f92ab 30-Jun-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Make sure any prolog instructions get debug info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107320 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
6369a6cd1994895b6ff143c7e9ba455d19150ee4 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
GCall.cpp
odeGenModule.cpp
odeGenTypes.cpp
odeGenTypes.h
argetInfo.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
GCall.cpp
odeGenModule.cpp
odeGenTypes.cpp
odeGenTypes.h
argetInfo.cpp
1802d558878839d2bcf00b4ea1cbce8282e91c49 30-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Use isFunctionOrMethod for vars declared locallly
in method/blocks to decide not to mangle them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107309 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
e81c5619f11e1ececf99ff30d15e5abfb6ea0c28 30-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Use isFunctionOrMethod for vars declared locallly
in method/blocks to decide not to mangle them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107309 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
b1730027c47763e7bb55e99c48f3984e398a161b 30-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> extern variable declared locally to objective-c++ method
should not be mangled either. Fixes radar 8016412.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107303 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
2fe13882a846b4152abf0734be43b3e141843818 30-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> extern variable declared locally to objective-c++ method
should not be mangled either. Fixes radar 8016412.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107303 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
08326eb82589b11e050b65903bd77a27860fa52c 30-Jun-2010 Chris Lattner <sabre@nondot.org> reduce nesting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107292 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f815306571385e2892e079a409f1b5b11f5e5cbb 30-Jun-2010 Chris Lattner <sabre@nondot.org> reduce nesting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107292 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8c27a44849d1bbbe6550101c7e5f32311a9eb75d 30-Jun-2010 Charles Davis <cdavis@mines.edu> Mangle arrays in the Microsoft C++ Mangler. It's not quite finished (it
doesn't mangle array parameters right), but I think that should be fixed
in Sema (Doug, John, what do you think?).

Also, stub out the remaining mangleType() routines.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107264 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
0b8fe8c68eb503b9955f13c0c27b18b1f8321158 30-Jun-2010 Charles Davis <cdavis@mines.edu> Mangle arrays in the Microsoft C++ Mangler. It's not quite finished (it
doesn't mangle array parameters right), but I think that should be fixed
in Sema (Doug, John, what do you think?).

Also, stub out the remaining mangleType() routines.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107264 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
96bf4bd21802cfeb6d2575bc4035496de7fa6d79 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
GCall.cpp
odeGenTypes.cpp
odeGenTypes.h
argetInfo.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
GCall.cpp
odeGenTypes.cpp
odeGenTypes.h
argetInfo.cpp
e2a6e6f71a9e1e1c6f367a24f0b506aaea4408d3 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
GCall.cpp
odeGenTypes.cpp
odeGenTypes.h
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
GCall.cpp
odeGenTypes.cpp
odeGenTypes.h
4d4e18f0f7d898ec028e1048807b3acf1d594306 30-Jun-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Assignment to Objective-C properties shouldn't reload the value, for
complex values either. Previously we did this properly for regular assignment,
but not for compound assignment.
- Also, tidy up assignment code a bit to look more like the scalar path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107217 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
120bc77f4c9ec281ec5e2d2a856c80cfae18bb57 30-Jun-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Assignment to Objective-C properties shouldn't reload the value, for
complex values either. Previously we did this properly for regular assignment,
but not for compound assignment.
- Also, tidy up assignment code a bit to look more like the scalar path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107217 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
e146acf3da0974a3c90b54860c06ea19285d38c9 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
GCall.cpp
odeGenTypes.cpp
odeGenTypes.h
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
GCall.cpp
odeGenTypes.cpp
odeGenTypes.h
31bb25d9d5be2d3a68858ce8094cb7e9131bc24c 30-Jun-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Assignment to Objective-C properties shouldn't reload the value (which
would trigger an extra method call).
- While in the area, I also changed Clang to not emit an unnecessary load from
'x' in cases like 'y = (x = 1)'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107210 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
d7f7d0895dc43db20c43112a24684f11eed305de 30-Jun-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Assignment to Objective-C properties shouldn't reload the value (which
would trigger an extra method call).
- While in the area, I also changed Clang to not emit an unnecessary load from
'x' in cases like 'y = (x = 1)'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107210 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
8f7a778dbe368c7068e62ddc1984fe39e4d37ed7 29-Jun-2010 Chris Lattner <sabre@nondot.org> change ABIArgInfo to hold its llvm type with PATypeHolder so that
it doesn't dangle as types get refined. This fixes Shootout-C++/lists1
and probably also PR7522.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107196 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
958c53c369b2e96b7638f170a3fcb4ff43382ff1 29-Jun-2010 Chris Lattner <sabre@nondot.org> change ABIArgInfo to hold its llvm type with PATypeHolder so that
it doesn't dangle as types get refined. This fixes Shootout-C++/lists1
and probably also PR7522.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107196 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
945812830ebae6f461131ac625260c48850321f0 29-Jun-2010 Chris Lattner <sabre@nondot.org> relax the CGFunctionInfo::CGFunctionInfo ctor to allow any sequence
of CanQualTypes to be passed in.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107176 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
bb52114f81e8829fe29a9a0faa49e8b2157206cc 29-Jun-2010 Chris Lattner <sabre@nondot.org> relax the CGFunctionInfo::CGFunctionInfo ctor to allow any sequence
of CanQualTypes to be passed in.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107176 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
9261e00fb73324256ef6950f1785636801c493ea 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
GCall.cpp
odeGenTypes.cpp
odeGenTypes.h
argetInfo.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
GCall.cpp
odeGenTypes.cpp
odeGenTypes.h
argetInfo.cpp
34da8052e824fcdfc3740ef9b147581ac2638678 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
GCall.cpp
odeGenTypes.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
GCall.cpp
odeGenTypes.cpp
fc536605c212ef1d463b6d0577bc205ec00e474a 29-Jun-2010 Chris Lattner <sabre@nondot.org> Change X86_64ABIInfo to have ASTContext and TargetData ivars to
avoid passing ASTContext down through all the methods it has.

When classifying an argument, or argument piece, as INTEGER, check
to see if we have a pointer at exactly the same offset in the
preferred type. If so, use that pointer type instead of i64. This
allows us to compile A function taking a stringref into something
like this:

define i8* @foo(i64 %D.coerce0, i8* %D.coerce1) nounwind ssp {
entry:
%D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=4]
%0 = getelementptr %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
store i64 %D.coerce0, i64* %0
%1 = getelementptr %struct.DeclGroup* %D, i32 0, i32 1 ; <i8**> [#uses=1]
store i8* %D.coerce1, i8** %1
%tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
%tmp1 = load i64* %tmp ; <i64> [#uses=1]
%tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i8**> [#uses=1]
%tmp3 = load i8** %tmp2 ; <i8*> [#uses=1]
%add.ptr = getelementptr inbounds i8* %tmp3, i64 %tmp1 ; <i8*> [#uses=1]
ret i8* %add.ptr
}

instead of this:

define i8* @foo(i64 %D.coerce0, i64 %D.coerce1) nounwind ssp {
entry:
%D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=3]
%0 = insertvalue %0 undef, i64 %D.coerce0, 0 ; <%0> [#uses=1]
%1 = insertvalue %0 %0, i64 %D.coerce1, 1 ; <%0> [#uses=1]
%2 = bitcast %struct.DeclGroup* %D to %0* ; <%0*> [#uses=1]
store %0 %1, %0* %2, align 1
%tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
%tmp1 = load i64* %tmp ; <i64> [#uses=1]
%tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i8**> [#uses=1]
%tmp3 = load i8** %tmp2 ; <i8*> [#uses=1]
%add.ptr = getelementptr inbounds i8* %tmp3, i64 %tmp1 ; <i8*> [#uses=1]
ret i8* %add.ptr
}

This implements rdar://7375902 - [codegen quality] clang x86-64 ABI lowering code punishing StringRef



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107123 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
9c254f0415bef9a0bafe5b5026ddb54b727597b1 29-Jun-2010 Chris Lattner <sabre@nondot.org> Change X86_64ABIInfo to have ASTContext and TargetData ivars to
avoid passing ASTContext down through all the methods it has.

When classifying an argument, or argument piece, as INTEGER, check
to see if we have a pointer at exactly the same offset in the
preferred type. If so, use that pointer type instead of i64. This
allows us to compile A function taking a stringref into something
like this:

define i8* @foo(i64 %D.coerce0, i8* %D.coerce1) nounwind ssp {
entry:
%D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=4]
%0 = getelementptr %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
store i64 %D.coerce0, i64* %0
%1 = getelementptr %struct.DeclGroup* %D, i32 0, i32 1 ; <i8**> [#uses=1]
store i8* %D.coerce1, i8** %1
%tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
%tmp1 = load i64* %tmp ; <i64> [#uses=1]
%tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i8**> [#uses=1]
%tmp3 = load i8** %tmp2 ; <i8*> [#uses=1]
%add.ptr = getelementptr inbounds i8* %tmp3, i64 %tmp1 ; <i8*> [#uses=1]
ret i8* %add.ptr
}

instead of this:

define i8* @foo(i64 %D.coerce0, i64 %D.coerce1) nounwind ssp {
entry:
%D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=3]
%0 = insertvalue %0 undef, i64 %D.coerce0, 0 ; <%0> [#uses=1]
%1 = insertvalue %0 %0, i64 %D.coerce1, 1 ; <%0> [#uses=1]
%2 = bitcast %struct.DeclGroup* %D to %0* ; <%0*> [#uses=1]
store %0 %1, %0* %2, align 1
%tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
%tmp1 = load i64* %tmp ; <i64> [#uses=1]
%tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i8**> [#uses=1]
%tmp3 = load i8** %tmp2 ; <i8*> [#uses=1]
%add.ptr = getelementptr inbounds i8* %tmp3, i64 %tmp1 ; <i8*> [#uses=1]
ret i8* %add.ptr
}

This implements rdar://7375902 - [codegen quality] clang x86-64 ABI lowering code punishing StringRef



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107123 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
157297fcccd87b5c12adb359fca359173b2a923c 29-Jun-2010 Chris Lattner <sabre@nondot.org> plumb preferred types down into X86_64ABIInfo::classifyArgumentType,
no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107115 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
a159c2e83942b7dae64457d4fff265bb74550cac 29-Jun-2010 Chris Lattner <sabre@nondot.org> plumb preferred types down into X86_64ABIInfo::classifyArgumentType,
no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107115 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
535817ec66fff0771a1ec75d8954b17e4a05699c 29-Jun-2010 Chris Lattner <sabre@nondot.org> Pass the LLVM IR version of argument types down into computeInfo.
This is somewhat annoying to do this at this level, but it avoids
having ABIInfo know depend on CodeGenTypes for a hint.

Nothing is using this yet, so no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107111 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetInfo.cpp
8640cd6bf077e007fdb9bc8c9c5e319f7d70da96 29-Jun-2010 Chris Lattner <sabre@nondot.org> Pass the LLVM IR version of argument types down into computeInfo.
This is somewhat annoying to do this at this level, but it avoids
having ABIInfo know depend on CodeGenTypes for a hint.

Nothing is using this yet, so no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107111 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetInfo.cpp
43ad3062ef111b243fdfc10e95b9b90f35d60007 29-Jun-2010 Chris Lattner <sabre@nondot.org> add IR names to coerced arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107105 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
225e286110bcc8b7b1ff8b35f0d51a10a158b18c 29-Jun-2010 Chris Lattner <sabre@nondot.org> add IR names to coerced arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107105 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
a28e4ea1e688d3aac4a95ff8f9d616af88fcca31 29-Jun-2010 Chris Lattner <sabre@nondot.org> make the argument passing stuff in the FCA case smarter still, by
avoiding making the FCA at all when the types exactly line up. For
example, before we made:

%struct.DeclGroup = type { i64, i64 }

define i64 @_Z3foo9DeclGroup(i64, i64) nounwind {
entry:
%D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=3]
%2 = insertvalue %struct.DeclGroup undef, i64 %0, 0 ; <%struct.DeclGroup> [#uses=1]
%3 = insertvalue %struct.DeclGroup %2, i64 %1, 1 ; <%struct.DeclGroup> [#uses=1]
store %struct.DeclGroup %3, %struct.DeclGroup* %D
%tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
%tmp1 = load i64* %tmp ; <i64> [#uses=1]
%tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i64*> [#uses=1]
%tmp3 = load i64* %tmp2 ; <i64> [#uses=1]
%add = add nsw i64 %tmp1, %tmp3 ; <i64> [#uses=1]
ret i64 %add
}

... which has the pointless insertvalue, which fastisel hates, now we
make:

%struct.DeclGroup = type { i64, i64 }

define i64 @_Z3foo9DeclGroup(i64, i64) nounwind {
entry:
%D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=4]
%2 = getelementptr %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
store i64 %0, i64* %2
%3 = getelementptr %struct.DeclGroup* %D, i32 0, i32 1 ; <i64*> [#uses=1]
store i64 %1, i64* %3
%tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
%tmp1 = load i64* %tmp ; <i64> [#uses=1]
%tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i64*> [#uses=1]
%tmp3 = load i64* %tmp2 ; <i64> [#uses=1]
%add = add nsw i64 %tmp1, %tmp3 ; <i64> [#uses=1]
ret i64 %add
}

This only kicks in when x86-64 abi lowering decides it likes us.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107104 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
309c59f6d3a4fd883fdf87334271df2c55338aae 29-Jun-2010 Chris Lattner <sabre@nondot.org> make the argument passing stuff in the FCA case smarter still, by
avoiding making the FCA at all when the types exactly line up. For
example, before we made:

%struct.DeclGroup = type { i64, i64 }

define i64 @_Z3foo9DeclGroup(i64, i64) nounwind {
entry:
%D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=3]
%2 = insertvalue %struct.DeclGroup undef, i64 %0, 0 ; <%struct.DeclGroup> [#uses=1]
%3 = insertvalue %struct.DeclGroup %2, i64 %1, 1 ; <%struct.DeclGroup> [#uses=1]
store %struct.DeclGroup %3, %struct.DeclGroup* %D
%tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
%tmp1 = load i64* %tmp ; <i64> [#uses=1]
%tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i64*> [#uses=1]
%tmp3 = load i64* %tmp2 ; <i64> [#uses=1]
%add = add nsw i64 %tmp1, %tmp3 ; <i64> [#uses=1]
ret i64 %add
}

... which has the pointless insertvalue, which fastisel hates, now we
make:

%struct.DeclGroup = type { i64, i64 }

define i64 @_Z3foo9DeclGroup(i64, i64) nounwind {
entry:
%D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=4]
%2 = getelementptr %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
store i64 %0, i64* %2
%3 = getelementptr %struct.DeclGroup* %D, i32 0, i32 1 ; <i64*> [#uses=1]
store i64 %1, i64* %3
%tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
%tmp1 = load i64* %tmp ; <i64> [#uses=1]
%tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i64*> [#uses=1]
%tmp3 = load i64* %tmp2 ; <i64> [#uses=1]
%add = add nsw i64 %tmp1, %tmp3 ; <i64> [#uses=1]
ret i64 %add
}

This only kicks in when x86-64 abi lowering decides it likes us.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107104 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
6b5bb8ada1d04e057cacf33e3473493f1a59215d 29-Jun-2010 Chris Lattner <sabre@nondot.org> Change CGCall to handle the "coerce" case where the coerce-to type
is a FCA to pass each of the elements as individual scalars. This
produces code fast isel is less likely to reject and is easier on
the optimizers.

For example, before we would compile:
struct DeclGroup { long NumDecls; char * Y; };
char * foo(DeclGroup D) {
return D.NumDecls+D.Y;
}

to:
%struct.DeclGroup = type { i64, i64 }

define i64 @_Z3foo9DeclGroup(%struct.DeclGroup) nounwind {
entry:
%D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=3]
store %struct.DeclGroup %0, %struct.DeclGroup* %D, align 1
%tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
%tmp1 = load i64* %tmp ; <i64> [#uses=1]
%tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i64*> [#uses=1]
%tmp3 = load i64* %tmp2 ; <i64> [#uses=1]
%add = add nsw i64 %tmp1, %tmp3 ; <i64> [#uses=1]
ret i64 %add
}

Now we get:

%0 = type { i64, i64 }
%struct.DeclGroup = type { i64, i8* }

define i8* @_Z3foo9DeclGroup(i64, i64) nounwind {
entry:
%D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=3]
%2 = insertvalue %0 undef, i64 %0, 0 ; <%0> [#uses=1]
%3 = insertvalue %0 %2, i64 %1, 1 ; <%0> [#uses=1]
%4 = bitcast %struct.DeclGroup* %D to %0* ; <%0*> [#uses=1]
store %0 %3, %0* %4, align 1
%tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
%tmp1 = load i64* %tmp ; <i64> [#uses=1]
%tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i8**> [#uses=1]
%tmp3 = load i8** %tmp2 ; <i8*> [#uses=1]
%add.ptr = getelementptr inbounds i8* %tmp3, i64 %tmp1 ; <i8*> [#uses=1]
ret i8* %add.ptr
}

Elimination of the FCA inside the function is still-to-come.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107099 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ce70016434ff82a29a60ef82894d934b8a23f23d 29-Jun-2010 Chris Lattner <sabre@nondot.org> Change CGCall to handle the "coerce" case where the coerce-to type
is a FCA to pass each of the elements as individual scalars. This
produces code fast isel is less likely to reject and is easier on
the optimizers.

For example, before we would compile:
struct DeclGroup { long NumDecls; char * Y; };
char * foo(DeclGroup D) {
return D.NumDecls+D.Y;
}

to:
%struct.DeclGroup = type { i64, i64 }

define i64 @_Z3foo9DeclGroup(%struct.DeclGroup) nounwind {
entry:
%D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=3]
store %struct.DeclGroup %0, %struct.DeclGroup* %D, align 1
%tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
%tmp1 = load i64* %tmp ; <i64> [#uses=1]
%tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i64*> [#uses=1]
%tmp3 = load i64* %tmp2 ; <i64> [#uses=1]
%add = add nsw i64 %tmp1, %tmp3 ; <i64> [#uses=1]
ret i64 %add
}

Now we get:

%0 = type { i64, i64 }
%struct.DeclGroup = type { i64, i8* }

define i8* @_Z3foo9DeclGroup(i64, i64) nounwind {
entry:
%D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=3]
%2 = insertvalue %0 undef, i64 %0, 0 ; <%0> [#uses=1]
%3 = insertvalue %0 %2, i64 %1, 1 ; <%0> [#uses=1]
%4 = bitcast %struct.DeclGroup* %D to %0* ; <%0*> [#uses=1]
store %0 %3, %0* %4, align 1
%tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
%tmp1 = load i64* %tmp ; <i64> [#uses=1]
%tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i8**> [#uses=1]
%tmp3 = load i8** %tmp2 ; <i8*> [#uses=1]
%add.ptr = getelementptr inbounds i8* %tmp3, i64 %tmp1 ; <i8*> [#uses=1]
ret i8* %add.ptr
}

Elimination of the FCA inside the function is still-to-come.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107099 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ef593f74cdcae25aabc37d940fe2a4b7cf7d3c17 29-Jun-2010 Chris Lattner <sabre@nondot.org> make the trivial forms of CreateCoerced{Load|Store} trivial.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107091 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
6ae0069f5db96b8ed5adc598d576e695e5ac4134 29-Jun-2010 Chris Lattner <sabre@nondot.org> make the trivial forms of CreateCoerced{Load|Store} trivial.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107091 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
bab64c7698fe38a2168626685a4894861a86c06b 28-Jun-2010 Chris Lattner <sabre@nondot.org> pass/return structs of char and short as i8/i16 to avoid
aweful through-memory coersion, just like we do for i32 now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107078 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
8ff296496de0970c8d6d72320a1427a926d7ef14 28-Jun-2010 Chris Lattner <sabre@nondot.org> pass/return structs of char and short as i8/i16 to avoid
aweful through-memory coersion, just like we do for i32 now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107078 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
d83db4841b14f30bd932d3f33b2946fcb899388e 28-Jun-2010 Chris Lattner <sabre@nondot.org> more tidying up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107076 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
1090a9ba0902380dbd97d0a500daa4c373712df9 28-Jun-2010 Chris Lattner <sabre@nondot.org> more tidying up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107076 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
3cbf3c8f74be941688404332f89ff9b6ba92d568 28-Jun-2010 Chris Lattner <sabre@nondot.org> random acts of tidying.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107050 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
dce5ad0cf70ba74e1ecdbb5e81f1a81d97821636 28-Jun-2010 Chris Lattner <sabre@nondot.org> random acts of tidying.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107050 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
f253909794f9c458a722d5b594874f680f71c144 28-Jun-2010 Chris Lattner <sabre@nondot.org> X86-64:
pass/return structs of float/int as float/i32 instead of double/i64
to make the code generated for ABI cleaner. Passing in the low part
of a double is the same as passing in a float.

For example, we now compile:

struct DeclGroup { float NumDecls; };
float foo(DeclGroup D);
void bar(DeclGroup *D) {
foo(*D);
}

into:

%struct.DeclGroup = type { float }

define void @_Z3barP9DeclGroup(%struct.DeclGroup* %D) nounwind {
entry:
%D.addr = alloca %struct.DeclGroup*, align 8 ; <%struct.DeclGroup**> [#uses=2]
%agg.tmp = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
store %struct.DeclGroup* %D, %struct.DeclGroup** %D.addr
%tmp = load %struct.DeclGroup** %D.addr ; <%struct.DeclGroup*> [#uses=1]
%tmp1 = bitcast %struct.DeclGroup* %agg.tmp to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.DeclGroup* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 4, i32 4, i1 false)
%coerce.dive = getelementptr %struct.DeclGroup* %agg.tmp, i32 0, i32 0 ; <float*> [#uses=1]
%0 = load float* %coerce.dive, align 1 ; <float> [#uses=1]
%call = call float @_Z3foo9DeclGroup(float %0) ; <float> [#uses=0]
ret void
}

instead of:

%struct.DeclGroup = type { float }

define void @_Z3barP9DeclGroup(%struct.DeclGroup* %D) nounwind {
entry:
%D.addr = alloca %struct.DeclGroup*, align 8 ; <%struct.DeclGroup**> [#uses=2]
%agg.tmp = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%tmp3 = alloca double ; <double*> [#uses=2]
store %struct.DeclGroup* %D, %struct.DeclGroup** %D.addr
%tmp = load %struct.DeclGroup** %D.addr ; <%struct.DeclGroup*> [#uses=1]
%tmp1 = bitcast %struct.DeclGroup* %agg.tmp to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.DeclGroup* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 4, i32 4, i1 false)
%coerce.dive = getelementptr %struct.DeclGroup* %agg.tmp, i32 0, i32 0 ; <float*> [#uses=1]
%0 = bitcast double* %tmp3 to float* ; <float*> [#uses=1]
%1 = load float* %coerce.dive ; <float> [#uses=1]
store float %1, float* %0, align 1
%2 = load double* %tmp3 ; <double> [#uses=1]
%call = call float @_Z3foo9DeclGroup(double %2) ; <float> [#uses=0]
ret void
}

which is this machine code (at -O0):

__Z3barP9DeclGroup:
subq $24, %rsp
movq %rdi, 16(%rsp)
movq 16(%rsp), %rdi
leaq 8(%rsp), %rax
movl (%rdi), %ecx
movl %ecx, (%rax)
movss 8(%rsp), %xmm0
callq __Z3foo9DeclGroup
addq $24, %rsp
ret

vs this:

__Z3barP9DeclGroup:
subq $24, %rsp
movq %rdi, 16(%rsp)
movq 16(%rsp), %rdi
leaq 8(%rsp), %rax
movl (%rdi), %ecx
movl %ecx, (%rax)
movss 8(%rsp), %xmm0
movss %xmm0, (%rsp)
movsd (%rsp), %xmm0
callq __Z3foo9DeclGroup
addq $24, %rsp
ret

At -O3, it is the difference between this now:

__Z3barP9DeclGroup:
movss (%rdi), %xmm0
jmp __Z3foo9DeclGroup # TAILCALL

vs this before:

__Z3barP9DeclGroup:
movl (%rdi), %eax
movd %rax, %xmm0
jmp __Z3foo9DeclGroup # TAILCALL



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107048 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
faf23b72f171ef997d48c453a5a4783c5759f8fe 28-Jun-2010 Chris Lattner <sabre@nondot.org> X86-64:
pass/return structs of float/int as float/i32 instead of double/i64
to make the code generated for ABI cleaner. Passing in the low part
of a double is the same as passing in a float.

For example, we now compile:

struct DeclGroup { float NumDecls; };
float foo(DeclGroup D);
void bar(DeclGroup *D) {
foo(*D);
}

into:

%struct.DeclGroup = type { float }

define void @_Z3barP9DeclGroup(%struct.DeclGroup* %D) nounwind {
entry:
%D.addr = alloca %struct.DeclGroup*, align 8 ; <%struct.DeclGroup**> [#uses=2]
%agg.tmp = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
store %struct.DeclGroup* %D, %struct.DeclGroup** %D.addr
%tmp = load %struct.DeclGroup** %D.addr ; <%struct.DeclGroup*> [#uses=1]
%tmp1 = bitcast %struct.DeclGroup* %agg.tmp to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.DeclGroup* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 4, i32 4, i1 false)
%coerce.dive = getelementptr %struct.DeclGroup* %agg.tmp, i32 0, i32 0 ; <float*> [#uses=1]
%0 = load float* %coerce.dive, align 1 ; <float> [#uses=1]
%call = call float @_Z3foo9DeclGroup(float %0) ; <float> [#uses=0]
ret void
}

instead of:

%struct.DeclGroup = type { float }

define void @_Z3barP9DeclGroup(%struct.DeclGroup* %D) nounwind {
entry:
%D.addr = alloca %struct.DeclGroup*, align 8 ; <%struct.DeclGroup**> [#uses=2]
%agg.tmp = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%tmp3 = alloca double ; <double*> [#uses=2]
store %struct.DeclGroup* %D, %struct.DeclGroup** %D.addr
%tmp = load %struct.DeclGroup** %D.addr ; <%struct.DeclGroup*> [#uses=1]
%tmp1 = bitcast %struct.DeclGroup* %agg.tmp to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.DeclGroup* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 4, i32 4, i1 false)
%coerce.dive = getelementptr %struct.DeclGroup* %agg.tmp, i32 0, i32 0 ; <float*> [#uses=1]
%0 = bitcast double* %tmp3 to float* ; <float*> [#uses=1]
%1 = load float* %coerce.dive ; <float> [#uses=1]
store float %1, float* %0, align 1
%2 = load double* %tmp3 ; <double> [#uses=1]
%call = call float @_Z3foo9DeclGroup(double %2) ; <float> [#uses=0]
ret void
}

which is this machine code (at -O0):

__Z3barP9DeclGroup:
subq $24, %rsp
movq %rdi, 16(%rsp)
movq 16(%rsp), %rdi
leaq 8(%rsp), %rax
movl (%rdi), %ecx
movl %ecx, (%rax)
movss 8(%rsp), %xmm0
callq __Z3foo9DeclGroup
addq $24, %rsp
ret

vs this:

__Z3barP9DeclGroup:
subq $24, %rsp
movq %rdi, 16(%rsp)
movq 16(%rsp), %rdi
leaq 8(%rsp), %rax
movl (%rdi), %ecx
movl %ecx, (%rax)
movss 8(%rsp), %xmm0
movss %xmm0, (%rsp)
movsd (%rsp), %xmm0
callq __Z3foo9DeclGroup
addq $24, %rsp
ret

At -O3, it is the difference between this now:

__Z3barP9DeclGroup:
movss (%rdi), %xmm0
jmp __Z3foo9DeclGroup # TAILCALL

vs this before:

__Z3barP9DeclGroup:
movl (%rdi), %eax
movd %rax, %xmm0
jmp __Z3foo9DeclGroup # TAILCALL



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107048 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
a7cc47310961ce2cd924f8facd1c2a249b1d15f8 28-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Minor refactorin of my last patch (radar 7860965 related).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107047 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
ef160b4a5a498e48ef8e5ccdabfe29aa4c73e0a1 28-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Minor refactorin of my last patch (radar 7860965 related).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107047 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
fd34ee4b80fbbf83d66b95123ff7e6dd9d5f40d4 28-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Have __func__ and siblings point to block's implementation function
name. Fixes radar 7860965.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107044 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
16ac5ce5fd7d9b4dd67ca8d57403c8f45e3dcf2d 28-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Have __func__ and siblings point to block's implementation function
name. Fixes radar 7860965.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107044 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
2a2856ec0cff857c1cb7f8e2b1905409ad408368 28-Jun-2010 Chris Lattner <sabre@nondot.org> Fix UnitTests/2004-02-02-NegativeZero.c, which regressed when
I broke negate of FP values.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107019 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
4ac0d83090c750bd8ab2c4fc91a6a44c32884cb3 28-Jun-2010 Chris Lattner <sabre@nondot.org> Fix UnitTests/2004-02-02-NegativeZero.c, which regressed when
I broke negate of FP values.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107019 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
37662b34bc204f6e92c9c861f1ae206d5bcf4d4c 27-Jun-2010 Anders Carlsson <andersca@mac.com> Correctly destroy reference temporaries with global storage. Remove ErrorUnsupported call when binding a global reference to a non-lvalue. Fixes PR7326.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106983 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
GExpr.cpp
045a6d84a0fa672eb5d914be1bb8f3baa226beb3 27-Jun-2010 Anders Carlsson <andersca@mac.com> Correctly destroy reference temporaries with global storage. Remove ErrorUnsupported call when binding a global reference to a non-lvalue. Fixes PR7326.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106983 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
GExpr.cpp
26aece625a68748e67b62e5862d46b9a5988c260 27-Jun-2010 Anders Carlsson <andersca@mac.com> Add a CreateReferenceTemporary that will do the right thing for variables with global storage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106982 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
656746cd8c3a45901bcdec89ca1eb4495ee79b36 27-Jun-2010 Anders Carlsson <andersca@mac.com> Add a CreateReferenceTemporary that will do the right thing for variables with global storage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106982 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
01afc5ef56a85f7205c2654521953edd30c8e76b 27-Jun-2010 Anders Carlsson <andersca@mac.com> Simplify CodeGenFunction::EmitReferenceBindingToExpr as a first step towards fixing PR7326.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106981 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
dca7ab2ea50a57545976e9d4c0472279fa397917 27-Jun-2010 Anders Carlsson <andersca@mac.com> Simplify CodeGenFunction::EmitReferenceBindingToExpr as a first step towards fixing PR7326.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106981 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
c94be5096a7435373050587691c02928c819c994 27-Jun-2010 Anders Carlsson <andersca@mac.com> Reduce indentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106980 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
cc09785424b056196c397862fca85806dd6ccc84 27-Jun-2010 Anders Carlsson <andersca@mac.com> Reduce indentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106980 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
155f168aa0e1bc55de58f0427062cb859335a367 27-Jun-2010 Chris Lattner <sabre@nondot.org> misc tidying


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106978 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenFunction.cpp
fbe02ffb573ac2aa51351278af1c7970573b6ed5 27-Jun-2010 Chris Lattner <sabre@nondot.org> misc tidying


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106978 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenFunction.cpp
a3ef4a2a080c3d5abf9b24696ca1f7218eb6d05a 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
GBlocks.cpp
GBlocks.h
GBuiltin.cpp
GCall.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenTypes.cpp
argetInfo.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
GBlocks.cpp
GBlocks.h
GBuiltin.cpp
GCall.cpp
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenTypes.cpp
argetInfo.cpp
c5e1dcbf18e9d9763982fff85b9c5eaa7252647f 27-Jun-2010 Chris Lattner <sabre@nondot.org> tidy up OrderGlobalInits


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106976 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenModule.h
ec2830d930e306124c2ba6bf1060a3c71dced6ea 27-Jun-2010 Chris Lattner <sabre@nondot.org> tidy up OrderGlobalInits


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106976 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenModule.h
c3c6ace48da214fa80190ab0650793672218973b 27-Jun-2010 Chris Lattner <sabre@nondot.org> If coercing something from int or pointer type to int or pointer type
(potentially after unwrapping it from a struct) do it without going through
memory. We now compile:

struct DeclGroup {
unsigned NumDecls;
};

int foo(DeclGroup D) {
return D.NumDecls;
}

into:

%struct.DeclGroup = type { i32 }

define i32 @_Z3foo9DeclGroup(i64) nounwind ssp noredzone {
entry:
%D = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%coerce.dive = getelementptr %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
%coerce.val.ii = trunc i64 %0 to i32 ; <i32> [#uses=1]
store i32 %coerce.val.ii, i32* %coerce.dive
%tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
%tmp1 = load i32* %tmp ; <i32> [#uses=1]
ret i32 %tmp1
}

instead of:

%struct.DeclGroup = type { i32 }

define i32 @_Z3foo9DeclGroup(i64) nounwind ssp noredzone {
entry:
%D = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%tmp = alloca i64 ; <i64*> [#uses=2]
%coerce.dive = getelementptr %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
store i64 %0, i64* %tmp
%1 = bitcast i64* %tmp to i32* ; <i32*> [#uses=1]
%2 = load i32* %1, align 1 ; <i32> [#uses=1]
store i32 %2, i32* %coerce.dive
%tmp1 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
%tmp2 = load i32* %tmp1 ; <i32> [#uses=1]
ret i32 %tmp2
}

... which is quite a bit less terrifying.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106975 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
6d11cdbde41aa847369db85369b2ce5f82515b06 27-Jun-2010 Chris Lattner <sabre@nondot.org> If coercing something from int or pointer type to int or pointer type
(potentially after unwrapping it from a struct) do it without going through
memory. We now compile:

struct DeclGroup {
unsigned NumDecls;
};

int foo(DeclGroup D) {
return D.NumDecls;
}

into:

%struct.DeclGroup = type { i32 }

define i32 @_Z3foo9DeclGroup(i64) nounwind ssp noredzone {
entry:
%D = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%coerce.dive = getelementptr %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
%coerce.val.ii = trunc i64 %0 to i32 ; <i32> [#uses=1]
store i32 %coerce.val.ii, i32* %coerce.dive
%tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
%tmp1 = load i32* %tmp ; <i32> [#uses=1]
ret i32 %tmp1
}

instead of:

%struct.DeclGroup = type { i32 }

define i32 @_Z3foo9DeclGroup(i64) nounwind ssp noredzone {
entry:
%D = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%tmp = alloca i64 ; <i64*> [#uses=2]
%coerce.dive = getelementptr %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
store i64 %0, i64* %tmp
%1 = bitcast i64* %tmp to i32* ; <i32*> [#uses=1]
%2 = load i32* %1, align 1 ; <i32> [#uses=1]
store i32 %2, i32* %coerce.dive
%tmp1 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
%tmp2 = load i32* %tmp1 ; <i32> [#uses=1]
ret i32 %tmp2
}

... which is quite a bit less terrifying.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106975 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ce3fef65b92b04bc1220bbdf58a2e43ffb973455 27-Jun-2010 Chris Lattner <sabre@nondot.org> Same patch as the previous on the store side. Before we compiled this:

struct DeclGroup {
unsigned NumDecls;
};

int foo(DeclGroup D) {
return D.NumDecls;
}

to:

%struct.DeclGroup = type { i32 }

define i32 @_Z3foo9DeclGroup(i64) nounwind ssp noredzone {
entry:
%D = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%tmp = alloca i64 ; <i64*> [#uses=2]
store i64 %0, i64* %tmp
%1 = bitcast i64* %tmp to %struct.DeclGroup* ; <%struct.DeclGroup*> [#uses=1]
%2 = load %struct.DeclGroup* %1, align 1 ; <%struct.DeclGroup> [#uses=1]
store %struct.DeclGroup %2, %struct.DeclGroup* %D
%tmp1 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
%tmp2 = load i32* %tmp1 ; <i32> [#uses=1]
ret i32 %tmp2
}

which caused fast isel bailouts due to the FCA load/store of %2. Now
we generate this just blissful code:

%struct.DeclGroup = type { i32 }

define i32 @_Z3foo9DeclGroup(i64) nounwind ssp noredzone {
entry:
%D = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%tmp = alloca i64 ; <i64*> [#uses=2]
%coerce.dive = getelementptr %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
store i64 %0, i64* %tmp
%1 = bitcast i64* %tmp to i32* ; <i32*> [#uses=1]
%2 = load i32* %1, align 1 ; <i32> [#uses=1]
store i32 %2, i32* %coerce.dive
%tmp1 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
%tmp2 = load i32* %tmp1 ; <i32> [#uses=1]
ret i32 %tmp2
}

This avoids fastisel bailing out and is groundwork for future patch.
This reduces bailouts on CGStmt.ll to 911 from 935.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106974 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
e7bb777caf478ac8b096bd6a0c14d78ea8b2f5be 27-Jun-2010 Chris Lattner <sabre@nondot.org> Same patch as the previous on the store side. Before we compiled this:

struct DeclGroup {
unsigned NumDecls;
};

int foo(DeclGroup D) {
return D.NumDecls;
}

to:

%struct.DeclGroup = type { i32 }

define i32 @_Z3foo9DeclGroup(i64) nounwind ssp noredzone {
entry:
%D = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%tmp = alloca i64 ; <i64*> [#uses=2]
store i64 %0, i64* %tmp
%1 = bitcast i64* %tmp to %struct.DeclGroup* ; <%struct.DeclGroup*> [#uses=1]
%2 = load %struct.DeclGroup* %1, align 1 ; <%struct.DeclGroup> [#uses=1]
store %struct.DeclGroup %2, %struct.DeclGroup* %D
%tmp1 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
%tmp2 = load i32* %tmp1 ; <i32> [#uses=1]
ret i32 %tmp2
}

which caused fast isel bailouts due to the FCA load/store of %2. Now
we generate this just blissful code:

%struct.DeclGroup = type { i32 }

define i32 @_Z3foo9DeclGroup(i64) nounwind ssp noredzone {
entry:
%D = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%tmp = alloca i64 ; <i64*> [#uses=2]
%coerce.dive = getelementptr %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
store i64 %0, i64* %tmp
%1 = bitcast i64* %tmp to i32* ; <i32*> [#uses=1]
%2 = load i32* %1, align 1 ; <i32> [#uses=1]
store i32 %2, i32* %coerce.dive
%tmp1 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i32*> [#uses=1]
%tmp2 = load i32* %tmp1 ; <i32> [#uses=1]
ret i32 %tmp2
}

This avoids fastisel bailing out and is groundwork for future patch.
This reduces bailouts on CGStmt.ll to 911 from 935.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106974 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
97b5950a483801e68da1d71738f60a712b36c0dd 27-Jun-2010 Chris Lattner <sabre@nondot.org> improve CreateCoercedLoad a bit to generate slightly less awful
IR when handling X86-64 by-value struct stuff. For example, we
use to compile this:

struct DeclGroup {
unsigned NumDecls;
};

int foo(DeclGroup D);
void bar(DeclGroup *D) {
foo(*D);
}

into:

define void @_Z3barP9DeclGroup(%struct.DeclGroup* %D) ssp nounwind {
entry:
%D.addr = alloca %struct.DeclGroup*, align 8 ; <%struct.DeclGroup**> [#uses=2]
%agg.tmp = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%tmp3 = alloca i64 ; <i64*> [#uses=2]
store %struct.DeclGroup* %D, %struct.DeclGroup** %D.addr
%tmp = load %struct.DeclGroup** %D.addr ; <%struct.DeclGroup*> [#uses=1]
%tmp1 = bitcast %struct.DeclGroup* %agg.tmp to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.DeclGroup* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 4, i32 4, i1 false)
%0 = bitcast i64* %tmp3 to %struct.DeclGroup* ; <%struct.DeclGroup*> [#uses=1]
%1 = load %struct.DeclGroup* %agg.tmp ; <%struct.DeclGroup> [#uses=1]
store %struct.DeclGroup %1, %struct.DeclGroup* %0, align 1
%2 = load i64* %tmp3 ; <i64> [#uses=1]
call void @_Z3foo9DeclGroup(i64 %2)
ret void
}

which would cause fastisel to bail out due to the first class aggregate load %1. With
this patch we now compile it into the (still awful):

define void @_Z3barP9DeclGroup(%struct.DeclGroup* %D) nounwind ssp noredzone {
entry:
%D.addr = alloca %struct.DeclGroup*, align 8 ; <%struct.DeclGroup**> [#uses=2]
%agg.tmp = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%tmp3 = alloca i64 ; <i64*> [#uses=2]
store %struct.DeclGroup* %D, %struct.DeclGroup** %D.addr
%tmp = load %struct.DeclGroup** %D.addr ; <%struct.DeclGroup*> [#uses=1]
%tmp1 = bitcast %struct.DeclGroup* %agg.tmp to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.DeclGroup* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 4, i32 4, i1 false)
%coerce.dive = getelementptr %struct.DeclGroup* %agg.tmp, i32 0, i32 0 ; <i32*> [#uses=1]
%0 = bitcast i64* %tmp3 to i32* ; <i32*> [#uses=1]
%1 = load i32* %coerce.dive ; <i32> [#uses=1]
store i32 %1, i32* %0, align 1
%2 = load i64* %tmp3 ; <i64> [#uses=1]
%call = call i32 @_Z3foo9DeclGroup(i64 %2) noredzone ; <i32> [#uses=0]
ret void
}

which doesn't bail out. On CGStmt.ll, this reduces fastisel bail outs from 958 to 935,
and is the precursor of better things to come.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106973 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
08dd2a0e4c6b3c7cb601e5053eb02cb7d084f87e 27-Jun-2010 Chris Lattner <sabre@nondot.org> improve CreateCoercedLoad a bit to generate slightly less awful
IR when handling X86-64 by-value struct stuff. For example, we
use to compile this:

struct DeclGroup {
unsigned NumDecls;
};

int foo(DeclGroup D);
void bar(DeclGroup *D) {
foo(*D);
}

into:

define void @_Z3barP9DeclGroup(%struct.DeclGroup* %D) ssp nounwind {
entry:
%D.addr = alloca %struct.DeclGroup*, align 8 ; <%struct.DeclGroup**> [#uses=2]
%agg.tmp = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%tmp3 = alloca i64 ; <i64*> [#uses=2]
store %struct.DeclGroup* %D, %struct.DeclGroup** %D.addr
%tmp = load %struct.DeclGroup** %D.addr ; <%struct.DeclGroup*> [#uses=1]
%tmp1 = bitcast %struct.DeclGroup* %agg.tmp to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.DeclGroup* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 4, i32 4, i1 false)
%0 = bitcast i64* %tmp3 to %struct.DeclGroup* ; <%struct.DeclGroup*> [#uses=1]
%1 = load %struct.DeclGroup* %agg.tmp ; <%struct.DeclGroup> [#uses=1]
store %struct.DeclGroup %1, %struct.DeclGroup* %0, align 1
%2 = load i64* %tmp3 ; <i64> [#uses=1]
call void @_Z3foo9DeclGroup(i64 %2)
ret void
}

which would cause fastisel to bail out due to the first class aggregate load %1. With
this patch we now compile it into the (still awful):

define void @_Z3barP9DeclGroup(%struct.DeclGroup* %D) nounwind ssp noredzone {
entry:
%D.addr = alloca %struct.DeclGroup*, align 8 ; <%struct.DeclGroup**> [#uses=2]
%agg.tmp = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%tmp3 = alloca i64 ; <i64*> [#uses=2]
store %struct.DeclGroup* %D, %struct.DeclGroup** %D.addr
%tmp = load %struct.DeclGroup** %D.addr ; <%struct.DeclGroup*> [#uses=1]
%tmp1 = bitcast %struct.DeclGroup* %agg.tmp to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.DeclGroup* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 4, i32 4, i1 false)
%coerce.dive = getelementptr %struct.DeclGroup* %agg.tmp, i32 0, i32 0 ; <i32*> [#uses=1]
%0 = bitcast i64* %tmp3 to i32* ; <i32*> [#uses=1]
%1 = load i32* %coerce.dive ; <i32> [#uses=1]
store i32 %1, i32* %0, align 1
%2 = load i64* %tmp3 ; <i64> [#uses=1]
%call = call i32 @_Z3foo9DeclGroup(i64 %2) noredzone ; <i32> [#uses=0]
ret void
}

which doesn't bail out. On CGStmt.ll, this reduces fastisel bail outs from 958 to 935,
and is the precursor of better things to come.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106973 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
78a9da2c86bdc87c7825b23ec74df62d26656df1 27-Jun-2010 Chris Lattner <sabre@nondot.org> Change IR generation for return (in the simple case) to avoid doing silly
load/store nonsense in the epilog. For example, for:

int foo(int X) {
int A[100];
return A[X];
}

we used to generate:

%arrayidx = getelementptr inbounds [100 x i32]* %A, i32 0, i64 %idxprom ; <i32*> [#uses=1]
%tmp1 = load i32* %arrayidx ; <i32> [#uses=1]
store i32 %tmp1, i32* %retval
%0 = load i32* %retval ; <i32> [#uses=1]
ret i32 %0
}

which codegen'd to this code:

_foo: ## @foo
## BB#0: ## %entry
subq $408, %rsp ## imm = 0x198
movl %edi, 400(%rsp)
movl 400(%rsp), %edi
movslq %edi, %rax
movl (%rsp,%rax,4), %edi
movl %edi, 404(%rsp)
movl 404(%rsp), %eax
addq $408, %rsp ## imm = 0x198
ret

Now we generate:

%arrayidx = getelementptr inbounds [100 x i32]* %A, i32 0, i64 %idxprom ; <i32*> [#uses=1]
%tmp1 = load i32* %arrayidx ; <i32> [#uses=1]
ret i32 %tmp1
}

and:

_foo: ## @foo
## BB#0: ## %entry
subq $408, %rsp ## imm = 0x198
movl %edi, 404(%rsp)
movl 404(%rsp), %edi
movslq %edi, %rax
movl (%rsp,%rax,4), %eax
addq $408, %rsp ## imm = 0x198
ret

This actually does matter, cutting out 2000 lines of IR from CGStmt.ll
for example.

Another interesting effect is that altivec.h functions which are dead
now get dce'd by the inliner. Hence all the changes to
builtins-ppc-altivec.c to ensure the calls aren't dead.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106970 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.cpp
odeGenFunction.h
35b21b884e5c3447a52a74d7ffaba966b07ac81f 27-Jun-2010 Chris Lattner <sabre@nondot.org> Change IR generation for return (in the simple case) to avoid doing silly
load/store nonsense in the epilog. For example, for:

int foo(int X) {
int A[100];
return A[X];
}

we used to generate:

%arrayidx = getelementptr inbounds [100 x i32]* %A, i32 0, i64 %idxprom ; <i32*> [#uses=1]
%tmp1 = load i32* %arrayidx ; <i32> [#uses=1]
store i32 %tmp1, i32* %retval
%0 = load i32* %retval ; <i32> [#uses=1]
ret i32 %0
}

which codegen'd to this code:

_foo: ## @foo
## BB#0: ## %entry
subq $408, %rsp ## imm = 0x198
movl %edi, 400(%rsp)
movl 400(%rsp), %edi
movslq %edi, %rax
movl (%rsp,%rax,4), %edi
movl %edi, 404(%rsp)
movl 404(%rsp), %eax
addq $408, %rsp ## imm = 0x198
ret

Now we generate:

%arrayidx = getelementptr inbounds [100 x i32]* %A, i32 0, i64 %idxprom ; <i32*> [#uses=1]
%tmp1 = load i32* %arrayidx ; <i32> [#uses=1]
ret i32 %tmp1
}

and:

_foo: ## @foo
## BB#0: ## %entry
subq $408, %rsp ## imm = 0x198
movl %edi, 404(%rsp)
movl 404(%rsp), %edi
movslq %edi, %rax
movl (%rsp,%rax,4), %eax
addq $408, %rsp ## imm = 0x198
ret

This actually does matter, cutting out 2000 lines of IR from CGStmt.ll
for example.

Another interesting effect is that altivec.h functions which are dead
now get dce'd by the inliner. Hence all the changes to
builtins-ppc-altivec.c to ensure the calls aren't dead.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106970 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.cpp
odeGenFunction.h
86e42256a9441fd3bc338d5e28a79505ceed7787 27-Jun-2010 Chris Lattner <sabre@nondot.org> reduce indentation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106967 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
c6e6dd2611bccd0d4df1f83a92bebb9b5d139b7d 27-Jun-2010 Chris Lattner <sabre@nondot.org> reduce indentation


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106967 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
cdd20885cb8db97accadc2e645fccd6efc6ff010 27-Jun-2010 Chris Lattner <sabre@nondot.org> Implement rdar://7530813 - collapse multiple GEP instructions in IRgen

This avoids generating two gep's for common array operations. Before
we would generate something like:

%tmp = load i32* %X.addr ; <i32> [#uses=1]
%arraydecay = getelementptr inbounds [100 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
%arrayidx = getelementptr inbounds i32* %arraydecay, i32 %tmp ; <i32*> [#uses=1]
%tmp1 = load i32* %arrayidx ; <i32> [#uses=1]

Now we generate:

%tmp = load i32* %X.addr ; <i32> [#uses=1]
%arrayidx = getelementptr inbounds [100 x i32]* %A, i32 0, i32 %tmp ; <i32*> [#uses=1]
%tmp1 = load i32* %arrayidx ; <i32> [#uses=1]

Less IR is better at -O0.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106966 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
9269d5c05bebe634dc9f08a37b192c6977fbc067 27-Jun-2010 Chris Lattner <sabre@nondot.org> Implement rdar://7530813 - collapse multiple GEP instructions in IRgen

This avoids generating two gep's for common array operations. Before
we would generate something like:

%tmp = load i32* %X.addr ; <i32> [#uses=1]
%arraydecay = getelementptr inbounds [100 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1]
%arrayidx = getelementptr inbounds i32* %arraydecay, i32 %tmp ; <i32*> [#uses=1]
%tmp1 = load i32* %arrayidx ; <i32> [#uses=1]

Now we generate:

%tmp = load i32* %X.addr ; <i32> [#uses=1]
%arrayidx = getelementptr inbounds [100 x i32]* %A, i32 0, i32 %tmp ; <i32*> [#uses=1]
%tmp1 = load i32* %arrayidx ; <i32> [#uses=1]

Less IR is better at -O0.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106966 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
91c62c0c56a07c03892f7ce341b407f69c059572 27-Jun-2010 Chris Lattner <sabre@nondot.org> minor cleanup: don't emit the base of an array subscript until after
we're done diddling around with the index stuff. Use a cheaper type
comparison.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106963 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
a4d94ab50ff3164bcbf4709a92a98e06c23a7459 27-Jun-2010 Chris Lattner <sabre@nondot.org> minor cleanup: don't emit the base of an array subscript until after
we're done diddling around with the index stuff. Use a cheaper type
comparison.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106963 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
327e7167883f7fc1750583a38e3e456dca610620 27-Jun-2010 Chris Lattner <sabre@nondot.org> fix inc/dec to honor -fwrapv and -ftrapv, implementing PR7426.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106962 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
640d3267228415328c0feb2bcc35757230ab4db7 27-Jun-2010 Chris Lattner <sabre@nondot.org> fix inc/dec to honor -fwrapv and -ftrapv, implementing PR7426.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106962 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
733136a69b79638f41a745479b991c5d338d2e56 27-Jun-2010 Chris Lattner <sabre@nondot.org> move scalar inc/dec codegen into ScalarExprEmitter instead
of being in CGF. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106961 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
8c11a65c18ae607b7073e1e451264492d2297726 27-Jun-2010 Chris Lattner <sabre@nondot.org> move scalar inc/dec codegen into ScalarExprEmitter instead
of being in CGF. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106961 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
5f538932d89e7af3fdc1b85529c5c9fda5f364b8 26-Jun-2010 Chris Lattner <sabre@nondot.org> use more efficient type comparison predicates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106958 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
argetInfo.cpp
7f215c12af4c3e7f81b24102a676aabfdb4e1566 26-Jun-2010 Chris Lattner <sabre@nondot.org> use more efficient type comparison predicates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106958 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
argetInfo.cpp
b0d1f8fbc66c08b7d0639f642445ba8022ca88c4 26-Jun-2010 Chris Lattner <sabre@nondot.org> Fix unary minus to trap on overflow with -ftrapv, refactoring binop
code so we can use it from VisitUnaryMinus.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106957 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
9a20723df5904f2da9e4da14bf127366609b5cd8 26-Jun-2010 Chris Lattner <sabre@nondot.org> Fix unary minus to trap on overflow with -ftrapv, refactoring binop
code so we can use it from VisitUnaryMinus.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106957 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
3d897ad92331e29821c049ff0eaae548fd17a3b4 26-Jun-2010 Chris Lattner <sabre@nondot.org> Implement support for -fwrapv, rdar://7221421

As part of this, pull together trapv handling into the same enum.

This also add support for NSW multiplies.

This also makes PCH disagreement on overflow behavior silent, since it
really doesn't matter except for warnings and codegen (no macros get
defined etc).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106956 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
a4d71455f0d418e16cc0c5c5aa55a3bad3494aee 26-Jun-2010 Chris Lattner <sabre@nondot.org> Implement support for -fwrapv, rdar://7221421

As part of this, pull together trapv handling into the same enum.

This also add support for NSW multiplies.

This also makes PCH disagreement on overflow behavior silent, since it
really doesn't matter except for warnings and codegen (no macros get
defined etc).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106956 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1faa812cfb2850d900104f8de42eb14e76bfae38 26-Jun-2010 Chris Lattner <sabre@nondot.org> implement rdar://7432000 - signed negate should codegen as NSW.
While I'm in there, adjust pointer to member adjustments as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106955 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
e70ffd631179c15d358838464425e3464cf05a98 26-Jun-2010 Chris Lattner <sabre@nondot.org> implement rdar://7432000 - signed negate should codegen as NSW.
While I'm in there, adjust pointer to member adjustments as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106955 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
8d21b8a669c9514adc1bafebe9a76133777479d2 26-Jun-2010 Anders Carlsson <andersca@mac.com> Change EmitReferenceBindingToExpr to take a decl instead of a boolean.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106949 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GExpr.cpp
GExprAgg.cpp
GStmt.cpp
odeGenFunction.h
32f36baa6c8d491c374af622b4e3ac28d597453c 26-Jun-2010 Anders Carlsson <andersca@mac.com> Change EmitReferenceBindingToExpr to take a decl instead of a boolean.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106949 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GExpr.cpp
GExprAgg.cpp
GStmt.cpp
odeGenFunction.h
e084774c72ee42a7a75cc2ccfb9cc96b2ad9248d 26-Jun-2010 Anders Carlsson <andersca@mac.com> Add function for mangling reference temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106948 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
715edf293698f40e600df65e18e48c70a29fc98c 26-Jun-2010 Anders Carlsson <andersca@mac.com> Add function for mangling reference temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106948 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
fbcdcb8ea7eb1fcc5304e76d19f696a030d93f0f 26-Jun-2010 Charles Davis <cdavis@mines.edu> Mangle pointer and (lvalue) reference types in the Microsoft C++ Mangler.

Also, fix mangling of throw specs. Turns out MSVC totally ignores throw
specs when mangling names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106937 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
3a0d41d29192ff42870310e33800939f4e34bb55 26-Jun-2010 Charles Davis <cdavis@mines.edu> Mangle pointer and (lvalue) reference types in the Microsoft C++ Mangler.

Also, fix mangling of throw specs. Turns out MSVC totally ignores throw
specs when mangling names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106937 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
cc38d5fde5eafdd7ffea928d7e3383cb3cc59a0c 25-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Minor change to my last patch to fix PR7490.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106875 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
5304c953c1ccba4772ee77ce6526fff14ef5a16c 25-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Minor change to my last patch to fix PR7490.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106875 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
daaae7f2af66e1d059f80e6eb3b10e98ebb86f10 25-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> IRGen for trivial initialization of dynamiccaly allocated
array of other done c++ objects. Fixes PR7490.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106869 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
odeGenFunction.h
ef66872797e46ced3ffdb428e582bc7f00474f99 25-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> IRGen for trivial initialization of dynamiccaly allocated
array of other done c++ objects. Fixes PR7490.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106869 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
odeGenFunction.h
7894ee3c59e9521866ad9b355c9b4913c0a9d458 24-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to correctly mangle block helper functions
when block literal is declared inside a ctor/dtor.
Fixes radr 8096995.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106700 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
angle.cpp
angle.h
icrosoftCXXABI.cpp
564360be450b319aeafc26698be9811837bfb826 24-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to correctly mangle block helper functions
when block literal is declared inside a ctor/dtor.
Fixes radr 8096995.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106700 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
angle.cpp
angle.h
icrosoftCXXABI.cpp
9484f8eade39f9d22deb26abdd6c1c804b820eac 23-Jun-2010 Chris Lattner <sabre@nondot.org> improve altivec vector bool/pixel support, patch by Anton Yartsev
with several tweaks by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106619 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
788b0fd67e1992f23555454efcdb16a19dfefac3 23-Jun-2010 Chris Lattner <sabre@nondot.org> improve altivec vector bool/pixel support, patch by Anton Yartsev
with several tweaks by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106619 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
2fbd4a7f36ef6144688172e49e074088a52ddfca 23-Jun-2010 Chris Lattner <sabre@nondot.org> polish the -finstrument-functions implementation, patch by Nelson Elhage!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106618 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
8dab6571b2cab96f44d0a1d6e3edbfdb68b7ed6b 23-Jun-2010 Chris Lattner <sabre@nondot.org> polish the -finstrument-functions implementation, patch by Nelson Elhage!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106618 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
e4a621552c52b7733af4b8c684abc54769ff0ec6 23-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Type Type::isRealFloatingType() that vectors are not floating-point
types, updating callers of both isFloatingType() and
isRealFloatingType() accordingly. Caught at least one issue where we
allowed one to declare a vector of vectors (!), along with cleaning up
the standard-conversion logic for C++.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106595 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0c293ea13d452c1a47a05ada5a5ee9acc69c66cc 23-Jun-2010 Douglas Gregor <dgregor@apple.com> Type Type::isRealFloatingType() that vectors are not floating-point
types, updating callers of both isFloatingType() and
isRealFloatingType() accordingly. Caught at least one issue where we
allowed one to declare a vector of vectors (!), along with cleaning up
the standard-conversion logic for C++.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106595 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6e64e9c0844336b1f60f004ea98318e45bbf4f20 22-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a problem in generation of meta-data for
category implementation whereby property list was missing.
NeXt ObjC runtime (radar 8093297).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106550 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6afbdf52563942cbf3d68c1cc0fcf590c94a47d3 22-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a problem in generation of meta-data for
category implementation whereby property list was missing.
NeXt ObjC runtime (radar 8093297).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106550 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d118b39b4b02bbb6b1a8c70431a8b698a6d9a87d 22-Jun-2010 Anders Carlsson <andersca@mac.com> Switch over to the new caching version of getMangledName.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106549 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDebugInfo.cpp
GDecl.cpp
odeGenModule.cpp
odeGenModule.h
9a20d55807cc2f6534a9c51a46cc8143ed16786d 22-Jun-2010 Anders Carlsson <andersca@mac.com> Switch over to the new caching version of getMangledName.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106549 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDebugInfo.cpp
GDecl.cpp
odeGenModule.cpp
odeGenModule.h
cae1eb6364e564a4d8a0ca427429cd8c06b79c7c 22-Jun-2010 Anders Carlsson <andersca@mac.com> Add a new variant of getMangledName that caches the mangling for decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106547 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
793a990774826a0c20b0da66cec0991badfb8b63 22-Jun-2010 Anders Carlsson <andersca@mac.com> Add a new variant of getMangledName that caches the mangling for decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106547 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
191ee07683e9ab580588598a23726f2a63aa83a4 22-Jun-2010 Anders Carlsson <andersca@mac.com> Add GlobalDecl::getCanonicalDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106546 91177308-0d34-0410-b5e6-96231b3b80d8
lobalDecl.h
dc5daec0d30959bf081544f72d378f6f96cf9b1a 22-Jun-2010 Anders Carlsson <andersca@mac.com> Add GlobalDecl::getCanonicalDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106546 91177308-0d34-0410-b5e6-96231b3b80d8
lobalDecl.h
5cfad2cbd37278571e2671644b004ca07d921266 22-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Per Chris's comment, remove another static (this one
is a static comparator operator).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106511 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenModule.h
f489688114275c821b1e647e26f71eeb94d8ab24 22-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Per Chris's comment, remove another static (this one
is a static comparator operator).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106511 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenModule.h
b377aed9fc0a90a0788af717c5a37c871061b7ce 22-Jun-2010 Chris Lattner <sabre@nondot.org> implement support for -finstrument-functions, patch by Nelson
Elhage!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106507 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
7255a2d997b15beae82e627052fdb1b2474495c2 22-Jun-2010 Chris Lattner <sabre@nondot.org> implement support for -finstrument-functions, patch by Nelson
Elhage!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106507 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
731425cc32c6a2243374ba1a093ea73d5dd7a4cb 22-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Avoid using a local static for providing lexical
order of priorotized global object initializations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106503 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
581c78fcb238bbc962176c3dd8399770343c26eb 22-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Avoid using a local static for providing lexical
order of priorotized global object initializations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106503 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
6a07977ccdb65b50bc79639cf87c179651c34253 22-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> In fragile-abi (32bit mode abi) generate global symbol
objc_category_name_xxx for each category implementation.
(fixes PR7431) patch by Nico Weber.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106492 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b9c5b3ddde5a327cd31f3aacbfc7d1e491f99fcb 22-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> In fragile-abi (32bit mode abi) generate global symbol
objc_category_name_xxx for each category implementation.
(fixes PR7431) patch by Nico Weber.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106492 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
26babc78718d8337ecebfbdda58799858007f47b 21-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> In supporting init-priority, globals with the same init_priority must be
emitted in the order in which they are seen (still radar 8076356).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106485 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenModule.h
e0b691a25f801d8be552c9387863637b9526e639 21-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> In supporting init-priority, globals with the same init_priority must be
emitted in the order in which they are seen (still radar 8076356).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106485 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenModule.h
92b08a57eb04297a1448f57a9ceb5b36daf7abf9 21-Jun-2010 Anders Carlsson <andersca@mac.com> Fix an Obj-C++ miscompile when calling an Obj-C method that returns a C++ reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106477 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjC.cpp
GObjCMac.cpp
7e70fb217dcdf96faf34df3e197c3831c86f8089 21-Jun-2010 Anders Carlsson <andersca@mac.com> Fix an Obj-C++ miscompile when calling an Obj-C method that returns a C++ reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106477 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjC.cpp
GObjCMac.cpp
c739608c489288a3932bc8738ff550fd4ecdc759 21-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Use more efficient API of SmallVector/array_pod_sort
for sorting (radar 8076356).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106453 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
027d7ed9d616d93ae7f02de79d17863725b14866 21-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Use more efficient API of SmallVector/array_pod_sort
for sorting (radar 8076356).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106453 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
0016e5c027e2efc965a1f01c95da85ba716c11b0 21-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> IRGen for implementation of init-priority attribute.
Test case will be checked in llvm test suite.
(finishes off radar 8076356).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106441 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenModule.h
9f967c5e4bbeb48caf6d0e62056b3d3fee20bf7c 21-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> IRGen for implementation of init-priority attribute.
Test case will be checked in llvm test suite.
(finishes off radar 8076356).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106441 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenModule.h
7d67253bf17a020df07f058930503320135ff0c6 21-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Instantiations subject to an explicit template instantiation
declaration have default visibility even under
-fvisibility=hidden. Fixes <rdar://problem/8109763>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106440 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
af896897f7485176f43d40c4adced7efb0fb2b06 21-Jun-2010 Douglas Gregor <dgregor@apple.com> Instantiations subject to an explicit template instantiation
declaration have default visibility even under
-fvisibility=hidden. Fixes <rdar://problem/8109763>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106440 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d790bfc3139f59f1cc8ac82d807faad23a6fd7d7 21-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement remaining codegen for NEON, all operations should now work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106407 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
4be54302da40d3e7cba3d93115f312d2fcca1879 21-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement remaining codegen for NEON, all operations should now work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106407 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
4b41460c165e06b7c5edec8e436c3f58be3376a5 19-Jun-2010 Anton Korobeynikov <asl@math.spbu.ru> More AltiVec support.
Patch by Anton Yartsev!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106387 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
4d3a7b0a0608febe3cdac68f6121546672ca875e 19-Jun-2010 Anton Korobeynikov <asl@math.spbu.ru> More AltiVec support.
Patch by Anton Yartsev!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106387 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
b25afc458dff759bdd54c3f8f540b0f5964f060b 19-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Fix for PR7415: refactor CodeGenModule::MayDeferGeneration and make it less
conservative for static variables in templated classes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106385 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
61c6c91930de9c0659027f019062b4a5636c1c2a 19-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Fix for PR7415: refactor CodeGenModule::MayDeferGeneration and make it less
conservative for static variables in templated classes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106385 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d3efb454118b12ccff9d7483fcc6b24bab08eaca 19-Jun-2010 Chris Lattner <sabre@nondot.org> Fix PR7097, a bad interaction between -fno-use-cxa-atexit and
-mconstructor-aliases by using a WeakVH instead of a raw pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106384 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenFunction.h
odeGenModule.h
810112e28dc839715d17b0a786f23aaa19600ac0 19-Jun-2010 Chris Lattner <sabre@nondot.org> Fix PR7097, a bad interaction between -fno-use-cxa-atexit and
-mconstructor-aliases by using a WeakVH instead of a raw pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106384 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenFunction.h
odeGenModule.h
ea32cf641ab2d11f70f539704624c31d4fd70533 18-Jun-2010 Charles Davis <cdavis@mines.edu> Mangle tag types (unions, structs, classes, enums) in the Microsoft C++ Mangler.

Also, test that static members with default visibility in a struct have the
right mangling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106276 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
c62458f6aead5e4c0d0f4534d52142e7864ba02b 18-Jun-2010 Charles Davis <cdavis@mines.edu> Mangle tag types (unions, structs, classes, enums) in the Microsoft C++ Mangler.

Also, test that static members with default visibility in a struct have the
right mangling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106276 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
02ce1cf82e3f1d534cfc650dc3ff74ea1c0667fd 18-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> objective-C++ IRGen: property reference as an
lvalue when performing a derived-to-base conversion.
Fixes radar 7501812. Added an executable test to
llvm-test suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106247 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
353b33b2bbd9e8715c7a0231681921bcfdfe4cbf 18-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> objective-C++ IRGen: property reference as an
lvalue when performing a derived-to-base conversion.
Fixes radar 7501812. Added an executable test to
llvm-test suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106247 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
cf6969912fc58e59a4a0c24ba90a803d80033c28 17-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Objective-c++ IRGen. Support for @selector expression as
an lvalue. Fixes PR7390.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106235 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
03b2960c14aede6ac82bdef32247094ebb72fa69 17-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Objective-c++ IRGen. Support for @selector expression as
an lvalue. Fixes PR7390.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106235 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
036d6e8f1a557455e86b0c7a4d682ebace48a7c7 17-Jun-2010 Charles Davis <cdavis@mines.edu> Mangle operator names in the Microsoft C++ Mangler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106211 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
21e2a7e8d38120e358bead9e1f14ed526d37bc90 17-Jun-2010 Charles Davis <cdavis@mines.edu> Mangle operator names in the Microsoft C++ Mangler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106211 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
4998ed0a1e51e2bb3ab6feef9340a23e53badbeb 17-Jun-2010 Nate Begeman <natebegeman@mac.com> Remove last of the bool shifts for MS VC++, patch by dimitry andric


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106206 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
d69ec16b1b03b4a97c571ff14f15769fe13c1e5a 17-Jun-2010 Nate Begeman <natebegeman@mac.com> Remove last of the bool shifts for MS VC++, patch by dimitry andric


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106206 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
00f90b974369ccd699c3d29e4edef8526d78083c 17-Jun-2010 Sean Hunt <rideau3@gmail.com> Update CMake build for new attribute changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106188 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ee6e4b4baa1acd85ba8b142862ac5986621aaffd 17-Jun-2010 Sean Hunt <rideau3@gmail.com> Update CMake build for new attribute changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106188 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
313f9d430b4699b81de878ebba190d18d9908199 16-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Change the test for which ABI/CC to use on ARM to be base on the environment
(the last argument of the triple).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106131 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
1ed1a594e9befc91ebf00d81b41a2fdfab862657 16-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Change the test for which ABI/CC to use on ARM to be base on the environment
(the last argument of the triple).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106131 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
0f030642dd0f7a166feefb692626e2527a49909d 16-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Fixed conflict between objc_memmove_collectable builtin
decl. and one ddefined in darwin header file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106107 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
8e2eab27056a78bf1db50ee09929438ed5ea9d93 16-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Fixed conflict between objc_memmove_collectable builtin
decl. and one ddefined in darwin header file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106107 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
ae14ff33ab6e9ac967df65ea1e858d364ee411cc 16-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Don't set the calling convention for ARM if it is already the default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106106 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
25117ab35c1a033846073183314c68ef07d1701a 16-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Don't set the calling convention for ARM if it is already the default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106106 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
3ce41f261cfd4dcb1d5cec5a59e337d2f6fe2327 16-Jun-2010 Charles Davis <cdavis@mines.edu> Start mangling function types in the Microsoft C++ Mangler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106081 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
65161d17cbf8980e24643c65b74a5127dcb7ac22 16-Jun-2010 Charles Davis <cdavis@mines.edu> Start mangling function types in the Microsoft C++ Mangler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106081 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
7fcbab0d9ed96afbdcc3dd4ad876bcbf452fd25f 16-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Give Type::isIntegralType() an ASTContext parameter, so that it
provides C "integer type" semantics in C and C++ "integral type"
semantics in C++.

Note that I still need to update isIntegerType (and possibly other
predicates) using the same approach I've taken for
isIntegralType(). The two should have the same meaning, but currently
don't (!).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106074 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
argetInfo.cpp
9d3347a5887d2d25afe8b0bd35783a72ec86cce2 16-Jun-2010 Douglas Gregor <dgregor@apple.com> Give Type::isIntegralType() an ASTContext parameter, so that it
provides C "integer type" semantics in C and C++ "integral type"
semantics in C++.

Note that I still need to update isIntegerType (and possibly other
predicates) using the same approach I've taken for
isIntegralType(). The two should have the same meaning, but currently
don't (!).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106074 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
argetInfo.cpp
59327f06fa557d652e0560e6895c93db70ea5ec7 16-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Introduce Type::isIntegralOrEnumerationType(), to cover those places
in C++ that involve both integral and enumeration types. Convert all
of the callers to Type::isIntegralType() that are meant to work with
both integral and enumeration types over to
Type::isIntegralOrEnumerationType(), to prepare to eliminate
enumeration types as integral types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106071 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
2ade35e2cfd554e49d35a52047cea98a82787af9 16-Jun-2010 Douglas Gregor <dgregor@apple.com> Introduce Type::isIntegralOrEnumerationType(), to cover those places
in C++ that involve both integral and enumeration types. Convert all
of the callers to Type::isIntegralType() that are meant to work with
both integral and enumeration types over to
Type::isIntegralOrEnumerationType(), to prepare to eliminate
enumeration types as integral types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106071 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
cd76ed8d5422128fddeb7d0bd0aed6274d43c9c2 16-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Move CodeGenOptions.h *back* into Frontend. This should have been done when the
dependency edge was reversed such that CodeGen depends on Frontend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106065 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
GCXX.cpp
GCall.cpp
GDebugInfo.cpp
GDecl.cpp
GDeclCXX.cpp
GExpr.cpp
GObjCMac.cpp
odeGenModule.cpp
oduleBuilder.cpp
06057cef0bcd7804e80f3ce2bbe352178396c715 16-Jun-2010 Chandler Carruth <chandlerc@gmail.com> Move CodeGenOptions.h *back* into Frontend. This should have been done when the
dependency edge was reversed such that CodeGen depends on Frontend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106065 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
GCXX.cpp
GCall.cpp
GDebugInfo.cpp
GDecl.cpp
GDeclCXX.cpp
GExpr.cpp
GObjCMac.cpp
odeGenModule.cpp
oduleBuilder.cpp
3c4b2d89607c852447bc632b4962add54d321fa7 16-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Patch adds support for copying of those
objective-c++ class objects which have GC'able objc object
pointers and need to use ObjC's objc_memmove_collectable
API (radar 8070772).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106061 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprAgg.cpp
GExprCXX.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
55bcace250e1ff366e4482714b344b8cbc8be5f3 16-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Patch adds support for copying of those
objective-c++ class objects which have GC'able objc object
pointers and need to use ObjC's objc_memmove_collectable
API (radar 8070772).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106061 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprAgg.cpp
GExprCXX.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
fba74842b08b8c1cd5ea9d1c4968cde0db848703 15-Jun-2010 Daniel Dunbar <daniel@zuster.org> Break Frontend's dependency on Rewrite, Checker and CodeGen in shared library configuration

Currently, all AST consumers are located in the Frontend library,
meaning that in a shared library configuration, Frontend has a
dependency on Rewrite, Checker and CodeGen. This is suboptimal for
clients which only wish to make use of the frontend. CodeGen in
particular introduces a large number of unwanted dependencies.

This patch breaks the dependency by moving all AST consumers with
dependencies on Rewrite, Checker and/or CodeGen to their respective
libraries. The patch therefore introduces dependencies in the other
direction (i.e. from Rewrite, Checker and CodeGen to Frontend).

After applying this patch, Clang builds correctly using CMake and
shared libraries ("cmake -DBUILD_SHARED_LIBS=ON").

N.B. This patch includes file renames which are indicated in the
patch body.

Changes in this revision of the patch:
- Fixed some copy-paste mistakes in the header files
- Modified certain aspects of the coding to comply with the LLVM
Coding Standards

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106010 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
MakeLists.txt
odeGenAction.cpp
9b414d3e2d0cb84512b55a3275a98490b090162a 15-Jun-2010 Daniel Dunbar <daniel@zuster.org> Break Frontend's dependency on Rewrite, Checker and CodeGen in shared library configuration

Currently, all AST consumers are located in the Frontend library,
meaning that in a shared library configuration, Frontend has a
dependency on Rewrite, Checker and CodeGen. This is suboptimal for
clients which only wish to make use of the frontend. CodeGen in
particular introduces a large number of unwanted dependencies.

This patch breaks the dependency by moving all AST consumers with
dependencies on Rewrite, Checker and/or CodeGen to their respective
libraries. The patch therefore introduces dependencies in the other
direction (i.e. from Rewrite, Checker and CodeGen to Frontend).

After applying this patch, Clang builds correctly using CMake and
shared libraries ("cmake -DBUILD_SHARED_LIBS=ON").

N.B. This patch includes file renames which are indicated in the
patch body.

Changes in this revision of the patch:
- Fixed some copy-paste mistakes in the header files
- Modified certain aspects of the coding to comply with the LLVM
Coding Standards

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106010 91177308-0d34-0410-b5e6-96231b3b80d8
ackendUtil.cpp
MakeLists.txt
odeGenAction.cpp
2951755e71ff826af2b7ab12b34b5c6e4d662222 15-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Implement -fvisibility-inlines-hidden. <rdar://problem/7819834>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106003 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7cf84d66965a7706004d8590b5af5fe54b85f525 15-Jun-2010 Douglas Gregor <dgregor@apple.com> Implement -fvisibility-inlines-hidden. <rdar://problem/7819834>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106003 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
65459d9680ffd6e98f66e398892fd6122fac957f 15-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Make sure to set the visible on a vtable; VTTs and typeinfo already
handle visibility properly. Fixes <rdar://problem/8091955>.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105977 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
4e6239684183bd3a1f83b6e3b38360a5afca6380 15-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Add name mangling for address spaces. We use the vendor-extension
mangling for types, where the <source-name> is ASxxx (xxx is the
address-space number).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105975 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
56079f7dde1d9c9e16207feffa3f1f888a78ab69 15-Jun-2010 Douglas Gregor <dgregor@apple.com> Add name mangling for address spaces. We use the vendor-extension
mangling for types, where the <source-name> is ASxxx (xxx is the
address-space number).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105975 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
5e1aa229ef20cf2f9b8f1e961269899ed65a92f4 14-Jun-2010 Benjamin Kramer <benny.kra@googlemail.com> An implementation of __builtin__fpclassify the way Chris Lattner described by Jörg Blank.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105936 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
7867f1a62b8b42cc2a55cc571608a75db2d516e0 14-Jun-2010 Benjamin Kramer <benny.kra@googlemail.com> An implementation of __builtin__fpclassify the way Chris Lattner described by Jörg Blank.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105936 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
6eb2d67175dc92101c3b463d7db0a8dd99b91eac 14-Jun-2010 Charles Davis <cdavis@mines.edu> Microsoft C++ Mangler:
- Mangle qualifiers.
- Start mangling variables' types into the name. A variable declared with a
builtin type should now mangle properly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105931 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
b021f8bd445959e2a5c958624a464ff621253ae4 14-Jun-2010 Charles Davis <cdavis@mines.edu> Microsoft C++ Mangler:
- Mangle qualifiers.
- Start mangling variables' types into the name. A variable declared with a
builtin type should now mangle properly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105931 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
179553dae02b9be490f2fe808f30ae16b5ab2cad 14-Jun-2010 Nate Begeman <natebegeman@mac.com> Add some missing shifts
Fix multiplies by scalar
Add SemaChecking code for all immediates
Add SemaChecking-gen support to arm_neon.td


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105930 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
61eecf5aea018ea65c9ab0bccacd2996b15c632d 14-Jun-2010 Nate Begeman <natebegeman@mac.com> Add some missing shifts
Fix multiplies by scalar
Add SemaChecking code for all immediates
Add SemaChecking-gen support to arm_neon.td


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105930 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
5dd8130f302adfcefee70419418748c5d9853cae 13-Jun-2010 Nate Begeman <natebegeman@mac.com> Most of NEON sema checking & fix to polynomial type detection


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105908 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
0d15c5321a11a5fee53b17ca8e9e0d72d6192b23 13-Jun-2010 Nate Begeman <natebegeman@mac.com> Most of NEON sema checking & fix to polynomial type detection


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105908 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
4880434cacee403085e2cc96461b8d3d05e32df2 12-Jun-2010 Charles Davis <cdavis@mines.edu> Microsoft C++ Mangler:
- Don't mangle static variables at global scope.
- Add support for mangling builtin types. This will be used later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105881 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
570d2763bc9ee6c26b12c0b6316dd87261520bfe 12-Jun-2010 Charles Davis <cdavis@mines.edu> Microsoft C++ Mangler:
- Don't mangle static variables at global scope.
- Add support for mangling builtin types. This will be used later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105881 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
8834f40c3a22d74baa1acff274a88519a376ec02 12-Jun-2010 Nate Begeman <natebegeman@mac.com> Shifts complete. Only vld & sema checking of constants remain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105879 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
5af93efc01f4acd247aa6d3124db6c92c3679198 12-Jun-2010 Nate Begeman <natebegeman@mac.com> Shifts complete. Only vld & sema checking of constants remain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105879 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
6e2e474cd2f1310c6c951a3d94df28704b7f1a88 12-Jun-2010 Nate Begeman <natebegeman@mac.com> vbsl, vrev* is implemented via arm_neon.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105875 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
cba9421f5c9f784bd32fcddf55b6af4b6e024904 12-Jun-2010 Nate Begeman <natebegeman@mac.com> vbsl, vrev* is implemented via arm_neon.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105875 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
7d7ae7353c86e60b3b013716f0bb32d609f0ac7c 12-Jun-2010 Nate Begeman <natebegeman@mac.com> Most of remaining builtins, 2 generics, vld, and rounding shfits remain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105848 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
464ccb68f22a7e1c0a2844551c16f721540c91c3 12-Jun-2010 Nate Begeman <natebegeman@mac.com> Most of remaining builtins, 2 generics, vld, and rounding shfits remain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105848 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
25cbc4d61194ac73a33b06b00a888cc7600e38cb 11-Jun-2010 Charles Davis <cdavis@mines.edu> When mangling for the Microsoft C++ ABI, mangle variables in the global
namespace, too.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105809 91177308-0d34-0410-b5e6-96231b3b80d8
angle.h
icrosoftCXXABI.cpp
971154db24429b103280d15423b8c200cfb2380c 11-Jun-2010 Charles Davis <cdavis@mines.edu> When mangling for the Microsoft C++ ABI, mangle variables in the global
namespace, too.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105809 91177308-0d34-0410-b5e6-96231b3b80d8
angle.h
icrosoftCXXABI.cpp
40bf2fb547ec2ab7977c09045088a7c4be628448 11-Jun-2010 Charles Davis <cdavis@mines.edu> Start implementing the Microsoft-style name mangler. Mangle simple names
(but not their types; that's later).

NOTE: Right now, variables in the global namespace don't get mangled, even
though they're supposed to be. This is because the default mangler
implements the shouldMangleDeclName() method that tells clang not to mangle
them. This will be fixed in a later patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105805 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
e60cea829b3bc45fcfedbfdb08cffb61f5bde79f 11-Jun-2010 Charles Davis <cdavis@mines.edu> Start implementing the Microsoft-style name mangler. Mangle simple names
(but not their types; that's later).

NOTE: Right now, variables in the global namespace don't get mangled, even
though they're supposed to be. This is because the default mangler
implements the shouldMangleDeclName() method that tells clang not to mangle
them. This will be fixed in a later patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105805 91177308-0d34-0410-b5e6-96231b3b80d8
icrosoftCXXABI.cpp
fed3a2b1dfd4e96b8bf74851e80e2f162f81b4ec 11-Jun-2010 Charles Davis <cdavis@mines.edu> Add an option to specify the target C++ ABI to the frontend. Use it to
select either the default Itanium ABI or the new, experimental Microsoft ABI.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105804 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
icrosoftCXXABI.cpp
98b7c5c496dfccb39287b8f7d8f1444594936d10 11-Jun-2010 Charles Davis <cdavis@mines.edu> Add an option to specify the target C++ ABI to the frontend. Use it to
select either the default Itanium ABI or the new, experimental Microsoft ABI.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105804 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
icrosoftCXXABI.cpp
52b136ace347ee82e11145927e37980157bacb35 11-Jun-2010 John McCall <rjmccall@apple.com> Split DependentNameType into two types. DependentNameType represents the
case of an elaborated-type-specifier like 'typename A<T>::foo', and
DependentTemplateSpecializationType represents the case of an
elaborated-type-specifier like 'typename A<T>::template B<T>'. The TypeLoc
representation of a DependentTST conveniently exactly matches that of an
ElaboratedType wrapping a TST.

Kill off the explicit rebuild methods for RebuildInCurrentInstantiation;
the standard implementations work fine because the nested name specifier
is computable in the newly-entered context.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105801 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
33500955d731c73717af52088b7fc0e7a85681e7 11-Jun-2010 John McCall <rjmccall@apple.com> Split DependentNameType into two types. DependentNameType represents the
case of an elaborated-type-specifier like 'typename A<T>::foo', and
DependentTemplateSpecializationType represents the case of an
elaborated-type-specifier like 'typename A<T>::template B<T>'. The TypeLoc
representation of a DependentTST conveniently exactly matches that of an
ElaboratedType wrapping a TST.

Kill off the explicit rebuild methods for RebuildInCurrentInstantiation;
the standard implementations work fine because the nested name specifier
is computable in the newly-entered context.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105801 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
0104bae0fef88edc586dcb7e214355e8e3f63817 10-Jun-2010 Nate Begeman <natebegeman@mac.com> Multiplies, some shifts, set_lane


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105793 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
548f7daa59012df2e20420e86c2722d19367ef17 10-Jun-2010 Nate Begeman <natebegeman@mac.com> Multiplies, some shifts, set_lane


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105793 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
b6a209378b5c6340bf2f8a91964f83689def886e 10-Jun-2010 Nate Begeman <natebegeman@mac.com> support _lane ops, and multiplies by scalar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105770 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
d075c01c359b9cc120c3accc7166990f9f4ac423 10-Jun-2010 Nate Begeman <natebegeman@mac.com> support _lane ops, and multiplies by scalar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105770 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
954abbbdc0f49934c9df24561731522b1d1c75b0 10-Jun-2010 Charles Davis <cdavis@mines.edu> Add a stub Microsoft Visual C++ ABI class (with stub mangler).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105767 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
MakeLists.txt
angle.h
icrosoftCXXABI.cpp
c3926645d70842eae22641df1bf69da457a0ff11 10-Jun-2010 Charles Davis <cdavis@mines.edu> Add a stub Microsoft Visual C++ ABI class (with stub mangler).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105767 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXABI.h
MakeLists.txt
angle.h
icrosoftCXXABI.cpp
ea990df18be44b10eccf8c70f7d55a000083cbc7 09-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement codegen for hadd, hsub, max, min, mlal, movl, movn, padal, mov_n
Make note about how to handle the dozen or so multiply by scalar ops.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105734 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
df98e1d1da5ab1ca7c325378fc1c2eaa90a6476d 09-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement codegen for hadd, hsub, max, min, mlal, movl, movn, padal, mov_n
Make note about how to handle the dozen or so multiply by scalar ops.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105734 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
95670f794c0749bd09cf9a84bf41a7b11147c3c2 09-Jun-2010 John McCall <rjmccall@apple.com> Correctly handle > 257 substitutions in a single mangling, and don't introduce
a spurious substitution for an unscoped dependent template-id after introducing
a substitution for the scoped template-id.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105699 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
6ab30e0c027458ff5293b898204ac2d1a789668e 09-Jun-2010 John McCall <rjmccall@apple.com> Correctly handle > 257 substitutions in a single mangling, and don't introduce
a spurious substitution for an unscoped dependent template-id after introducing
a substitution for the scoped template-id.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105699 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
58b3a5326e3288553b266acfb9e59be0549e8351 09-Jun-2010 Nate Begeman <natebegeman@mac.com> More accurate BuiltinsARM.def
vget_lane support


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105684 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
95450f6ffc89ee218faa550433265f80930469c4 09-Jun-2010 Nate Begeman <natebegeman@mac.com> More accurate BuiltinsARM.def
vget_lane support


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105684 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
494e1c6a16dd88fd61c6d351126067382eed2b36 09-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Simplify the code a bit and avoid a gcc waring about uninitialized variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105676 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
e140af3e27016f902146023fba7680b43043ec07 09-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Simplify the code a bit and avoid a gcc waring about uninitialized variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105676 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
75ce6b1b424f26270ed0672978c39abee869b36f 09-Jun-2010 Anders Carlsson <andersca@mac.com> Get rid of getMangledCXXCtorName and getMangledCXXDtorName.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105673 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
9a8822bb154b792cdb18fe4cfb34480ca0ec7661 09-Jun-2010 Anders Carlsson <andersca@mac.com> Get rid of getMangledCXXCtorName and getMangledCXXDtorName.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105673 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
c68eaf1194d5dfdbeda1418afd992fdd2e0dee43 09-Jun-2010 Anders Carlsson <andersca@mac.com> More mangling cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105672 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
dc709a8aea1072f11080f3a9519fd253582bf973 09-Jun-2010 Anders Carlsson <andersca@mac.com> More mangling cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105672 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
ad798dca80466ba8a7f9ca680d59fdb33d3c3ff3 09-Jun-2010 Anders Carlsson <andersca@mac.com> Get rid of an unnecessary getMangledName overload.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105671 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
afd04290de594111fe0f5917317e3a68e28639cf 09-Jun-2010 Anders Carlsson <andersca@mac.com> Get rid of an unnecessary getMangledName overload.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105671 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
b48312a9b605396aae0b62d9493f611329e53c7e 09-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix a gcc warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105670 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
3f4cb120fe574f7b80864f52a1999502a4f3a83d 09-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix a gcc warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105670 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
453bb15609d94a406796543f4b9421c97f8f40b6 09-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement transpose/zip/unzip & table lookup.
Test out some basic constant-checking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105667 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
1c2a88cfaeb11227d3a6bf7204207e0c8cf6de6f 09-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement transpose/zip/unzip & table lookup.
Test out some basic constant-checking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105667 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
608b5793179e667766022a3710204a676f3e350f 09-Jun-2010 Anders Carlsson <andersca@mac.com> On Darwin, initialization and destruction functions should go into the __StaticInit section.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105650 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
18af368c080b9d60e34e670cd01f7d2d3ad2ba48 09-Jun-2010 Anders Carlsson <andersca@mac.com> On Darwin, initialization and destruction functions should go into the __StaticInit section.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105650 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
d95d84cdf2f73205afa99e99d057e30c0d84dce8 09-Jun-2010 Anders Carlsson <andersca@mac.com> Add a global CreateGlobalInitOrDestructFunction and use it for creating global init or destruction functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105649 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
9dc046e70d189457968e4c3b986da75b5d98ce8e 09-Jun-2010 Anders Carlsson <andersca@mac.com> Add a global CreateGlobalInitOrDestructFunction and use it for creating global init or destruction functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105649 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
23dbba6689b58ed11131ce7c50b8008d6ad473fb 09-Jun-2010 Anders Carlsson <andersca@mac.com> Rename __tcf_ to __cxx_global_array_dtor. Remove the UniqueAggreDestructorCount from CodeGenFunction and let LLVM handle uniquing the internal functions instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105648 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
5687a5cb5941744c42aaaa9a1e7cd6d7c4c07fbf 09-Jun-2010 Anders Carlsson <andersca@mac.com> Rename __tcf_ to __cxx_global_array_dtor. Remove the UniqueAggreDestructorCount from CodeGenFunction and let LLVM handle uniquing the internal functions instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105648 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
be619062bf8b96d895c1e3ad56be8c512f13763e 09-Jun-2010 Anders Carlsson <andersca@mac.com> Move GenerateCXXAggrDestructorHelper to CGDeclCXX.cpp where it belongs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105647 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDeclCXX.cpp
772913659894551b02f342e3577e7219e4f9a701 09-Jun-2010 Anders Carlsson <andersca@mac.com> Move GenerateCXXAggrDestructorHelper to CGDeclCXX.cpp where it belongs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105647 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDeclCXX.cpp
f8a6d8e6fc45dfb1e4d650cda3e7e8f5279115e8 09-Jun-2010 Anders Carlsson <andersca@mac.com> Simplify GenerateCXXAggrDestructorHelper.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105646 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDeclCXX.cpp
odeGenFunction.h
02e370a02f05b4a734fe5e8c88efc4ed9dac60fa 09-Jun-2010 Anders Carlsson <andersca@mac.com> Simplify GenerateCXXAggrDestructorHelper.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105646 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDeclCXX.cpp
odeGenFunction.h
6dda7a24ef0e8a5a89128bba338bbfb9d8e6e7b1 08-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Block Code Gen. API. Call destructor on descriptior
entry previously constructed via copy constructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105641 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
ac7362dedab6002a0811f47ccfcaf81a9c728d35 08-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Block Code Gen. API. Call destructor on descriptior
entry previously constructed via copy constructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105641 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
ed5bf62969af84e508b62c0a9b19756bbfb2ce38 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Makefiles: Set Clang CPP compiler flags in a single location, instead of scattered throughout the project Makefiles.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105638 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
c4dec1c58eeb2ef46cdb64120eb6b819c6927afb 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Makefiles: Set Clang CPP compiler flags in a single location, instead of scattered throughout the project Makefiles.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105638 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
e55e5e35d511ea62e635374aeca1c09ba7ce6d88 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.
- This eliminates most dependencies on how Clang is installed relative to LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105637 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
afed099bd2e759efd4bb63fdc525d3445f94cc13 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.
- This eliminates most dependencies on how Clang is installed relative to LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105637 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
0678fd75cc258921f961c9bff14d8fcf1dbdcb42 08-Jun-2010 Anders Carlsson <andersca@mac.com> Correctly mangle static variables of anonymous struct/union type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105606 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
6f7e2f4019860cad19883db44f4d0bfa36d2f552 08-Jun-2010 Anders Carlsson <andersca@mac.com> Correctly mangle static variables of anonymous struct/union type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105606 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
702405a46f56c2ca05f951085fb5aeff1272f108 08-Jun-2010 Nate Begeman <natebegeman@mac.com> Fix NEON intrinsic argument passing, support vext. Most now successfully make it through codegen to the .s file


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105599 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
30d91718a676177f0d0d0210ce4fdb4f616df6e5 08-Jun-2010 Nate Begeman <natebegeman@mac.com> Fix NEON intrinsic argument passing, support vext. Most now successfully make it through codegen to the .s file


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105599 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
c8bfd0f8bb22ea019c673898bbdb07a834f0d821 08-Jun-2010 Shih-wei Liao <sliao@google.com> Git hiccup. Retry....

Change-Id: I5a329137a43f36bab32ea62386ade11da550c0b0
ndroid.mk
200213f20fef82c10b7da00873c99b93cee6da63 08-Jun-2010 Shih-wei Liao <sliao@google.com> Fix llvm.mk and the other 49 mk files

Change-Id: I5aa02363c1083297d163a575f5a35c495f950230
ndroid.mk
81342eb959d8c4a59d91ef73dc016d97598905e5 08-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix what looks like a merge problem that broke __clear_cache.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105595 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
7afacd5dc4614aff70ba9856b53541637309e282 08-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix what looks like a merge problem that broke __clear_cache.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105595 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
9d6651dc501c0bbe14ba3cd2fbd3d97bd1381be0 08-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix passing and returning of objects with non trivial copy constructors on
ARM.

Fixes PR7310.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105592 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
0eb1d9733801764cd8b692c67e117e4feeecf013 08-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix passing and returning of objects with non trivial copy constructors on
ARM.

Fixes PR7310.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105592 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
ca9d6c02dfacc19957841cbe0bf50730a85443c4 08-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement ARM NEON up through vcvt, alphabetically.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105590 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
9eb65a56e18bee1e5392bf2dff01cbd7b895f685 08-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement ARM NEON up through vcvt, alphabetically.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105590 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
515bb02ac1add48cd0ea9e7b1348d21abb29d157 08-Jun-2010 Nate Begeman <natebegeman@mac.com> Extend __builtin_shufflevector to expose the full power of the llvm shufflevector instruction. This means it can now be used for vector truncation and concatenation. This will be used for the ARM NEON implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105589 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
37b6a5731a47f811d754f0d48aa93edf30e30513 08-Jun-2010 Nate Begeman <natebegeman@mac.com> Extend __builtin_shufflevector to expose the full power of the llvm shufflevector instruction. This means it can now be used for vector truncation and concatenation. This will be used for the ARM NEON implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105589 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
8e3545f860596c0c755c3c48c2b6ebeca82bc39a 08-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> When using property-dot assignment syntax to call a setter method,
type of rhs need be compared to setter's argument and
not the getter type. Fixes radar 8062778


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105560 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
e2a901a1883a74469bdcd22e38f52b3f877bc6ca 08-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> When using property-dot assignment syntax to call a setter method,
type of rhs need be compared to setter's argument and
not the getter type. Fixes radar 8062778


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105560 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
3fc3d379b66c8e384290721949ffb1593bc7ad6a 07-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Fixed a block regression caused by trying to use
an existing ir for load of a bock variable. This cannot be
done across basic blocks.
Fixes radar 8064140.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105549 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
19739ae839fd4ebe472da4bdb9d65df452313ae4 07-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Fixed a block regression caused by trying to use
an existing ir for load of a bock variable. This cannot be
done across basic blocks.
Fixes radar 8064140.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105549 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
6cd738cba242add05c6deafe2c0bdad7d12b55ce 07-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Implement __clear_cache on ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105537 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
79ba509b0106fd0a1ff832baeb1fdb5430527efe 07-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Implement __clear_cache on ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105537 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
ee45832d4b228b0b7be972081b626ab9046aa2ed 07-Jun-2010 Nate Begeman <natebegeman@mac.com> weekend checkpoint of arm neon builtins codegen.
TODO: add remainder of builtins to CGBuiltin, add code to SemaChecking to validate constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105532 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
998622c10198a25ba06c93d7e908f88ba0acc920 07-Jun-2010 Nate Begeman <natebegeman@mac.com> weekend checkpoint of arm neon builtins codegen.
TODO: add remainder of builtins to CGBuiltin, add code to SemaChecking to validate constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105532 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
b9805b6ffe18062027f2150f0b701d2873617fc5 05-Jun-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added AccessSpecDecl node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105525 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
6206d53f67613958ae1b023aba337ebb46f11a8b 05-Jun-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Added AccessSpecDecl node.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105525 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
e3fa7a6ff686635863ac9f31204a09a3086a0c1a 05-Jun-2010 Devang Patel <dpatel@apple.com> Preserve type info for local variables in optimized builds.
llvm-gcc enabled this couple of weeks ago.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105516 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
44eeebaa53c0137447f9bac5f55755e480d59597 05-Jun-2010 Devang Patel <dpatel@apple.com> Preserve type info for local variables in optimized builds.
llvm-gcc enabled this couple of weeks ago.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105516 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
8ca17e2090c50c45ac58561da8240c020e76956c 04-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Build AST for copy-construction of copied-in
class object in blocks and carry it to IRGen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105487 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
59da45a1fc10a3af4f3b3152f45504b4c5ca7385 04-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Build AST for copy-construction of copied-in
class object in blocks and carry it to IRGen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105487 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
ea285162342df160e7860e26528bc7110bc6c0cd 04-Jun-2010 Shih-wei Liao <sliao@google.com> Initial slang.

Change-Id: I4f84a741e5fbc440cd4c251406d2b611a237f713
BIInfo.h
ndroid.mk
GBlocks.cpp
GBlocks.h
GBuilder.h
GBuiltin.cpp
GCXX.cpp
GCXX.h
GCall.cpp
GCall.h
GClass.cpp
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GRTTI.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
GStmt.cpp
GTemporaries.cpp
GVTT.cpp
GVTables.cpp
GVTables.h
GValue.h
MakeLists.txt
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
lobalDecl.h
akefile
angle.cpp
angle.h
oduleBuilder.cpp
EADME.txt
argetInfo.cpp
argetInfo.h
04520839ece1d6292b1cac3732a3d04b985b1fc9 04-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> For C++ copied in objects, use copy constructors in
setting up block's descriptor. This is on going work to
support c++ specific issues in setting up blocks
various APIs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105469 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
df8b8ea3492a314488ffee72704665b22bc73989 04-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> For C++ copied in objects, use copy constructors in
setting up block's descriptor. This is on going work to
support c++ specific issues in setting up blocks
various APIs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105469 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
320e93c941c594b4e257c7e559e3b649b2e7bec3 04-Jun-2010 Anders Carlsson <andersca@mac.com> Remove now unused code.

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105447 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
b8ca7611fade439cee8acf382a751591559b7e44 03-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Don't intentionally try to ignore the value of a scalar expression when we
actually care about it. Fixes PR7291.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105404 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
0b29227012aacb1ae42277b0a63d28acb1b35270 03-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Don't intentionally try to ignore the value of a scalar expression when we
actually care about it. Fixes PR7291.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105404 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
479dcd36a879d9b87d1a5945261aa3574ae91bc6 03-Jun-2010 Anders Carlsson <andersca@mac.com> Don't try to explicitly zero out bit-fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105391 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
e9a05b7fd6ece68310707d10bc747a702a9af4a8 03-Jun-2010 Anders Carlsson <andersca@mac.com> Don't try to explicitly zero out bit-fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105391 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
e0c9522091dcc14a21d6d24e9aba410d823eb321 02-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Block C++ code gen. Adds support for block reference argument
types. Executable test will be added to LLVM test suite.
(radar 8041962).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105347 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
7965172058761ae34e6f8b2c5b801fee8840f964 02-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Block C++ code gen. Adds support for block reference argument
types. Executable test will be added to LLVM test suite.
(radar 8041962).


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

Fixes PR7241.



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

Fixes PR7241.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105345 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
GVTables.h
b02037d98143461fb75d745b731fb070ecbf706b 02-Jun-2010 Anders Carlsson <andersca@mac.com> Don't substitute 'St' for 'std' when the namespace is nested inside another namespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105330 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
c820f90ff1a2c6e3e8b859355541c32f31d3cb8e 02-Jun-2010 Anders Carlsson <andersca@mac.com> Don't substitute 'St' for 'std' when the namespace is nested inside another namespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105330 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
b261387fb04503349b87a88ce25a25ec44daa7c5 02-Jun-2010 Anders Carlsson <andersca@mac.com> When building RTTI descriptors for pointer types, we need to get the unqualified array type and the qualifiers from it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105326 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
abd6b09e3daa4d82b7e8ee6966d7f745fd121835 02-Jun-2010 Anders Carlsson <andersca@mac.com> When building RTTI descriptors for pointer types, we need to get the unqualified array type and the qualifiers from it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105326 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
ea1c83172c89fa1497818f5711a67aff622426d9 02-Jun-2010 Anders Carlsson <andersca@mac.com> Correctly mangle unsigned integer literals where the high bit is set.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105312 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
dfc0d1ff1af5b199945a1ff98a6f7db0fdfb1615 02-Jun-2010 Anders Carlsson <andersca@mac.com> Correctly mangle unsigned integer literals where the high bit is set.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105312 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
f1e87a14c6f86c7b1851e98f6c93d9cee252d6d3 02-Jun-2010 Anders Carlsson <andersca@mac.com> Correctly mangle variadic functions that don't have any other parameters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105311 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
93296683a70eed2fae0b694748ed4cc51c53aef4 02-Jun-2010 Anders Carlsson <andersca@mac.com> Correctly mangle variadic functions that don't have any other parameters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105311 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
a688e07823218ed0a94f1503c1a6c6830ca10b9f 02-Jun-2010 Anders Carlsson <andersca@mac.com> When mangling member function pointers, fake adding a substitution corresponding to the function type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105310 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
9d85b7203b4cb638e45e64e8378338aa256699cd 02-Jun-2010 Anders Carlsson <andersca@mac.com> When mangling member function pointers, fake adding a substitution corresponding to the function type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105310 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
b691ae2a7705455751cd93a380c456583a0bd260 02-Jun-2010 Anders Carlsson <andersca@mac.com> More cleanup.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105301 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
b350bdfa0898e000cdef06de8f221ed170a303b8 02-Jun-2010 Anders Carlsson <andersca@mac.com> More cleanup.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105299 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
0d055e55e99cb3f1e7d9597000b51d2fbff960fd 02-Jun-2010 Anders Carlsson <andersca@mac.com> Cleanup.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105296 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
4c214d96283941d87e53e6e77ce0273c051a81b9 31-May-2010 Charles Davis <cdavis@mines.edu> Make methods non-virtual again for now. I accidentally committed this in
preparation for an alternate mangler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105224 91177308-0d34-0410-b5e6-96231b3b80d8
angle.h
61ecf35dcb18f53ea4b41ce9b8152f8046616be6 31-May-2010 Charles Davis <cdavis@mines.edu> Make methods non-virtual again for now. I accidentally committed this in
preparation for an alternate mangler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105224 91177308-0d34-0410-b5e6-96231b3b80d8
angle.h
e03bb9841cc60b89d83d7e6a8e4c910070490b14 31-May-2010 Chandler Carruth <chandlerc@gmail.com> Silence GCC warning about an accessible non-virtual destructor in a class with
virtual methods.

Please review cdavis, should these methods even be virtual?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105218 91177308-0d34-0410-b5e6-96231b3b80d8
angle.h
5b013df7d194ddaf030177387789c3c8248852b2 31-May-2010 Chandler Carruth <chandlerc@gmail.com> Silence GCC warning about an accessible non-virtual destructor in a class with
virtual methods.

Please review cdavis, should these methods even be virtual?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105218 91177308-0d34-0410-b5e6-96231b3b80d8
angle.h
e9dc85be6368f0b362f2f166dc8b4caefa6b74bd 30-May-2010 Anders Carlsson <andersca@mac.com> Remove unused parameter to FinalOverriders::PropagateOverrider.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105171 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
b7be965ff561d784a5de8d794b56a442085c8760 30-May-2010 Sean Hunt <rideau3@gmail.com> Convert DeclNodes to use TableGen.

The macros required for DeclNodes use have changed to match the use of
StmtNodes. The FooFirst enumerator constants have been named firstFoo
to match usage elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105165 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
MakeLists.txt
9a55591af3e5506b95a9718e15380129fbfc5ebc 30-May-2010 Sean Hunt <rideau3@gmail.com> Convert DeclNodes to use TableGen.

The macros required for DeclNodes use have changed to match the use of
StmtNodes. The FooFirst enumerator constants have been named firstFoo
to match usage elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105165 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
MakeLists.txt
dc537d9a525f8f1486970b11d5ac27ffbe5666b8 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
GCXX.cpp
GCall.cpp
GExprAgg.cpp
GExprConstant.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
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
GCXX.cpp
GCall.cpp
GExprAgg.cpp
GExprConstant.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
eed0aabb89835c6bbc3910221ec4584d8e2bb14e 28-May-2010 Daniel Dunbar <daniel@zuster.org> Fix personality function name when using SjLj exceptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104999 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
8019c45024be3026f854e3d22bfd89842be82266 28-May-2010 Daniel Dunbar <daniel@zuster.org> Fix personality function name when using SjLj exceptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104999 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
ee41cf12de4b8e1d291627faec94612a46fc357c 28-May-2010 Fariborz Jahanian <fjahanian@apple.com> zero-cost exception API for NeXt runtime.
rethrow inside @catch block must use objc_exception_rethrow
API. Fixes radar 8037512. Test will be added to LLVM
test suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104964 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
69677eadf881ba02d1a36e55c3b9a520769aa3c3 28-May-2010 Fariborz Jahanian <fjahanian@apple.com> zero-cost exception API for NeXt runtime.
rethrow inside @catch block must use objc_exception_rethrow
API. Fixes radar 8037512. Test will be added to LLVM
test suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104964 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9c9203a90fb29701ff91cf748916d7fa5cf7a368 28-May-2010 Dan Gohman <gohman@apple.com> This cast is no longer needed; the FIXME is fixed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104919 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
0140d92977b70b6cd12164b725758aa5f5aa5c60 28-May-2010 Dan Gohman <gohman@apple.com> This cast is no longer needed; the FIXME is fixed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104919 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
7fe2f33174e806ed1f5949216eceabf9bfd2595c 28-May-2010 Dan Gohman <gohman@apple.com> This cast is no longer required.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104916 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
707bef3207a1459dc49ebc3c2493ec9a35e06ab8 28-May-2010 Dan Gohman <gohman@apple.com> This cast is no longer required.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104916 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
66aba92b32456049f30fbb4ce9f4fb3d8f644162 28-May-2010 Jim Grosbach <grosbach@apple.com> Update __builtin_setjmp codegen to match llvmCore changes in r104900.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104902 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
6d172e2985346e55095c75f456901ea5d40fddaa 28-May-2010 Jim Grosbach <grosbach@apple.com> Update __builtin_setjmp codegen to match llvmCore changes in r104900.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104902 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
5b8549a644a81d003364cf65fa23267a3d23c2c7 27-May-2010 Anders Carlsson <andersca@mac.com> When null-initializing bases with data member pointers, don't assert on virtual bases. Just initialize them to null.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104868 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
0a87b377d9a8af87ebc99585be96aac2d36ccfcb 27-May-2010 Anders Carlsson <andersca@mac.com> When null-initializing bases with data member pointers, don't assert on virtual bases. Just initialize them to null.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104868 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
5144adc703d2f37fd044e1e0a70570bf6e68cad8 27-May-2010 John McCall <rjmccall@apple.com> Enable the implementation of __builtin_setjmp and __builtin_longjmp. Not all
LLVM backends support these yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104867 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
78673d9f910e8dfe13248c2426c51d8f9fb28572 27-May-2010 John McCall <rjmccall@apple.com> Enable the implementation of __builtin_setjmp and __builtin_longjmp. Not all
LLVM backends support these yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104867 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
ad4c6ff1f124a152f06dff254a503a284d995b51 27-May-2010 John McCall <rjmccall@apple.com> Implement __builtin_init_dwarf_reg_size_table and __builtin_dwarf_sp_column
for 32-bit MIPS processors. Hat-tip to rdivacky for providing gcc dumps
on this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104816 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
aeeb7011a875d3dd439e9fa07dc3ac54d97785b9 27-May-2010 John McCall <rjmccall@apple.com> Implement __builtin_init_dwarf_reg_size_table and __builtin_dwarf_sp_column
for 32-bit MIPS processors. Hat-tip to rdivacky for providing gcc dumps
on this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104816 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
57993e951aa099ecbaa31e05f21c6d2416b6e4af 27-May-2010 John McCall <rjmccall@apple.com> When deciding whether a deferred declaration has already been emitted,
aliases count as definitions regardless of whether their target has been
emitted yet. Fixes PR 7142.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104796 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
c76702cc80c1ef8a94d82b62ddcb4ed4f67d5b8c 27-May-2010 John McCall <rjmccall@apple.com> When deciding whether a deferred declaration has already been emitted,
aliases count as definitions regardless of whether their target has been
emitted yet. Fixes PR 7142.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104796 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8df8ff1b1d982e97d323d354379234802b6b9b3d 27-May-2010 Daniel Dunbar <daniel@zuster.org> AST: Rename PragmaPackAttr to MaxFieldAlignmentAttr, which is more accurate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104795 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
8a2c92cab213bd7e28ff669577e815cd70bafbe3 27-May-2010 Daniel Dunbar <daniel@zuster.org> AST: Rename PragmaPackAttr to MaxFieldAlignmentAttr, which is more accurate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104795 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
aac7434e0b6f05ced1927cc2ef68ec02054dfcc4 27-May-2010 John McCall <rjmccall@apple.com> Correctly pass aggregates by reference when emitting thunks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104778 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GClass.cpp
GVTables.cpp
odeGenFunction.h
2736071ea3a46f90e65c93418961611d96c10ab9 27-May-2010 John McCall <rjmccall@apple.com> Correctly pass aggregates by reference when emitting thunks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104778 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GClass.cpp
GVTables.cpp
odeGenFunction.h
3a593f68d59ff5c11b24ac6a35888dd174b46d67 26-May-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to fix a irgen crash accessing an initialized local static
variable in a local function. Fixes pr7101.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104743 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
4c464b9702af8ec5e76d5eb184e76df1d40c23ec 26-May-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to fix a irgen crash accessing an initialized local static
variable in a local function. Fixes pr7101.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104743 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
1f2e1adb4d2eb843aaaf888bb7ff75b3955dc2c9 26-May-2010 Charles Davis <cdavis@mines.edu> Extract the ObjC and blocks manglers into their own class. No functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104715 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
685b1d9e0d019c4ca2a2742cca287367af3d01e6 26-May-2010 Charles Davis <cdavis@mines.edu> Extract the ObjC and blocks manglers into their own class. No functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104715 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
d6a3bd95e1da68c9f912ab95823d0bf32cd4da71 26-May-2010 Douglas Gregor <doug.gregor@gmail.com> Be sure to use the standard substitutions when mangling the names of
vtables, VTTs, and construction vtables. Fixes PR7201.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104675 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
1b12a3bb4d4c0db74fc97be724beefec7366b460 26-May-2010 Douglas Gregor <dgregor@apple.com> Be sure to use the standard substitutions when mangling the names of
vtables, VTTs, and construction vtables. Fixes PR7201.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104675 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
1a013243ce78e895b58b307d7e858b7c0b1b7b9b 25-May-2010 Charles Davis <cdavis@mines.edu> IRgen: Add a stub class for generating ABI-specific C++ code.

This class only supports name mangling (which is apparently used during C/ObjC
codegen). For now only the Itanium C++ ABI is supported. Patches to add a
second C++ ABI are forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104630 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
MakeLists.txt
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
3a811f1f4286ee3fd0c563c1cfe623956f3caa24 25-May-2010 Charles Davis <cdavis@mines.edu> IRgen: Add a stub class for generating ABI-specific C++ code.

This class only supports name mangling (which is apparently used during C/ObjC
codegen). For now only the Itanium C++ ABI is supported. Patches to add a
second C++ ABI are forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104630 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXABI.h
MakeLists.txt
odeGenModule.cpp
odeGenModule.h
taniumCXXABI.cpp
db24113622b73fc0fe406e312775241e4352652f 25-May-2010 Douglas Gregor <doug.gregor@gmail.com> Fix compilation failure

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104613 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
6e5d9b08f852a1052e5a2af4727f6b797e57d578 25-May-2010 Douglas Gregor <dgregor@apple.com> Fix compilation failure

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104613 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
2805fb52ca86a144a078f1e5dcccaf879241cf8c 25-May-2010 Douglas Gregor <doug.gregor@gmail.com> Improve name mangling for blocks and support mangling of static local
variables within blocks. We loosely follow GCC's mangling, but since
these are always internal symbols the names don't really matter. I
intend to revisit block mangling later, because GCC's mangling is
rather verbose. <rdar://problem/8015719>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104610 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
odeGenFunction.cpp
odeGenModule.h
angle.cpp
angle.h
35415f5132f70ad5097a3514ab84251e10db3664 25-May-2010 Douglas Gregor <dgregor@apple.com> Improve name mangling for blocks and support mangling of static local
variables within blocks. We loosely follow GCC's mangling, but since
these are always internal symbols the names don't really matter. I
intend to revisit block mangling later, because GCC's mangling is
rather verbose. <rdar://problem/8015719>.


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

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



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

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104581 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDecl.cpp
GVTables.cpp
odeGenModule.cpp
odeGenModule.h
5f7db2f368ccb989bc36f75f6d6403c34375c449 23-May-2010 Benjamin Kramer <benny.kra@googlemail.com> Add a comment for r104472.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104473 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
89cf2e3d9d356a8b960a5ab12ccc677fe2dce7f8 23-May-2010 Benjamin Kramer <benny.kra@googlemail.com> Add a comment for r104472.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104473 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
948d950a8ff2a15e1d5bfdca0f7634915c7e6ba7 23-May-2010 Benjamin Kramer <benny.kra@googlemail.com> PR5863: Don't erase unreachable BBs which have an associated cleanup size.

This works around a crash where malloc reused the memory of an erased BB for a
new BB leaving old cleanup information pointing at the new block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104472 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
92b9bd96ce25630f73717965fcaf4b5a761e49e5 23-May-2010 Benjamin Kramer <benny.kra@googlemail.com> PR5863: Don't erase unreachable BBs which have an associated cleanup size.

This works around a crash where malloc reused the memory of an erased BB for a
new BB leaving old cleanup information pointing at the new block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104472 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
118d74def033426d9bafb5247c6ee7df691afb84 23-May-2010 John McCall <rjmccall@apple.com> Re-teach IR gen to perform GC moves on rvalues resulting from various ObjC
expressions. Essentially, GC breaks a certain form of the return-value
optimization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104454 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
fa037bd3f79d3c70197a3224bb1b29c6c4af0098 23-May-2010 John McCall <rjmccall@apple.com> Re-teach IR gen to perform GC moves on rvalues resulting from various ObjC
expressions. Essentially, GC breaks a certain form of the return-value
optimization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104454 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
556d81d50592704f5c35a2b4b4cb5ebf350ed59a 22-May-2010 Anders Carlsson <andersca@mac.com> Really fix PR7139. There was one boost test that we still failed, and my first fix broke self-host.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104447 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
a40a9f31218c743e366322e34b59f0d4d4414198 22-May-2010 Anders Carlsson <andersca@mac.com> Really fix PR7139. There was one boost test that we still failed, and my first fix broke self-host.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104447 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
b37139087ebfd53925ec2235865ec93f68da0acb 22-May-2010 Anders Carlsson <andersca@mac.com> Re-land the fix for PR7139.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104446 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
GExprAgg.cpp
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
1884eb0b5c55edda4893ddec45e7dbad79758782 22-May-2010 Anders Carlsson <andersca@mac.com> Re-land the fix for PR7139.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104446 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
GExprAgg.cpp
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
ee82da709d153ed9633efdd8838f2e0ca7434429 22-May-2010 Douglas Gregor <doug.gregor@gmail.com> Improve our handling of reference binding for subobjects of
temporaries. There are actually several interrelated fixes here:

- When converting an object to a base class, it's only an lvalue
cast when the original object was an lvalue and we aren't casting
pointer-to-derived to pointer-to-base. Previously, we were
misclassifying derived-to-base casts of class rvalues as lvalues,
causing various oddities (including problems with reference binding
not extending the lifetimes of some temporaries).

- Teach the code for emitting a reference binding how to look
through no-op casts and parentheses directly, since
Expr::IgnoreParenNoOpCasts is just plain wrong for this. Also, make
sure that we properly look through multiple levels of indirection
from the temporary object, but destroy the actual temporary object;
this fixes the reference-binding issue mentioned above.

- Teach Objective-C message sends to bind the result as a temporary
when needed. This is actually John's change, but it triggered the
reference-binding problem above, so it's included here. Now John
can actually test his return-slot improvements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104434 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
2d6b0e94db30c0e2754d270753c6f75478e451bf 22-May-2010 Douglas Gregor <dgregor@apple.com> Improve our handling of reference binding for subobjects of
temporaries. There are actually several interrelated fixes here:

- When converting an object to a base class, it's only an lvalue
cast when the original object was an lvalue and we aren't casting
pointer-to-derived to pointer-to-base. Previously, we were
misclassifying derived-to-base casts of class rvalues as lvalues,
causing various oddities (including problems with reference binding
not extending the lifetimes of some temporaries).

- Teach the code for emitting a reference binding how to look
through no-op casts and parentheses directly, since
Expr::IgnoreParenNoOpCasts is just plain wrong for this. Also, make
sure that we properly look through multiple levels of indirection
from the temporary object, but destroy the actual temporary object;
this fixes the reference-binding issue mentioned above.

- Teach Objective-C message sends to bind the result as a temporary
when needed. This is actually John's change, but it triggered the
reference-binding problem above, so it's included here. Now John
can actually test his return-slot improvements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104434 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
c9a726dcd5c49bcede3080b75dec329caa2057b4 22-May-2010 John McCall <rjmccall@apple.com> Push a return-value slot throughout ObjC message-send codegen. Will be
critical for ObjC++ correctness; hard to test independently of various
required Sema changes, though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104422 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
ef072fd2f3347cfd857d6eb787b245b950771430 22-May-2010 John McCall <rjmccall@apple.com> Push a return-value slot throughout ObjC message-send codegen. Will be
critical for ObjC++ correctness; hard to test independently of various
required Sema changes, though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104422 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
23c27994191df56203e023a2da0105f09cc9231d 22-May-2010 Anders Carlsson <andersca@mac.com> Unbreak self-host.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104390 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
892fa6c5e152dd22e4ba460d5c8cd5c79d657e87 22-May-2010 Anders Carlsson <andersca@mac.com> Unbreak self-host.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104390 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
32a7d64067595de50f8bdc8c9c0ca1d480549be6 21-May-2010 Anders Carlsson <andersca@mac.com> Rename CodeGenFunction::EmitMemSetToZero to EmitNullInitialization. Handle setting null data member pointers correctly. Fixes PR7139.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104387 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
db9b12e32c988e4a6ac49404fd2513d0b05bba32 21-May-2010 Anders Carlsson <andersca@mac.com> Rename CodeGenFunction::EmitMemSetToZero to EmitNullInitialization. Handle setting null data member pointers correctly. Fixes PR7139.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104387 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
f07a7ada2dfaaa731e0527eec79efdfc927a56e8 21-May-2010 Douglas Gregor <doug.gregor@gmail.com> Don't remove the break/continue scope of a for loop until after we've
emitted the increment expression. Fixes PR7189.

If someone knows how to write a useful test for this, I'd be grateful.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104335 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
45d3fe1898d3726d269a0bd2ccb8527102e29d79 21-May-2010 Douglas Gregor <dgregor@apple.com> Don't remove the break/continue scope of a for loop until after we've
emitted the increment expression. Fixes PR7189.

If someone knows how to write a useful test for this, I'd be grateful.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104335 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
84f5f9a637bdffb04400953cd7ac265558714513 21-May-2010 Douglas Gregor <doug.gregor@gmail.com> When generating the call arguments in a thunk to call the thunkee, do
not make copies non-POD arguments or arguments passed by reference:
just copy the pointers directly. This eliminates another source of the
dreaded memcpy-of-non-PODs. Fixes PR7188.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104327 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
9bb6496257e9f8160d9e184b17c190413ed0ed73 21-May-2010 Chandler Carruth <chandlerc@gmail.com> Add braces to avoid an ambiguous else, fixing a GCC warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104314 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
f54b80f2348ff49bedf4081ccd2f60e5d63a26c6 21-May-2010 Chandler Carruth <chandlerc@gmail.com> Add braces to avoid an ambiguous else, fixing a GCC warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104314 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
fc564adb48048870767568d36649db574999aa64 21-May-2010 John McCall <rjmccall@apple.com> Allocate space in a block record for implicit references to the Objective C
'self' variable arising from uses of the 'super' keyword. Also reorganize
some code so that BlockInfo (now CGBlockInfo) can be opaque outside of
CGBlocks.cpp.

Fixes rdar://problem/8010633.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104312 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GObjC.cpp
odeGenFunction.h
ee5042903d53fa7b0fbc1902d0ea07d57c7775b1 21-May-2010 John McCall <rjmccall@apple.com> Allocate space in a block record for implicit references to the Objective C
'self' variable arising from uses of the 'super' keyword. Also reorganize
some code so that BlockInfo (now CGBlockInfo) can be opaque outside of
CGBlocks.cpp.

Fixes rdar://problem/8010633.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104312 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GObjC.cpp
odeGenFunction.h
7a9beb61bfb154a477a9fb4ac44e53f76dd0f10d 21-May-2010 John McCall <rjmccall@apple.com> When emitting an lvalue for an anonymous struct or union member during
class initialization, drill down through an arbitrary number of anonymous
records.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104310 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
odeGenFunction.h
a9976d3b192690db20f59dc44099ac4ca939bdb7 21-May-2010 John McCall <rjmccall@apple.com> When emitting an lvalue for an anonymous struct or union member during
class initialization, drill down through an arbitrary number of anonymous
records.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104310 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
odeGenFunction.h
57e7e582cffa9b7f93ed870c2cd31f7479137d8a 20-May-2010 Fariborz Jahanian <fjahanian@apple.com> Adds support for generation of objc_memmove_collectable API
in Objective-C++ mode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104281 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
842ddd0391eb799edfed05f0c5019d6f720d2c37 20-May-2010 Fariborz Jahanian <fjahanian@apple.com> Adds support for generation of objc_memmove_collectable API
in Objective-C++ mode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104281 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
df44b46c380ec86175309e3e46ecad8cd682598e 20-May-2010 Fariborz Jahanian <fjahanian@apple.com> Copy construction of non-trivial properties must not
be turned into a setter call (fixes radar 8008649).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104235 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprCXX.cpp
1d49f2112572c247ff9c209de112fbf5d9ecf765 20-May-2010 Fariborz Jahanian <fjahanian@apple.com> Copy construction of non-trivial properties must not
be turned into a setter call (fixes radar 8008649).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104235 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprCXX.cpp
6af551aa507d0e9ad0127024ea042b6989236f0d 20-May-2010 Douglas Gregor <doug.gregor@gmail.com> Picky, picky

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104230 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
419aa964ae845aa5b1183fabb2f1cff78faaeddd 20-May-2010 Douglas Gregor <dgregor@apple.com> Picky, picky

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104230 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
8765a8ff23e26a2154103059fd6f0775943564ee 20-May-2010 Douglas Gregor <doug.gregor@gmail.com> Fix a thinko

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104229 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
722653023bec8e4be4d72377c8a929276ff10ff8 20-May-2010 Douglas Gregor <dgregor@apple.com> Fix a thinko

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104229 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
eb8851d427260063d3468e336ebd2013930ef301 20-May-2010 Douglas Gregor <doug.gregor@gmail.com> Assert that we do not try to memcpy a non-POD class type in C++. This
particular issue was the cause of the Boost.Interprocess failures, and
in general will lead to horrendous, hard-to-diagnose miscompiles. The
assertion itself has survives self-host and a full Boost build, so we
are close to eradicating this problem in C++.

Note that the assertion is *not* turned on for Objective-C++, where we
still have problems with introducing memcpy's of non-POD class
types. That part of the assertion will go away as soon as we fix the
known issues in Objective-C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104227 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
e9979484670ca2b528146d1b681e149fdc29f7cc 20-May-2010 Douglas Gregor <dgregor@apple.com> Assert that we do not try to memcpy a non-POD class type in C++. This
particular issue was the cause of the Boost.Interprocess failures, and
in general will lead to horrendous, hard-to-diagnose miscompiles. The
assertion itself has survives self-host and a full Boost build, so we
are close to eradicating this problem in C++.

Note that the assertion is *not* turned on for Objective-C++, where we
still have problems with introducing memcpy's of non-POD class
types. That part of the assertion will go away as soon as we fix the
known issues in Objective-C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104227 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
31ab059c734a3a5d0fca76bf132c845a05621fcf 20-May-2010 David Chisnall <csdavec@swan.ac.uk> Fix my inability to spell 'continue' and a case where message sends returning non-pointer-sized things were generating invalid IR inside @try blocks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104222 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
a54da05098aff1ca992f5292f3f6a39ec3cef31e 20-May-2010 David Chisnall <csdavec@swan.ac.uk> Fix my inability to spell 'continue' and a case where message sends returning non-pointer-sized things were generating invalid IR inside @try blocks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104222 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
fd657115d69efc308b907647e667f5ca6ce74b94 20-May-2010 Douglas Gregor <doug.gregor@gmail.com> Rework our handling of binding a reference to a temporary
subobject. Previously, we could only properly bind to a base class
subobject while extending the lifetime of the complete object (of a
derived type); for non-static data member subobjects, we could memcpy
(!) the result and bind to that, which is rather broken.

Now, we pull apart the expression that we're binding to, to figure out
which subobject we're accessing, then construct the temporary object
(adding a destruction if needed) and, finally, dig out the subobject
we actually meant to access.

This fixes yet another instance where we were memcpy'ing rather than
doing the right thing. However, note the FIXME in references.cpp:
there's more work to be done for binding to subobjects, since the AST
is incorrectly modeling some member accesses in base classes as
lvalues when they are really rvalues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104219 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
60dcb8432cff2455488b9226b9cc65b80356146e 20-May-2010 Douglas Gregor <dgregor@apple.com> Rework our handling of binding a reference to a temporary
subobject. Previously, we could only properly bind to a base class
subobject while extending the lifetime of the complete object (of a
derived type); for non-static data member subobjects, we could memcpy
(!) the result and bind to that, which is rather broken.

Now, we pull apart the expression that we're binding to, to figure out
which subobject we're accessing, then construct the temporary object
(adding a destruction if needed) and, finally, dig out the subobject
we actually meant to access.

This fixes yet another instance where we were memcpy'ing rather than
doing the right thing. However, note the FIXME in references.cpp:
there's more work to be done for binding to subobjects, since the AST
is incorrectly modeling some member accesses in base classes as
lvalues when they are really rvalues.


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


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104215 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
357f3b377abe85dd33a59122c90a361ea4226353 20-May-2010 John McCall <rjmccall@apple.com> Support implicitly closing on 'this' in a block. Fixed PR7165.

(the codegen works here, too, but that's annoying to test without execution)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104202 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
odeGenFunction.h
ea1471e0e967548c596a71469702f8846dbaf3c0 20-May-2010 John McCall <rjmccall@apple.com> Support implicitly closing on 'this' in a block. Fixed PR7165.

(the codegen works here, too, but that's annoying to test without execution)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104202 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
odeGenFunction.h
a18b3a60f1ad34cf216e96e9bea2d61dace96321 19-May-2010 Benjamin Kramer <benny.kra@googlemail.com> Implement codegen for __builtin_isnormal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104118 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
6349ce94d1b4fa560bf060c5ca5ad5728ce4fad9 19-May-2010 Benjamin Kramer <benny.kra@googlemail.com> Implement codegen for __builtin_isnormal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104118 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
01890a8487ae3330abc501b455e2092545d54775 18-May-2010 Douglas Gregor <doug.gregor@gmail.com> Add support for Microsoft's __thiscall, from Steven Watanabe!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104026 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
f813a2c03fcb05381b3252010435f557eb6b3cde 18-May-2010 Douglas Gregor <dgregor@apple.com> Add support for Microsoft's __thiscall, from Steven Watanabe!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104026 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
787971bc468bdf62182053e71f0bc81c56047d8a 18-May-2010 Anders Carlsson <andersca@mac.com> Correctly initialize bases with member pointers. This should fix PR6441 but that test case is a bit weird and I'd like to investigate further before closing that bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104025 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GRecordLayoutBuilder.cpp
a83fb4bf8119b980ccf7de0795dff250a799ea58 18-May-2010 Anders Carlsson <andersca@mac.com> Correctly initialize bases with member pointers. This should fix PR6441 but that test case is a bit weird and I'd like to investigate further before closing that bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104025 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GRecordLayoutBuilder.cpp
e445021aab6311948d36d0b7c32d5b2ab152047e 18-May-2010 Anders Carlsson <andersca@mac.com> Keep track of the LLVM field numbers for non-virtual bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104013 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayout.h
GRecordLayoutBuilder.cpp
c6772ce9c80ff524c7c522b5f0b37de58786bd84 18-May-2010 Anders Carlsson <andersca@mac.com> Keep track of the LLVM field numbers for non-virtual bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104013 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayout.h
GRecordLayoutBuilder.cpp
615157acd0881e05cbe0224b6e6f58d079a9f035 18-May-2010 Anders Carlsson <andersca@mac.com> Start laying out bases as individual fields. We still use ugly i8 arrays but this is a step in the right direction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104012 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
15ddfdc5d8929556c07ea7341006b31c71544325 18-May-2010 Anders Carlsson <andersca@mac.com> Start laying out bases as individual fields. We still use ugly i8 arrays but this is a step in the right direction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104012 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
72aa0845374d9e9888e527c33bd56479106dbd86 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
odeGenTypes.cpp
odeGenTypes.h
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
odeGenTypes.cpp
odeGenTypes.h
1618cd6e889cc500331f22b88f66af4ae2cce3d5 17-May-2010 John McCall <rjmccall@apple.com> Clean up some more uses of getAs<ObjCInterfaceType>() that Fariborz pointed
out. The remaining ones are okay.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103973 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
506b57e8b79d7dc2c367bf2ee7ec95420ad3fc8f 17-May-2010 John McCall <rjmccall@apple.com> Clean up some more uses of getAs<ObjCInterfaceType>() that Fariborz pointed
out. The remaining ones are okay.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103973 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
5b463a52fd203bbef94af38d0c95caa034f1265b 17-May-2010 Chandler Carruth <chandlerc@gmail.com> Fix an ambiguous else warning from GCC by adding some much needed curlies.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103972 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
dcf22ad88fdb6c4dd74f9065262cde8bac4f807b 17-May-2010 Chandler Carruth <chandlerc@gmail.com> Fix an ambiguous else warning from GCC by adding some much needed curlies.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103972 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
8472e8b1fc6640d22d82ba534ec85fdcee8b6851 17-May-2010 John McCall <rjmccall@apple.com> Correctly generate IR for ObjC messages sends to protocol-qualified types.
Fixes rdar://problem/7992749



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103965 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
3031c63f7b5b09d5f64609fa7a1922a05b520fa7 17-May-2010 John McCall <rjmccall@apple.com> Correctly generate IR for ObjC messages sends to protocol-qualified types.
Fixes rdar://problem/7992749



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103965 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
3b25372e450bbf46b2ca5f5c3b38012c1adac967 17-May-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Remove dead function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103945 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
e32b9b854e5b92b223c553164d3ecfbf657dbbf2 17-May-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Remove dead function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103945 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
b2dba36050ccad8c714b512b2803200c5e786d5a 17-May-2010 Daniel Dunbar <daniel@zuster.org> C++/Darwin/i386 ABI: Fix some problems with empty record handling.
- Check bases as part of isEmptyRecord().

- C++ record fields are never empty in the Itanium ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103944 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
5ea68614bfe0e78b5d66339b781529038f86501f 17-May-2010 Daniel Dunbar <daniel@zuster.org> C++/Darwin/i386 ABI: Fix some problems with empty record handling.
- Check bases as part of isEmptyRecord().

- C++ record fields are never empty in the Itanium ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103944 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
36e0c89d848e14cfd20636d8db78853972727653 17-May-2010 Douglas Gregor <doug.gregor@gmail.com> Ensure that destructors are called for NRVO'd objects when the
function does not return. Thanks to Eli for pointing out this corner
case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103941 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GStmt.cpp
odeGenFunction.h
3d91bbcdab155181556969cad6ec97014405aced 17-May-2010 Douglas Gregor <dgregor@apple.com> Ensure that destructors are called for NRVO'd objects when the
function does not return. Thanks to Eli for pointing out this corner
case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103941 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GStmt.cpp
odeGenFunction.h
61011202701d3806b100bb86b74f595298a53058 17-May-2010 David Chisnall <csdavec@swan.ac.uk> Pick the correct personality function based on the language. This prevents link failures when C/ObjC code uses __attribute__((cleanup())) (previously this was inserting references to two libstc++ symbols; the personality function and the __terminate() function).

This is still probably wrong for Objective-C++ and adds a couple of lines in CGException that should probably be in the CGObjCRuntime subclass. The personality function is now only looked up in one place in CGException though, so this should be easier to fix in the future.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103938 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
79a9ad8e5eec3696989354be13a74a1106f64f72 17-May-2010 David Chisnall <csdavec@swan.ac.uk> Pick the correct personality function based on the language. This prevents link failures when C/ObjC code uses __attribute__((cleanup())) (previously this was inserting references to two libstc++ symbols; the personality function and the __terminate() function).

This is still probably wrong for Objective-C++ and adds a couple of lines in CGException that should probably be in the CGObjCRuntime subclass. The personality function is now only looked up in one place in CGException though, so this should be easier to fix in the future.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103938 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
032b03f634afe9f4ccaf008f4e9809bbb5b24cd3 16-May-2010 Douglas Gregor <doug.gregor@gmail.com> When initializing thread-safe statics, put the call to
__cxa_guard_abort along the exceptional edge into (in effect) a nested
"try" that rethrows after aborting. Fixes PR7144 and the remaining
Boost.ProgramOptions failures, along with the regressions that r103880
caused.

The crucial difference between this and r103880 is that we now follow
LLVM's little dance with the llvm.eh.exception and llvm.eh.selector
calls, then use _Unwind_Resume_or_Rethrow to rethrow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103892 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
GException.cpp
odeGenFunction.h
86a3a03667bdb0dcab7e6a2877dfd234b07a6d43 16-May-2010 Douglas Gregor <dgregor@apple.com> When initializing thread-safe statics, put the call to
__cxa_guard_abort along the exceptional edge into (in effect) a nested
"try" that rethrows after aborting. Fixes PR7144 and the remaining
Boost.ProgramOptions failures, along with the regressions that r103880
caused.

The crucial difference between this and r103880 is that we now follow
LLVM's little dance with the llvm.eh.exception and llvm.eh.selector
calls, then use _Unwind_Resume_or_Rethrow to rethrow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103892 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
GException.cpp
odeGenFunction.h
54960879e979f0c7e14627fbce0e0502ac75ee1f 16-May-2010 Douglas Gregor <doug.gregor@gmail.com> Revert r103880 (thread-safe static initialization w/ exceptions),
because it's causing strange linker errors. Unfixes PR7144.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103890 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
GException.cpp
odeGenFunction.h
1eb2e59338c4b9c0429fc39ca98662adc9e7a3f2 16-May-2010 Douglas Gregor <dgregor@apple.com> Revert r103880 (thread-safe static initialization w/ exceptions),
because it's causing strange linker errors. Unfixes PR7144.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103890 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
GException.cpp
odeGenFunction.h
39e19c9b6a50ec5cc454741e10f0047663ff3c8e 16-May-2010 Fariborz Jahanian <fjahanian@apple.com> Minor twik to my last patch. (for radar 7986354).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103889 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
c9a8fa4e4df099cf0addc55d9ba513926588a0fb 16-May-2010 Fariborz Jahanian <fjahanian@apple.com> Minor twik to my last patch. (for radar 7986354).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103889 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
6749136c3912245d92e243ebffe02f687064c10d 16-May-2010 Fariborz Jahanian <fjahanian@apple.com> Fix API gen for objc_msgSend property of aggregate types
in Objective-c++ mode. Fixes radar 7986354.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103887 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
0ca0b1f4b4a73e888c42c930dab464885afcd09a 16-May-2010 Fariborz Jahanian <fjahanian@apple.com> Fix API gen for objc_msgSend property of aggregate types
in Objective-c++ mode. Fixes radar 7986354.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103887 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
3fb34bcba3538356a76487116d64e6a22c08705e 15-May-2010 Douglas Gregor <doug.gregor@gmail.com> When initializing thread-safe statics, put the call to
__cxa_guard_abort along the exceptional edge into (in effect) a nested
"try" that rethrows after aborting. Fixes PR7144 and the remaining
Boost.ProgramOptions failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103880 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
GException.cpp
odeGenFunction.h
bfcc823a5c53dabab8cfc842bfea70e2b69cdee0 15-May-2010 Douglas Gregor <dgregor@apple.com> When initializing thread-safe statics, put the call to
__cxa_guard_abort along the exceptional edge into (in effect) a nested
"try" that rethrows after aborting. Fixes PR7144 and the remaining
Boost.ProgramOptions failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103880 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
GException.cpp
odeGenFunction.h
e7de25a311898f733e9de8d07635f63a1c81d990 15-May-2010 John McCall <rjmccall@apple.com> Modify this comment per Doug's suggestion: we don't need to mangle protocols.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103875 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
c00c1f6638a8ca771df14133560873fc21f31234 15-May-2010 John McCall <rjmccall@apple.com> Modify this comment per Doug's suggestion: we don't need to mangle protocols.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103875 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
faf6b8a8a31a679da3327089186416847fb8be24 15-May-2010 Douglas Gregor <doug.gregor@gmail.com> When applying the named return value optimization, we still need to
destroy the variable along the exceptional edge; it's only during
normal execution that we avoid destroying this variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103872 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
b5b30b96e0accaf3c78a19c3febba5136dae8386 15-May-2010 Douglas Gregor <dgregor@apple.com> When applying the named return value optimization, we still need to
destroy the variable along the exceptional edge; it's only during
normal execution that we avoid destroying this variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103872 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
f4f254c60f644f08dea9cfbe0865016a5ef748a6 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
GDebugInfo.cpp
GDebugInfo.h
GExpr.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenTypes.cpp
angle.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
GDebugInfo.cpp
GDebugInfo.h
GExpr.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenTypes.cpp
angle.cpp
b7d79b3cff07dd63db778f369deb3d0f1060202b 15-May-2010 Douglas Gregor <doug.gregor@gmail.com> Implement a simple form of the C++ named return value optimization for
return statements. We perform NRVO only when all of the return
statements in the function return the same variable. Fixes some link
failures in Boost.Interprocess (which is relying on NRVO), and
probably improves performance for some C++ applications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103867 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GStmt.cpp
d86c477fb5d3fc34864afecbbb5443da9355e8fb 15-May-2010 Douglas Gregor <dgregor@apple.com> Implement a simple form of the C++ named return value optimization for
return statements. We perform NRVO only when all of the return
statements in the function return the same variable. Fixes some link
failures in Boost.Interprocess (which is relying on NRVO), and
probably improves performance for some C++ applications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103867 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GStmt.cpp
8b9ae4311f89abe3c417577a4e6e23a504f5d33f 15-May-2010 Douglas Gregor <doug.gregor@gmail.com> Implement semantic analysis and an AST representation for the named
return value optimization. Sema marks return statements with their
NRVO candidates (which may or may not end up using the NRVO), then, at
the end of a function body, computes and marks those variables that
can be allocated into the return slot.

I've checked this locally with some debugging statements (not
committed), but there won't be any tests until CodeGen comes along.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103865 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
5077c3876beeaed32280af88244e8050078619a8 15-May-2010 Douglas Gregor <dgregor@apple.com> Implement semantic analysis and an AST representation for the named
return value optimization. Sema marks return statements with their
NRVO candidates (which may or may not end up using the NRVO), then, at
the end of a function body, computes and marks those variables that
can be allocated into the return slot.

I've checked this locally with some debugging statements (not
committed), but there won't be any tests until CodeGen comes along.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103865 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
7424ed8f5eff898e865a2efceca5ef14b81d6b76 15-May-2010 Douglas Gregor <doug.gregor@gmail.com> Recognize when the named return value optimization applies in a
"return" statement and mark the corresponding CXXConstructExpr as
elidable. Teach CodeGen that eliding a temporary is different from
eliding an object construction.

This is just a baby step toward NRVO.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103849 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
3c9034cb7ff1d6c1e4ecd1b44c98f553df013c7c 15-May-2010 Douglas Gregor <dgregor@apple.com> Recognize when the named return value optimization applies in a
"return" statement and mark the corresponding CXXConstructExpr as
elidable. Teach CodeGen that eliding a temporary is different from
eliding an object construction.

This is just a baby step toward NRVO.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103849 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
29dc3d78a7e0fcf62607d530f51d93ab8d6d8451 15-May-2010 Daniel Dunbar <daniel@zuster.org> C++/ABI/x86_64: Member pointers should be classified as INTEGER.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103843 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
67d438d39a1cc37c372a2684dc354f58d0169bb1 15-May-2010 Daniel Dunbar <daniel@zuster.org> C++/ABI/x86_64: Member pointers should be classified as INTEGER.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103843 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
7d50fcf85aa1e40b7d8acb367126d9356ff495a8 15-May-2010 Daniel Dunbar <daniel@zuster.org> C++/ABI/i386: Member function pointers should be passed by value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103842 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
7711523d948bbe635f690f5795ef7ea9a3289eb2 15-May-2010 Daniel Dunbar <daniel@zuster.org> C++/ABI/i386: Member function pointers should be passed by value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103842 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
1c8cadfa64eff546b209889c5a6ab5c1e59a7938 14-May-2010 Douglas Gregor <doug.gregor@gmail.com> Emit an lvalue dynamic_cast even if the result is not used. Another
part (or possibly all) of PR7132.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103810 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
69cfeb1036ad22c911b7243dca0eecee72e452d3 14-May-2010 Douglas Gregor <dgregor@apple.com> Emit an lvalue dynamic_cast even if the result is not used. Another
part (or possibly all) of PR7132.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103810 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
ae842e5d4516a377132d31ea8da706a6a9cca805 14-May-2010 Douglas Gregor <doug.gregor@gmail.com> When a failed dynamic_cast<T&> (which is an lvalue) results in a
throw, it should use invoke when needed. The fixes the
Boost.Statechrt failures that motivated PR7132, but there are a few
side issues to tackle as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103803 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
485ee32d93d9f955ef1fb7239a0871c8a68a1867 14-May-2010 Douglas Gregor <dgregor@apple.com> When a failed dynamic_cast<T&> (which is an lvalue) results in a
throw, it should use invoke when needed. The fixes the
Boost.Statechrt failures that motivated PR7132, but there are a few
side issues to tackle as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103803 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
b263e613bd955c131c5b82fc070aa4f1ae49ea51 14-May-2010 Anders Carlsson <andersca@mac.com> Remove an unused function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103793 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenFunction.h
5e37d48a4988cb8ff776009876b7fd1a7504b4eb 14-May-2010 Anders Carlsson <andersca@mac.com> Remove an unused function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103793 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenFunction.h
702f8a53a0e35ddf88e69134da049a8b89b77d94 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
GExprConstant.cpp
odeGenTypes.cpp
odeGenTypes.h
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
GExprConstant.cpp
odeGenTypes.cpp
odeGenTypes.h
f16286bbe896ae55548c018ea0bc177a21cc2696 14-May-2010 Devang Patel <dpatel@apple.com> Fix thinko in yesterday's fix.
Providing linkage name for function static variable confuses gdb, so don't do that.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103779 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0fd3d1f5664149f0a6b62fc847eeabf4d8659360 14-May-2010 Devang Patel <dpatel@apple.com> Fix thinko in yesterday's fix.
Providing linkage name for function static variable confuses gdb, so don't do that.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103779 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3d24cf0a45390e33faf5149e7a6952fbd519f2c5 14-May-2010 Anders Carlsson <andersca@mac.com> Make sure that value-initialized pointers to data members are initialized correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103771 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
3cb18bcefe39756f3b079fa1a62b4c9cbf6a592f 14-May-2010 Anders Carlsson <andersca@mac.com> Make sure that value-initialized pointers to data members are initialized correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103771 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
b4e955916df74b3cdd2dced2a3a1f3dcb91099e4 14-May-2010 Daniel Dunbar <daniel@zuster.org> C++/Darwin/x86: Teach IRgen it can pass reference types in registers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103761 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
a1842d32a1964712e42078e9b389dce9258c6a8c 14-May-2010 Daniel Dunbar <daniel@zuster.org> C++/Darwin/x86: Teach IRgen it can pass reference types in registers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103761 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
7fcf201bd7a98c83913e64eb4c372a51aa16a57c 14-May-2010 Devang Patel <dpatel@apple.com> Fix context in class static variable's debugging information entry.
This fixes bunch of failures in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103745 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
8b90a7804b15b0d203650df123fb236b86da8cc0 14-May-2010 Devang Patel <dpatel@apple.com> Fix context in class static variable's debugging information entry.
This fixes bunch of failures in gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103745 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2e6d7bab7149ab950fb4db8b562d8f20aa527ca8 13-May-2010 Douglas Gregor <doug.gregor@gmail.com> Disable the available_externally optimization for inline virtual
methods for which the key function is guaranteed to be in another
translation unit. Unfortunately, this guarantee isn't the case when
dealing with shared libraries that fail to export these virtual method
definitions.

I'm reopening PR6747 so we can consider this again at a later point in
time.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103741 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
1297fd72b1a3d7985c5c5e3e3a09b8acb2696358 13-May-2010 Douglas Gregor <dgregor@apple.com> Disable the available_externally optimization for inline virtual
methods for which the key function is guaranteed to be in another
translation unit. Unfortunately, this guarantee isn't the case when
dealing with shared libraries that fail to export these virtual method
definitions.

I'm reopening PR6747 so we can consider this again at a later point in
time.



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

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

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

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

Fixes PR7114 and PR6564.



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

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

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

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

Fixes PR7114 and PR6564.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103718 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
GVTables.h
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
f18e37819ef103147b041b6b01a5ea914de0ed2a 13-May-2010 Devang Patel <dpatel@apple.com> If given location is invalid then use current location.
This fixes recent regressions reported by gdb testsuite.
Tighter verification of debug info generated by FE found these regressions.

Refactor code to extract line number and column number from SourceLocation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103678 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
8ab870d34f02921e117e61de9ef7e78548635655 13-May-2010 Devang Patel <dpatel@apple.com> If given location is invalid then use current location.
This fixes recent regressions reported by gdb testsuite.
Tighter verification of debug info generated by FE found these regressions.

Refactor code to extract line number and column number from SourceLocation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103678 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
537dd85b1e1a7533d5d0439f9441708c31df50b7 12-May-2010 Devang Patel <dpatel@apple.com> Use end location of DeclStmt to mark stop point.
This is meaningful for blocks. This patch fixes bunch of test failures in gdb testsuite.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103533 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
60e4fd95ed8c1f99697f4d9f73d07717b6e21048 12-May-2010 Devang Patel <dpatel@apple.com> Use end location of DeclStmt to mark stop point.
This is meaningful for blocks. This patch fixes bunch of test failures in gdb testsuite.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103533 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
ab1f1819386bd718899582eb6426b2619b11e2cf 11-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Merged Elaborated and QualifiedName types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103517 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GObjCMac.cpp
465d41b92b2c862f3062c412a0538db65c6a2661 11-May-2010 Abramo Bagnara <abramo.bagnara@gmail.com> Merged Elaborated and QualifiedName types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103517 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GObjCMac.cpp
3d57259f4bbcd25629688607128c596195dd46cd 11-May-2010 Daniel Dunbar <daniel@zuster.org> IRgen/i386/C++: Fix isSingleElementStruct computation for C++ record decls.
- Fixes PR7098.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103514 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
9430d5a61598c47d827e1cd05f7cf3f110eeec9e 11-May-2010 Daniel Dunbar <daniel@zuster.org> IRgen/i386/C++: Fix isSingleElementStruct computation for C++ record decls.
- Fixes PR7098.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103514 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
b4274db8bf8710d7d5a8a575883578425fc721a0 11-May-2010 Douglas Gregor <doug.gregor@gmail.com> It's bad form to create VarDecl's without DeclContexts

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103484 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
ba55ec29033efba015878744dc5e1946a47a795a 11-May-2010 Douglas Gregor <dgregor@apple.com> It's bad form to create VarDecl's without DeclContexts

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103484 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
80e57984001dfcf4be034966cb8cbab0062a753c 11-May-2010 Fariborz Jahanian <fjahanian@apple.com> Minor refactoring of my last patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103475 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
84c580f6f387523684d56f60c84ec866dca63035 11-May-2010 Fariborz Jahanian <fjahanian@apple.com> Minor refactoring of my last patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103475 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
0afc8f51c9ffc5a83969c53e7dc8152add687f36 11-May-2010 Devang Patel <dpatel@apple.com> Initialize Column.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103448 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f8e10a5d408b59946ce66edbaba251f0c6f16d60 11-May-2010 Devang Patel <dpatel@apple.com> Initialize Column.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103448 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
94cf55e9792b2329ecdfe24d25fce4b77c63b403 11-May-2010 Fariborz Jahanian <fjahanian@apple.com> Objective-C++ Code gen. Handle code gen. for property
reference dot-syntax notation in a varierty of cases.
Fixes radar 7964490.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103440 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprCXX.cpp
b3ebe946d3bf1e06d3ccbecd11cc16c75b128342 11-May-2010 Fariborz Jahanian <fjahanian@apple.com> Objective-C++ Code gen. Handle code gen. for property
reference dot-syntax notation in a varierty of cases.
Fixes radar 7964490.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103440 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprCXX.cpp
a8dcd4cc28817c2042324eb47b60e3c6c7da7990 10-May-2010 Devang Patel <dpatel@apple.com> If variable location is invalid then use current location.
This fixes radar 7959934.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103408 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
258cf2766859f706bcd231a48593fbb6a1a1d0fe 10-May-2010 Devang Patel <dpatel@apple.com> If variable location is invalid then use current location.
This fixes radar 7959934.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103408 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
959aafa580d2193aa08a913d3614fd921fa7fc8b 09-May-2010 David Chisnall <csdavec@swan.ac.uk> Tweaked selector mangling again (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103368 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
22b8827d340d2993639c2ec53e9d2b4e4d876beb 09-May-2010 David Chisnall <csdavec@swan.ac.uk> Tweaked selector mangling again (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103368 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
7e33a9a586c8f3ea313488ce54901e0cd11e5150 08-May-2010 David Chisnall <csdavec@swan.ac.uk> Fixed linkage problem from last commit (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103355 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
20fba8ad3fda19bd23d67c069f39080320d46fd5 08-May-2010 David Chisnall <csdavec@swan.ac.uk> Fixed linkage problem from last commit (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103355 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
7a672670bde9e95fbc270b02041c7fd81eec7b28 08-May-2010 David Chisnall <csdavec@swan.ac.uk> Tweaked selector generation (GNU runtime). Removed the use of GlobalAliases in the generated bitcode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103353 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
87935a8d5c0eeda8ad62815f4fc815ad25c7cd8e 08-May-2010 David Chisnall <csdavec@swan.ac.uk> Tweaked selector generation (GNU runtime). Removed the use of GlobalAliases in the generated bitcode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103353 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
7010f571f199432fe61877f2b60670ebd818ab60 08-May-2010 Devang Patel <dpatel@apple.com> If there is not any debug info for type then do not emit debug info for this variable.
A recent change to tightly verify debug info prepared by FE caught this.
This fixes unittest build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103320 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f4e54a2ddf50d81cb761be12ec1381a9f77a9ea9 08-May-2010 Devang Patel <dpatel@apple.com> If there is not any debug info for type then do not emit debug info for this variable.
A recent change to tightly verify debug info prepared by FE caught this.
This fixes unittest build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103320 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
30fc80c3a371bfc2f3902d1f3e8ea05829890957 07-May-2010 Fariborz Jahanian <fjahanian@apple.com> Minor mod. to my last patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103280 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
100b3b915335834715afc81a3911b77668e215b2 07-May-2010 Fariborz Jahanian <fjahanian@apple.com> Minor mod. to my last patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103280 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
b1194459f451af9f27ed4742c519cde5a00a753b 07-May-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a Code gen crash trying to use a dot-syntax for
a property of a c++ class object (radar 7957369).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103279 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
bbb5224710ded82014b0be9ba8651da312613d02 07-May-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a Code gen crash trying to use a dot-syntax for
a property of a c++ class object (radar 7957369).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103279 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
0c45347a047c375b84e529cde2dd1115a041de10 07-May-2010 Devang Patel <dpatel@apple.com> Avoid use of DIDescriptor::getNode(). Use overloaded operators instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103273 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ab699798f72225f1735b60b35a7db7c8022c50c6 07-May-2010 Devang Patel <dpatel@apple.com> Avoid use of DIDescriptor::getNode(). Use overloaded operators instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103273 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0fee7ccdc5f831011958ac2e149599015b5c2b0f 07-May-2010 Douglas Gregor <doug.gregor@gmail.com> Do not give implicitly-defined virtual members functions
available_externally linkage, since they may not have been given a
strong definition in another translation unit. Without this patch, the
following test case fails to link with a GCC-compiled libstdc++:

#include <sstream>
int main() { std::basic_stringbuf<char> bs; }

Fixes the last problem with the Boost.IO library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103208 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b0769101ac05792ccc539bc7359b1927b3fd4aca 07-May-2010 Douglas Gregor <dgregor@apple.com> Do not give implicitly-defined virtual members functions
available_externally linkage, since they may not have been given a
strong definition in another translation unit. Without this patch, the
following test case fails to link with a GCC-compiled libstdc++:

#include <sstream>
int main() { std::basic_stringbuf<char> bs; }

Fixes the last problem with the Boost.IO library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103208 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5bb360fad954b6f4368f36695aa3ab0c4206c17a 07-May-2010 Douglas Gregor <doug.gregor@gmail.com> Fix typo in comment; 80 col violation

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103204 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
07aa106c349cbfd480f97e055afe09c9560f9fc6 07-May-2010 Douglas Gregor <doug.gregor@gmail.com> The global variable for the VTT might not have external linkage; allow
us to find local variables, too. Fixes the last remaining
Boost.Rational failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103203 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
f4aac11a5e49752b7f603e6ff2c6bbc1e044eb24 07-May-2010 Douglas Gregor <dgregor@apple.com> The global variable for the VTT might not have external linkage; allow
us to find local variables, too. Fixes the last remaining
Boost.Rational failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103203 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
8cfb4bd75d435caa3920230d997f92fa0493579c 06-May-2010 Fariborz Jahanian <fjahanian@apple.com> Code Gen support for Getter/Setter synthesis of
C++ object properties. (still radar 7468090).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103182 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
97a73cd8e2b81f5aed9f59e07e7787e3fd3b8d00 06-May-2010 Fariborz Jahanian <fjahanian@apple.com> Code Gen support for Getter/Setter synthesis of
C++ object properties. (still radar 7468090).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103182 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
daf74df42de0626163bfd830403d02734270e18e 06-May-2010 Chris Lattner <sabre@nondot.org> simplify EmitAggMemberInitializer a bit and make it work in 32-bit mode,
fixing PR7063.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103171 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
985f73960ac76842da4b10c30ca87a282ff9aa31 06-May-2010 Chris Lattner <sabre@nondot.org> simplify EmitAggMemberInitializer a bit and make it work in 32-bit mode,
fixing PR7063.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103171 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
2bb564783eca649c79bf52a53d37f6e97bcc6c8d 06-May-2010 Chris Lattner <sabre@nondot.org> add todos for isinf_sign and isnormal, which I don't intend to implement
in the near future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103169 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
58ae5b4b1e2fc02b95d6650af5755a59639aa153 06-May-2010 Chris Lattner <sabre@nondot.org> add todos for isinf_sign and isnormal, which I don't intend to implement
in the near future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103169 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
86e465b058591c3fe4bceb7c7607db4a971ab0ec 06-May-2010 Chris Lattner <sabre@nondot.org> implement codegen support for __builtin_isfinite, part of PR6083


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103168 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
ed074150c9a775c5e2e1c4ececeba18ba880ce7d 06-May-2010 Chris Lattner <sabre@nondot.org> implement codegen support for __builtin_isfinite, part of PR6083


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103168 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
1946bd05b865eb1d74fee8bd7ced48551fd34e5a 06-May-2010 Chris Lattner <sabre@nondot.org> implement part of PR6083: codegen support for isinf. Like isnan,
this is generating correct but suboptimal (extra extend to double)
code for the float case. Will investigate next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103166 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
420b11850d3f4557421f43f519b59d528329c668 06-May-2010 Chris Lattner <sabre@nondot.org> implement part of PR6083: codegen support for isinf. Like isnan,
this is generating correct but suboptimal (extra extend to double)
code for the float case. Will investigate next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103166 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
e850e9531307c87fc19b1cab340d0f5379e1bedb 06-May-2010 Chandler Carruth <chandlerc@gmail.com> Clean up the {} and else placement. This fixes an ambiguous else as well as
picking a more consistent pattern.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103142 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
bc397cf90355f17c974b0bdf3960e8fb38caf5d6 06-May-2010 Chandler Carruth <chandlerc@gmail.com> Clean up the {} and else placement. This fixes an ambiguous else as well as
picking a more consistent pattern.


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



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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103131 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
10250b5323c9c3d19a405b6ff110092038e9a6f6 05-May-2010 Fariborz Jahanian <fjahanian@apple.com> This patch deals with Sema Part of Setter/Getter synthesis
of properties which are of C++ objects. Code Gen to follow
(Radar 7468090).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103123 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
17cb326cb62a59f53d92236394af40eaae4eddbd 05-May-2010 Fariborz Jahanian <fjahanian@apple.com> This patch deals with Sema Part of Setter/Getter synthesis
of properties which are of C++ objects. Code Gen to follow
(Radar 7468090).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103123 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
126a065503be1e42f8045e0917393b2346c7e29e 05-May-2010 Douglas Gregor <doug.gregor@gmail.com> When we emit a non-constant initializer for a global variable of
reference type, make sure that the initializer we build is the
of the appropriate type for the *reference*, not for the thing that it
refers to. Fixes PR7050.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103115 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
c446d1816f46a4b6d2337102dfc001f55fc18211 05-May-2010 Douglas Gregor <dgregor@apple.com> When we emit a non-constant initializer for a global variable of
reference type, make sure that the initializer we build is the
of the appropriate type for the *reference*, not for the thing that it
refers to. Fixes PR7050.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103115 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
34f024208254acb4c1708e4489722d677a8aed26 05-May-2010 Douglas Gregor <doug.gregor@gmail.com> For thread-safe static initialization of local statics with
destructors, place the __cxa_atexit call after the __cxa_guard_release
call, mimicking GCC/LLVM-GCC behavior. Noticed while debugging
something related.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103088 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
cc6a44b8bdecd9fc70211146e8ba3853b1fac784 05-May-2010 Douglas Gregor <dgregor@apple.com> For thread-safe static initialization of local statics with
destructors, place the __cxa_atexit call after the __cxa_guard_release
call, mimicking GCC/LLVM-GCC behavior. Noticed while debugging
something related.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103088 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
ef2008e92d1b320db947c63bc9e795d2ae39e2a2 05-May-2010 Sean Hunt <rideau3@gmail.com> Reapplying patch to change StmtNodes.def to StmtNodes.td, this time
with no whitespace. This will allow statements to be referred to in
attribute TableGen files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103087 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
4bfe1968410ea8ffe3b4f629addd7c4bcf484765 05-May-2010 Sean Hunt <rideau3@gmail.com> Reapplying patch to change StmtNodes.def to StmtNodes.td, this time
with no whitespace. This will allow statements to be referred to in
attribute TableGen files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103087 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
fa2ce27369f457c7a0c5ae5f682a793316cc587d 05-May-2010 Sean Hunt <rideau3@gmail.com> Revert r103072; I accidentally ended up deleting a bunch of trailing
whitespace which makes this patch unreadable. Will recommit without the
whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103086 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
c302113179a1c2b1254224ea9b6f5316ceeb375c 05-May-2010 Sean Hunt <rideau3@gmail.com> Revert r103072; I accidentally ended up deleting a bunch of trailing
whitespace which makes this patch unreadable. Will recommit without the
whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103086 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
d131290ee2068b996311073e68d5aba798632cb7 05-May-2010 Douglas Gregor <doug.gregor@gmail.com> Reimplement code generation for copying fields in the
implicitly-generated copy constructor. Previously, Sema would perform
some checking and instantiation to determine which copy constructors,
etc., would be called, then CodeGen would attempt to figure out which
copy constructor to call... but would get it wrong, or poke at an
uninstantiated default argument, or fail in other ways.

The new scheme is similar to what we now do for the implicit
copy-assignment operator, where Sema performs all of the semantic
analysis and builds specific ASTs that look similar to the ASTs we'd
get from explicitly writing the copy constructor, so that CodeGen need
only do a direct translation.

However, it's not quite that simple because one cannot explicit write
elementwise copy-construction of an array. So, I've extended
CXXBaseOrMemberInitializer to contain a list of indexing variables
used to copy-construct the elements. For example, if we have:

struct A { A(const A&); };

struct B {
A array[2][3];
};

then we generate an implicit copy assignment operator for B that looks
something like this:

B::B(const B &other) : array[i0][i1](other.array[i0][i1]) { }

CodeGen will loop over the invented variables i0 and i1 to visit all
elements in the array, so that each element in the destination array
will be copy-constructed from the corresponding element in the source
array. Of course, if we're dealing with arrays of scalars or class
types with trivial copy-assignment operators, we just generate a
memcpy rather than a loop.

Fixes PR6928, PR5989, and PR6887. Boost.Regex now compiles and passes
all of its regression tests.

Conspicuously missing from this patch is handling for the exceptional
case, where we need to destruct those objects that we have
constructed. I'll address that case separately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103079 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
fb8cc253420e93cee33d29df5a2bdae6aaf16e39 05-May-2010 Douglas Gregor <dgregor@apple.com> Reimplement code generation for copying fields in the
implicitly-generated copy constructor. Previously, Sema would perform
some checking and instantiation to determine which copy constructors,
etc., would be called, then CodeGen would attempt to figure out which
copy constructor to call... but would get it wrong, or poke at an
uninstantiated default argument, or fail in other ways.

The new scheme is similar to what we now do for the implicit
copy-assignment operator, where Sema performs all of the semantic
analysis and builds specific ASTs that look similar to the ASTs we'd
get from explicitly writing the copy constructor, so that CodeGen need
only do a direct translation.

However, it's not quite that simple because one cannot explicit write
elementwise copy-construction of an array. So, I've extended
CXXBaseOrMemberInitializer to contain a list of indexing variables
used to copy-construct the elements. For example, if we have:

struct A { A(const A&); };

struct B {
A array[2][3];
};

then we generate an implicit copy assignment operator for B that looks
something like this:

B::B(const B &other) : array[i0][i1](other.array[i0][i1]) { }

CodeGen will loop over the invented variables i0 and i1 to visit all
elements in the array, so that each element in the destination array
will be copy-constructed from the corresponding element in the source
array. Of course, if we're dealing with arrays of scalars or class
types with trivial copy-assignment operators, we just generate a
memcpy rather than a loop.

Fixes PR6928, PR5989, and PR6887. Boost.Regex now compiles and passes
all of its regression tests.

Conspicuously missing from this patch is handling for the exceptional
case, where we need to destruct those objects that we have
constructed. I'll address that case separately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103079 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
b6f25efc3c393c7f890b194ea4106d09d273fe18 05-May-2010 Anders Carlsson <andersca@mac.com> Use a more appropriate LLVM type for the vtable pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103078 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
68e3013ade8a219625b636bb8c1dcec2ba6fb685 05-May-2010 Anders Carlsson <andersca@mac.com> Use a more appropriate LLVM type for the vtable pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103078 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
468e42e9ca5531889f8f1aa4fa467d277c701638 05-May-2010 Douglas Gregor <doug.gregor@gmail.com> Unbreak CMake build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103077 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
71b1d0e5f07de274af2b3c48955af66b1b7f0403 05-May-2010 Douglas Gregor <dgregor@apple.com> Unbreak CMake build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103077 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
c418cd479d17c9f5ded9cb0f54b07d6bfe12ac73 05-May-2010 Sean Hunt <rideau3@gmail.com> Change StmtNodes.def to StmtNodes.td in anticipation of a rewrite of attributes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103072 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
9d90d62e1661720d9cf533290b4227c4fde780a4 05-May-2010 Sean Hunt <rideau3@gmail.com> Change StmtNodes.def to StmtNodes.td in anticipation of a rewrite of attributes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103072 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
396b4afdad9cadf40d745f0be8156c2e80b8bc9d 04-May-2010 John McCall <rjmccall@apple.com> Emit the globals, metadata, etc. associated with static variables even when
they're unreachable. This matters because (if they're POD, or if this is C)
the scope containing the variable might be reachable even if the variable
isn't. Fixes PR7044.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103052 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GDeclCXX.cpp
fe67f3bfc09caa66ab1398c03418c35bea77caf4 04-May-2010 John McCall <rjmccall@apple.com> Emit the globals, metadata, etc. associated with static variables even when
they're unreachable. This matters because (if they're POD, or if this is C)
the scope containing the variable might be reachable even if the variable
isn't. Fixes PR7044.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103052 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GDeclCXX.cpp
84d76a9146ab30be9bca8908209e6bf13217e1c8 04-May-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a code gen. crash when ivar object has trivial constructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103028 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
8b688ed1d56065458d9e22f813577e0dff5c488e 04-May-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a code gen. crash when ivar object has trivial constructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103028 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
070700a777f857c65cec18d01405d2d240ba1914 04-May-2010 Douglas Gregor <doug.gregor@gmail.com> When instantiating a function that was declared via a typedef, e.g.,

typedef int functype(int, int);
functype func;

also instantiate the synthesized function parameters for the resulting
function declaration.

With this change, Boost.Wave builds and passes all of its regression
tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103025 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5f970eee81372dfc6a1457c3d6d052af04e32a38 04-May-2010 Douglas Gregor <dgregor@apple.com> When instantiating a function that was declared via a typedef, e.g.,

typedef int functype(int, int);
functype func;

also instantiate the synthesized function parameters for the resulting
function declaration.

With this change, Boost.Wave builds and passes all of its regression
tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103025 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
50802ac72eaba667d8aa96b0cce80b3e2f689d9d 04-May-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a code gen crash when block is a reference type, etc.
(radar 7495203).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103022 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
d33ded52b06f7be00b95c1ce546924b4468adf9a 04-May-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a code gen crash when block is a reference type, etc.
(radar 7495203).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103022 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
bdc90c31939e0a500494bb7a3b70e4938281fd7e 04-May-2010 John McCall <rjmccall@apple.com> When inheriting a default argument expression, inherit the full expression,
not just the inner expression. This is important if the expression has any
temporaries. Fixes PR 7028.

Basically a symptom of really tragic method names.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102998 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
3d6c1782c4fc2ed3e6a924c15042edb1f56fee36 04-May-2010 John McCall <rjmccall@apple.com> When inheriting a default argument expression, inherit the full expression,
not just the inner expression. This is important if the expression has any
temporaries. Fixes PR 7028.

Basically a symptom of really tragic method names.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102998 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
94dcc3386e6596f543c234b848826017e7f8542e 04-May-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a Code Gen. Crash when calling destructor on a __block
variabe. Blocks and their construction/destruction is
wip though.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102985 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
3c347f25b507740c3e41de70819f8fbbee4cde89 04-May-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a Code Gen. Crash when calling destructor on a __block
variabe. Blocks and their construction/destruction is
wip though.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102985 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
addd2948276d823529d86a4c504afca6fa06e75f 03-May-2010 John McCall <rjmccall@apple.com> Just bail out immediately when emitting an unreachable function-local static
variable. Surprisingly, this does seem to be the right way to solve this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102961 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
e65ce966b6865b686b0a9ba4fc72dfadf3e83701 03-May-2010 John McCall <rjmccall@apple.com> Just bail out immediately when emitting an unreachable function-local static
variable. Surprisingly, this does seem to be the right way to solve this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102961 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
7d21413c3b3fc22492ec418362618ac195c01c6d 03-May-2010 Douglas Gregor <doug.gregor@gmail.com> If we're generating code to create a pointer-to-member function
aggregate and the result of the aggregate is unused, bail out
early. Fixes PR7027.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102942 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
e174bd05ca9991e705f51afcfab27933b537dc63 03-May-2010 Douglas Gregor <dgregor@apple.com> If we're generating code to create a pointer-to-member function
aggregate and the result of the aggregate is unused, bail out
early. Fixes PR7027.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102942 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
302543cd37b3fb517e2c6fe4fd85b4a155b1d977 03-May-2010 Anders Carlsson <andersca@mac.com> When computing the address of a virtual member function pointer, use the pointer width instead of hardcoding for 64-bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102921 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
32897fd3bd84e96d4bfa28aca0c7a907776fb855 03-May-2010 Anders Carlsson <andersca@mac.com> When computing the address of a virtual member function pointer, use the pointer width instead of hardcoding for 64-bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102921 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
a2f425a9a86b530ed0414d0482f076a8d224409b 03-May-2010 Anders Carlsson <andersca@mac.com> Don't build an aggregate constructor loop when the constructor is trivial.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102912 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
e99bdb6969ec16d2829ccdf62b04a8c8eda8b215 03-May-2010 Anders Carlsson <andersca@mac.com> Don't build an aggregate constructor loop when the constructor is trivial.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102912 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
a543a960d8511f0dfe0f75f562786ae4387f0b81 03-May-2010 Anders Carlsson <andersca@mac.com> Don't copy or initialize empty classes. Fixes PR7012.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102891 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenFunction.cpp
0d7c583a4b4d0f57c6b69c66fd73babec4ef3799 03-May-2010 Anders Carlsson <andersca@mac.com> Don't copy or initialize empty classes. Fixes PR7012.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102891 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenFunction.cpp
92abbf909d4d511573b90b1f3dcc7c47f2685b0f 03-May-2010 Anders Carlsson <andersca@mac.com> Store the entire base subobject in SubVTTIndices.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102890 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVTables.h
3855a07db05677883f4a9534e324da22ed1c6f9a 03-May-2010 Anders Carlsson <andersca@mac.com> Store the entire base subobject in SubVTTIndices.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102890 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVTables.h
6b35b56b641c75fe33966d4f6829ff934e73da62 03-May-2010 Anders Carlsson <andersca@mac.com> Remove OldGetAddressOfBaseClass - bye bye ambiguities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102889 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
43373963ac204ff491ec8851e706eb7423f951ce 03-May-2010 Anders Carlsson <andersca@mac.com> Remove OldGetAddressOfBaseClass - bye bye ambiguities.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102889 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
e8c1e3d279d48650c129b4151a835994c177dad1 03-May-2010 Anders Carlsson <andersca@mac.com> Get rid of the last caller of OldGetAddressOfBaseClass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102888 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
8246cc7f85a9b307900e9c05e7e1bb8a40b2b7a5 03-May-2010 Anders Carlsson <andersca@mac.com> Get rid of the last caller of OldGetAddressOfBaseClass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102888 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
f6a21652e971e5d9208e6f4a853437ef40a69236 03-May-2010 Anders Carlsson <andersca@mac.com> More work towards getting rid of OldGetAddressOfBaseClass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102887 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
4235840554aaed11efd479df9e622dc82ab77e6d 03-May-2010 Anders Carlsson <andersca@mac.com> More work towards getting rid of OldGetAddressOfBaseClass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102887 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
f6676e7f16961072c7aa53a9170ad223a9ea493b 03-May-2010 Anders Carlsson <andersca@mac.com> Get rid of a call to GetAddressOfDirectBaseInCompleteClass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102886 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
77fae58f6dedd85c2506100e1754a2233a9c5e3a 03-May-2010 Anders Carlsson <andersca@mac.com> Get rid of a call to GetAddressOfDirectBaseInCompleteClass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102886 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
fa2e212c08520f591d10143f95685133cb74a870 03-May-2010 Anders Carlsson <andersca@mac.com> Have getSubVTTIndex take a BaseSubobject instead of just a base.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102885 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GVTT.cpp
GVTables.h
c11bb2191088b9e74bec5007a4e05c78b41a8f64 03-May-2010 Anders Carlsson <andersca@mac.com> Have getSubVTTIndex take a BaseSubobject instead of just a base.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102885 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GVTT.cpp
GVTables.h
0ae98e1152bd6c688c532ae6410496523d0aab40 03-May-2010 Anders Carlsson <andersca@mac.com> Pass ForVirtualBase all the way to GetVTTParameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102883 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
314e622d20e67ad2f9bd3e3d4473fb23bec93132 03-May-2010 Anders Carlsson <andersca@mac.com> Pass ForVirtualBase all the way to GetVTTParameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102883 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
c52e5c7a20a823741fb2e0a7e3c7a1a14727c8b8 03-May-2010 Anders Carlsson <andersca@mac.com> Add the same 'ForVirtualBase' parameter to EmitCXXDestructorCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102882 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDecl.cpp
GExpr.cpp
GExprCXX.cpp
GObjC.cpp
GTemporaries.cpp
odeGenFunction.h
8e6404ca28d6bbb76e97ea2a53a74816c2a74665 03-May-2010 Anders Carlsson <andersca@mac.com> Add the same 'ForVirtualBase' parameter to EmitCXXDestructorCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102882 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDecl.cpp
GExpr.cpp
GExprCXX.cpp
GObjC.cpp
GTemporaries.cpp
odeGenFunction.h
d3c6cbe2e0162ea8701747a594dc59ea7e2b2db2 03-May-2010 Anders Carlsson <andersca@mac.com> Revert my last change and add a 'ForVirtualBase' parameter to EmitCXXConstructorCall instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102881 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
odeGenFunction.h
155ed4a23366f4514befb1c9f5f89d16f8b8b6db 03-May-2010 Anders Carlsson <andersca@mac.com> Revert my last change and add a 'ForVirtualBase' parameter to EmitCXXConstructorCall instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102881 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
odeGenFunction.h
f7b163b082977c92c96e8c584fd50b4c4054e2d6 03-May-2010 Anders Carlsson <andersca@mac.com> Pass the construction kind down to EmitCXXConstructorCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102880 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
odeGenFunction.h
24eb78e38aba55c507bc3c05c37035a9ab2defa7 03-May-2010 Anders Carlsson <andersca@mac.com> Pass the construction kind down to EmitCXXConstructorCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102880 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
odeGenFunction.h
d30f9450d0785265882f0a787ddd860256f2a3ca 02-May-2010 Anders Carlsson <andersca@mac.com> Remove another unused function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102871 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
82929316ccfcc1a7674f12195f93b41c91a28bd4 02-May-2010 Anders Carlsson <andersca@mac.com> Remove another unused function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102871 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
bf45b64ed0209a1598fe456d06ef75c6df719f57 02-May-2010 Anders Carlsson <andersca@mac.com> Remove an unused function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102870 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
05dd1f6292bd39cbd75ef3dd641b5fc66b7c22ca 02-May-2010 Anders Carlsson <andersca@mac.com> Remove an unused function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102870 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
772ba81b328033c37fe52f7470001b490b1a76ef 02-May-2010 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: Shrink RValue. 4 words -> 2 words.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102863 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
81bf3b35667cb2a241b5157784f28ee9bd3928b2 02-May-2010 Benjamin Kramer <benny.kra@googlemail.com> CodeGen: Shrink RValue. 4 words -> 2 words.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102863 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
f8048370f14558d91c3df9daa0a53f582ed14e0c 02-May-2010 David Chisnall <csdavec@swan.ac.uk> As per Chris' request, return the Instruction from EmitCall and add the metadata in the caller.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102862 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GObjCGNU.cpp
odeGenFunction.h
4b02afcb45cd1a384de7d45f440a8be091dd500b 02-May-2010 David Chisnall <csdavec@swan.ac.uk> As per Chris' request, return the Instruction from EmitCall and add the metadata in the caller.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102862 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GObjCGNU.cpp
odeGenFunction.h
82ffffd44d4de0ccb064b855cbcbe7916a693393 01-May-2010 Douglas Gregor <doug.gregor@gmail.com> Complete reimplementation of the synthesis for implicitly-defined copy
assignment operators.

Previously, Sema provided type-checking and template instantiation for
copy assignment operators, then CodeGen would synthesize the actual
body of the copy constructor. Unfortunately, the two were not in sync,
and CodeGen might pick a copy-assignment operator that is different
from what Sema chose, leading to strange failures, e.g., link-time
failures when CodeGen called a copy-assignment operator that was not
instantiation, run-time failures when copy-assignment operators were
overloaded for const/non-const references and the wrong one was
picked, and run-time failures when by-value copy-assignment operators
did not have their arguments properly copy-initialized.

This implementation synthesizes the implicitly-defined copy assignment
operator bodies in Sema, so that the resulting ASTs encode exactly
what CodeGen needs to do; there is no longer any special code in
CodeGen to synthesize copy-assignment operators. The synthesis of the
body is relatively simple, and we generate one of three different
kinds of copy statements for each base or member:

- For a class subobject, call the appropriate copy-assignment
operator, after overload resolution has determined what that is.
- For an array of scalar types or an array of class types that have
trivial copy assignment operators, construct a call to
__builtin_memcpy.
- For an array of class types with non-trivial copy assignment
operators, synthesize a (possibly nested!) for loop whose inner
statement calls the copy constructor.
- For a scalar type, use built-in assignment.

This patch fixes at least a few tests cases in Boost.Spirit that were
failing because CodeGen picked the wrong copy-assignment operator
(leading to link-time failures), and I suspect a number of undiagnosed
problems will also go away with this change.

Some of the diagnostics we had previously have gotten worse with this
change, since we're going through generic code for our
type-checking. I will improve this in a subsequent patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102853 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.cpp
odeGenFunction.h
06a9f3680d22529a2fcf20c52d71cf221d99d910 01-May-2010 Douglas Gregor <dgregor@apple.com> Complete reimplementation of the synthesis for implicitly-defined copy
assignment operators.

Previously, Sema provided type-checking and template instantiation for
copy assignment operators, then CodeGen would synthesize the actual
body of the copy constructor. Unfortunately, the two were not in sync,
and CodeGen might pick a copy-assignment operator that is different
from what Sema chose, leading to strange failures, e.g., link-time
failures when CodeGen called a copy-assignment operator that was not
instantiation, run-time failures when copy-assignment operators were
overloaded for const/non-const references and the wrong one was
picked, and run-time failures when by-value copy-assignment operators
did not have their arguments properly copy-initialized.

This implementation synthesizes the implicitly-defined copy assignment
operator bodies in Sema, so that the resulting ASTs encode exactly
what CodeGen needs to do; there is no longer any special code in
CodeGen to synthesize copy-assignment operators. The synthesis of the
body is relatively simple, and we generate one of three different
kinds of copy statements for each base or member:

- For a class subobject, call the appropriate copy-assignment
operator, after overload resolution has determined what that is.
- For an array of scalar types or an array of class types that have
trivial copy assignment operators, construct a call to
__builtin_memcpy.
- For an array of class types with non-trivial copy assignment
operators, synthesize a (possibly nested!) for loop whose inner
statement calls the copy constructor.
- For a scalar type, use built-in assignment.

This patch fixes at least a few tests cases in Boost.Spirit that were
failing because CodeGen picked the wrong copy-assignment operator
(leading to link-time failures), and I suspect a number of undiagnosed
problems will also go away with this change.

Some of the diagnostics we had previously have gotten worse with this
change, since we're going through generic code for our
type-checking. I will improve this in a subsequent patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102853 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.cpp
odeGenFunction.h
6329085d7e4757e8b5b194cf5d58fdec03265f22 01-May-2010 Anders Carlsson <andersca@mac.com> Simplify EmitCopyCtorCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102849 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
bfe7e91c1297f6f8c033790f64e59f0a1c9f6b3e 01-May-2010 Anders Carlsson <andersca@mac.com> Simplify EmitCopyCtorCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102849 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
90c334138e63bebddb30752cfa18107fefbb76f8 01-May-2010 Anders Carlsson <andersca@mac.com> Simplify EmitClassAggrMemberwiseCopy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102848 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
odeGenFunction.h
43db20e9550ecf2b215ddb76eaff82a3b466de96 01-May-2010 Anders Carlsson <andersca@mac.com> Simplify EmitClassAggrMemberwiseCopy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102848 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
odeGenFunction.h
c0e295fb42ad66b188a2f7ab69ac732b25e98b7f 01-May-2010 Anders Carlsson <andersca@mac.com> Clean up EmitClassMemberwiseCopy further.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102846 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
f62756f45b5254ba7faa4e5cd848b4ad08c18824 01-May-2010 Anders Carlsson <andersca@mac.com> Clean up EmitClassMemberwiseCopy further.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102846 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
6ec2b875b8da780ff6bff012c9a4c579d010a3c4 01-May-2010 Anders Carlsson <andersca@mac.com> Get rid of a parameter from EmitClassMemberwiseCopy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102845 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
1d1d1185b46173107f5292a16e3a6ca4d60f7486 01-May-2010 Anders Carlsson <andersca@mac.com> Get rid of a parameter from EmitClassMemberwiseCopy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102845 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
10fe8b04cce65887181fd8a395e73e2b155184b5 01-May-2010 Anders Carlsson <andersca@mac.com> When defining implicit copy constructors, use SetBaseOrMemberInitializers to initialize the bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102842 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
59b7f1538d9d4c4f7c3932e3e3f95d2cb0fca7e4 01-May-2010 Anders Carlsson <andersca@mac.com> When defining implicit copy constructors, use SetBaseOrMemberInitializers to initialize the bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102842 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
f7b37df4e00dd1b4018762e4d0ffaa06b1819ac3 01-May-2010 David Chisnall <csdavec@swan.ac.uk> Attach message send metadata to the lookup as well as to the call (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102839 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
63e742bed90aab2e8e778e48fbbd4bce766b4373 01-May-2010 David Chisnall <csdavec@swan.ac.uk> Attach message send metadata to the lookup as well as to the call (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102839 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
53ff2bed257443ee08afd8444a67abfa114b9d59 01-May-2010 David Chisnall <csdavec@swan.ac.uk> Make super message lookups cacheable (GNUstep Runtime)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102837 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
db831948f32217ece8410099f9982ef900c3b3c3 01-May-2010 David Chisnall <csdavec@swan.ac.uk> Make super message lookups cacheable (GNUstep Runtime)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102837 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
f743c5bf9508a4eb16521ceb68d2164d43f5671f 01-May-2010 David Chisnall <csdavec@swan.ac.uk> Tweaked EmitCall() to permit the caller to provide some metadata to attach to the call site.

Used this in CGObjCGNU to attach metadata about message sends to permit speculative inlining.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102833 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GObjCGNU.cpp
odeGenFunction.h
dd5c98f709837e5dd3da08d44d1ce407975df2cf 01-May-2010 David Chisnall <csdavec@swan.ac.uk> Tweaked EmitCall() to permit the caller to provide some metadata to attach to the call site.

Used this in CGObjCGNU to attach metadata about message sends to permit speculative inlining.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102833 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GObjCGNU.cpp
odeGenFunction.h
e39df17b8abbf6685c8b8a284613f3c5a6204320 30-Apr-2010 John McCall <rjmccall@apple.com> When synthesizing Objective C records, give the synthetic fields public
access. Fixes an assertion.

Fixes rdar://problem/7927811. Too lazy to reduce a test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102776 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
2888b65aae768f54062505330df7be230a0510c7 30-Apr-2010 John McCall <rjmccall@apple.com> When synthesizing Objective C records, give the synthetic fields public
access. Fixes an assertion.

Fixes rdar://problem/7927811. Too lazy to reduce a test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102776 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
5499bc807f92a83b69913641d8681c2ff1483da3 30-Apr-2010 Anders Carlsson <andersca@mac.com> Remove an unnecessary parameter from EmitClassCopyAssignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102747 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
106d9ea61c7211b370c5b97a0288652c23da329a 30-Apr-2010 Anders Carlsson <andersca@mac.com> Remove an unnecessary parameter from EmitClassCopyAssignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102747 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
15a1b59146dac818878e86fe1dd97c236f67b493 30-Apr-2010 David Chisnall <csdavec@swan.ac.uk> Fixed incorrect type of alloca (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102711 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
866163bf6c66211a9b4d5ba160ac02de04ce4be6 30-Apr-2010 David Chisnall <csdavec@swan.ac.uk> Fixed incorrect type of alloca (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102711 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
0af43bf7a2d38bff9dbdcf126719c799c5ac710f 30-Apr-2010 John McCall <rjmccall@apple.com> Account for the VTT argument when making an implicit copy constructor for
a class with virtual bases. Just a patch until Sema starts (correctly) doing
most of this analysis.

Fixes PR 6622.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102692 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
c743571e24c864b5930ef1290d71b03ccfde80a1 30-Apr-2010 John McCall <rjmccall@apple.com> Account for the VTT argument when making an implicit copy constructor for
a class with virtual bases. Just a patch until Sema starts (correctly) doing
most of this analysis.

Fixes PR 6622.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102692 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
d8c26aa51bb324204c03309b98366badd3b6c8df 30-Apr-2010 John McCall <rjmccall@apple.com> Fix -fno-rtti -fexceptions by forcing the emission of (non-"builtin") RTTI
when used by the exceptions routines. Fixes PR 6974.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102684 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GRTTI.cpp
odeGenModule.h
9dffe6f51c676c1e423c382c62d1648746e36cd4 30-Apr-2010 John McCall <rjmccall@apple.com> Fix -fno-rtti -fexceptions by forcing the emission of (non-"builtin") RTTI
when used by the exceptions routines. Fixes PR 6974.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102684 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GRTTI.cpp
odeGenModule.h
21933618eb5f117185e61fc93073ee6eec84e9fd 30-Apr-2010 John McCall <rjmccall@apple.com> Teach EHCleanupBlock to deal appropriately with the possibility that there
might not have been an insertion block set at start. Fixes PR6975.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102677 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
891f80ec2fb2d1730b769467d602689e1080845b 30-Apr-2010 John McCall <rjmccall@apple.com> Teach EHCleanupBlock to deal appropriately with the possibility that there
might not have been an insertion block set at start. Fixes PR6975.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102677 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
1205698b74699d89e013c16d0f0289a328fcd9c9 30-Apr-2010 Anders Carlsson <andersca@mac.com> Get the base class addresses before calling EmitClassCopyAssignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102676 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
f406d9c68762163cf817230bca13030e4d10514e 30-Apr-2010 Anders Carlsson <andersca@mac.com> Get the base class addresses before calling EmitClassCopyAssignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102676 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
b8c3e71438db7a885e09ced6384d3cef561bb3bc 30-Apr-2010 Anders Carlsson <andersca@mac.com> Remove an unnecessary argument to EmitClassCopyAssignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102674 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
9ffdd45c56e2f143016f6c78fe2d7ca652c1b57a 30-Apr-2010 Anders Carlsson <andersca@mac.com> Remove an unnecessary argument to EmitClassCopyAssignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102674 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
29e10d362c377bd77178c939472b69b6eaa1291c 29-Apr-2010 Devang Patel <dpatel@apple.com> Use clang::VarDecl name instead of llvm::GlobalVariable name.
llvm::GLobalVariable name may not match user visibile name for function static variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102644 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5d822f06e84196c8bf80641d793d35e8cc7adb0e 29-Apr-2010 Devang Patel <dpatel@apple.com> Use clang::VarDecl name instead of llvm::GlobalVariable name.
llvm::GLobalVariable name may not match user visibile name for function static variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102644 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
fb820dfec133284808cd7e4f00748db094196bad 29-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen/NeXT: Put the synthesized _objc_super, _message_ref_t decls in a valid DeclContext, to satisfy the invariants that should hold on a RecordDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102624 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
daa3ac503e93315ed3546463c13de4856bb80ef7 29-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen/NeXT: Put the synthesized _objc_super, _message_ref_t decls in a valid DeclContext, to satisfy the invariants that should hold on a RecordDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102624 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
198b6e4023cfd154cca1457625ff64789b8b06cf 29-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Support for construct/destruct of ivar array
of c++ objects (NeXt runtime).
radar 7900343.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102546 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
9b4d4fc49f30f1caa35d680702f1921afad81971 29-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Support for construct/destruct of ivar array
of c++ objects (NeXt runtime).
radar 7900343.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102546 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
ce6b353d4b551b98c4282486fd13ef3b3bcf6e31 29-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Completely reimplement __builtin_offsetof, based on a patch by Roberto
Amadini.

This change introduces a new expression node type, OffsetOfExpr, that
describes __builtin_offsetof. Previously, __builtin_offsetof was
implemented using a unary operator whose subexpression involved
various synthesized array-subscript and member-reference expressions,
which was ugly and made it very hard to instantiate as a
template. OffsetOfExpr represents the AST more faithfully, with proper
type source information and a more compact representation.

OffsetOfExpr also has support for dependent __builtin_offsetof
expressions; it can be value-dependent, but will never be
type-dependent (like sizeof or alignof). This commit introduces
template instantiation for __builtin_offsetof as well.

There are two major caveats to this patch:

1) CodeGen cannot handle the case where __builtin_offsetof is not a
constant expression, so it produces an error. So, to avoid
regressing in C, we retain the old UnaryOperator-based
__builtin_offsetof implementation in C while using the shiny new
OffsetOfExpr implementation in C++. The old implementation can go
away once we have proper CodeGen support for this case, which we
expect won't cause much trouble in C++.

2) __builtin_offsetof doesn't work well with non-POD class types,
particularly when the designated field is found within a base
class. I will address this in a subsequent patch.

Fixes PR5880 and a bunch of assertions when building Boost.Python
tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102542 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
8ecdb65716cd7914ffb2eeee993fa9039fcd31e8 29-Apr-2010 Douglas Gregor <dgregor@apple.com> Completely reimplement __builtin_offsetof, based on a patch by Roberto
Amadini.

This change introduces a new expression node type, OffsetOfExpr, that
describes __builtin_offsetof. Previously, __builtin_offsetof was
implemented using a unary operator whose subexpression involved
various synthesized array-subscript and member-reference expressions,
which was ugly and made it very hard to instantiate as a
template. OffsetOfExpr represents the AST more faithfully, with proper
type source information and a more compact representation.

OffsetOfExpr also has support for dependent __builtin_offsetof
expressions; it can be value-dependent, but will never be
type-dependent (like sizeof or alignof). This commit introduces
template instantiation for __builtin_offsetof as well.

There are two major caveats to this patch:

1) CodeGen cannot handle the case where __builtin_offsetof is not a
constant expression, so it produces an error. So, to avoid
regressing in C, we retain the old UnaryOperator-based
__builtin_offsetof implementation in C while using the shiny new
OffsetOfExpr implementation in C++. The old implementation can go
away once we have proper CodeGen support for this case, which we
expect won't cause much trouble in C++.

2) __builtin_offsetof doesn't work well with non-POD class types,
particularly when the designated field is found within a base
class. I will address this in a subsequent patch.

Fixes PR5880 and a bunch of assertions when building Boost.Python
tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102542 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1cd44fa0842434c5b9fb479576bd66a009d7d353 28-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> IRGen for initialization/destruction of
ivar class objects (NeXt runtime).
(radar 7900343).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102533 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
109dfc6ca6652f60c55ed0f2631aebf323d0200d 28-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> IRGen for initialization/destruction of
ivar class objects (NeXt runtime).
(radar 7900343).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102533 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
d4344d001049700fcdf4b2c9ffc1bbb92fac91f9 28-Apr-2010 David Chisnall <csdavec@swan.ac.uk> Changed signature of GenerateMessageSend() function to pass the ObjCInterfaceDecl for class messages and removed the boolean IsClassMessage argument, which wasn't used anywhere.

Emitted some metadata on message sends to allow a later pass to do some speculative inlining of class methods (GNU runtime). Speculative inlining of instance methods requires type feedback to be useful (work in progress), but for class methods it works quite nicely.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102514 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
c6cd5fd3eae71f8841504a396563343cfaaf503e 28-Apr-2010 David Chisnall <csdavec@swan.ac.uk> Changed signature of GenerateMessageSend() function to pass the ObjCInterfaceDecl for class messages and removed the boolean IsClassMessage argument, which wasn't used anywhere.

Emitted some metadata on message sends to allow a later pass to do some speculative inlining of class methods (GNU runtime). Speculative inlining of instance methods requires type feedback to be useful (work in progress), but for class methods it works quite nicely.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102514 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
469a05425ffe76fa36f13434796ab885547be7e4 28-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Remove unused function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102499 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
07c55e36a0d1625c38354f6814099c5951e94202 28-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Remove unused function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102499 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
46661af4c9a02d308b90ce25bf25fa30a4c84889 28-Apr-2010 David Chisnall <csdavec@swan.ac.uk> Emit the correct symbol name for the class (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102497 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
8c757f9ea33dccff4da7810e0c1bda59c19ddc9a 28-Apr-2010 David Chisnall <csdavec@swan.ac.uk> Emit the correct symbol name for the class (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102497 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
84a145b2b60c3114ce9d5a7133e597a76a3a8f46 28-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Improve name mangling for dependent template names (e.g., typename
T::template apply<U>), handling a few cases where we previously failed
and performing substitutions on such dependent names. Fixes a crash in
Boost.PropertyTree.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102490 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
1e9268e29798155b9edb5b20ac7490d8539ef6aa 28-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve name mangling for dependent template names (e.g., typename
T::template apply<U>), handling a few cases where we previously failed
and performing substitutions on such dependent names. Fixes a crash in
Boost.PropertyTree.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102490 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
6045be628daa3447fc1e384a40d8a6bfb3650de5 28-Apr-2010 John McCall <rjmccall@apple.com> Properly pass the address of a lazily-generated function declaration with
incomplete type. Fixes PR6911.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102473 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
784f21121a6c9418ebd86baa6814e36e1176c410 28-Apr-2010 John McCall <rjmccall@apple.com> Properly pass the address of a lazily-generated function declaration with
incomplete type. Fixes PR6911.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102473 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
1956212e4319e95e56081e7775980d3d00662cbd 27-Apr-2010 David Chisnall <csdavec@swan.ac.uk> Fixed message send to void (broken by my last commit - GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102459 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
254e2d9e61dd0adb9c5e219d901f9872fd951728 27-Apr-2010 David Chisnall <csdavec@swan.ac.uk> Fixed message send to void (broken by my last commit - GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102459 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
e38eed5c6fd86740d6b3de2194310e87c05d875d 27-Apr-2010 David Chisnall <csdavec@swan.ac.uk> Ensure return from a message to nil is always 0 (GNU runtime).

This works around stack corruption / crashes resulting from PR6944, and also
works around people who expect 'what works on my machine' to work everywhere
(GCC crashes in a number of cases on SPARC that should now work correctly with
clang).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102430 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
664b7c74aff2ccdf9d13eae08b3466326fc6cc1f 27-Apr-2010 David Chisnall <csdavec@swan.ac.uk> Ensure return from a message to nil is always 0 (GNU runtime).

This works around stack corruption / crashes resulting from PR6944, and also
works around people who expect 'what works on my machine' to work everywhere
(GCC crashes in a number of cases on SPARC that should now work correctly with
clang).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102430 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
003d066bf0e0eafda8833a140cb58a1c7b528ef0 27-Apr-2010 Daniel Dunbar <daniel@zuster.org> Fix comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102429 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayout.h
50810d355ab2cf3f11f4e6c478a1df7c1f9f233d 27-Apr-2010 Daniel Dunbar <daniel@zuster.org> Fix comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102429 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayout.h
4578a3a1441eb22b68d909fa35d82e6ee7204e38 27-Apr-2010 John McCall <rjmccall@apple.com> Make the InjectedClassNameType the canonical type of the current instantiation
of a class template or class template partial specialization. That is to
say, in
template <class T> class A { ... };
or
template <class T> class B<const T*> { ... };
make 'A<T>' and 'B<const T*>' sugar for the corresponding InjectedClassNameType
when written inside the appropriate context. This allows us to track the
current instantiation appropriately even inside AST routines. It also allows
us to compute a DeclContext for a type much more efficiently, at some extra
cost every time we write a template specialization (which can be optimized,
but I've left it simple in this patch).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102407 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
angle.cpp
31f17ecbef57b5679c017c375db330546b7b5145 27-Apr-2010 John McCall <rjmccall@apple.com> Make the InjectedClassNameType the canonical type of the current instantiation
of a class template or class template partial specialization. That is to
say, in
template <class T> class A { ... };
or
template <class T> class B<const T*> { ... };
make 'A<T>' and 'B<const T*>' sugar for the corresponding InjectedClassNameType
when written inside the appropriate context. This allows us to track the
current instantiation appropriately even inside AST routines. It also allows
us to compute a DeclContext for a type much more efficiently, at some extra
cost every time we write a template specialization (which can be optimized,
but I've left it simple in this patch).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102407 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
angle.cpp
bc29b46c5cecde68682969a4f7e904c8be8a2b21 27-Apr-2010 Devang Patel <dpatel@apple.com> Enable debug info for local variables at -O1+.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102398 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2b594b9b62e914770d736cc51a18598202d90945 27-Apr-2010 Devang Patel <dpatel@apple.com> Enable debug info for local variables at -O1+.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102398 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b9507407d3947cd1be31bdb3b5501128ca034448 26-Apr-2010 Chris Lattner <sabre@nondot.org> emit dtors with the right calling convention in -fno-use-cxa-atexit
mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102377 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
c9a85f9b4cc8ed95ed7feeff554a74bf52bdc1f7 26-Apr-2010 Chris Lattner <sabre@nondot.org> emit dtors with the right calling convention in -fno-use-cxa-atexit
mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102377 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
ff0b45f255aedeca5155e50ef2c603c26142f4fc 26-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Make the static type of the exception variable in an Objective-C
@catch a VarDecl. The dynamic type is still a ParmVarDecl, but that
will change soon. No effective functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102341 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
c00d8e18ad3d903acfeb5d05163ce90713066a3f 26-Apr-2010 Douglas Gregor <dgregor@apple.com> Make the static type of the exception variable in an Objective-C
@catch a VarDecl. The dynamic type is still a ParmVarDecl, but that
will change soon. No effective functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102341 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
836b7abd8fbc30c7c38f15d153b6aa8c307c1b28 25-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen/NeXT: Fix several alignment issues with Objective-C metadata symbols:
- Fix some places that had the alignment hard coded.
- Use ABI type alignment, not preferred type alignment -- neither of this is exactly right, as we really want the C type alignment as required by the runtime, but the ABI alignment is a more correct choice.

This should be equivalent for x86_64, but fixes the alignment for ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102314 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
4b429ae34d80dd21661c91009c559746e553bc1e 25-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen/NeXT: Fix several alignment issues with Objective-C metadata symbols:
- Fix some places that had the alignment hard coded.
- Use ABI type alignment, not preferred type alignment -- neither of this is exactly right, as we really want the C type alignment as required by the runtime, but the ABI alignment is a more correct choice.

This should be equivalent for x86_64, but fixes the alignment for ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102314 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
283764a9b4287988a06ea721f50b4205aa754477 25-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen/NeXT: Reuse EmitImageInfo for both fragile and non-fragile ABI. This fixes Clang to correctly emit the "CorrectedSynthesize" bit when using the non-fragile ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102312 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
fce176b051a5f6abe7464b6c75161476eceda0c5 25-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen/NeXT: Reuse EmitImageInfo for both fragile and non-fragile ABI. This fixes Clang to correctly emit the "CorrectedSynthesize" bit when using the non-fragile ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102312 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6c5560b90c550eca66f381699e6ec6639a9c7e14 25-Apr-2010 Anders Carlsson <andersca@mac.com> Land another cleanup patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102293 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
96754665707fd0273f0caa7023947fe470e8dc32 25-Apr-2010 Anders Carlsson <andersca@mac.com> Land another cleanup patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102293 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
374b04033a49487e97387efd8ba6affde832733f 25-Apr-2010 Anders Carlsson <andersca@mac.com> Revert enough of my patches to fix self-host again :(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102289 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
8e142ccf1196c9ae31f10f9caa97670e343971e7 25-Apr-2010 Anders Carlsson <andersca@mac.com> Revert enough of my patches to fix self-host again :(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102289 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
3d3b11a785065bdff674b1e8c8927b2b4db9ccbf 25-Apr-2010 Anders Carlsson <andersca@mac.com> Cleanup SynthesizeCXXCopyConstructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102286 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
df1147e6d4f8079253ddd91eaada844c2481b870 25-Apr-2010 Anders Carlsson <andersca@mac.com> Cleanup SynthesizeCXXCopyConstructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102286 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
7fc14ac1146771a87c0d871d76bf7df96f6858d8 25-Apr-2010 Anders Carlsson <andersca@mac.com> Clean up SynthesizeCXXCopyAssignment a little.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102285 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
5f7cc730d7a284e88ef3980b85e17dde6b34144d 25-Apr-2010 Anders Carlsson <andersca@mac.com> Clean up SynthesizeCXXCopyAssignment a little.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102285 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
f1fccc9662dd7a7b3a6c7974bcfea97e60c856ce 25-Apr-2010 Anders Carlsson <andersca@mac.com> RenameGetAddressOfBaseOfCompleteClass to GetAddressOfDirectBaseInCompleteClass to reflect that it only handles direct bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102284 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
8561a8666c70f924c8f0209c41b9b77bbbf90607 25-Apr-2010 Anders Carlsson <andersca@mac.com> RenameGetAddressOfBaseOfCompleteClass to GetAddressOfDirectBaseInCompleteClass to reflect that it only handles direct bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102284 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
c05741bdca59c0d7ec4210f7184caa7762056c36 25-Apr-2010 Anders Carlsson <andersca@mac.com> More cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102282 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
f500de5bdfa1ab8e6944bb3519c2ae27f87c414b 25-Apr-2010 Anders Carlsson <andersca@mac.com> More cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102282 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
a9a0686853d56fd815705368635a1893601eb17c 25-Apr-2010 Anders Carlsson <andersca@mac.com> Simplify EmitClassMemberwiseCopy now that it's only used for fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102281 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
6444c417b4e8eaf1893c641f5a246f5adbb761c4 25-Apr-2010 Anders Carlsson <andersca@mac.com> Simplify EmitClassMemberwiseCopy now that it's only used for fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102281 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
87dbfe766f0a480b02e4473fdfda50f9f287a3df 25-Apr-2010 Anders Carlsson <andersca@mac.com> DefineImplicitCopyConstructor now uses SetBaseOrMemberInitializers to create implicit base initializers. (Member initializers are still handled by CodeGenFunction::SynthesizeCXXCopyConstructor for now).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102279 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
e127abe8bbcff7fef0326d68731bc178182a9990 25-Apr-2010 Anders Carlsson <andersca@mac.com> DefineImplicitCopyConstructor now uses SetBaseOrMemberInitializers to create implicit base initializers. (Member initializers are still handled by CodeGenFunction::SynthesizeCXXCopyConstructor for now).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102279 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
f736fe54e44290ea5550ef1a9e999d55046643c5 24-Apr-2010 Anders Carlsson <andersca@mac.com> Rename GetAddressOfBaseClass to OldGetAddressOfBaseClass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102275 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
a88ad5618fcb07c5374c79d6781a33234984b039 24-Apr-2010 Anders Carlsson <andersca@mac.com> Rename GetAddressOfBaseClass to OldGetAddressOfBaseClass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102275 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
0133e0ff2bbf79031fe3dd49aa74ebe3a178b9f5 24-Apr-2010 Anders Carlsson <andersca@mac.com> Get rid of the old GetNonVirtualBaseClassOffset and change all call sites to use the new version.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102274 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenModule.h
e04d45e05277ee04997fe59b1d194503f484c846 24-Apr-2010 Anders Carlsson <andersca@mac.com> Get rid of the old GetNonVirtualBaseClassOffset and change all call sites to use the new version.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102274 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenModule.h
85f144435fe40ceecd0433a74f7bf30199588ecd 24-Apr-2010 Anders Carlsson <andersca@mac.com> Change CodeGenFunction::GetAddressOfDerivedClass to take a BasePath.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102273 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
odeGenModule.h
a04efdf635d35d88e65041fad007225d8c8d64a5 24-Apr-2010 Anders Carlsson <andersca@mac.com> Change CodeGenFunction::GetAddressOfDerivedClass to take a BasePath.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102273 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
odeGenModule.h
701a98167bae2eacad9b04a829a52dc9f5140e8b 24-Apr-2010 Anders Carlsson <andersca@mac.com> Convert more call sites over to the new GetAddressOfBaseClass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102272 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
fc89c31a329eb6b36c6dbd8b7cb945d1a831650e 24-Apr-2010 Anders Carlsson <andersca@mac.com> Convert more call sites over to the new GetAddressOfBaseClass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102272 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
1bc5f41d02cdb6c35225e9feba36fee106f4a0ec 24-Apr-2010 Anders Carlsson <andersca@mac.com> Add a new GetAddressOfBaseClass overload that takes a base path and. Use it for derived-to-base casts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102270 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprScalar.cpp
odeGenFunction.h
34a2d384c745ebc39cae45dc1c0c4a6a7012e09b 24-Apr-2010 Anders Carlsson <andersca@mac.com> Add a new GetAddressOfBaseClass overload that takes a base path and. Use it for derived-to-base casts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102270 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprScalar.cpp
odeGenFunction.h
ce0a8c297fc0ff1ba8c636d242a97c3d4b526fcf 24-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Fix pasto, add a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102263 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
d3651cc24fbcffd8f187c82e6a91e6e3de7fe26e 24-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Fix pasto, add a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102263 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
80184b7daa2dec00f4a8069cbca7a4370dcd61f1 24-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Factor code. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102262 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
48c70f62dd7233a0ce5242dfb933b0d4638b3923 24-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Factor code. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102262 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
b9421286fab2bf4dc529511a4cb675bc243c741f 24-Apr-2010 Daniel Dunbar <daniel@zuster.org> NeXT: Clean up dispatch method policy selection.
- Replace -cc1 level -fobjc-legacy-dispatch with -fobjc-dispatch-method={legacy,non-legacy,mixed}.

- Lift "mixed" vs "non-mixed" policy choice up to driver level, instead of being buried in CGObjCMac.cpp.

- No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102255 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f643b9b338b797a824447207d7eab5f1187f4f34 24-Apr-2010 Daniel Dunbar <daniel@zuster.org> NeXT: Clean up dispatch method policy selection.
- Replace -cc1 level -fobjc-legacy-dispatch with -fobjc-dispatch-method={legacy,non-legacy,mixed}.

- Lift "mixed" vs "non-mixed" policy choice up to driver level, instead of being buried in CGObjCMac.cpp.

- No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102255 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
8bf515b1f6e8ecdcbd3ebcc99fe08ea22fc7fd95 24-Apr-2010 Anders Carlsson <andersca@mac.com> CastExpr should not hold a pointer to the base path. More cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102249 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
f1b48b7014992155286d58bb1676f9f51031d18b 24-Apr-2010 Anders Carlsson <andersca@mac.com> CastExpr should not hold a pointer to the base path. More cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102249 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
1e962b52adff44f944f6af0f61d3fc2ae8a639cf 24-Apr-2010 Dan Gohman <gohman@apple.com> Fix a place in inline asm lowering which was creating a TruncInst with a
pointer operand. This fixes an abort on
MultiSource/Applications/ClamAV/libclamav_mbox.c.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102238 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
2dca88fc6d3e606a8131712be1800e3a4b90ca3e 24-Apr-2010 Dan Gohman <gohman@apple.com> Fix a place in inline asm lowering which was creating a TruncInst with a
pointer operand. This fixes an abort on
MultiSource/Applications/ClamAV/libclamav_mbox.c.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102238 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
ec37c92d4a3bddb92e507872e7b07d6cd66b2526 24-Apr-2010 Devang Patel <dpatel@apple.com> Revert accidental check-in.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102226 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
970c618c3f9ce7e010a30587118afc03434cfd99 24-Apr-2010 Devang Patel <dpatel@apple.com> Revert accidental check-in.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102226 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
6742ed0fae1d786bcc2e6c9b4cca19f35fd13bd6 24-Apr-2010 Devang Patel <dpatel@apple.com> Revert r102215. This causes clang crash while compiling a test case from gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102224 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f0bf4d554f2513cbb4bec952c81ced59279ad91e 24-Apr-2010 Devang Patel <dpatel@apple.com> Revert r102215. This causes clang crash while compiling a test case from gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102224 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1a2c1a806b8322d095e20481a2815bc4275900aa 24-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Improve the AST representation of Objective-C @try/@catch/@finally
statements. Instead of the @try having a single @catch, where all of
the @catch's were chained (using an O(n^2) algorithm nonetheless),
@try just holds an array of its @catch blocks. The resulting AST is
slightly more compact (not important) and better represents the actual
language semantics (good).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102221 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
8f5e3dd32e443768d9dbbad7191e123e6733750c 24-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve the AST representation of Objective-C @try/@catch/@finally
statements. Instead of the @try having a single @catch, where all of
the @catch's were chained (using an O(n^2) algorithm nonetheless),
@try just holds an array of its @catch blocks. The resulting AST is
slightly more compact (not important) and better represents the actual
language semantics (good).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102221 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
d973415fc7134449ae45582c934adcda521f6968 24-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> More -fno-constant-cfstrings API work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102219 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ec951e0c2fc0db00c36bc60c900331dde32c1b43 24-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> More -fno-constant-cfstrings API work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102219 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
301ea81936fb6061341b17d73c34d9fbd2fdb423 24-Apr-2010 Anders Carlsson <andersca@mac.com> Add an InheritancePath parameter to the ImplicitCastExpr constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102218 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
88465d3e996e627bbaa11099b039ddab66d5af2c 24-Apr-2010 Anders Carlsson <andersca@mac.com> Add an InheritancePath parameter to the ImplicitCastExpr constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102218 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
e44447824eceae8dafd06aee1f9f20c15a3d0fe2 23-Apr-2010 Daniel Dunbar <daniel@zuster.org> NeXT/EH: When generating the rethrow code for a finally block, make sure to
chain outwards when inside a nested exception scope.
- A real test for this is going into LLVM test-suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102204 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b76db237b8c2080137f9dc3362712432f3150ff1 23-Apr-2010 Daniel Dunbar <daniel@zuster.org> NeXT/EH: When generating the rethrow code for a finally block, make sure to
chain outwards when inside a nested exception scope.
- A real test for this is going into LLVM test-suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102204 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
5a364ecbd881040e94d53d811dedfcf52e56657c 23-Apr-2010 Daniel Dunbar <daniel@zuster.org> NeXT/EH: Tidy up EH code a bit, don't emit the catch block EH handler if it is unreachable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102203 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ba6940aa58715633169aa519f6c94f5da097eba7 23-Apr-2010 Daniel Dunbar <daniel@zuster.org> NeXT/EH: Tidy up EH code a bit, don't emit the catch block EH handler if it is unreachable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102203 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f0b08496aea4aaa2fbe12b8c3af61072c206a30c 23-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> More work toward implementing
NeXt's -fno-constant-cfstrings - wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102189 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
2bb5ddaff86ee73d2cea7ec1835978afc88a83f0 23-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> More work toward implementing
NeXt's -fno-constant-cfstrings - wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102189 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
49d10ab2aeef21d10751226aa7a39efa089986a8 23-Apr-2010 Chris Lattner <sabre@nondot.org> Implement PR6845. We allow matching constraints to have different
input and output types when the smaller value isn't mentioned in the
asm string. Extend this support from integers to also allowing
fp values to be mismatched (if not mentioned in the asm string).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102188 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
aab64d0b7f41ed30b15ba9210ed859424cbc7455 23-Apr-2010 Chris Lattner <sabre@nondot.org> Implement PR6845. We allow matching constraints to have different
input and output types when the smaller value isn't mentioned in the
asm string. Extend this support from integers to also allowing
fp values to be mismatched (if not mentioned in the asm string).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102188 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
fb5784b7c6b72de30f2560aed565b097a83a6337 23-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Handle compound assignment expressions (i += j) as lvalues, which is
permitted in C++ but not in C. Fixes PR6900. Clang can now handle all
of Boost.Lambda's regression tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102170 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
6a03e345bb3c971750920e34a0d7d1ea7c9eceb7 23-Apr-2010 Douglas Gregor <dgregor@apple.com> Handle compound assignment expressions (i += j) as lvalues, which is
permitted in C++ but not in C. Fixes PR6900. Clang can now handle all
of Boost.Lambda's regression tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102170 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
0383da10fb505c43db83fe40f42eca1303dc9e9b 23-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Emit a lame diagnostic when we can't mangle operator names

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102168 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
f55e3fd5e316db2e9993b26255f727d00486b904 23-Apr-2010 Douglas Gregor <dgregor@apple.com> Emit a lame diagnostic when we can't mangle operator names

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102168 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
2b4d3b34391f181d88a5414ab58756b924b46957 23-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Mangle dependent template names such as the nested-name-specifier in

T::apply <U>::type

Fixes PR6899, although I want to dig a little deeper into the FIXME
for dependent template names that refer to operators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102167 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
20f0cc7a0f0c4a941fa0c57b9516c2d455b64a64 23-Apr-2010 Douglas Gregor <dgregor@apple.com> Mangle dependent template names such as the nested-name-specifier in

T::apply <U>::type

Fixes PR6899, although I want to dig a little deeper into the FIXME
for dependent template names that refer to operators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102167 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
2c980e09d91f3d36f84586daedd71b2f52caa693 23-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> I hate default statements. Fixes PR6874.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102160 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
08688ac8aaf02b565619181903319d32b546bcf5 23-Apr-2010 Douglas Gregor <dgregor@apple.com> I hate default statements. Fixes PR6874.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102160 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
b2df6b5289dd2d3b7e4b077ae4555145f6fc9c61 22-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Support for -fno-constant-cfstrings option - wip.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102112 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
33e982bf782d851bfe5767acb1336fcf3419ac6b 22-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Support for -fno-constant-cfstrings option - wip.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102112 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
2c922a1d094b9a43f425d76f511a8ee080ca11b1 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix another case where we generated an invalid access component when we
immediately narrowed the access size. Fix this (and previous case) by just
choosing a better access size up-front.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102068 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
52968a1c765e43000f904ecb27a6353b0185bcd6 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix another case where we generated an invalid access component when we
immediately narrowed the access size. Fix this (and previous case) by just
choosing a better access size up-front.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102068 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
2edfb45206c006e0a6bfc1f5b5c2410d3694649b 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix case where we might generate an access component with width == 0, if
we have to narrow the access side immediately (can happen with packed,
-fno-bitfield-type-align).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102067 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
4651efb5ba5710c91b58c8b86872b264dd71f464 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix case where we might generate an access component with width == 0, if
we have to narrow the access side immediately (can happen with packed,
-fno-bitfield-type-align).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102067 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
28ab98fb835c2dad33a30c73ad605acda577b841 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> Suppress compiler warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102047 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
0b647a6ea18151149d624ab373e6fe0e819e4a9a 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> Suppress compiler warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102047 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
60d5d1f3ffaf5c340e0150721b02ae284a44c393 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Set alignment correctly on bit-field accesses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102046 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
89da874f8ecfebabdac2c6e9b7930ebe179ccf81 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Set alignment correctly on bit-field accesses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102046 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
78bb92b2716fb867a315db9ddf9ed5546b1e9e45 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Rewrite bit-field access policy to not access data beyond the bounds of the structure, which we also now verify as part of the post-layout consistency checks.
- This fixes some pedantic bugs with packed structures, as well as major problems with -fno-bitfield-type-align.

- Fixes PR5591, PR5567, and all known -fno-bitfield-type-align issues.

- Review appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102045 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
e1467a4ceeeb74cdc54830e03df8d58893e38892 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Rewrite bit-field access policy to not access data beyond the bounds of the structure, which we also now verify as part of the post-layout consistency checks.
- This fixes some pedantic bugs with packed structures, as well as major problems with -fno-bitfield-type-align.

- Fixes PR5591, PR5567, and all known -fno-bitfield-type-align issues.

- Review appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102045 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
e910ad5e1f2a3c18b56966646210eb9684f6cec9 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix CGRecordLayout::print to print the bit-field infos in a consistent order.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102044 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
ad759530ff48385255c25e71d7e05632361e0c11 22-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix CGRecordLayout::print to print the bit-field infos in a consistent order.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102044 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
54bcfc54cb1dcb0c1b5133972287cff3f78b3360 22-Apr-2010 John McCall <rjmccall@apple.com> Call PerformCopyInitialization to properly initialize the exception temporary
in a throw expression. Use EmitAnyExprToMem to emit the throw expression,
which magically elides the final copy-constructor call (which raises a new
strict-compliance bug, but baby steps). Give __cxa_throw a destructor pointer
if the exception type has a non-trivial destructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102039 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GExpr.cpp
GTemporaries.cpp
odeGenFunction.h
ac418162692a951ca3796d6830496a85a2d12493 22-Apr-2010 John McCall <rjmccall@apple.com> Call PerformCopyInitialization to properly initialize the exception temporary
in a throw expression. Use EmitAnyExprToMem to emit the throw expression,
which magically elides the final copy-constructor call (which raises a new
strict-compliance bug, but baby steps). Give __cxa_throw a destructor pointer
if the exception type has a non-trivial destructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102039 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GExpr.cpp
GTemporaries.cpp
odeGenFunction.h
2ed1c65b14343ef9dea32adc898f46358d871c1e 22-Apr-2010 Devang Patel <dpatel@apple.com> Encode field accessibility.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102033 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
71f4ff62bcff31c67808adb08691103b469ce9be 22-Apr-2010 Devang Patel <dpatel@apple.com> Encode field accessibility.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102033 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f023979080bc2657f5eb1f673a8ce22715ec2d1f 21-Apr-2010 Daniel Dunbar <daniel@zuster.org> ABI/x86-32 & x86-64: Alignment on 'byval' must be set when when the alignment
exceeds the minimum ABI alignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102019 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
46c54fb8ec45765a475b7b709b9aee7f94c490c2 21-Apr-2010 Daniel Dunbar <daniel@zuster.org> ABI/x86-32 & x86-64: Alignment on 'byval' must be set when when the alignment
exceeds the minimum ABI alignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102019 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
bc8e47adcaf1b307a3677be5d4eb9dc1412bbcf0 21-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen/x86-32: Factor out getIndirectResult(), to match x86-64 factoring.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102015 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
dc6d574155072bfb35a7a29b94ef3afa0d40fb5a 21-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen/x86-32: Factor out getIndirectResult(), to match x86-64 factoring.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102015 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
fce9c287fbf9bc335116c8ecbdc973dbe432ac11 21-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Add checking that the LLVM and AST record layout offsets agree (for
non-bit-fields).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102014 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
3b2ae7ae59b11657416fc3f16e742713b4683e5e 21-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Add checking that the LLVM and AST record layout offsets agree (for
non-bit-fields).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102014 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
878b82dc869865aed9d8cdd91ad9be518c5fafbe 21-Apr-2010 Anders Carlsson <andersca@mac.com> Comment out an assert for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102007 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
c2a9b7973922cab0c0c56d46829d232ce3f4aacf 21-Apr-2010 Anders Carlsson <andersca@mac.com> Comment out an assert for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102007 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
b3a696cadd55333bddf560d820d50ae3327bc8a8 21-Apr-2010 John McCall <rjmccall@apple.com> I failed to notice that my last patch wasn't doing as much as it could
because EmitBranch actually clears the insert point. This version
actually accomplishes what I initially wanted.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101998 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
548ce5e78215a34f409d597bb2c1e9f897a8eda3 21-Apr-2010 John McCall <rjmccall@apple.com> I failed to notice that my last patch wasn't doing as much as it could
because EmitBranch actually clears the insert point. This version
actually accomplishes what I initially wanted.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101998 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
4bf72c0e03be591a7bfaec1da232db8494132d17 21-Apr-2010 John McCall <rjmccall@apple.com> Teach EmitBlock to put the target block immediately after the current block
(if there's a current block). The chief advantage of doing this is that it
lets us pick blocks (e.g. EH blocks) to push to the end of the function so
that fallthrough happens consistently --- i.e. it gives us the flexibility
of ordering blocks as we please without having to change the order in which
we generate code. There are standard (?) optimization passes which can do some
of that for us, but better to generate reasonable code to begin with.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101997 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
839cbaa004a24e8f1ea14db5ed76e3d25ed28996 21-Apr-2010 John McCall <rjmccall@apple.com> Teach EmitBlock to put the target block immediately after the current block
(if there's a current block). The chief advantage of doing this is that it
lets us pick blocks (e.g. EH blocks) to push to the end of the function so
that fallthrough happens consistently --- i.e. it gives us the flexibility
of ordering blocks as we please without having to change the order in which
we generate code. There are standard (?) optimization passes which can do some
of that for us, but better to generate reasonable code to begin with.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101997 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
858776eff6ad5c56f85acc2c77fe313b3de30576 21-Apr-2010 John McCall <rjmccall@apple.com> Miscellaneous codegen cleanups. Mostly, don't create new basic blocks
just to save the current insertion state! This change significantly
simplifies the IR CFG in exceptions code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101996 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.h
GException.cpp
GExpr.cpp
odeGenFunction.h
3d3ec1c099ec8bfac3aa1fb0126fe515b7c7fa05 21-Apr-2010 John McCall <rjmccall@apple.com> Miscellaneous codegen cleanups. Mostly, don't create new basic blocks
just to save the current insertion state! This change significantly
simplifies the IR CFG in exceptions code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101996 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.h
GException.cpp
GExpr.cpp
odeGenFunction.h
aa598756ea06cb4de58fa775892e02f57e71537b 21-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Overhaul the AST representation of Objective-C message send
expressions, to improve source-location information, clarify the
actual receiver of the message, and pave the way for proper C++
support. The ObjCMessageExpr node represents four different kinds of
message sends in a single AST node:

1) Send to a object instance described by an expression (e.g., [x method:5])
2) Send to a class described by the class name (e.g., [NSString method:5])
3) Send to a superclass class (e.g, [super method:5] in class method)
4) Send to a superclass instance (e.g., [super method:5] in instance method)

Previously these four cases where tangled together. Now, they have
more distinct representations. Specific changes:

1) Unchanged; the object instance is represented by an Expr*.

2) Previously stored the ObjCInterfaceDecl* referring to the class
receiving the message. Now stores a TypeSourceInfo* so that we know
how the class was spelled. This both maintains typedef information
and opens the door for more complicated C++ types (e.g., dependent
types). There was an alternative, unused representation of these
sends by naming the class via an IdentifierInfo *. In practice, we
either had an ObjCInterfaceDecl *, from which we would get the
IdentifierInfo *, or we fell into the case below...

3) Previously represented by a class message whose IdentifierInfo *
referred to "super". Sema and CodeGen would use isStr("super") to
determine if they had a send to super. Now represented as a
"class super" send, where we have both the location of the "super"
keyword and the ObjCInterfaceDecl* of the superclass we're
targetting (statically).

4) Previously represented by an instance message whose receiver is a
an ObjCSuperExpr, which Sema and CodeGen would check for via
isa<ObjCSuperExpr>(). Now represented as an "instance super" send,
where we have both the location of the "super" keyword and the
ObjCInterfaceDecl* of the superclass we're targetting
(statically). Note that ObjCSuperExpr only has one remaining use in
the AST, which is for "super.prop" references.

The new representation of ObjCMessageExpr is 2 pointers smaller than
the old one, since it combines more storage. It also eliminates a leak
when we loaded message-send expressions from a precompiled header. The
representation also feels much cleaner to me; comments welcome!

This patch attempts to maintain the same semantics we previously had
with Objective-C message sends. In several places, there are massive
changes that boil down to simply replacing a nested-if structure such
as:

if (message has a receiver expression) {
// instance message
if (isa<ObjCSuperExpr>(...)) {
// send to super
} else {
// send to an object
}
} else {
// class message
if (name->isStr("super")) {
// class send to super
} else {
// send to class
}
}

with a switch

switch (E->getReceiverKind()) {
case ObjCMessageExpr::SuperInstance: ...
case ObjCMessageExpr::Instance: ...
case ObjCMessageExpr::SuperClass: ...
case ObjCMessageExpr::Class:...
}

There are quite a few places (particularly in the checkers) where
send-to-super is effectively ignored. I've placed FIXMEs in most of
them, and attempted to address send-to-super in a reasonable way. This
could use some review.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101972 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
04badcf84c8d504d8491c7c7e29b58f52cb16640 21-Apr-2010 Douglas Gregor <dgregor@apple.com> Overhaul the AST representation of Objective-C message send
expressions, to improve source-location information, clarify the
actual receiver of the message, and pave the way for proper C++
support. The ObjCMessageExpr node represents four different kinds of
message sends in a single AST node:

1) Send to a object instance described by an expression (e.g., [x method:5])
2) Send to a class described by the class name (e.g., [NSString method:5])
3) Send to a superclass class (e.g, [super method:5] in class method)
4) Send to a superclass instance (e.g., [super method:5] in instance method)

Previously these four cases where tangled together. Now, they have
more distinct representations. Specific changes:

1) Unchanged; the object instance is represented by an Expr*.

2) Previously stored the ObjCInterfaceDecl* referring to the class
receiving the message. Now stores a TypeSourceInfo* so that we know
how the class was spelled. This both maintains typedef information
and opens the door for more complicated C++ types (e.g., dependent
types). There was an alternative, unused representation of these
sends by naming the class via an IdentifierInfo *. In practice, we
either had an ObjCInterfaceDecl *, from which we would get the
IdentifierInfo *, or we fell into the case below...

3) Previously represented by a class message whose IdentifierInfo *
referred to "super". Sema and CodeGen would use isStr("super") to
determine if they had a send to super. Now represented as a
"class super" send, where we have both the location of the "super"
keyword and the ObjCInterfaceDecl* of the superclass we're
targetting (statically).

4) Previously represented by an instance message whose receiver is a
an ObjCSuperExpr, which Sema and CodeGen would check for via
isa<ObjCSuperExpr>(). Now represented as an "instance super" send,
where we have both the location of the "super" keyword and the
ObjCInterfaceDecl* of the superclass we're targetting
(statically). Note that ObjCSuperExpr only has one remaining use in
the AST, which is for "super.prop" references.

The new representation of ObjCMessageExpr is 2 pointers smaller than
the old one, since it combines more storage. It also eliminates a leak
when we loaded message-send expressions from a precompiled header. The
representation also feels much cleaner to me; comments welcome!

This patch attempts to maintain the same semantics we previously had
with Objective-C message sends. In several places, there are massive
changes that boil down to simply replacing a nested-if structure such
as:

if (message has a receiver expression) {
// instance message
if (isa<ObjCSuperExpr>(...)) {
// send to super
} else {
// send to an object
}
} else {
// class message
if (name->isStr("super")) {
// class send to super
} else {
// send to class
}
}

with a switch

switch (E->getReceiverKind()) {
case ObjCMessageExpr::SuperInstance: ...
case ObjCMessageExpr::Instance: ...
case ObjCMessageExpr::SuperClass: ...
case ObjCMessageExpr::Class:...
}

There are quite a few places (particularly in the checkers) where
send-to-super is effectively ignored. I've placed FIXMEs in most of
them, and attempted to address send-to-super in a reasonable way. This
could use some review.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101972 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
bcd1e9b2d01b87e7921b3f863610668070f995f5 21-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a code gen. bug by removing an assert.
It is ok to have c++-ness inside extern "C"
block. Fixes pr6644.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101948 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
876681e706287d23ce45ea5bf715514da9e9212d 21-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Fixes a code gen. bug by removing an assert.
It is ok to have c++-ness inside extern "C"
block. Fixes pr6644.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101948 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
9d67450d05814192c80b3dbfae42212536403dc7 20-Apr-2010 Anders Carlsson <andersca@mac.com> Back out r101911 and see if it makes the bots happy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101921 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
3e79c30807c516e8d32e4ed08408b30605df5997 20-Apr-2010 Anders Carlsson <andersca@mac.com> Back out r101911 and see if it makes the bots happy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101921 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
def006c16271ffdc9a2697be3dc0fe0075276b80 20-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Always use i8 arrays to access union bit-fields. This is ugly, but
matches how we currently handle structs, and this correctly handles
-fno-bitfield-type-align.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101918 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
8ab78a7d9d755975db67170cae64c05d5176c00c 20-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Always use i8 arrays to access union bit-fields. This is ugly, but
matches how we currently handle structs, and this correctly handles
-fno-bitfield-type-align.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101918 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
61a4b7c5df85e3867d5ab7a45181562b74dd4d15 20-Apr-2010 Anders Carlsson <andersca@mac.com> Fix a bug which triggered the assertion I added yesterday. Basically, when we initialize the vtable pointer for a virtual base, and there was another path from the most derived class to another base with the same class type, we would use the wrong base.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101911 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
36fd6beef1ffaf93217d8ce96d900d4ed817e463 20-Apr-2010 Anders Carlsson <andersca@mac.com> Fix a bug which triggered the assertion I added yesterday. Basically, when we initialize the vtable pointer for a virtual base, and there was another path from the most derived class to another base with the same class type, we would use the wrong base.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101911 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
4c86b6d5e66bf0582a9ea07852e40715697f0124 20-Apr-2010 Anders Carlsson <andersca@mac.com> Move code to apply a non-virtual and virtual offset out into a separate function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101909 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
9dc228a1b971aa884766a9bdfdf5fa8ee4730b5b 20-Apr-2010 Anders Carlsson <andersca@mac.com> Move code to apply a non-virtual and virtual offset out into a separate function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101909 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
a8247f880d037a72b85173759279bbe303fc98ee 20-Apr-2010 Chris Lattner <sabre@nondot.org> don't slap noalias attribute on stret result arguments.
This mirror's Dan's patch for llvm-gcc in r97989, and
fixes the miscompilation in PR6525. There is some contention
over whether this is the right thing to do, but it is the
conservative answer and demonstrably fixes a miscompilation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101877 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
fb97cf24158aa7f1fd74374052f99733ef331bb9 20-Apr-2010 Chris Lattner <sabre@nondot.org> don't slap noalias attribute on stret result arguments.
This mirror's Dan's patch for llvm-gcc in r97989, and
fixes the miscompilation in PR6525. There is some contention
over whether this is the right thing to do, but it is the
conservative answer and demonstrably fixes a miscompilation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101877 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
b66a861c8b296fbcecc09f11d114329ed430c198 20-Apr-2010 Anders Carlsson <andersca@mac.com> Pass the nearest virtual base decl to InitializeVTablePointers. No functionality change right now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101872 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
b3b772ea15a4cd54879e244629aa685ead9548bb 20-Apr-2010 Anders Carlsson <andersca@mac.com> Pass the nearest virtual base decl to InitializeVTablePointers. No functionality change right now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101872 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
63cfd8bc6c9a522bf1d136535ed0e8c2ed5e3cdc 20-Apr-2010 Anders Carlsson <andersca@mac.com> Assert that the path from the derived to the base class in CodeGenFunction::GetAddressOfBaseClass is not ambiguous.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101869 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
2692d8284c77eee8ef3a93bf114cfec997a191a1 20-Apr-2010 Anders Carlsson <andersca@mac.com> Assert that the path from the derived to the base class in CodeGenFunction::GetAddressOfBaseClass is not ambiguous.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101869 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
944c37abb8acd1e14e73176922ee351db6a0f62f 20-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Keep track of the actual storage specifier written on a variable or
function declaration, since it may end up being changed (e.g.,
"extern" can become "static" if a prior declaration was static). Patch
by Enea Zaffanella and Paolo Bolzoni.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101826 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GClass.cpp
16573fa9705b546b7597c273b25b85d6321e2b33 20-Apr-2010 Douglas Gregor <dgregor@apple.com> Keep track of the actual storage specifier written on a variable or
function declaration, since it may end up being changed (e.g.,
"extern" can become "static" if a prior declaration was static). Patch
by Enea Zaffanella and Paolo Bolzoni.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101826 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GClass.cpp
a3817fdf040372b8f46f31a7015497e731f6a4fb 19-Apr-2010 Daniel Dunbar <daniel@zuster.org> AST: Dump ASTRecordLayout objects when they are created with -fdump-record-layouts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101815 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
8d8ab749f6f8bb63ea2cd2b589c0f050b67fc5cc 19-Apr-2010 Daniel Dunbar <daniel@zuster.org> AST: Dump ASTRecordLayout objects when they are created with -fdump-record-layouts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101815 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
4765ced05fbbcf3bfd2b49aee85d256fd6b96495 19-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Kill unused function and move the type match assert to after record dumping.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101814 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
2e7b7c2f267e0bf8047608aa1cd6691c0bf86792 19-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Kill unused function and move the type match assert to after record dumping.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101814 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
d6ac901f1084a8d9c93c246b9326a4db58feb0b0 19-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Check for darwin befoer cheking for version.
(related to radar 7866951).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101799 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
794afcb7049bdc82a2e7391e2f84d32446a7ffae 19-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Check for darwin befoer cheking for version.
(related to radar 7866951).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101799 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7c5d9538c7621a5b4eb922bf14360fdd6e1d4c6a 19-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Some renaming of methods, fixes typo
(related to PR6769).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101794 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
odeGenModule.h
63326a53418b4853a83b360ce1dbdb10c5739fc7 19-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Some renaming of methods, fixes typo
(related to PR6769).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101794 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
odeGenModule.h
da796c56198ff4ba41d65e28a553b5cd82ffbfe5 19-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Force clang to produce legacy api for messaging
in for pre-snowleoprd (NeXt runtime). Fixes
radar 7866951


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101791 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
776dbf9704353515b422ee13e481194c937ba01d 19-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Force clang to produce legacy api for messaging
in for pre-snowleoprd (NeXt runtime). Fixes
radar 7866951


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101791 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
721aa4e34e5733d60400eadc31cc00d00a71838f 19-Apr-2010 Rafael Espindola <rafael.espindola@gmail.com> Add comment explaning the use of c99 inline in c++.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101787 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b1af4c810fbf71d70d356c6244b157784e0d1405 19-Apr-2010 Rafael Espindola <rafael.espindola@gmail.com> Add comment explaning the use of c99 inline in c++.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101787 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f659b239aa691ee558fd4ba0ef0a68ce396857d3 19-Apr-2010 Dan Gohman <gohman@apple.com> Fix -Wcast-qual warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101786 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
odeGenModule.cpp
cb421fa690da545b58a720abe5f1c49b166dbde7 19-Apr-2010 Dan Gohman <gohman@apple.com> Fix -Wcast-qual warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101786 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
odeGenModule.cpp
1e76f972074d45e60c84299f30875dbfb1b25671 19-Apr-2010 David Chisnall <csdavec@swan.ac.uk> Don't just emit ivar metadata - emit CORRECT ivar metadata. (GNU runtime)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101759 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
d901da531433254210a08e8b1f9e1ad049b340aa 19-Apr-2010 David Chisnall <csdavec@swan.ac.uk> Don't just emit ivar metadata - emit CORRECT ivar metadata. (GNU runtime)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101759 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
376ba30750eedc3773241bfa6c050b5cd76e69c3 19-Apr-2010 David Chisnall <csdavec@swan.ac.uk> Fix emitting ivar metadata for synthesized ivars and some 64-bit fixes. (GNU runtime)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101758 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
7f63cb098f2461643f71ea590c1a477603f27f63 19-Apr-2010 David Chisnall <csdavec@swan.ac.uk> Fix emitting ivar metadata for synthesized ivars and some 64-bit fixes. (GNU runtime)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101758 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
44c7bce7825efed545209ccfd101477b75ee08ca 19-Apr-2010 Rafael Espindola <rafael.espindola@gmail.com> If a method is virtual and the class key function is in another file, emit the method as available_externally.
Fixes PR6747


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101757 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.h
odeGenModule.cpp
b8cab18e8562994b87f8d7c06f8c122beb712677 19-Apr-2010 Rafael Espindola <rafael.espindola@gmail.com> If a method is virtual and the class key function is in another file, emit the method as available_externally.
Fixes PR6747


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101757 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.h
odeGenModule.cpp
f573eaf3c7ff85ebd18b6f2861097e1a8b3d1d3f 18-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Local static variables must be available module-wise
as they are accessible in static methods in a class
local to the same function. Fixes PR6769.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101756 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
odeGenModule.h
65ad5a42cca954e070428dcc499b62393aa7a6d3 18-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Local static variables must be available module-wise
as they are accessible in static methods in a class
local to the same function. Fixes PR6769.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101756 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
odeGenModule.h
a334acb290ca1a58c5859bd76bd840f219bc74c2 18-Apr-2010 Nuno Lopes <nunoplopes@sapo.pt> recommit r101568 to fix PR6766
as a side-effect, remove two FIXMEs now fixed

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101726 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
a75b71f967d7f090ef16a3d255baddbdce7ff81e 18-Apr-2010 Nuno Lopes <nunoplopes@sapo.pt> recommit r101568 to fix PR6766
as a side-effect, remove two FIXMEs now fixed

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101726 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
1f6588b1334dfaf5f91037be038e3f8f4952e61f 18-Apr-2010 Anders Carlsson <andersca@mac.com> Simplify wide bit-field layout in CGRecordLayoutBuilder, and also fix a bug where assigning to a bit-field member would overwrite other parts of the struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101681 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
6ba38151f7e31d7f9194c8bbb91229cb5ffbb6f4 18-Apr-2010 Anders Carlsson <andersca@mac.com> Simplify wide bit-field layout in CGRecordLayoutBuilder, and also fix a bug where assigning to a bit-field member would overwrite other parts of the struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101681 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
f4808b92fce383c71904737bc8918288e0dedff8 17-Apr-2010 Anders Carlsson <andersca@mac.com> Fix an assert when assigning a boolean value to a bitfield of type _Bool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101678 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4803535dfef2626d2aec18ef92450b5008945352 17-Apr-2010 Anders Carlsson <andersca@mac.com> Fix an assert when assigning a boolean value to a bitfield of type _Bool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101678 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
f6885ba8331c247db60c8556cb3f2f1ed74e0e0e 17-Apr-2010 Anders Carlsson <andersca@mac.com> Unnamed bit-fields in a union should be laid out with a type that doesn't affect alignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101673 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
d62328e6a0fa933e3a5daaf68e4964031e6c5c5e 17-Apr-2010 Anders Carlsson <andersca@mac.com> Unnamed bit-fields in a union should be laid out with a type that doesn't affect alignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101673 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
949530867d0bfe8d90bb1e48846a0f40fcfeeaf7 17-Apr-2010 Anders Carlsson <andersca@mac.com> Factor union field layout code out into a separate function. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101671 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
86664465bac330871d4a476f68a1d6f7f6f102af 17-Apr-2010 Anders Carlsson <andersca@mac.com> Factor union field layout code out into a separate function. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101671 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
ac31224820a92c7e38e632c807a8ee55dbfa69a3 17-Apr-2010 Anders Carlsson <andersca@mac.com> Vtable -> VTable renames across the board.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101666 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCall.cpp
GDebugInfo.cpp
GDebugInfo.h
GExprAgg.cpp
GExprCXX.cpp
GExprConstant.cpp
GRTTI.cpp
GRecordLayoutBuilder.cpp
GVTables.cpp
GVTables.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.h
angle.cpp
angle.h
046c294a43024874ff35656c6e785b64e72f1f36 17-Apr-2010 Anders Carlsson <andersca@mac.com> Vtable -> VTable renames across the board.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101666 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCall.cpp
GDebugInfo.cpp
GDebugInfo.h
GExprAgg.cpp
GExprCXX.cpp
GExprConstant.cpp
GRTTI.cpp
GRecordLayoutBuilder.cpp
GVTables.cpp
GVTables.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.h
angle.cpp
angle.h
d793bb1572d2832d8df1aa483a4b6bddf196c846 17-Apr-2010 Chris Lattner <sabre@nondot.org> fix integrated assembler with i386 objc code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101660 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
afd5eda46e8e98e13e6cb0c937e39835eef5a296 17-Apr-2010 Chris Lattner <sabre@nondot.org> fix integrated assembler with i386 objc code.



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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101643 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
13946c261d641cd1745b59d36ae1420c2aea20ae 17-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Add raw_ostream operators to NamedDecl for convenience. Switch over all users of getNameAsString on a stream.

The next step is to print the name directly into the stream, avoiding a temporary std::string copy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101632 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
angle.cpp
900fc6388e803868a34b9483510c345e9b49d7eb 17-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Add raw_ostream operators to NamedDecl for convenience. Switch over all users of getNameAsString on a stream.

The next step is to print the name directly into the stream, avoiding a temporary std::string copy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101632 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
angle.cpp
56006c715601fb0a7bee8ef1535ab89e9ad9c095 17-Apr-2010 Chris Lattner <sabre@nondot.org> revert r101568, which miscompiles this testcase, distilled from ldecod:

void exit_picture()
{
char yuv_types[4][6]= {"4:0:0","4:2:0","4:2:2","4:4:4"};
foo(yuv_types);
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101623 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
7a22f02a02616be8fd817529f1696a88a35ee041 17-Apr-2010 Chris Lattner <sabre@nondot.org> revert r101568, which miscompiles this testcase, distilled from ldecod:

void exit_picture()
{
char yuv_types[4][6]= {"4:0:0","4:2:0","4:2:2","4:4:4"};
foo(yuv_types);
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101623 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
f9b09b133256905b4581ea57b68dddf9d3b919f8 17-Apr-2010 Nuno Lopes <nunoplopes@sapo.pt> fix PR6766: codegen of var initialized with wide char

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101568 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
6784704d4715664adfa41277efc09f3ce46e7750 17-Apr-2010 Nuno Lopes <nunoplopes@sapo.pt> fix PR6766: codegen of var initialized with wide char

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101568 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
2016dc9753e38fa861003f01ef77b25956b7e2ab 16-Apr-2010 Chris Lattner <sabre@nondot.org> fix a bogus assertion exposed by a recent change: packing the
struct may cause it to shrink more than one byte. Before
my recent changes we compiled the new test into:

%0 = type { [6 x i8] }
@x = global %0 { [6 x i8] undef }, align 2 ; <%0*> [#uses=0]

which is obviously bogus. Now we compile it into:

%0 = type <{ i32, i8, i8 }>
@x = global %0 zeroinitializer, align 2 ; <%0*> [#uses=0]

Where the last byte only is tail padding.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101536 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
d39a0d6119a3bf69e3e5149b778e825b77b2e06a 16-Apr-2010 Chris Lattner <sabre@nondot.org> fix a bogus assertion exposed by a recent change: packing the
struct may cause it to shrink more than one byte. Before
my recent changes we compiled the new test into:

%0 = type { [6 x i8] }
@x = global %0 { [6 x i8] undef }, align 2 ; <%0*> [#uses=0]

which is obviously bogus. Now we compile it into:

%0 = type <{ i32, i8, i8 }>
@x = global %0 zeroinitializer, align 2 ; <%0*> [#uses=0]

Where the last byte only is tail padding.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101536 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
65a73088520ac19597de36f8fb285c28d224d2e6 16-Apr-2010 Nuno Lopes <nunoplopes@sapo.pt> emit padding as undef values, take 2
merge also a few tests I had here for this feature, and FileCheck'ize one file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101535 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
cdb30b41590bf9e20d1d46a866fce071ebadf21a 16-Apr-2010 Nuno Lopes <nunoplopes@sapo.pt> emit padding as undef values, take 2
merge also a few tests I had here for this feature, and FileCheck'ize one file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101535 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
c7fb373155b3a32a8087a69bb80b23d52037bc1c 16-Apr-2010 Anders Carlsson <andersca@mac.com> Make CGRecordLayoutBuilder deal with wide bit-fields. Will land tests shortly (Daniel, please review).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101472 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
1c7658fd32f26a3ea5fa1421494b2449c9eba3c9 16-Apr-2010 Anders Carlsson <andersca@mac.com> Make CGRecordLayoutBuilder deal with wide bit-fields. Will land tests shortly (Daniel, please review).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101472 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
e07a7be97db3001cdef64f128ba49cf1c2688d47 16-Apr-2010 Chris Lattner <sabre@nondot.org> tidy up


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101447 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTypes.h
ce2b41dab3378750a79db518ab3ba8a5c8f39457 16-Apr-2010 Chris Lattner <sabre@nondot.org> tidy up


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101447 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTypes.h
ddbd4f9fb99278d3bb8d7c1e90fd2676cb4e38f0 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Change CGBitFieldInfo to take the AccessInfo as constructor arguments, it is now an immutable object.

Also, add some checking of various invariants that should hold on the CGBitFieldInfo access.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101345 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
2df2569679237b4979654a8663cd61aea67ab207 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Change CGBitFieldInfo to take the AccessInfo as constructor arguments, it is now an immutable object.

Also, add some checking of various invariants that should hold on the CGBitFieldInfo access.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101345 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
106c6b2147763e5a239df9fc5c7015b4e96605d1 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Eliminate now unused fields from CGBitFieldInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101344 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
7fb619500404129322af972aab66c369949a2a74 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Eliminate now unused fields from CGBitFieldInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101344 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
ededec287aa5549419ffc7c983a1da5073995c1e 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: (Reapply 101222, with fixes) Move EmitStoreThroughBitfieldLValue to use new CGBitfieldInfo::AccessInfo decomposition, instead of computing the access policy itself.
- Sadly, this doesn't seem to give any .ll size win so far. It is possible to make this routine significantly smarter & avoid various shifting, masking, and zext/sext, but I'm not really convinced it is worth it. It is tricky, and this is really instcombine's job.

- No intended functionality change; the test case is just to increase coverage & serves as a demo file, it worked before this commit.

The new fixes from r101222 are:

1. The shift to the target position needs to occur after the value is extended to the correct size. This broke Clang bootstrap, among other things no doubt.

2. Swap the order of arguments to OR, to get a tad more constant folding.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101339 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
2677261656b2f3325218d38bdd9d102ad732da92 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: (Reapply 101222, with fixes) Move EmitStoreThroughBitfieldLValue to use new CGBitfieldInfo::AccessInfo decomposition, instead of computing the access policy itself.
- Sadly, this doesn't seem to give any .ll size win so far. It is possible to make this routine significantly smarter & avoid various shifting, masking, and zext/sext, but I'm not really convinced it is worth it. It is tricky, and this is really instcombine's job.

- No intended functionality change; the test case is just to increase coverage & serves as a demo file, it worked before this commit.

The new fixes from r101222 are:

1. The shift to the target position needs to occur after the value is extended to the correct size. This broke Clang bootstrap, among other things no doubt.

2. Swap the order of arguments to OR, to get a tad more constant folding.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101339 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
ead0e63d97e8d96b3ed450ad2012264441feea8b 15-Apr-2010 Eric Christopher <echristo@apple.com> Rewrite handling of 64-bit palignr intrinsics to be vector shuffles.
Stop multiplying constant by 8 accordingly in the header and change
intrinsic definition for what types we expect.

Add to existing palignr test to check that we're emitting the correct things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101332 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
e57aa9e367af227214140e1a174cc561aabaa0b9 15-Apr-2010 Eric Christopher <echristo@apple.com> Rewrite handling of 64-bit palignr intrinsics to be vector shuffles.
Stop multiplying constant by 8 accordingly in the header and change
intrinsic definition for what types we expect.

Add to existing palignr test to check that we're emitting the correct things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101332 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
947e5d772ff2a8465d3814186905201e344a0e23 14-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen/NeXT: Simplify to use AST record layout for getting offsets instead of the
IRgen record layout, which this code doesn't need to depend on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101257 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f8f8ebafafa6f4469a44de7a64194f52be1b8f53 14-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen/NeXT: Simplify to use AST record layout for getting offsets instead of the
IRgen record layout, which this code doesn't need to depend on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101257 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1135817166d1fb33201c4c0cab3205ed06e39a91 14-Apr-2010 Daniel Dunbar <daniel@zuster.org> Speculatively revert "IRgen: Move EmitStoreThroughBitfieldLValue to use new CGBitfieldInfo::AccessInfo decomposition, instead of computing the access policy itself.", I think it might be breaking bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101235 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
96c250a9d2f3bcff800500c22a8cf75579395588 14-Apr-2010 Daniel Dunbar <daniel@zuster.org> Speculatively revert "IRgen: Move EmitStoreThroughBitfieldLValue to use new CGBitfieldInfo::AccessInfo decomposition, instead of computing the access policy itself.", I think it might be breaking bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101235 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
11afd1c1721abf8cad833a90103c4992f92b9186 14-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move EmitStoreThroughBitfieldLValue to use new CGBitfieldInfo::AccessInfo decomposition, instead of computing the access policy itself.
- Sadly, this doesn't seem to give any .ll size win so far. It is possible to make this routine significantly smarter & avoid various shifting, masking, and zext/sext, but I'm not really convinced it is worth it. It is tricky, and this is really instcombine's job.

- No intended functionality change; the test case is just to increase coverage & serves as a demo file, it worked before this commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101222 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
89cdaa94ecac5e83197c5889830ee37ff1faea58 14-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move EmitStoreThroughBitfieldLValue to use new CGBitfieldInfo::AccessInfo decomposition, instead of computing the access policy itself.
- Sadly, this doesn't seem to give any .ll size win so far. It is possible to make this routine significantly smarter & avoid various shifting, masking, and zext/sext, but I'm not really convinced it is worth it. It is tricky, and this is really instcombine's job.

- No intended functionality change; the test case is just to increase coverage & serves as a demo file, it worked before this commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101222 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
e4804ae81041e5e6ee333a93e75a559feb2205e8 14-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Tweak CGBitFieldInfo doxyments & add an accessor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101221 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayout.h
e792584917983edb9bbfd5751b1fa6a4136e566a 14-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Tweak CGBitFieldInfo doxyments & add an accessor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101221 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayout.h
2b3730baddad5e06c1498de980ca3efe66e5d893 14-Apr-2010 Chris Lattner <sabre@nondot.org> implement altivec.h and a bunch of support code, patch by Anton Yartsev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101215 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
dd17394d225b06376e9ae1d23f36cec463fdef01 14-Apr-2010 Chris Lattner <sabre@nondot.org> implement altivec.h and a bunch of support code, patch by Anton Yartsev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101215 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
2082b126c587b3c16a5ce4dcbfb61d1ef0346cf6 14-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move EmitLoadOfBitfieldLValue to use new CGBitfieldInfo::AccessInfo decomposition, instead of computing the access policy itself.
- This lets the method focus slightly more on emitting clean IR to honor the policy which has been selected. On 403.gcc's combine.c, x86_64, -O0, this reduces the number of lines in the .ll file (~= # of instructions) by 2.5%.

- No intended functionality change -- at -O3 this should produce equivalent if not identical output. On 403.gcc's combine.c, x86_64, -O3, this isn't quite true and some of the changes are regressions, but I'm not going to worry about that until we move to a new access policy.

- There is still some room for improvement in the generated IR, in particular we can usually fold the sign-extension of the bit-field into one of the component access. See the FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101192 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
ecdb41ebc30e781ccbd3d89674caebc4fd35f023 14-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move EmitLoadOfBitfieldLValue to use new CGBitfieldInfo::AccessInfo decomposition, instead of computing the access policy itself.
- This lets the method focus slightly more on emitting clean IR to honor the policy which has been selected. On 403.gcc's combine.c, x86_64, -O0, this reduces the number of lines in the .ll file (~= # of instructions) by 2.5%.

- No intended functionality change -- at -O3 this should produce equivalent if not identical output. On 403.gcc's combine.c, x86_64, -O3, this isn't quite true and some of the changes are regressions, but I'm not going to worry about that until we move to a new access policy.

- There is still some room for improvement in the generated IR, in particular we can usually fold the sign-extension of the bit-field into one of the component access. See the FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101192 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
e6922fce21edfd22f8269a5b7f35ab01b3176c15 13-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Enhance CGBitFieldInfo with enough information to fully describe the "policy" with which a bit-field should be accessed.
- For now, these policies are computed to match the current IRgen strategy, although the new information isn't being used yet (except in -fdump-record-layouts).

- Design comments appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101178 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
ab970f90ce31a53fe7e6375a37536bf0832fd922 13-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Enhance CGBitFieldInfo with enough information to fully describe the "policy" with which a bit-field should be accessed.
- For now, these policies are computed to match the current IRgen strategy, although the new information isn't being used yet (except in -fdump-record-layouts).

- Design comments appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101178 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
517340a34c719c8bae407e386ce630589b4ff735 13-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Removes a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101161 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
08adf327cdcbf838990915bcdaebfdaf553144b7 13-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Removes a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101161 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
bdc7ac7f49427f10b24c12a9a2aea29c5fdddeb8 13-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Variation of objc_copyStruct API generation when
property (atomic/nonatomic) is of aggregate type with
gc'able member objects) (NeXT runtime).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101156 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.h
15bd58842adaa4f8cca4e58047ed18e033858d9b 13-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Variation of objc_copyStruct API generation when
property (atomic/nonatomic) is of aggregate type with
gc'able member objects) (NeXT runtime).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101156 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.h
ed39aaa71c887aaf8dbc0678f87b9bd6252fa258 13-Apr-2010 Chris Lattner <sabre@nondot.org> Rework the ConstStructBuilder code to emit missing initializer
elements with explicit zero values instead of with tail padding.
On an example like this:

struct foo { int a; int b; };

struct foo fooarray[] = {
{1, 2},
{4},
};

We now lay this out as:

@fooarray = global [2 x %struct.foo] [%struct.foo { i32 1, i32 2 }, %struct.foo { i32 4, i32 0 }]

instead of as:

@fooarray = global %0 <{ %struct.foo { i32 1, i32 2 }, %1 { i32 4, [4 x i8] zeroinitializer } }>

Preserving both the struct type of the second element, but also the array type of the entire thing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101155 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
8ce9e451b421e4c941bc120bcc7f422457656d63 13-Apr-2010 Chris Lattner <sabre@nondot.org> Rework the ConstStructBuilder code to emit missing initializer
elements with explicit zero values instead of with tail padding.
On an example like this:

struct foo { int a; int b; };

struct foo fooarray[] = {
{1, 2},
{4},
};

We now lay this out as:

@fooarray = global [2 x %struct.foo] [%struct.foo { i32 1, i32 2 }, %struct.foo { i32 4, i32 0 }]

instead of as:

@fooarray = global %0 <{ %struct.foo { i32 1, i32 2 }, %1 { i32 4, [4 x i8] zeroinitializer } }>

Preserving both the struct type of the second element, but also the array type of the entire thing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101155 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
c2bebcddae6b90221a2bd37f31128e88c0d3871d 13-Apr-2010 Chris Lattner <sabre@nondot.org> unbreak tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101153 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b5e8156ebd6accd27daeaae6971597c45d5e5139 13-Apr-2010 Chris Lattner <sabre@nondot.org> unbreak tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101153 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8f0110f782fece20487d0cb711c20474f03ba8f5 13-Apr-2010 Chris Lattner <sabre@nondot.org> move a bunch of ConstStructBuilder methods out of line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101152 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
eba3e5af56b292f5c96fe50dbbd66bfdefc8d48c 13-Apr-2010 Chris Lattner <sabre@nondot.org> move a bunch of ConstStructBuilder methods out of line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101152 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
b8456b3783691bd5d12a20180796c303e0f3fdcb 13-Apr-2010 Chris Lattner <sabre@nondot.org> minor cleanups


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101151 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4357a8291d759f6f9c36d3edeee8476d3eaf0804 13-Apr-2010 Chris Lattner <sabre@nondot.org> minor cleanups


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101151 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
fb10ed37d4f7d0a2813285bbdd1a643e94e957c1 13-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Add support for objc_copyStruct to enforce
atomicity of aggregate properties in setter/getter
methods. wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101107 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.h
0b2bd47151ee9205ad6c66d1ffb921918106088a 13-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Add support for objc_copyStruct to enforce
atomicity of aggregate properties in setter/getter
methods. wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101107 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.h
22da7b3ad15c627ca541e5c86ec7c8d1d546f139 13-Apr-2010 Devang Patel <dpatel@apple.com> Fix debug info for cleanup block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101100 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.cpp
cd9199eb3dd1a665ea642f3918020a53e5ecb673 13-Apr-2010 Devang Patel <dpatel@apple.com> Fix debug info for cleanup block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101100 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.cpp
f823a4bb813f1f0cd191eca604256e0b1ea018cf 12-Apr-2010 Chris Lattner <sabre@nondot.org> fix PR6660/6168: emit padding as zeros instead of undef. Because
trailing fields may not be represented in initializer lists, they
are being handled as padding and those fields *must* be zero
initialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101067 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
0eea9f92b4972bbdf63a6ec97a2a85107c07d7ee 12-Apr-2010 Chris Lattner <sabre@nondot.org> fix PR6660/6168: emit padding as zeros instead of undef. Because
trailing fields may not be represented in initializer lists, they
are being handled as padding and those fields *must* be zero
initialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101067 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
b319a5c836069779554d22593b00e6d399574c05 12-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Factor out ComputeBitFieldInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101066 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
9b28daf9b6ea3808ef6b63408c24095a43d48018 12-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Factor out ComputeBitFieldInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101066 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
c3c44c65dc039b0b5eb51942c581131fd3a94ba3 12-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Add some API code for future work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101052 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
6cc590602f41c3e98e8af0023d54296c8eca7910 12-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Add some API code for future work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101052 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
55286f1eb9bc52ab01ac6bacf6233d9ea84130e4 12-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Add CGRecordLayout::dump, and dump (irgen) record layouts as part of -fdump-record-layouts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101051 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayout.h
GRecordLayoutBuilder.cpp
93c62967d4ac7620a8ed2c5f875daab9adb416f0 12-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Add CGRecordLayout::dump, and dump (irgen) record layouts as part of -fdump-record-layouts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101051 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayout.h
GRecordLayoutBuilder.cpp
580de3c5ca180bdef2f4e1c0b721fb3bf48a9ef2 12-Apr-2010 Anders Carlsson <andersca@mac.com> Have the CXXBaseOrMemberInitializer keep track of whether an initializer initializes a virtual base or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101004 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
80638c5e6395344c1e6096542b0ff3b8bfb2139e 12-Apr-2010 Anders Carlsson <andersca@mac.com> Have the CXXBaseOrMemberInitializer keep track of whether an initializer initializes a virtual base or not.

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100998 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
3a92733c077c250ed2ca0faf2d7d4e0d1a222abf 12-Apr-2010 Anders Carlsson <andersca@mac.com> More renames.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100991 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
8f2c766cda9c111c565e5472a357668c5c079c74 12-Apr-2010 Anders Carlsson <andersca@mac.com> Rename a function parameter.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100990 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
8eb6faac0e8c4f71d7f79b3d3de16e082979643d 11-Apr-2010 Anders Carlsson <andersca@mac.com> Clarify an assertion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100986 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
836d9dde50f46db4a64345004346a003d714e060 11-Apr-2010 Anders Carlsson <andersca@mac.com> Clarify an assertion.

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

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

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

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100949 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
8edbf80c6ae8627bcae81ef7c86c74b751ed1e05 10-Apr-2010 Chris Lattner <sabre@nondot.org> revert 100942, pending discussion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100946 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
c603d09980ced1ca0f49faa9ad628795ef739497 10-Apr-2010 Chris Lattner <sabre@nondot.org> revert 100942, pending discussion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100946 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
0e65e5df139f7d420cf927edc32fde1684d45f62 10-Apr-2010 Anders Carlsson <andersca@mac.com> Rename VtableComponent and VtableBuilder.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100945 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
a23edd8304f5227d1f486d4beda7a0936135351d 10-Apr-2010 David Chisnall <csdavec@swan.ac.uk> Fix for PR6811.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100942 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
d281915e49ae69609c28ccc55c0a02ae97a52eb9 10-Apr-2010 David Chisnall <csdavec@swan.ac.uk> Fix for PR6811.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100942 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
bdbb904c118e8c1029816a12b7e25caeea629782 10-Apr-2010 Chris Lattner <sabre@nondot.org> fix PR6805: llvm.objectsize changed to take an i1 instead of an i32.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100938 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
c24b9c46558919e98f4398ecbd45bc7b05f9acd9 10-Apr-2010 Chris Lattner <sabre@nondot.org> fix PR6805: llvm.objectsize changed to take an i1 instead of an i32.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100938 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
2e18619c20de730d44eba2726230051a02103f8a 10-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> A bunch of string-related microoptimizations in Mangler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100928 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
35f59b64b497e181f8dbd2a36e35b5e2919e7b1d 10-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> A bunch of string-related microoptimizations in Mangler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100928 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
5fad5b305dc76c8ed34dd3de740c9ccda20d83ef 10-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Fix use after free. Incrementing an use_iterator after its user is erased is unsafe.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100926 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
dbf02bccc9fc1115cb7dd45c84df77252d68f220 10-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Fix use after free. Incrementing an use_iterator after its user is erased is unsafe.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100926 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
110ffbabbfecb1a3e518532aa5985294ece42e9b 10-Apr-2010 John McCall <rjmccall@apple.com> Doug pointed out that we have a perfectly reasonable expression here to
serve as a source of source locations for the can't-yet-mangle diagnostic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100924 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
739bf09fc6c7e34a86f1b049b44e58a4718dd348 10-Apr-2010 John McCall <rjmccall@apple.com> Doug pointed out that we have a perfectly reasonable expression here to
serve as a source of source locations for the can't-yet-mangle diagnostic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100924 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
7406fb6be879901d27d0783e61868b0e79fe8389 10-Apr-2010 Gabor Greif <ggreif@gmail.com> rely even less on CallInst internals

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100919 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
35db3b9aad1829a1279b9e213ddee36395314a0b 10-Apr-2010 Gabor Greif <ggreif@gmail.com> rely even less on CallInst internals

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100919 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4ec945cdb0491608f0d9fb5dbafb299ca074377d 10-Apr-2010 Gabor Greif <ggreif@gmail.com> do not rely on CallInst interna, use CallSite to access arguments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100918 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6ba728d9687b2617793f5afd410650a8d6c71080 10-Apr-2010 Gabor Greif <ggreif@gmail.com> do not rely on CallInst interna, use CallSite to access arguments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100918 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
fd95e29dbac199f449d043ee32f82129b3f31fb3 10-Apr-2010 John McCall <rjmccall@apple.com> Mangle some expressions with codegen implications but no mangling "overhead".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100909 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
d93076038afe2d26e1e5cf3d68faccc44245450e 10-Apr-2010 John McCall <rjmccall@apple.com> Mangle some expressions with codegen implications but no mangling "overhead".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100909 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
e43be984dcbe96d05c8839395a1724675fc0184d 10-Apr-2010 John McCall <rjmccall@apple.com> Provide an extremely unsatisfactory diagnostic (instead of crashing) when
mangling an unknown expression kind. Also conveniently tells the user what
kind of expression they should add to the mangler!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100907 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
angle.cpp
angle.h
6ae1f35cedb5a847f15f86bdb227b7bbe574a344 10-Apr-2010 John McCall <rjmccall@apple.com> Provide an extremely unsatisfactory diagnostic (instead of crashing) when
mangling an unknown expression kind. Also conveniently tells the user what
kind of expression they should add to the mangler!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100907 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
angle.cpp
angle.h
ba1bebbf5c18e351c6ea4b3cfc061c96b1e17407 09-Apr-2010 John McCall <rjmccall@apple.com> Provide manglings for bool and character literal expressions. These are
just integer-literal expressions with special case implementations in the AST.

Fixes rdar://problem/7825453.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100905 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
de81063acdc999fbe1225f466ead12f7e9107acf 09-Apr-2010 John McCall <rjmccall@apple.com> Provide manglings for bool and character literal expressions. These are
just integer-literal expressions with special case implementations in the AST.

Fixes rdar://problem/7825453.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100905 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
316a971214df7d52ed50cddc3dbbe7a95efd9609 08-Apr-2010 Anders Carlsson <andersca@mac.com> Rename CGVtable files to CGVTables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100778 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
GVTables.h
GVtable.cpp
GVtable.h
MakeLists.txt
odeGenModule.h
angle.cpp
461e326e74fa840945330a04df33b1180b08ddc0 08-Apr-2010 Anders Carlsson <andersca@mac.com> Rename CGVtable files to CGVTables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100778 91177308-0d34-0410-b5e6-96231b3b80d8
GVTables.cpp
GVTables.h
GVtable.cpp
GVtable.h
MakeLists.txt
odeGenModule.h
angle.cpp
8346b25b19504b5f84606cf11056ee18b8a331e5 08-Apr-2010 Anders Carlsson <andersca@mac.com> Clarify an assert.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100776 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ec9c202e9d7d665b178e193531094602ee9c95b3 08-Apr-2010 Anders Carlsson <andersca@mac.com> Clarify an assert.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100776 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e5ee8658d16b2e9dd5d8670e835846d364ae2029 08-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Unbreak the build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100775 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
e17ad2fd5c4b66c712bdffd2789eaafc54a9b001 08-Apr-2010 Douglas Gregor <dgregor@apple.com> Unbreak the build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100775 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
f766a147c422efc4e1d6bd8d6075b8ba7456d515 08-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate excessive PCH deserialization caused by the search for
__cxxabiv1::__fundamental_type_info in every translation
unit. Previously, we would perform name lookup for
__cxxabiv1::__fundamental_type_info at the end of IRGen for a each
translation unit, to determine whether it was present. If so, we we
produce type information for all of the fundamental types. However,
this name lookup causes PCH deserialization of a significant part of the
translation unit, which has a woeful impact on performance.

With this change, we now look at each record type after we've
generated its vtable to see if it is
__cxxabiv1::__fundamental_type_info. If so, we generate type info for
all of the fundamental types. This works because
__cxxabiv1::__fundamental_type_info should always have a key function
(typically the virtual destructor), that will be defined once in the
support library. The fundamental type information will end up there.

Fixes <rdar://problem/7840011>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100772 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
GVtable.cpp
odeGenModule.cpp
1e201b4a9d4880c3f90ab77e8a308140f003c7da 08-Apr-2010 Douglas Gregor <dgregor@apple.com> Eliminate excessive PCH deserialization caused by the search for
__cxxabiv1::__fundamental_type_info in every translation
unit. Previously, we would perform name lookup for
__cxxabiv1::__fundamental_type_info at the end of IRGen for a each
translation unit, to determine whether it was present. If so, we we
produce type information for all of the fundamental types. However,
this name lookup causes PCH deserialization of a significant part of the
translation unit, which has a woeful impact on performance.

With this change, we now look at each record type after we've
generated its vtable to see if it is
__cxxabiv1::__fundamental_type_info. If so, we generate type info for
all of the fundamental types. This works because
__cxxabiv1::__fundamental_type_info should always have a key function
(typically the virtual destructor), that will be defined once in the
support library. The fundamental type information will end up there.

Fixes <rdar://problem/7840011>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100772 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
GVtable.cpp
odeGenModule.cpp
990800b54380a207dd8e03eae2ba7843acdf8dc2 08-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move the bit-field access type into CGBitFieldInfo, and change bit-field LValues to just store the base address of object containing the bit-field.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100745 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
GValue.h
7f2896406c8f14bf123578610043a919ba1a1c8a 08-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move the bit-field access type into CGBitFieldInfo, and change bit-field LValues to just store the base address of object containing the bit-field.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100745 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
GValue.h
e6c39d3a3e77c17bb9aa97be6e2e1ae2dbd654db 07-Apr-2010 Shih-wei Liao <sliao@google.com> libbcc

Change-Id: Ieaa3ebd5a38f370752495549f8870b534eeedfc5
BIInfo.h
GBlocks.cpp
GBlocks.h
GBuilder.h
GBuiltin.cpp
GCXX.cpp
GCXX.h
GCall.cpp
GCall.h
GClass.cpp
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GRTTI.cpp
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
GStmt.cpp
GTemporaries.cpp
GVTT.cpp
GValue.h
GVtable.cpp
GVtable.h
MakeLists.txt
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
lobalDecl.h
akefile
angle.cpp
angle.h
oduleBuilder.cpp
EADME.txt
argetInfo.cpp
argetInfo.h
b510fd610b8c6790bf8392cbb827888e67dbca80 07-Apr-2010 John McCall <rjmccall@apple.com> @llvm.sqrt isn't really close enough to C's sqrt to justify emitting calls
to the intrinsic, even when math-errno is off.

Fixes rdar://problem/7828230 by falling back on the library function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100613 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
beb41281f8355caa05700d0a77539defbdf428f8 07-Apr-2010 John McCall <rjmccall@apple.com> @llvm.sqrt isn't really close enough to C's sqrt to justify emitting calls
to the intrinsic, even when math-errno is off.

Fixes rdar://problem/7828230 by falling back on the library function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100613 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
2f085cebeee78fcf29f0bacc120633340f883ef4 07-Apr-2010 Chris Lattner <sabre@nondot.org> a ridiculous amount of propagation through the backend later,
have the code generate slap a srcloc metadata on inline asm nodes.
This allows us to diagnose invalid inline asms with such nice
diagnostics as:

<inline asm>:1:2: error: unrecognized instruction
abc incl %eax
^
asm.c:2:12: note: generated from here
__asm__ ("abc incl %0" : "+r" (X));
^
2 diagnostics generated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100608 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
fc1a9c312d249a2c7458f763f848ba42685c23f8 07-Apr-2010 Chris Lattner <sabre@nondot.org> a ridiculous amount of propagation through the backend later,
have the code generate slap a srcloc metadata on inline asm nodes.
This allows us to diagnose invalid inline asms with such nice
diagnostics as:

<inline asm>:1:2: error: unrecognized instruction
abc incl %eax
^
asm.c:2:12: note: generated from here
__asm__ ("abc incl %0" : "+r" (X));
^
2 diagnostics generated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100608 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
af8e174554a882efc9b9c130287fa3645d80f644 06-Apr-2010 Chris Lattner <sabre@nondot.org> fit in 80 cols


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100534 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
52d9ae3220c08fcbb80f213a364a88e4e0067242 06-Apr-2010 Chris Lattner <sabre@nondot.org> fit in 80 cols


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100534 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
7ad672b93c2c15fe9c2ee32dc8f6e108b8d59d9a 06-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move BitFieldIsSigned bit into CGBitFieldInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100513 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
GValue.h
efbf487da83883c2da81181cac6f040928aa4289 06-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move BitFieldIsSigned bit into CGBitFieldInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100513 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
GValue.h
40f40af7f530f9aa63929a4b04470c75e2b4d564 06-Apr-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100512 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
c7a984af71394402cb4d149554ab5da11aebd729 06-Apr-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100512 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
a462f869a6b2ba0b757e2aa5c3ca87f001fcf4a2 06-Apr-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100511 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
8bea3efe46be55f6632aa2cd1906c21e41ce3737 06-Apr-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100511 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
36b511fbafbba5074f9b2adba4704fdfbde81396 05-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move BitField LValues to just hold a reference to the CGBitFieldInfo.
- Unfortunately, this requires some horrible code in CGObjCMac which always
allocats a CGBitFieldInfo because we don't currently build a proper layout
for Objective-C classes. It needs to be cleaned up, but I don't want the
bit-field cleanups to be blocked on that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100474 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
GObjCMac.cpp
GObjCRuntime.h
GValue.h
f0fe5bc0e46038dc79cdd27fcf0c77ad4789fdff 05-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Move BitField LValues to just hold a reference to the CGBitFieldInfo.
- Unfortunately, this requires some horrible code in CGObjCMac which always
allocats a CGBitFieldInfo because we don't currently build a proper layout
for Objective-C classes. It needs to be cleaned up, but I don't want the
bit-field cleanups to be blocked on that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100474 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
GObjCMac.cpp
GObjCRuntime.h
GValue.h
ba5f76858b3388192b974f38299e17c9416a6257 05-Apr-2010 Devang Patel <dpatel@apple.com> Emit debug info for objc getters and setters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100462 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GObjC.cpp
4800ea6ff8017cf803c32a5fd63b94c0614014e3 05-Apr-2010 Devang Patel <dpatel@apple.com> Emit debug info for objc getters and setters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100462 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GObjC.cpp
c9add5fbf400c7e8aa23be23b54857d9b88a631b 05-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Lift BitFieldInfo to CGBitFieldInfo at namespace level.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100433 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
2eec0b2e3e931de6cefbb266a7652a0622fe95b2 05-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Lift BitFieldInfo to CGBitFieldInfo at namespace level.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100433 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
da7356337884820dfd599404bd77c0b7971110de 05-Apr-2010 Daniel Dunbar <daniel@zuster.org> Add a FIXME and reduce nesting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100432 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
56229f5889ee35495de7138f29712674f8f81ec1 05-Apr-2010 Daniel Dunbar <daniel@zuster.org> Add a FIXME and reduce nesting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100432 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
833f0b8f3087840034bc2468907b08a4d1439c28 04-Apr-2010 Mon P Wang <wangmp@apple.com> Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100305 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDecl.cpp
GExprAgg.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
3ecd785aff34381f3704d9cb28fe3ef85af759de 04-Apr-2010 Mon P Wang <wangmp@apple.com> Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100305 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDecl.cpp
GExprAgg.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
32517fc736bfc89986fb189710f8b99929beb5ea 03-Apr-2010 Rafael Espindola <rafael.espindola@gmail.com> Don't produce a vtable for a class if we have an explicit template instantiation declaration and no key function. We will produce the vtable at the explicit template instantiation.

Fixes PR6748



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100266 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
35d646133ba70e5d44bc2d112ffd5e2ca262dbee 03-Apr-2010 Rafael Espindola <rafael.espindola@gmail.com> Don't produce a vtable for a class if we have an explicit template instantiation declaration and no key function. We will produce the vtable at the explicit template instantiation.

Fixes PR6748



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100266 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d1ee4dc7f69da86047b4e3f169f4b3ee7805bd3f 03-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen/NeXT: Remove my refactoring-enabling asserts, and add a FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100237 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
61ac1d274936d96bd7590adeff75d3466fd87e76 03-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen/NeXT: Remove my refactoring-enabling asserts, and add a FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100237 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d16b90948d3ce7b39adba0546a76b2b9d0ed98d1 02-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen/Obj-C: Eliminate FindIvarInterface, now that ivar's are in the right DeclContexts (-2 FIXMEs). We still have an annoying linear scan + hidden dependency on how Obj-C layout is done.
- This is also an algorithmic improvement in IRgen for Obj-C, although it probably doesn't matter in practice.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100228 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
e83be1228028f44de76cbad9d908e2dc9e261171 02-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen/Obj-C: Eliminate FindIvarInterface, now that ivar's are in the right DeclContexts (-2 FIXMEs). We still have an annoying linear scan + hidden dependency on how Obj-C layout is done.
- This is also an algorithmic improvement in IRgen for Obj-C, although it probably doesn't matter in practice.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100228 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
95e132afa5d5f753fbef53881fe119bae4f0d975 02-Apr-2010 Chris Lattner <sabre@nondot.org> NewDebugLoc got renamed to DebugLoc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100219 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e541d01cc886e4a3c16c98ee7d9921757727adf1 02-Apr-2010 Chris Lattner <sabre@nondot.org> NewDebugLoc got renamed to DebugLoc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100219 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2467dd8bd05b6e9f0ef72f9b870b3758e8b52cc8 02-Apr-2010 Mon P Wang <wangmp@apple.com> Revert r100193 since it causes failures in objc in clang


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100200 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDecl.cpp
GExprAgg.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
c90f56d9f144b2dce88d1c141ddf0e0940e62e63 02-Apr-2010 Mon P Wang <wangmp@apple.com> Revert r100193 since it causes failures in objc in clang


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100200 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDecl.cpp
GExprAgg.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
0fedc2fc0a4dc1cf55ece57b339ca0e20d342ff0 02-Apr-2010 Douglas Gregor <doug.gregor@gmail.com> Rework our handling of copy construction of temporaries, which was a
poor (and wrong) approximation of the actual rules governing when to
build a copy and when it can be elided.

The correct implementation is actually simpler than the
approximation. When we only enumerate constructors as part of
initialization (e.g., for direct initialization or when we're copying
from a class type or one of its derived classes), we don't create a
copy. When we enumerate all conversion functions, we do create a
copy. Before, we created some extra copies and missed some
others. The new test copy-initialization.cpp shows a case where we
missed creating a (required, non-elidable) copy as part of a
user-defined conversion, which resulted in a miscompile. This commit
also fixes PR6757, where the missing copy made us reject well-formed
code in the ternary operator.

This commit also cleans up our handling of copy elision in the case
where we create an extra copy of a temporary object, which became
necessary now that we produce the right copies. The code that seeks to
find the temporary object being copied has moved into
Expr::getTemporaryObject(); it used to have two different
not-quite-the-same implementations, one in Sema and one in CodeGen.

Note that we still do not attempt to perform the named return value
optimization, so we miss copy elisions for return values and throw
expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100196 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
2f59979a7cc7929f53c9984423b0abeb83113442 02-Apr-2010 Douglas Gregor <dgregor@apple.com> Rework our handling of copy construction of temporaries, which was a
poor (and wrong) approximation of the actual rules governing when to
build a copy and when it can be elided.

The correct implementation is actually simpler than the
approximation. When we only enumerate constructors as part of
initialization (e.g., for direct initialization or when we're copying
from a class type or one of its derived classes), we don't create a
copy. When we enumerate all conversion functions, we do create a
copy. Before, we created some extra copies and missed some
others. The new test copy-initialization.cpp shows a case where we
missed creating a (required, non-elidable) copy as part of a
user-defined conversion, which resulted in a miscompile. This commit
also fixes PR6757, where the missing copy made us reject well-formed
code in the ternary operator.

This commit also cleans up our handling of copy elision in the case
where we create an extra copy of a temporary object, which became
necessary now that we produce the right copies. The code that seeks to
find the temporary object being copied has moved into
Expr::getTemporaryObject(); it used to have two different
not-quite-the-same implementations, one in Sema and one in CodeGen.

Note that we still do not attempt to perform the named return value
optimization, so we miss copy elisions for return values and throw
expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100196 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
8e23c2561a3304bd8b1e646d5b080164f60c37a7 02-Apr-2010 Mon P Wang <wangmp@apple.com> Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100193 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDecl.cpp
GExprAgg.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
8facca6cafa8d471768fe14074b1301e24e08fec 02-Apr-2010 Mon P Wang <wangmp@apple.com> Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100193 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDecl.cpp
GExprAgg.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
3ffee40219568b9cdb239a382444f85aa0091659 02-Apr-2010 Daniel Dunbar <daniel@zuster.org> CG/NeXT: Assert some invariants on an ivar's containing decl context that I am about to refactor based on, following some testing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100188 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3a2c80fe4c1f9306b7b96241117730a29e73ea8c 02-Apr-2010 Daniel Dunbar <daniel@zuster.org> CG/NeXT: Assert some invariants on an ivar's containing decl context that I am about to refactor based on, following some testing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100188 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
33a9c6719f7ae57b718deabde474bb1b8115eca5 01-Apr-2010 Chris Lattner <sabre@nondot.org> adjust to IRBuilder change and use faster DebugLoc apis.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100093 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
odeGenModule.cpp
c60346388d60b1756f3675dabb60dc58da0728ec 01-Apr-2010 Chris Lattner <sabre@nondot.org> adjust to IRBuilder change and use faster DebugLoc apis.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100093 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
odeGenModule.cpp
ca7a15360ebda535be0f3281baf6bd4310b9b6d4 31-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Extend DependentNameType with a keyword enum that specifies whether
this was parsed as a typename-specifier, elaborated-type-specifier
(including the kind), or just a dependent qualified type name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100039 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
4a2023f5014e82389d5980d307b89c545dbbac81 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Extend DependentNameType with a keyword enum that specifies whether
this was parsed as a typename-specifier, elaborated-type-specifier
(including the kind), or just a dependent qualified type name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100039 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
725b41e4eefc6d19b6215f24489acbc2e1641765 31-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Rename TypenameType to DependentNameType in anticipation of some
refactoring work in this area.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100019 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
4714c12a1ab759156b78be8f109ea4c12213af57 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Rename TypenameType to DependentNameType in anticipation of some
refactoring work in this area.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100019 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
4928202296dbc7758e73536e5a57f2f432683292 31-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Minor include pruning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100007 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDebugInfo.h
GObjCRuntime.h
GVtable.h
odeGenFunction.h
odeGenModule.h
odeGenTypes.h
6876fe615e16b0e76c7711e129e470305b7e9d41 31-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Minor include pruning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100007 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDebugInfo.h
GObjCRuntime.h
GVtable.h
odeGenFunction.h
odeGenModule.h
odeGenTypes.h
4d08cf29c5bb08bc62ce5754714fe0221316f69c 31-Mar-2010 Chris Lattner <sabre@nondot.org> use the new optimized debug info metadata accessors. In
addition to the inherent win, this eliminates the pointless
cost of going through the name -> mdkind stringmap that we
were paying.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99983 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
odeGenModule.cpp
aaa210cf82141968b59eff28ae448d0e383c46a3 31-Mar-2010 Chris Lattner <sabre@nondot.org> use the new optimized debug info metadata accessors. In
addition to the inherent win, this eliminates the pointless
cost of going through the name -> mdkind stringmap that we
were paying.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99983 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
odeGenModule.cpp
039498e567eebb9a91f0e6e1b075a6775fd4650b 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
GExpr.cpp
GExprConstant.cpp
GObjCMac.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
odeGenTypes.cpp
odeGenTypes.h
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
GExpr.cpp
GExprConstant.cpp
GObjCMac.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
odeGenTypes.cpp
odeGenTypes.h
fc84219710557632a92c9b111c39c9ab627fefb8 31-Mar-2010 Daniel Dunbar <daniel@zuster.org> CGRecordLayoutBuilder: Switch unions to use same mechanism for tracking field and bit-field info as structs.
- Anders, please check.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99977 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
490fc902710eca4e4a07b2ecaa223e70670331d6 31-Mar-2010 Daniel Dunbar <daniel@zuster.org> CGRecordLayoutBuilder: Switch unions to use same mechanism for tracking field and bit-field info as structs.
- Anders, please check.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99977 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
8608b86b1dcfdba7148d32cab18b2245ce4994c6 31-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Drastically simplify the computation of linkage for typeinfo by using
the existing (and already well-tested) linkage computation for types,
with minor tweaks for dynamic classes and (pointers to) incomplete
types. Fixes PR6597.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99968 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
031b37140d0864c741618960b5220245a2a086ae 31-Mar-2010 Douglas Gregor <dgregor@apple.com> Drastically simplify the computation of linkage for typeinfo by using
the existing (and already well-tested) linkage computation for types,
with minor tweaks for dynamic classes and (pointers to) incomplete
types. Fixes PR6597.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99968 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
695e5385895199496e3ab27e2751019fd9edfea5 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
GRecordLayout.h
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
odeGenTypes.cpp
odeGenTypes.h
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
GRecordLayout.h
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
odeGenTypes.cpp
odeGenTypes.h
27160d35e436d2611ade7eb76d31da99b38a32ac 31-Mar-2010 John McCall <rjmccall@apple.com> Introduce a new kind of derived-to-base cast which bypasses the need for
null checks, and make sure we elide null checks when accessing base class
members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99963 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
23cba801e11b03929c44f8cf54578305963a3476 31-Mar-2010 John McCall <rjmccall@apple.com> Introduce a new kind of derived-to-base cast which bypasses the need for
null checks, and make sure we elide null checks when accessing base class
members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99963 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
0606e6b405fc42b92b89f0beff9d5875841a9c8f 31-Mar-2010 Bob Wilson <bob.wilson@apple.com> Revert Mon Ping's 99930 due to broken llvm-gcc buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99949 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDecl.cpp
GExprAgg.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
b5896c37922e09529e61db4b3dd946cf2ecb211e 31-Mar-2010 Bob Wilson <bob.wilson@apple.com> Revert Mon Ping's 99930 due to broken llvm-gcc buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99949 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDecl.cpp
GExprAgg.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
4ec849aa6f6aeb714058867c089c9de589e4e793 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
odeGenTypes.cpp
odeGenTypes.h
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
odeGenTypes.cpp
odeGenTypes.h
7cd8297e67fe0c6a647da776917d957ae1f26410 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
GExprConstant.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
odeGenTypes.cpp
odeGenTypes.h
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
GExprConstant.cpp
GRecordLayout.h
GRecordLayoutBuilder.cpp
odeGenTypes.cpp
odeGenTypes.h
0f25f762ef2e833107e74f6ea733a02c5d6488a6 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
GExpr.cpp
odeGenTypes.cpp
odeGenTypes.h
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
GExpr.cpp
odeGenTypes.cpp
odeGenTypes.h
2ffdc0f8242c22c4bca8bbc2390be61a8a80e4b8 31-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Remember the regparm attribute in FunctionType::ExtInfo.
Fixes PR3782.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99940 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
425ef72306d4ff6b3698b744353e5f0e56b4b884 31-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Remember the regparm attribute in FunctionType::ExtInfo.
Fixes PR3782.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99940 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
07971ff14cfeff7b3c8f983d3a5a1c826d6406ef 30-Mar-2010 Mon P Wang <wangmp@apple.com> Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99930 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDecl.cpp
GExprAgg.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
3b5caa20652c43d00229bac972b78bee44a0ee9f 30-Mar-2010 Mon P Wang <wangmp@apple.com> Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99930 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDecl.cpp
GExprAgg.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
433d7d2c70b9be3f9edd40579f512ecab8755049 30-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> the big refactoring bits of PR3782.

This introduces FunctionType::ExtInfo to hold the calling convention and the
noreturn attribute. The next patch will extend it to include the regparm
attribute and fix the bug.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99920 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCall.cpp
GCall.h
GClass.cpp
GExprCXX.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GVtable.cpp
odeGenFunction.cpp
odeGenTypes.h
264ba48dc98f3f843935a485d5b086f7e0fdc4f1 30-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> the big refactoring bits of PR3782.

This introduces FunctionType::ExtInfo to hold the calling convention and the
noreturn attribute. The next patch will extend it to include the regparm
attribute and fix the bug.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99920 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCall.cpp
GCall.h
GClass.cpp
GExprCXX.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GVtable.cpp
odeGenFunction.cpp
odeGenTypes.h
12640527c2bfbb97db3e1ee33f338e794558325d 30-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Don't produce a vtable if we are just instantiating a method and the
class has no key function.

Fix PR6738.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99900 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e0f38678f01291e68fc70ea6056260b54d529307 30-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Don't produce a vtable if we are just instantiating a method and the
class has no key function.

Fix PR6738.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99900 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
68fb7f0fd4a95579c046b1cc9d10cbff64a6a354 30-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Replace some constant-sized SmallVectors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99884 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GObjC.cpp
ad4688669579d5d7b025137a095be66936d7ea31 30-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Replace some constant-sized SmallVectors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99884 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GObjC.cpp
f550e72e93ec59a3eb506990a0fbdb0b84c42167 30-Mar-2010 Anders Carlsson <andersca@mac.com> Remove the old vtable layout code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99869 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
GVTT.cpp
GVtable.cpp
GVtable.h
odeGenModule.h
angle.cpp
angle.h
bfb7a1d6eba6714bd71db921092332da65b774c0 30-Mar-2010 Anders Carlsson <andersca@mac.com> Remove the old vtable layout code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99869 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
GVTT.cpp
GVtable.cpp
GVtable.h
odeGenModule.h
angle.cpp
angle.h
0757bfe1aea4d779ec68425973d7e9a623ef7266 30-Mar-2010 Anders Carlsson <andersca@mac.com> Remove UseNewVTableCode checks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99868 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
9dc338ac74e7855293a60812bd5780a52f141f52 30-Mar-2010 Anders Carlsson <andersca@mac.com> Remove UseNewVTableCode checks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99868 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
35ea9cf6d495c35c7227dd2ec3dcab287223a28b 30-Mar-2010 Anders Carlsson <andersca@mac.com> Use the new function in EmitClassAggrMemberwiseCopy, fixing the same assert as seen in PR6628 but for arrays this time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99867 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
8887bdcd4056ac25cb37dcb2abb9514e668eb81a 30-Mar-2010 Anders Carlsson <andersca@mac.com> Use the new function in EmitClassAggrMemberwiseCopy, fixing the same assert as seen in PR6628 but for arrays this time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99867 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
eddd27990aebf3ca8752a103ccd2f7f657354567 30-Mar-2010 Anders Carlsson <andersca@mac.com> Factor emitting a call to a copy constructor out into a separate function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99866 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
21c9ad9d29d08a287292c670e7c52bc522c7f8bb 30-Mar-2010 Anders Carlsson <andersca@mac.com> Factor emitting a call to a copy constructor out into a separate function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99866 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
3b2920f06d5a856a7269aa07d6b786fa6e2488a0 30-Mar-2010 Anders Carlsson <andersca@mac.com> Introduce a CXXTemporariesCleanupScope RAII object and use it to cleanup the temporaries code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99865 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GTemporaries.cpp
odeGenFunction.h
44ec82b4a1597802f5bf17721481b8c265bc8dc5 30-Mar-2010 Anders Carlsson <andersca@mac.com> Introduce a CXXTemporariesCleanupScope RAII object and use it to cleanup the temporaries code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99865 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GTemporaries.cpp
odeGenFunction.h
bf664f42bf6776a80f3c237dbd8a7561876cd4e2 30-Mar-2010 Anders Carlsson <andersca@mac.com> Handle default arguments when calling copy constructors for bases or members when synthesizing a copy constructor. Fixes PR6628.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99864 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
46bbf8d352fcd615420c5759a112ccd6e61516ad 30-Mar-2010 Anders Carlsson <andersca@mac.com> Handle default arguments when calling copy constructors for bases or members when synthesizing a copy constructor. Fixes PR6628.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99864 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
a3a0b47b425fca31d00a98c5a5a1cb82893d8a2b 30-Mar-2010 Anders Carlsson <andersca@mac.com> Flip the switch and use the new vtable layout code for everything. I've verified that this passes a self-host but I'll let the bots self host as well before removing the now dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99861 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c9b64bafaf3129568f013e0c2875e1fcb9f51e6b 30-Mar-2010 Anders Carlsson <andersca@mac.com> Flip the switch and use the new vtable layout code for everything. I've verified that this passes a self-host but I'll let the bots self host as well before removing the now dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99861 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
03d9f05352a676bb5c2c3c74930b6922434eddfe 30-Mar-2010 Ted Kremenek <kremenek@apple.com> Cache results computed by CGDebugInfo::getOrCreateFile() in a DenseMap.
This reduces '-c -g' time on one file in 403.gcc by 12%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99857 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
9c25039c4b93faf9cd09b62d41552cc3c5986d12 30-Mar-2010 Ted Kremenek <kremenek@apple.com> Cache results computed by CGDebugInfo::getOrCreateFile() in a DenseMap.
This reduces '-c -g' time on one file in 403.gcc by 12%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99857 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
c02bbf245f2cd4260d11e390f410cd5db1167e88 29-Mar-2010 Ted Kremenek <kremenek@apple.com> Remove FIXME comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99828 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.h
a1d2d397d64a9791f609532c995ad3eb9158d203 29-Mar-2010 Ted Kremenek <kremenek@apple.com> Remove FIXME comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99828 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.h
2822aa564ef479ad1ea54c7c35d1d635a2674bb1 29-Mar-2010 Ted Kremenek <kremenek@apple.com> Change 'TypeCache' from being an std::map to a llvm::DenseMap. This reduces codegen time
on one .i file from 403.gcc by 0.5%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99823 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
590838badd46e0559a6b709857fb87530e546276 29-Mar-2010 Ted Kremenek <kremenek@apple.com> Change 'TypeCache' from being an std::map to a llvm::DenseMap. This reduces codegen time
on one .i file from 403.gcc by 0.5%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99823 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
575c474777248d3678401bcee017ddbd31b0047a 29-Mar-2010 Chris Lattner <sabre@nondot.org> emit signed integer subtractions as 'sub nsw', patch by
Anton Yartsev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99817 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
2eb91e4812d54a1cf634c265a16633a3d3edcf91 29-Mar-2010 Chris Lattner <sabre@nondot.org> emit signed integer subtractions as 'sub nsw', patch by
Anton Yartsev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99817 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
bce7c6a053916ac548478bd97e6094e7e8a5e952 29-Mar-2010 Anders Carlsson <andersca@mac.com> Another vtable layout fix, making us match gcc better.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99812 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
adb507df13aeb2334eddef64e6bbdf41a44dc5b1 29-Mar-2010 Anders Carlsson <andersca@mac.com> Another vtable layout fix, making us match gcc better.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99812 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
7ed3fb95ef563a11adc825585b7624a46d6f5bc2 29-Mar-2010 Anders Carlsson <andersca@mac.com> Handle pure virtual member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99807 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
67d568aaeba023e42ca74da3dca18e161664f567 29-Mar-2010 Anders Carlsson <andersca@mac.com> Handle pure virtual member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99807 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ebff56a10313d5e8daca892517d8438e87cc8b4b 29-Mar-2010 Anders Carlsson <andersca@mac.com> More vtable work - it's not possible to use the new vtable code for everything by setting a flag inside CGVtable.cpp. My plan is to run some tests and bootstrap and once that's done flip the bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99804 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
a7cde3bb62eccc087821ee91c4ee4f6fd9a76b44 29-Mar-2010 Anders Carlsson <andersca@mac.com> More vtable work - it's not possible to use the new vtable code for everything by setting a flag inside CGVtable.cpp. My plan is to run some tests and bootstrap and once that's done flip the bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99804 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
54f5fad4695e036f4c72644abc77567644ef3f34 29-Mar-2010 Anders Carlsson <andersca@mac.com> Only add thunks for the most derived class. This fixes some link errors I was seeing in files generated by the vtable tester utility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99801 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
acfa6ae66e8b8bb83edc13e1e560fd14ad72f783 29-Mar-2010 Anders Carlsson <andersca@mac.com> Only add thunks for the most derived class. This fixes some link errors I was seeing in files generated by the vtable tester utility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99801 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
65aa918b4db7717165e6814ba4319f7cb5c05e11 29-Mar-2010 Anders Carlsson <andersca@mac.com> Flip the switch to always get vtables from the VTT when necessary, I've verified that clang bootstraps with this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99800 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
851853d8b71f5bf2f24705c8dc2df54b2af88d71 29-Mar-2010 Anders Carlsson <andersca@mac.com> Flip the switch to always get vtables from the VTT when necessary, I've verified that clang bootstraps with this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99800 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
9feff9b4fdd8a77f45f46465cc316b053f12d2e2 29-Mar-2010 Anders Carlsson <andersca@mac.com> Use the newly added function in the VTT builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99799 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
0a4a2fd5da5312a0dbc98198a49928c852180411 29-Mar-2010 Anders Carlsson <andersca@mac.com> Use the newly added function in the VTT builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99799 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
9250d34e7322ef3618917d7491cf35701f2b9508 29-Mar-2010 Anders Carlsson <andersca@mac.com> Cleanup, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99798 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GVtable.cpp
GVtable.h
64c9eca97e06d80960d8782769661904e261ac29 29-Mar-2010 Anders Carlsson <andersca@mac.com> Cleanup, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99798 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GVtable.cpp
GVtable.h
f751308593330372c38ff3d7b68bbc0af85a5457 29-Mar-2010 Anders Carlsson <andersca@mac.com> Add the thunks needed by this vtable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99793 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
276701f38d383e9bf036b6b4af60f7e18ec4e525 29-Mar-2010 Anders Carlsson <andersca@mac.com> Add the thunks needed by this vtable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99793 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
bcf0f864b0d5cef26e4ee80c31265eac1d81bc43 29-Mar-2010 Anders Carlsson <andersca@mac.com> Make sure to sort the vtable thunks by their vtable index :) With this we now pass the test from http://www.codesourcery.com/public/cxx-abi/abi-examples.html#vtable-ctor successfully.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99792 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
aed924e9f210169c9a5b0ca30099fd2f479f2637 29-Mar-2010 Anders Carlsson <andersca@mac.com> Make sure to sort the vtable thunks by their vtable index :) With this we now pass the test from http://www.codesourcery.com/public/cxx-abi/abi-examples.html#vtable-ctor successfully.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99792 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f80985d06bb68d0b0285c8ec7b0e9a900be940df 29-Mar-2010 Anders Carlsson <andersca@mac.com> Fix another thinko, so that flags don't depend on previous bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99791 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
14da9de3ad9a451ed58f0196eea945c8393d5762 29-Mar-2010 Anders Carlsson <andersca@mac.com> Fix another thinko, so that flags don't depend on previous bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99791 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
b62bfb30da0e5086626fa5d7ace3c910fd5d8ad9 29-Mar-2010 Anders Carlsson <andersca@mac.com> When generating base ctors/dtors, we need to lookup virtual bases using the vtable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99790 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
b358814a25a75657f7f80ee9e198834da873c76e 29-Mar-2010 Anders Carlsson <andersca@mac.com> When generating base ctors/dtors, we need to lookup virtual bases using the vtable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99790 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
6905bc7feede329518cd63d1d28e6c6be12da578 29-Mar-2010 Anders Carlsson <andersca@mac.com> Fix thinko.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99788 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
80faf6986c667ca0f7e8d665f8aa104c8e2fa105 29-Mar-2010 Anders Carlsson <andersca@mac.com> Fix thinko.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99788 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
a3a78682fb2fb38c781b0fdacc93bb5068ff7982 29-Mar-2010 Anders Carlsson <andersca@mac.com> Use construction vtables when needed. This is currently guarded by -fdump-vtable-layouts since it doesn't work 100% yet :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99787 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
c83f1061fedc223ad661e25337cc853f54671d8a 29-Mar-2010 Anders Carlsson <andersca@mac.com> Use construction vtables when needed. This is currently guarded by -fdump-vtable-layouts since it doesn't work 100% yet :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99787 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
70c21e4c9115e26e994705a42b972e4b041b4226 29-Mar-2010 Anders Carlsson <andersca@mac.com> Two bug fixes, we weren't updating the thunk index when creating the vtable initializer and we weren't storing the secondary virtual pointer indices.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99786 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVtable.cpp
f6da6a082cc97cd496260875742241f9457185f5 29-Mar-2010 Anders Carlsson <andersca@mac.com> Two bug fixes, we weren't updating the thunk index when creating the vtable initializer and we weren't storing the secondary virtual pointer indices.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99786 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVtable.cpp
e61f6aed2ba306a409cbc4db459d882b900f591c 28-Mar-2010 Anders Carlsson <andersca@mac.com> Reapply r99775 with a fix for a silly bug - we were setting the vtable pointer for all bases, even those without a vtable pointer :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99777 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
603d6d12cc4cba1ef219a3d55c698c7c87f87adf 28-Mar-2010 Anders Carlsson <andersca@mac.com> Reapply r99775 with a fix for a silly bug - we were setting the vtable pointer for all bases, even those without a vtable pointer :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99777 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
375615efa63e1d8a209caab0b614ca76d1993da6 28-Mar-2010 Anders Carlsson <andersca@mac.com> Looks like I broke self-host again :(.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99776 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
4658990ac17046bfe7a30c45c9faea9e617eb479 28-Mar-2010 Anders Carlsson <andersca@mac.com> Looks like I broke self-host again :(.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99776 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
863c5c781f1d2321cd5b6490557d7c0325353d0e 28-Mar-2010 Anders Carlsson <andersca@mac.com> More improvements to setting the vtable pointer. We now no longer set the vtable pointer for non-virtual primary bases. We also do a pre-order traversal of the class hierarchy; this is necessary in order to get the right vbase offset offsets in base ctors/dtors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99775 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
bdb88655204ec14a20e51210bd50e84fe2f1cee9 28-Mar-2010 Anders Carlsson <andersca@mac.com> More improvements to setting the vtable pointer. We now no longer set the vtable pointer for non-virtual primary bases. We also do a pre-order traversal of the class hierarchy; this is necessary in order to get the right vbase offset offsets in base ctors/dtors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99775 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
0e8bc4b59d84483079e3d74d276205f7e96ea49b 28-Mar-2010 Anders Carlsson <andersca@mac.com> Factor vtable pointer setting code out into a separate function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99773 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
d103f9f9b401b419e756f8c1849683cd77586067 28-Mar-2010 Anders Carlsson <andersca@mac.com> Factor vtable pointer setting code out into a separate function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99773 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
c24ebec0cc18e9e057683db03654c6c4ae958332 27-Mar-2010 Anders Carlsson <andersca@mac.com> Give thunks the same linkage as their original methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99729 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ada087c4518a18f844ecc051b07039064016a4ba 27-Mar-2010 Anders Carlsson <andersca@mac.com> Give thunks the same linkage as their original methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99729 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
96193c52378b7e3b89a69c4cd79e631d5b7a6c15 27-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> When given the magic class __cxxabiv1::__fundamental_type_info, produce
the typeinfo for the fundamental types.

Fixes PR6685.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99701 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
odeGenModule.cpp
odeGenModule.h
d1a5c31b78997befe75d10a4731cee4ab211cc31 27-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> When given the magic class __cxxabiv1::__fundamental_type_info, produce
the typeinfo for the fundamental types.

Fixes PR6685.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99701 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
odeGenModule.cpp
odeGenModule.h
afb06588595a1823b979b7aa34ddcbb8485067f3 27-Mar-2010 John McCall <rjmccall@apple.com> When mapping restrict to noalias, look for 'restrict' on the parameter variable
instead of the canonical parameter type (which has correctly dropped all such
direct qualifiers). Fixes PR6695.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99688 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
d8e10d26b5a24257fe13c289b653fd450326eeff 27-Mar-2010 John McCall <rjmccall@apple.com> When mapping restrict to noalias, look for 'restrict' on the parameter variable
instead of the canonical parameter type (which has correctly dropped all such
direct qualifiers). Fixes PR6695.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99688 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
a33c8e25e0a8b88dabda181e35ea885563e6eebe 26-Mar-2010 Nick Lewycky <nicholas@mxc.ca> Implement new mangling for vectors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99616 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
0e5f067da58e43aa9bdfd1317283b52d4beeb19a 26-Mar-2010 Nick Lewycky <nicholas@mxc.ca> Implement new mangling for vectors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99616 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
4b7d45882ee023000de9797f561f583a1c6af174 26-Mar-2010 Anders Carlsson <andersca@mac.com> Revert r99612 and see if it fixes self-host.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99614 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
94e8ee520a00dcbdc896df07973d68f5ec7fdac8 26-Mar-2010 Anders Carlsson <andersca@mac.com> Revert r99612 and see if it fixes self-host.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99614 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
fe7675c5f2dd3caf704cec8e5e4adbde7ff5a7cf 26-Mar-2010 Anders Carlsson <andersca@mac.com> Don't initialize virtual pointers for primary bases, they've already been initialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99612 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
c2d526e4b2fa1cda43e614d80c9fc156f2874996 26-Mar-2010 Anders Carlsson <andersca@mac.com> Don't initialize virtual pointers for primary bases, they've already been initialized.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99612 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
bb83f2716b1fb465f2c6f8ae3e84bac213cd4a64 26-Mar-2010 Anders Carlsson <andersca@mac.com> Simplify InitializeVtablePtrs in preparation of making it work with construction vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99609 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
0703690603bd197b581ceb2fb9a020aa88b9a106 26-Mar-2010 Anders Carlsson <andersca@mac.com> Simplify InitializeVtablePtrs in preparation of making it work with construction vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99609 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
3cec317f9f783c912f225f11d18e69bf9dfa01bf 26-Mar-2010 Anders Carlsson <andersca@mac.com> Add and implement CodeGenVTables::getSecondaryVirtualPointerIndex (not used yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99608 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVtable.h
e1dcc2240114e81513bb30e3c89684824ddb1b1f 26-Mar-2010 Anders Carlsson <andersca@mac.com> Add and implement CodeGenVTables::getSecondaryVirtualPointerIndex (not used yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99608 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVtable.h
9275e39e35a9882649d99e5f44fe090d66373c96 26-Mar-2010 Anders Carlsson <andersca@mac.com> Use the new vtable layout code for construction vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99606 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0bf4089d190ba80bc2ef5734ab736b6ea6d01fbc 26-Mar-2010 Anders Carlsson <andersca@mac.com> Use the new vtable layout code for construction vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99606 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e79bf920b3956d908460e14534411015cfab4193 26-Mar-2010 Anders Carlsson <andersca@mac.com> More cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99605 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
19f191fad178baf25388d972c71facbd26932693 26-Mar-2010 Anders Carlsson <andersca@mac.com> More cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99605 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
f9cdd85fb19c66a14aa2e90f761df4ecd06e8e84 26-Mar-2010 Anders Carlsson <andersca@mac.com> Way more VTT builder cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99604 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVtable.cpp
GVtable.h
2c822f1cecf6e89a129c3e5ad969564b56326140 26-Mar-2010 Anders Carlsson <andersca@mac.com> Way more VTT builder cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99604 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVtable.cpp
GVtable.h
7a3c88a0f99a896d4f96669c62332f97414fd2e0 26-Mar-2010 Anders Carlsson <andersca@mac.com> More VTT builder cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99588 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
50a2b426b3a4db544945273207f900c085b3edbd 26-Mar-2010 Anders Carlsson <andersca@mac.com> More VTT builder cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99588 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
45788cc86e5a28d8a3e89a64cd35dc328f4cd7f7 26-Mar-2010 Anders Carlsson <andersca@mac.com> More VTT cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99586 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
9f17d410044af23fe426c504bc969156f0fc248d 26-Mar-2010 Anders Carlsson <andersca@mac.com> More VTT cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99586 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
e50f9517e27750aa87d2d18fd91dbbde4958b818 26-Mar-2010 Anders Carlsson <andersca@mac.com> Start cleaning up the VTT builder to make it work more like the VTable builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99581 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVtable.cpp
c1246c882bfbb3ec6fe982ab3c63998414a72fb9 26-Mar-2010 Anders Carlsson <andersca@mac.com> Start cleaning up the VTT builder to make it work more like the VTable builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99581 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVtable.cpp
e8d00b903efc1b4a19d6587f23574d8508904a2a 26-Mar-2010 Anders Carlsson <andersca@mac.com> Remove some VTT builder arguments that were always zero.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99576 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
1822254debf013860b008a27754ed909b66784d3 26-Mar-2010 Anders Carlsson <andersca@mac.com> Remove some VTT builder arguments that were always zero.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99576 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
5cd3c2fab5f5d7a7321010ce873cc6b2fcaecc85 25-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a code gen. bug involving generation of getter method
from properties of _Complex type. (radar 7351147).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99558 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
1b23fe61cf4437668280212d0ad6cb7196f51529 25-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a code gen. bug involving generation of getter method
from properties of _Complex type. (radar 7351147).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99558 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
2adc0ad633920da51ee1efa93d77dd0f6d66a91e 25-Mar-2010 Anders Carlsson <andersca@mac.com> Don't add address points for virtual primary bases that aren't primary bases in the complete class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99555 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
014a358058fab46a84718b1424e40ad5a8068827 25-Mar-2010 Anders Carlsson <andersca@mac.com> Don't add address points for virtual primary bases that aren't primary bases in the complete class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99555 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d39a5e7bb75d659025762c035dade1bfc2dddd2a 25-Mar-2010 Daniel Dunbar <daniel@zuster.org> Remove support for nand atomic builtins. They are inconsistently implemented in
gcc, and the common expectation seems to be that they are unused. If and when
someone cares we can add them back with well documented demantics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99522 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
7eff7c4153faf45b19b5919ef409ee5f6794eb25 25-Mar-2010 Daniel Dunbar <daniel@zuster.org> Remove support for nand atomic builtins. They are inconsistently implemented in
gcc, and the common expectation seems to be that they are unused. If and when
someone cares we can add them back with well documented demantics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99522 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
2fbf3b492b21dacef8f586a059da445053c8c716 25-Mar-2010 Anders Carlsson <andersca@mac.com> Use the new vtable layout code for construction vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99516 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6a5ab5d7bc962a4ab461ce4f33f658ba6c10cc64 25-Mar-2010 Anders Carlsson <andersca@mac.com> Use the new vtable layout code for construction vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99516 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a89819e50e27f02a24a6bcb668f70d77e0f246f0 25-Mar-2010 Anders Carlsson <andersca@mac.com> When -fdump-vtable-layouts is specified, construction vtable initializers will be generated using the new vtable layout code. (The code is still not completely in place but this is a huge step forward).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99508 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
0d1407e8784844397e0f754a2212161c563f25fa 25-Mar-2010 Anders Carlsson <andersca@mac.com> When -fdump-vtable-layouts is specified, construction vtable initializers will be generated using the new vtable layout code. (The code is still not completely in place but this is a huge step forward).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99508 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
ec64c0b26baa2c716ca7137a143a9aa5c83ce4fd 25-Mar-2010 Anders Carlsson <andersca@mac.com> More address point map shuffling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99462 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVtable.cpp
GVtable.h
66d567d849f160593064cd3eae336d8aa2de363c 25-Mar-2010 Anders Carlsson <andersca@mac.com> More address point map shuffling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99462 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVtable.cpp
GVtable.h
aae6af28ce7e7574d3bb0c0fcf3cdaea06ab9130 25-Mar-2010 Anders Carlsson <andersca@mac.com> Shuffle some code around; this will make it easier to use the new layout code for address points.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99461 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVtable.cpp
GVtable.h
ff143f8f78f6f2417d4b46d41c83f287485f0aec 25-Mar-2010 Anders Carlsson <andersca@mac.com> Shuffle some code around; this will make it easier to use the new layout code for address points.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99461 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVtable.cpp
GVtable.h
b3f97dc2eaf84f87f29bc338d89e449ffce05a72 25-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> When returning from a function that has a reference return type, use
EmitReferenceBindingToExpr() rather than assuming we have an
lvalue. This is just the lowest hanging fruit for PR6024, which still
requires a bit of work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99447 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
33fd1fc1814a5573c972840d49317989e20deace 25-Mar-2010 Douglas Gregor <dgregor@apple.com> When returning from a function that has a reference return type, use
EmitReferenceBindingToExpr() rather than assuming we have an
lvalue. This is just the lowest hanging fruit for PR6024, which still
requires a bit of work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99447 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
e48c44a651a40732b4a5bf2ed5e5e78085f8435a 24-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Change two class forward declarations to struct forward declarations, silencing a Clang warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99405 91177308-0d34-0410-b5e6-96231b3b80d8
angle.h
9ff659b1950fa67958a057b97fdd36aadfb8017e 24-Mar-2010 Douglas Gregor <dgregor@apple.com> Change two class forward declarations to struct forward declarations, silencing a Clang warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99405 91177308-0d34-0410-b5e6-96231b3b80d8
angle.h
00eefdc43f931fb926854096f8884ba8f10e9c54 24-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Code gen for multi-dimensional dynamic allocations.
Fixes PR6641.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99404 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
ceb43b662bf09b44a08714e8f9d222780ca979d7 24-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Code gen for multi-dimensional dynamic allocations.
Fixes PR6641.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99404 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
e218fa53237ddfa4adedb1f21b7ddae64a2e76d7 24-Mar-2010 Anders Carlsson <andersca@mac.com> More vtable improvements. We now compute and keep track of all vtable related information which avoids computing the same vtable layout over and over.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99403 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
ccd83d748c82c5255100f38e3f07537b949853b3 24-Mar-2010 Anders Carlsson <andersca@mac.com> More vtable improvements. We now compute and keep track of all vtable related information which avoids computing the same vtable layout over and over.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99403 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
7646ab22feb96f88d06dd489e57a2f4fd79f43b7 24-Mar-2010 Anders Carlsson <andersca@mac.com> Use getNamedGlobal instead of getGlobalVariable. (Fixes self-host).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99385 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GVTT.cpp
GVtable.cpp
GVtable.h
5eea8768b7a659825a46d7e55730a75282231a6f 24-Mar-2010 Anders Carlsson <andersca@mac.com> Use getNamedGlobal instead of getGlobalVariable. (Fixes self-host).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99385 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GVTT.cpp
GVtable.cpp
GVtable.h
fea5b0f44318a71ce51650a5cc49130c3ab9f08b 24-Mar-2010 Anders Carlsson <andersca@mac.com> More vtable work; preparations for moving over to the new vtable layout code (finally).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99381 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GVTT.cpp
GVtable.cpp
GVtable.h
odeGenFunction.h
5c6c1d9eca7ce932eff011cd3e592f606e60b4be 24-Mar-2010 Anders Carlsson <andersca@mac.com> More vtable work; preparations for moving over to the new vtable layout code (finally).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99381 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GVTT.cpp
GVtable.cpp
GVtable.h
odeGenFunction.h
326c464df4b86c3c0c877180b0f74ee6691aaeb9 24-Mar-2010 Anders Carlsson <andersca@mac.com> Remove old thunks code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99374 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
GVtable.h
odeGenFunction.h
odeGenModule.h
f532f3b4a642ad5d9704c4a1d17b61cc52ab2f65 24-Mar-2010 Anders Carlsson <andersca@mac.com> Remove old thunks code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99374 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
GVtable.h
odeGenFunction.h
odeGenModule.h
2c21ec89c55976c4a99c5b2e2e8935492879e525 24-Mar-2010 Anders Carlsson <andersca@mac.com> Flip the switch and use the new vtable layout code for thunks by default. Add a thunks.cpp test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99367 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d63fed48fa958ca7d9a432dab1010c272c19f215 24-Mar-2010 Anders Carlsson <andersca@mac.com> Flip the switch and use the new vtable layout code for thunks by default. Add a thunks.cpp test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99367 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6e9cec3e2ea4df58479de0c3ea04ffcc62e56da2 24-Mar-2010 Anders Carlsson <andersca@mac.com> Add CodeGenFunction::GenerateThunk and implement it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99365 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
odeGenFunction.h
519c32880b99396034ecaedc0cd86db2e8485003 24-Mar-2010 Anders Carlsson <andersca@mac.com> Add CodeGenFunction::GenerateThunk and implement it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99365 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
odeGenFunction.h
072d6203bf6d8742020cd9f144bbbdd0bb579992 24-Mar-2010 Anders Carlsson <andersca@mac.com> Minor cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99364 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
13d6898f89ad1b044d650d01d81176089a5ab363 24-Mar-2010 Anders Carlsson <andersca@mac.com> Minor cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99364 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6c00ff82c690638b3069d0617389b258587c9165 23-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> revert 99311. Looks like it broke darwin bootstrap.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99317 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
odeGenModule.cpp
f075b229643aa07389a6055352ade7446241c3ca 23-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> revert 99311. Looks like it broke darwin bootstrap.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99317 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
odeGenModule.cpp
42f35be726fb70c8900da3bbd67e17ff5caa56ac 23-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Avoid producing implicit methods when we have a explicit template instantiation
declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99311 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
odeGenModule.cpp
5fb12c6c8f64d4b69f65faefb7d0800d7e4bca66 23-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Avoid producing implicit methods when we have a explicit template instantiation
declaration.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99311 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
odeGenModule.cpp
febfc46ab324c8e2e2cf21c569d5f5845958f2c2 23-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Code gen for compound assignment of complex
types using property syntax to access setter/getters.
(also radar 7351147).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99307 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
707ea283f5514e2cb633a89f702190f0d798c7ea 23-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Code gen for compound assignment of complex
types using property syntax to access setter/getters.
(also radar 7351147).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99307 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
01aba787a5224855e7416f0bfa95ec1fcc0a234d 23-Mar-2010 Anders Carlsson <andersca@mac.com> More work on thunks - don't assert if there's a variable with the same name as the thunk already.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99303 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
7986ad5f8de58987a3f3f5ec27d6e765f9e14c9a 23-Mar-2010 Anders Carlsson <andersca@mac.com> More work on thunks - don't assert if there's a variable with the same name as the thunk already.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99303 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
9ac90b0c9a597b46cc0115bd7152e609ebbcc6bf 23-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to implement code gen. use of compound assignent on
properties of complex type. Radar 7351147.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99299 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
dfb1eb208e401a0e5ecf2910e1a73b09aa69fd26 23-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to implement code gen. use of compound assignent on
properties of complex type. Radar 7351147.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99299 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
6b0b1941f514156d38ff92fda8604df87333053e 23-Mar-2010 Anders Carlsson <andersca@mac.com> More thunks scaffolding.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99294 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
odeGenModule.h
angle.cpp
angle.h
19879c98d964bc67442618510af04e3457219780 23-Mar-2010 Anders Carlsson <andersca@mac.com> More thunks scaffolding.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99294 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
odeGenModule.h
angle.cpp
angle.h
21a3ffcfc48589f88c1d01d0da542d3b7971cea8 23-Mar-2010 Anders Carlsson <andersca@mac.com> More work on thunks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99287 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
fbf6ed46dd6ecc8d94a5f35ddf88b59c39895b84 23-Mar-2010 Anders Carlsson <andersca@mac.com> More work on thunks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99287 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
903c90b396db60de3f3e78981550c2b40a81b8d1 23-Mar-2010 Anders Carlsson <andersca@mac.com> Move ThunkInfo as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99280 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
b4e4c96b9e717ae747f8a22b432695d833b4c0d6 23-Mar-2010 Anders Carlsson <andersca@mac.com> Move ThunkInfo as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99280 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
7bdd40719587e07b8e769d9cc14a7cd2daf9acb8 23-Mar-2010 Anders Carlsson <andersca@mac.com> Move ReturnAdjustment and ThisAdjustment out into CGVtable.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99279 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
80d8d7da43571dba85c55528a1ea56870fd6ad3a 23-Mar-2010 Anders Carlsson <andersca@mac.com> Move ReturnAdjustment and ThisAdjustment out into CGVtable.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99279 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
ada7ac5f52ad0550800948bcc1c8684980ff91bf 23-Mar-2010 Anders Carlsson <andersca@mac.com> Use the canonical destructor, which fixes the self-host build. Thanks to Eli for noticing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99260 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
02e245942f3808bfbba5fbd25af9690682cc800d 23-Mar-2010 Anders Carlsson <andersca@mac.com> Use the canonical destructor, which fixes the self-host build. Thanks to Eli for noticing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99260 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
7f70a2386fab9b9b7210974629eea75937e93eab 23-Mar-2010 Anders Carlsson <andersca@mac.com> Baby steps towards making thunks be emitted from the new vtable layout code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99254 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
ee5ab9f7a6368e516ab4e9eeadff0b2e9df03b34 23-Mar-2010 Anders Carlsson <andersca@mac.com> Baby steps towards making thunks be emitted from the new vtable layout code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99254 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
1566a3ad453ccf4bb80a55fddeb83acce43318ed 23-Mar-2010 Anders Carlsson <andersca@mac.com> Some renames.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99253 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
3a5df3fc95082ae7ac8919e1a6483b0d1c5e39c1 23-Mar-2010 Anders Carlsson <andersca@mac.com> Some renames.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99253 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
cb3a9264ebc0d7fc9d9aa451c3f44cbdb623ac52 23-Mar-2010 Anders Carlsson <andersca@mac.com> Always emit associated thunks when emitting the function itself. Remove getVtableAddressPoint, it's not used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99252 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
GVtable.h
odeGenModule.cpp
7270ee4cd4794281c09dfb6931a98bbb2581ef02 23-Mar-2010 Anders Carlsson <andersca@mac.com> Always emit associated thunks when emitting the function itself. Remove getVtableAddressPoint, it's not used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99252 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
GVtable.h
odeGenModule.cpp
334608c70dd8898aa79a15aa8cd1da30a18449bd 23-Mar-2010 Anders Carlsson <andersca@mac.com> Rename MaybeEmitVtable to EmitVTableRelatedData in preparation for making it emit thunks as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99251 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
odeGenModule.cpp
13189d0a184cac98b00ad7d7ee93481633af46cc 23-Mar-2010 Anders Carlsson <andersca@mac.com> Rename MaybeEmitVtable to EmitVTableRelatedData in preparation for making it emit thunks as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99251 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
odeGenModule.cpp
89535becaf726a8df216956ace7cc1dd42a7db4d 23-Mar-2010 Anders Carlsson <andersca@mac.com> Rename CGVtableInfo to CodeGenVTables in preparation of adding another VTableInfo class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99250 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
GDebugInfo.cpp
GExprAgg.cpp
GExprConstant.cpp
GRTTI.cpp
GVTT.cpp
GVtable.cpp
GVtable.h
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
af4403545a50a60d208e6fcae057308d576a92e0 23-Mar-2010 Anders Carlsson <andersca@mac.com> Rename CGVtableInfo to CodeGenVTables in preparation of adding another VTableInfo class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99250 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
GDebugInfo.cpp
GExprAgg.cpp
GExprConstant.cpp
GRTTI.cpp
GVTT.cpp
GVtable.cpp
GVtable.h
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
8cda020a8b1cfb586e728e368f479731d75535f0 22-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Comment the reasons for the strange little dance we do with the main file name for debug information

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99215 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f6728fcbec62be94469a6e80c7e7e32e3f2c3329 22-Mar-2010 Douglas Gregor <dgregor@apple.com> Comment the reasons for the strange little dance we do with the main file name for debug information

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99215 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1449efdd8f706bdf693a40a34964626bad93e8c6 22-Mar-2010 Anders Carlsson <andersca@mac.com> More work on thunks; almost there now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99199 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
bca5d375f782dc9db5b3a64c666fd1590125824b 22-Mar-2010 Anders Carlsson <andersca@mac.com> More work on thunks; almost there now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99199 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a702380ef56da7e23d75bd186e7c0dedb912e993 22-Mar-2010 Anders Carlsson <andersca@mac.com> Add less than operators to ThisAdjustment, ReturnAdjustment and ThunkInfo. Sort the thunks before dumping them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99184 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
87e0ac81f8ad3b6a05df0febb44dff9a6a62036a 22-Mar-2010 Anders Carlsson <andersca@mac.com> Add less than operators to ThisAdjustment, ReturnAdjustment and ThunkInfo. Sort the thunks before dumping them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99184 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
add6ad18534a5a09c690ad4fb2e410336dc9adce 22-Mar-2010 Anders Carlsson <andersca@mac.com> Improve dumping of thunks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99181 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
09daa50ff77f166f9d5cc30a6fc6c827fc5e44db 22-Mar-2010 Anders Carlsson <andersca@mac.com> Improve dumping of thunks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99181 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
2601147507d6b3baa5b35f1f41d2bc52734880b2 22-Mar-2010 Anders Carlsson <andersca@mac.com> We want to add all thunks, not just 'this' adjustment thunks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99177 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
253942158cd75fc9061e384aeba589cc8bb5f0c5 22-Mar-2010 Anders Carlsson <andersca@mac.com> We want to add all thunks, not just 'this' adjustment thunks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99177 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
b5782ac7b42ef314449fcd9fe0bfde4bf16d5f79 21-Mar-2010 Anders Carlsson <andersca@mac.com> AddThunk should take a const reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99140 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
9d734f39f85e352c39370ca3a5fd15446f285a63 21-Mar-2010 Anders Carlsson <andersca@mac.com> AddThunk should take a const reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99140 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
3528ce6070a57a3052e02b27d89bfdf4aff5999a 21-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix PR6648 by not creating a temporary with the type of a
CXXExprWithTemporaries.

Not emitting the expression as an aggregate might be the right thing to do,
but is orthogonal. Emitting it as an scalar expression will still try to
create a temporary for the incomplete type of the CXXExprWithTemporaries and
fail.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99134 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
8682bdae7e3db4e5d7dd957754923bbdf75fc166 21-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix PR6648 by not creating a temporary with the type of a
CXXExprWithTemporaries.

Not emitting the expression as an aggregate might be the right thing to do,
but is orthogonal. Emitting it as an scalar expression will still try to
create a temporary for the incomplete type of the CXXExprWithTemporaries and
fail.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99134 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
15fdd9ec1be6ff870e4885b4b5955455692704e8 20-Mar-2010 David Chisnall <csdavec@swan.ac.uk> Fixed synthesizing properties declared in properties (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99077 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
4c8c8e93ca3b63de4d30f4a460b50fe63fd6bd3b 20-Mar-2010 David Chisnall <csdavec@swan.ac.uk> Fixed synthesizing properties declared in properties (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99077 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
321412fe7dcb8d38538cfd8645b9da3f870b915f 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Wrap atomic intrinsics with memory barriers, to ensure we honor the semantics.
- This should be conservatively correct, we eventually should have target hooks for platforms that are less strict.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99050 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
cb61a7bbe635cfa941b1aeaaa1fbda1bf900ee51 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Wrap atomic intrinsics with memory barriers, to ensure we honor the semantics.
- This should be conservatively correct, we eventually should have target hooks for platforms that are less strict.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99050 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
e2a6a781c8824ddde4d2d8b2d92ee37cddff8732 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> C++: Add support for -fno-use-cxa-atexit.
- So much typing, so little gain...

Also, rename the __cxx_global_initialization function just to match llvm-gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99039 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
efb0fa9e11f75af51744a6159530ef7cc8efa24a 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> C++: Add support for -fno-use-cxa-atexit.
- So much typing, so little gain...

Also, rename the __cxx_global_initialization function just to match llvm-gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99039 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
9f3814607c15f1098aaf4ec21e99f85f1ab42d17 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Inline GenerateCXXGlobal[VarDecl]InitFunc into sole caller.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99038 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenFunction.h
5c6846e64b8bbf620636dd688137a27ca8e66aa2 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Inline GenerateCXXGlobal[VarDecl]InitFunc into sole caller.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99038 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenFunction.h
798b4340efe5d4a82533e6f77953e9b346b6780b 20-Mar-2010 John McCall <rjmccall@apple.com> Change CodeGenModule to rely on the Module's symbol table instead of
shadowing it in the GlobalDeclMap. Eliminates the string-uniquing
requirement for mangled names, which should help C++ codegen times a little.
Forces us to do string lookups instead of pointer lookups, which might hurt
codegen times a little across the board. We'll see how it plays out.

Removing the string-uniquing requirement implicitly fixes any bugs like
PR6635 which arose from the fact that we had multiple uniquing tables for
different kinds of identifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99012 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDebugInfo.cpp
GDecl.cpp
odeGenModule.cpp
odeGenModule.h
angle.h
f746aa6a8f538be914173a4aef2d9a2fd9f99d17 20-Mar-2010 John McCall <rjmccall@apple.com> Change CodeGenModule to rely on the Module's symbol table instead of
shadowing it in the GlobalDeclMap. Eliminates the string-uniquing
requirement for mangled names, which should help C++ codegen times a little.
Forces us to do string lookups instead of pointer lookups, which might hurt
codegen times a little across the board. We'll see how it plays out.

Removing the string-uniquing requirement implicitly fixes any bugs like
PR6635 which arose from the fact that we had multiple uniquing tables for
different kinds of identifiers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99012 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDebugInfo.cpp
GDecl.cpp
odeGenModule.cpp
odeGenModule.h
angle.h
38aa58ac45d1e987507b57900b3e7f580647ce3f 19-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Try to improve computation of the main file name for debug
information, to address recent gdb failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98959 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f7ad50026074776bde13fdf790bcf2f647904f1b 19-Mar-2010 Douglas Gregor <dgregor@apple.com> Try to improve computation of the main file name for debug
information, to address recent gdb failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98959 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ba5c87fc97a37e2722fc8c3d69b5e5c731c439cc 19-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> For debug information, get the main file name from the source manager
rather than from the -main-file-name flag, since the source manager
has proper path information. Fixes <rdar://problem/7769538>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98898 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ac91b4c7063615da6797031f5ac46a906e6b8166 19-Mar-2010 Douglas Gregor <dgregor@apple.com> For debug information, get the main file name from the source manager
rather than from the -main-file-name flag, since the source manager
has proper path information. Fixes <rdar://problem/7769538>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98898 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4fb22c68c608bfd0ec34da430fc4eb2dd47d4100 18-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Replace some SmallVectors with arrays.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98833 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
7c647a1270cbe02f5e64cee9e3f3ddc176ed61e9 18-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Replace some SmallVectors with arrays.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98833 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
38fb12bf8fac8e5db6a7e071c51eef4aec9c1702 18-Mar-2010 Anders Carlsson <andersca@mac.com> When dumping vtables, also dump the thunks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98799 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
9135a84d8e2c835d8b39c92eb15e8e9034b80bad 18-Mar-2010 Anders Carlsson <andersca@mac.com> When dumping vtables, also dump the thunks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98799 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a0760121fb52579af013591a36b854553f4ceb41 17-Mar-2010 Anders Carlsson <andersca@mac.com> More work on thunks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98765 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
5e454aa4c9249693ec69be05e16081c9b7a48dc7 17-Mar-2010 Anders Carlsson <andersca@mac.com> More work on thunks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98765 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6f9bedd5bbe17dd717e3d21098e5de36c872059a 17-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Correctly mangle dependent TypenameType.
Fixes PR6625.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98707 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
9b35b25db3641dfa8876d24b41cfa5b4d51477cb 17-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Correctly mangle dependent TypenameType.
Fixes PR6625.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98707 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
4876a7e9ca4e375fda4e771b6f310fe94091e366 13-Mar-2010 David Chisnall <csdavec@swan.ac.uk> Fixed copy-and-paste error causing categories to contain the protocols declared on the class, not the protocols declared on the category.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98455 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
ad9e06d82ae627e858e5bfe4a7f1f9337b5b0a15 13-Mar-2010 David Chisnall <csdavec@swan.ac.uk> Fixed copy-and-paste error causing categories to contain the protocols declared on the class, not the protocols declared on the category.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98455 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
4d322ebe60f6ac87f2dd2a9baac0faa560bfc7a5 13-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Give explicit template instantiations weak ODR linkage. Former
iterations of this patch gave explicit template instantiation
link-once ODR linkage, which permitted the back end to eliminate
unused symbols. Weak ODR linkage still requires the symbols to be
generated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98441 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
8f51a4f2d00b0abda3cde7f3828fb2e2b9beafb5 13-Mar-2010 Douglas Gregor <dgregor@apple.com> Give explicit template instantiations weak ODR linkage. Former
iterations of this patch gave explicit template instantiation
link-once ODR linkage, which permitted the back end to eliminate
unused symbols. Weak ODR linkage still requires the symbols to be
generated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98441 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
c85865124c115cf18b447e99979f251f8b1b6473 13-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Use raw_ostream instead of sprintf.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98438 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
fea3d4dd1a0cebafba7d85cfcb1724b644e2b8e2 13-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Use raw_ostream instead of sprintf.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98438 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
6dbd14d0949144ebc64cd964b74c1b872e62b019 13-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Use SmallString instead of SmallVector

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98436 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
193575455e00eca03fd7177f60e3f2e6263cb661 13-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Use SmallString instead of SmallVector

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98436 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
3a504cc87c27bd9fa69575e39b6e7aac7dd9a872 13-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Re-revert the explicit template instantiation linkage patch. I am beginning to look incompetent

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98425 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
34fd284e0a6ea88b98d6e1183548264bab5b3702 13-Mar-2010 Douglas Gregor <dgregor@apple.com> Re-revert the explicit template instantiation linkage patch. I am beginning to look incompetent

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98425 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
dc95556346e273c62930526cb192e4c2e72b16aa 13-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Reinstate patch to turn explicit template instantiations into weak symbols

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98424 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
8721360da5cf3d5dfdc2fc2bf8d53a5f79307995 13-Mar-2010 Douglas Gregor <dgregor@apple.com> Reinstate patch to turn explicit template instantiations into weak symbols

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98424 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
27c4182d9c44e33a144944a4123b5bc6d6d7a854 12-Mar-2010 Jeffrey Yasskin <jyasskin@google.com> Allow users to set CPPFLAGS and CXXFLAGS on the make command line.

Tested: make CPPFLAGS=-m64 CXXFLAGS=-m64 -j8 && (cd tools/clang;make test)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98399 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
3352406820d133c78161e8d710f95b8ac152a1e7 12-Mar-2010 Jeffrey Yasskin <jyasskin@google.com> Allow users to set CPPFLAGS and CXXFLAGS on the make command line.

Tested: make CPPFLAGS=-m64 CXXFLAGS=-m64 -j8 && (cd tools/clang;make test)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98399 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
18222b00fd4fad6f4606048663752d0262c74641 12-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a rare corner case bug which exposed a serious block API generation
when initialized variable is a byref block variable and is referenced recursively
in the initializer (you guessed it, it is block implementation of
fibonacci number). Fix, on the other hand is trvial, by generating the
API for byref variable before API for its initializer. We will have this
test added to our internal test suite as a clang-style test is not possible
due to very convoluted IR sequence. Fixes radar 7745514.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98393 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
20e1c7ea56103b7de26e5ab4086739bdc3a3d850 12-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a rare corner case bug which exposed a serious block API generation
when initialized variable is a byref block variable and is referenced recursively
in the initializer (you guessed it, it is block implementation of
fibonacci number). Fix, on the other hand is trvial, by generating the
API for byref variable before API for its initializer. We will have this
test added to our internal test suite as a clang-style test is not possible
due to very convoluted IR sequence. Fixes radar 7745514.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98393 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
9090886f21f0c9db9e4e6dcd587ba60d2461f16c 12-Mar-2010 Devang Patel <dpatel@apple.com> If main file name is empty then use "<unknown>".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98385 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
22fe585bd689c2ff64af193e207901aba14cadd5 12-Mar-2010 Devang Patel <dpatel@apple.com> If main file name is empty then use "<unknown>".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98385 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2fd6465b054d46275f70b01c677f1bb512d7498c 12-Mar-2010 Anders Carlsson <andersca@mac.com> More this adjustment simplification.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98333 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
617def321f362e010cc8ec0523b4f54157e5a7a5 12-Mar-2010 Anders Carlsson <andersca@mac.com> More this adjustment simplification.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98333 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ec5d58e5eb88fa8febb827e27721feadace20f20 12-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Revert the linkage change for explicit template instantiations; something is amiss

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98332 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
4ea9006629acb6bf9b2984554517c968a10a6b77 12-Mar-2010 Douglas Gregor <dgregor@apple.com> Revert the linkage change for explicit template instantiations; something is amiss

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98332 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
5ac1fef5ad8313d378ef862ee554f85f0355a994 12-Mar-2010 Anders Carlsson <andersca@mac.com> Remove OldOffset.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98331 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
cd0d27f2c2de6d2bd404ddff0f515e47b8753a5b 12-Mar-2010 Anders Carlsson <andersca@mac.com> Remove OldOffset.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98331 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
2d4c213a436da71eda448300e062dde2cd5a5849 12-Mar-2010 Anders Carlsson <andersca@mac.com> Remove debug output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98330 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ae936d5b68b73f47fa7abf23b871218bf2dab3cb 12-Mar-2010 Anders Carlsson <andersca@mac.com> Remove debug output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98330 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
7aa3ebf3f2d99d390c0875d2e8e75c304e8dca50 12-Mar-2010 Anders Carlsson <andersca@mac.com> Begin simplifying handling of thunks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98329 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
dd366815ab9562f3598184ff4b38b67fe50b7eb7 12-Mar-2010 Anders Carlsson <andersca@mac.com> Begin simplifying handling of thunks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98329 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
41612f9d7782cde36cf41e32d8884e008e218bb5 12-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Give explicit template instantiations weak linkage (but don't defer
them). Fixes PR6578.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98328 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
e5e0c9deb1b4cfa081152cda548d31368facbc57 12-Mar-2010 Douglas Gregor <dgregor@apple.com> Give explicit template instantiations weak linkage (but don't defer
them). Fixes PR6578.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98328 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
77c8c9ac9da93fb7fa5a1b461e28b7776ff43456 11-Mar-2010 Devang Patel <dpatel@apple.com> Keep track of Record context to ensure that record elements are properly nested in debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98283 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e4c1ea0c23ce994e5d8084c6a9d41b18c803fcf3 11-Mar-2010 Devang Patel <dpatel@apple.com> Keep track of Record context to ensure that record elements are properly nested in debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98283 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f09ab6d998e169a18c9a9f2eb2d1bc98b5802637 11-Mar-2010 Chris Lattner <sabre@nondot.org> fix PR6433, crash on va_arg of typedef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98264 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
a14db75641f377ef8b033c67653cd95ac4c36fe3 11-Mar-2010 Chris Lattner <sabre@nondot.org> fix PR6433, crash on va_arg of typedef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98264 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
45250c943cf7f1a5ec01fca149bc4b27830eabad 11-Mar-2010 Anders Carlsson <andersca@mac.com> Use the new vtable layout code for computing virtual base offset offsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98257 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c89a7cf3be654e803a173750cc523a3c599e2760 11-Mar-2010 Anders Carlsson <andersca@mac.com> Use the new vtable layout code for computing virtual base offset offsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98257 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
605c83a3f8d095013ee7764fe3581a16ff55339b 11-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Correctly mangle address of member in template arguments. Fixes PR6460



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98254 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
d9800728cc3e7f478eec4d4b19af5b808ac51942 11-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Correctly mangle address of member in template arguments. Fixes PR6460



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98254 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
42313ec304b555ae3fecbb19519c75c3c90f632f 11-Mar-2010 Anders Carlsson <andersca@mac.com> Rename getVirtualBaseOffsetIndex to getVirtualBaseOffsetOffset to reflect what it actually does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98248 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDebugInfo.cpp
GRTTI.cpp
GVtable.cpp
GVtable.h
bba16079eed1f3c8cd141685ecfaec9e78e07e35 11-Mar-2010 Anders Carlsson <andersca@mac.com> Rename getVirtualBaseOffsetIndex to getVirtualBaseOffsetOffset to reflect what it actually does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98248 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GDebugInfo.cpp
GRTTI.cpp
GVtable.cpp
GVtable.h
dc264ecf846ebb7526d607901d46b47bd0fb1141 11-Mar-2010 Anders Carlsson <andersca@mac.com> When possible, use the vbase offset offsets from the most derived class directly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98247 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
1972ced0061bb0bf7e3237b0c06ad95b4923f9e4 11-Mar-2010 Anders Carlsson <andersca@mac.com> When possible, use the vbase offset offsets from the most derived class directly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98247 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
4636efd21d3cded641a82d97c5fba00387b372a0 11-Mar-2010 Anders Carlsson <andersca@mac.com> Keep track of, and dump, vbase offset offsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98245 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
bb6305b78493d6ef773c9ae8de833e05c3788d0a 11-Mar-2010 Anders Carlsson <andersca@mac.com> Keep track of, and dump, vbase offset offsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98245 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
7d631809f4c4caf2fbc20e2f228155d0c8b357a9 11-Mar-2010 Anders Carlsson <andersca@mac.com> Fix tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98242 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
1ffd79bb8414904b9c78732e706fe9b5359e047c 11-Mar-2010 Anders Carlsson <andersca@mac.com> Fix tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98242 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
25b69f4e4f40617d261135b4781f789b8488a676 11-Mar-2010 Anders Carlsson <andersca@mac.com> Run the new vtable builder for construction vtables as well now. Note that we still don't use the data it generates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98239 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e02fc0ac5b24b08a32267966ca50c2f39ee52739 11-Mar-2010 Anders Carlsson <andersca@mac.com> Run the new vtable builder for construction vtables as well now. Note that we still don't use the data it generates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98239 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
92f405fabe1d5e3aab8a9049f48850ecbee6b3f8 11-Mar-2010 John McCall <rjmccall@apple.com> Support PPC-32 DWARF EH intrinisics. Thanks to rdivacky for his assistance.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98206 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
ec853ba1087f606e9685cb1e800616565ba35093 11-Mar-2010 John McCall <rjmccall@apple.com> Support PPC-32 DWARF EH intrinisics. Thanks to rdivacky for his assistance.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98206 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
5a679424bbd0a5a628b76e9dd5e162a7fa2ccbe7 11-Mar-2010 Chris Lattner <sabre@nondot.org> set alignment on static locals properly, patch by Arnaud de Grandmaison!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98204 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
0af9523607754a945b49d8a1ebae6631fc927921 11-Mar-2010 Chris Lattner <sabre@nondot.org> set alignment on static locals properly, patch by Arnaud de Grandmaison!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98204 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
0595e75f518f208130bead470ee8e95c0fb3f5e2 10-Mar-2010 Anders Carlsson <andersca@mac.com> Fix calculation of whether a member function needs a thunk in construction vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98191 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
2bc1d3a3b71564dc2909420abdd58aaf35191de2 10-Mar-2010 Anders Carlsson <andersca@mac.com> Fix calculation of whether a member function needs a thunk in construction vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98191 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
1406ed0fd68491d729e00db90e9f8fbca2d27803 10-Mar-2010 Anders Carlsson <andersca@mac.com> We were mistakenly marking morally virtual bases as being uninteresting. Fix this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98180 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a96a2e961a3bce0ad2fc44a115ac949a481d42db 10-Mar-2010 Anders Carlsson <andersca@mac.com> We were mistakenly marking morally virtual bases as being uninteresting. Fix this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98180 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
967c2cd452abce718d653b576556e394fd48cee6 10-Mar-2010 Anders Carlsson <andersca@mac.com> Ignore non-interesting bases when emitting construction vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98177 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f2c98ce9819cb7688a86e308f82ee896694a10e5 10-Mar-2010 Anders Carlsson <andersca@mac.com> Ignore non-interesting bases when emitting construction vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98177 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
759ba774d0d121a0a3639b72ca86326483fa4b22 10-Mar-2010 Anders Carlsson <andersca@mac.com> Don't accidentally mark some functions in construction vtables as unused. Also land the test for a previous checkin, now that it's correct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98139 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6039661c20eb6345c9d7dc1abd644183ebc91063 10-Mar-2010 Anders Carlsson <andersca@mac.com> Don't accidentally mark some functions in construction vtables as unused. Also land the test for a previous checkin, now that it's correct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98139 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
55851d6d117e79db3a891bcb821acd19592b2178 10-Mar-2010 John McCall <rjmccall@apple.com> Create a new InjectedClassNameType to represent bare-word references to the
injected class name of a class template or class template partial specialization.
This is a non-canonical type; the canonical type is still a template
specialization type. This becomes the TypeForDecl of the pattern declaration,
which cleans up some amount of code (and complicates some other parts, but
whatever).

Fixes PR6326 and probably a few others, primarily by re-establishing a few
invariants about TypeLoc sizes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98134 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3cb0ebd5f76abcb776f7cb4062bd79e3268c0dc4 10-Mar-2010 John McCall <rjmccall@apple.com> Create a new InjectedClassNameType to represent bare-word references to the
injected class name of a class template or class template partial specialization.
This is a non-canonical type; the canonical type is still a template
specialization type. This becomes the TypeForDecl of the pattern declaration,
which cleans up some amount of code (and complicates some other parts, but
whatever).

Fixes PR6326 and probably a few others, primarily by re-establishing a few
invariants about TypeLoc sizes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98134 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b26a3af538465814493fee7683af583f9d7963d7 10-Mar-2010 Anders Carlsson <andersca@mac.com> When building construction vtables, we need to check if a primary virtual base is actually a primary virtual base in the layout class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98131 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d7fdae5ea0158f91f0683044bb3a7dee0426bfe0 10-Mar-2010 Anders Carlsson <andersca@mac.com> When building construction vtables, we need to check if a primary virtual base is actually a primary virtual base in the layout class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98131 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a4788be9dd910552de29d0d60eb61ee159b6cd14 10-Mar-2010 Anders Carlsson <andersca@mac.com> Improve vcall offset handling in construction vtables. With this we layout the construction vtables from the ABI examples correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98127 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
db4022cf95d80afd28b5fd1273f5be62c891a230 10-Mar-2010 Anders Carlsson <andersca@mac.com> Improve vcall offset handling in construction vtables. With this we layout the construction vtables from the ABI examples correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98127 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
1431b77a7b8cee2d15a326f01f95804fc850ce29 10-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Delay codegen of vtables when handling implicit instantiations.

This fixes PR6474.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98123 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
odeGenModule.cpp
odeGenModule.h
bbf58bb1b8dd8c5e0f07547a6c20ffd55385fcf6 10-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Delay codegen of vtables when handling implicit instantiations.

This fixes PR6474.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98123 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
odeGenModule.cpp
odeGenModule.h
cf670297d83e129dce8b734abab504e497ea31f5 10-Mar-2010 Devang Patel <dpatel@apple.com> Use SmallString instead of alloca.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98112 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f33837022e000c383527fa560d4b5381b6563fcd 10-Mar-2010 Devang Patel <dpatel@apple.com> Use SmallString instead of alloca.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98112 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
594e081b15cddb5fcaffca6a8699565717a4e200 09-Mar-2010 Devang Patel <dpatel@apple.com> Fix file reference for derived and composite types. Now, dwarf writer uses strict verifier that ignores debug info for such types if their file info is unknown.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98096 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d58562e84f54f0d2c9f2cd0f8b589201f3add2ec 09-Mar-2010 Devang Patel <dpatel@apple.com> Fix file reference for derived and composite types. Now, dwarf writer uses strict verifier that ignores debug info for such types if their file info is unknown.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98096 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
11c94e31a62146c44b93a2465b7fdc9586e9e3cc 09-Mar-2010 Devang Patel <dpatel@apple.com> More then one anonymous aggregates on one line creates chaos when MDNode uniquness is combined with RAUW operation. Right solution is to avoid using RAUW.

This fixes PR 6554.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98083 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
7573f8b2f90ef65a253f7355fc466c93f0bc9832 09-Mar-2010 Devang Patel <dpatel@apple.com> More then one anonymous aggregates on one line creates chaos when MDNode uniquness is combined with RAUW operation. Right solution is to avoid using RAUW.

This fixes PR 6554.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98083 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
3aac4ce83686765c1da1e8d563dd614335af516c 09-Mar-2010 Devang Patel <dpatel@apple.com> Use getLast() instead of getBasename().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98072 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
683f6db0b7f0475123f66887f333c40fb2d791a2 09-Mar-2010 Devang Patel <dpatel@apple.com> Use getLast() instead of getBasename().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98072 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f408190d2144c1c1db3af28b9ec38da54370449a 09-Mar-2010 Devang Patel <dpatel@apple.com> Start using DIFile. Corresponding llvm patch is r98020.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98021 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
1780055f6dacd44ae9bd896c47a6424470b3ea2b 09-Mar-2010 Devang Patel <dpatel@apple.com> Start using DIFile. Corresponding llvm patch is r98020.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98021 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
e69814ed927a7719ab55e2f34a1dc98e87b3e251 08-Mar-2010 Chris Lattner <sabre@nondot.org> add a codegen hack to work around an AST bug, allowing us to compile the
code in PR6537. This should be reverted when the ast bug is fixed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97981 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
b35baae19b906245b5c2266b47ef411abcc6b25a 08-Mar-2010 Chris Lattner <sabre@nondot.org> add a codegen hack to work around an AST bug, allowing us to compile the
code in PR6537. This should be reverted when the ast bug is fixed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97981 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
d4b3562e9010a0c9c7222ecab68edd18b5511ec2 08-Mar-2010 Devang Patel <dpatel@apple.com> Avoid using DIDescriptor.isNull().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97976 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0804e6e0ad2862826497677a4c26c6a9d7c3d66c 08-Mar-2010 Devang Patel <dpatel@apple.com> Avoid using DIDescriptor.isNull().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97976 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
dca2e0ff592a0c8a1df65c4ff064db0ff1be5adf 08-Mar-2010 Devang Patel <dpatel@apple.com> Revert r97949.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97964 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
dd7b0d5d2763be1061cc99ca3e55a99cdee70816 08-Mar-2010 Devang Patel <dpatel@apple.com> Revert r97949.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97964 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1ecb477d7ab08e0806331850e549ad750a6cef47 08-Mar-2010 Devang Patel <dpatel@apple.com> Avoid DIDescriptor.isNull() checks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97949 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ff03ab10bde75a142a944cbaa5cbf8757fe3e71c 08-Mar-2010 Devang Patel <dpatel@apple.com> Avoid DIDescriptor.isNull() checks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97949 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f03f5f6c50378476d7fd10edfa0ed8f4c01e38da 08-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Extend ObjCMessageExpr for class method sends with the source location
of the class name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97943 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
c2350e553b853ad00914faf23fa731e5fc4a8a5c 08-Mar-2010 Douglas Gregor <dgregor@apple.com> Extend ObjCMessageExpr for class method sends with the source location
of the class name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97943 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
c92b06b42ed3610f21a74e60c8efaf7a98c910b1 08-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Perform overload resolution when static_cast'ing from a
pointer-to-member-to-derived to a pointer-to-member-to-base. Fixes
PR6072.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97923 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
4ce46c2db2b17ef52b34dbeeec01e448025c8edc 08-Mar-2010 Douglas Gregor <dgregor@apple.com> Perform overload resolution when static_cast'ing from a
pointer-to-member-to-derived to a pointer-to-member-to-base. Fixes
PR6072.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97923 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
d0ebf64a5d6e206f65ab7160ed814e8d9404d057 07-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Don't turn off mangling in implicitly extern "C" system headers. GCC
doesn't do this on any of the major platforms, and we don't really
support any of the platforms that do (nor will we actually handle
those headers well). Fixes PR6217; see PR6530 for details on what we
would need to do to support these platforms.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97899 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
96df6cfd1220d629fca2ae4fec2aecfdf35ad847 07-Mar-2010 Douglas Gregor <dgregor@apple.com> Don't turn off mangling in implicitly extern "C" system headers. GCC
doesn't do this on any of the major platforms, and we don't really
support any of the platforms that do (nor will we actually handle
those headers well). Fixes PR6217; see PR6530 for details on what we
would need to do to support these platforms.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97899 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
3e0402f5e43109e2062a2fa6f6004b93e2ce0fe8 06-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Add a message to these asserts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97873 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d3a344c55b89bad933c04ac59650f7afb95423e9 06-Mar-2010 Benjamin Kramer <benny.kra@googlemail.com> Add a message to these asserts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97873 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4904b5717805839ef003595f959da66da6041f7a 06-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Use static method in GlobalValue


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97872 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
3c15745b4baaa0c075418cfbe9f1be19c3a59c45 06-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Use static method in GlobalValue


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97872 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
dcd6adcc33de98d6c94c52f208b7f1408d78d3d6 06-Mar-2010 Eli Friedman <eli.friedman@gmail.com> PR6515: Implement __builtin_signbit and friends.

I'm reasonably sure my implementation is correct, but it would be nice if
someone could double-check.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97864 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
ba68b08a05587490ed4c2e3d26f3a742c995c660 06-Mar-2010 Eli Friedman <eli.friedman@gmail.com> PR6515: Implement __builtin_signbit and friends.

I'm reasonably sure my implementation is correct, but it would be nice if
someone could double-check.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97864 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
63172dffea08a1edb2bcba37942e69fe14b925d2 06-Mar-2010 John McCall <rjmccall@apple.com> Implement __builtin_dwarf_sp_column for i386 (Darwin and not), x86-64 (all),
and ARM. Implement __builtin_init_dwarf_reg_size_table for i386 (both) and
x86-64 (all).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97859 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenModule.cpp
odeGenModule.h
argetInfo.cpp
argetInfo.h
6374c3307e2d73348f7b8cc73eeeb0998ad0ac94 06-Mar-2010 John McCall <rjmccall@apple.com> Implement __builtin_dwarf_sp_column for i386 (Darwin and not), x86-64 (all),
and ARM. Implement __builtin_init_dwarf_reg_size_table for i386 (both) and
x86-64 (all).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97859 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenModule.cpp
odeGenModule.h
argetInfo.cpp
argetInfo.h
98abe75ac8f62d289f8c85068429ad2419a0d9cb 05-Mar-2010 Blaine Garst <blaine@apple.com> add support for a 1<<29 bit in the block flags field to mark blocks using alternate struct return ABI


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97775 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
a36e22399cc13100ee531adf80e9ed7b1ac8b2d4 05-Mar-2010 Blaine Garst <blaine@apple.com> add support for a 1<<29 bit in the block flags field to mark blocks using alternate struct return ABI


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97775 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
c87f0f7c3127e94a0e1543f4741ffc9cf60c0693 05-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Don't produce an alias for a destructor if the target is weak.

This fixes bootstrap on ELF systems :-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97773 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
bc6afd158cc67b5f87dcc2d8efe2a2254af8debe 05-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Don't produce an alias for a destructor if the target is weak.

This fixes bootstrap on ELF systems :-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97773 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
3348db7191534000afabd8e49e7f7c0b5e86a465 04-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> really fix 6473 by handling weakref in constant expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97750 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
da1826102fcadb5d3c5d2d20dfa51f0e77489004 04-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> really fix 6473 by handling weakref in constant expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97750 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
58209efdb9da8712d83c63b4872139dc269d45c4 04-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix PR6473.

Clang's support for weakref is now better than llvm-gcc's :-)

We don't introduce a new symbol and we correctly mark undefined references weak only if there is no
definition or regular undefined references in the same file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97733 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenModule.cpp
odeGenModule.h
6a836706c40a31c716952b74785102c90fd6afa7 04-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix PR6473.

Clang's support for weakref is now better than llvm-gcc's :-)

We don't introduce a new symbol and we correctly mark undefined references weak only if there is no
definition or regular undefined references in the same file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97733 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenModule.cpp
odeGenModule.h
f889e52574b00be87e112ae29e2bc57db24f78e7 04-Mar-2010 John McCall <rjmccall@apple.com> Revert changes r97693, r97700, and r97718.

Our testing framework can't deal with disabled targets yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97719 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
468ec6c0266e48fccb26ce50d5b915c645bb3c7b 04-Mar-2010 John McCall <rjmccall@apple.com> Revert changes r97693, r97700, and r97718.

Our testing framework can't deal with disabled targets yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97719 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
6c976f5a615e68415d9d1175bafff106ae218ba5 04-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Refactor local class name mangling and make it
ABI conforming.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97702 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
angle.cpp
angle.h
4819ac44c0e5222ebfe8e199c51f653f52177336 04-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Refactor local class name mangling and make it
ABI conforming.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97702 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
angle.cpp
angle.h
ac2711ba56e2fea597090adad82454cb2b492b58 04-Mar-2010 John McCall <rjmccall@apple.com> Implement __builtin_dwarf_sp_column().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97700 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
06a3066ea137b79e87a2f5d67e3012334bf4896b 04-Mar-2010 John McCall <rjmccall@apple.com> Implement __builtin_dwarf_sp_column().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97700 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
bbdb752100cfd5649ea5e1264e5be51950bdac25 04-Mar-2010 John McCall <rjmccall@apple.com> Create a TargetMachine whenever we create a CodeGenAction. The codegen of
some builtins will rely on target knowledge.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97693 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
c9fe644675503894e9e76e8ecd8e6519426548de 04-Mar-2010 John McCall <rjmccall@apple.com> Create a TargetMachine whenever we create a CodeGenAction. The codegen of
some builtins will rely on target knowledge.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97693 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
799e8a2d4754375c96dda92a78ef3be7eb36363e 03-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Fix code gen bug generating code for
((id)cat)->isa. Fixes radar 7709015.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97672 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
9f9efe6d58f49bce01b548bf81245f053b632a02 03-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Fix code gen bug generating code for
((id)cat)->isa. Fixes radar 7709015.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97672 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
a2fea4bd2f6a6877bc1631530d10a211a1542cb0 03-Mar-2010 Chris Lattner <sabre@nondot.org> fix PR6475, we were doing side-effecting stuff in an assert.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97669 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
b992259f7790d3fb9fc5c2eb7182d7af9d64f9ac 03-Mar-2010 Chris Lattner <sabre@nondot.org> fix PR6475, we were doing side-effecting stuff in an assert.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97669 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
d256853196d43ca0d0f70ae68161d23635b35a2d 03-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Implements mangling of local class names to
fix a code gen crash. This is WIP as not
all ABI cases are covered (there is a FIXME to
this effect). Fixes radar 7696748.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97658 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
570585307ef1e33490883b26b807cd2a5f88e99d 03-Mar-2010 Fariborz Jahanian <fjahanian@apple.com> Implements mangling of local class names to
fix a code gen crash. This is WIP as not
all ABI cases are covered (there is a FIXME to
this effect). Fixes radar 7696748.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97658 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
b45275280c16fb078d3eb2826a829a75eeb1fc89 03-Mar-2010 Chris Lattner <sabre@nondot.org> add framework for ARM builtins, Patch by Edmund Grimley Evans!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97656 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
2752c0137d95aa2f4ee1cdff4b564bac842e041b 03-Mar-2010 Chris Lattner <sabre@nondot.org> add framework for ARM builtins, Patch by Edmund Grimley Evans!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97656 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
8750f163f4d79fa2fc97f8d10260e157bc9aaac8 03-Mar-2010 John McCall <rjmccall@apple.com> Sketch out an implementation for __builtin_dwarf_cfa. I have no idea
why the front-end is calculating the argument to llvm.eh.dwarf.cfa().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97653 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
fb17a562135dd7597121da9245d0c1bdcda4146f 03-Mar-2010 John McCall <rjmccall@apple.com> Sketch out an implementation for __builtin_dwarf_cfa. I have no idea
why the front-end is calculating the argument to llvm.eh.dwarf.cfa().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97653 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
9edbffd3a962f72eb584bef1e6585f57dedf36fe 03-Mar-2010 John McCall <rjmccall@apple.com> Implement __builtin_eh_return.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97643 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
7ada111fd5e81aff355e67bad0e4083f552b34bd 03-Mar-2010 John McCall <rjmccall@apple.com> Implement __builtin_eh_return.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97643 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
4826763e585ba91999b4431be6093d6c62215ce3 03-Mar-2010 Anders Carlsson <andersca@mac.com> Fix a bug with base offset merging that Devang noticed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97641 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ce57dd5f9ff5bd6cebe3c94ae48eaf166ea50a23 03-Mar-2010 Anders Carlsson <andersca@mac.com> Fix a bug with base offset merging that Devang noticed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97641 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
de7868e6ff321337e99f08b5405b0675a0bf391e 03-Mar-2010 John McCall <rjmccall@apple.com> Add proper target hooks for __builtin_extract_return_address and
__builtin_frob_return_address. The implementations for both are
still trivial in the default case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97638 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
argetInfo.h
492c4f998d848673d3d6c9e6416115df4036a71d 03-Mar-2010 John McCall <rjmccall@apple.com> Add proper target hooks for __builtin_extract_return_address and
__builtin_frob_return_address. The implementations for both are
still trivial in the default case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97638 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
argetInfo.h
a6c64354bacf05c784b4857005d4ee0912bc68a0 03-Mar-2010 John McCall <rjmccall@apple.com> Don't emit derived-to-base destructor aliases if we don't have a definition
for the base destructor, because aliases to declarations aren't legal.

Fixes PR 6471.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97637 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
9a70846c5ffd5ff5cce60de49cd7b312146bf502 03-Mar-2010 John McCall <rjmccall@apple.com> Don't emit derived-to-base destructor aliases if we don't have a definition
for the base destructor, because aliases to declarations aren't legal.

Fixes PR 6471.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97637 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
a2435baa80a5beea29f291219f788b1f4908f5d6 02-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> During codegen assert that any copy assignment, destructor or constructor that
we need to synthesize has been marked as used by Sema.

Change Sema to avoid these asserts.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97589 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7b9a5aa7c0d76f577699d25ce6afe21ecccb60b7 02-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> During codegen assert that any copy assignment, destructor or constructor that
we need to synthesize has been marked as used by Sema.

Change Sema to avoid these asserts.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97589 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
bf20d7bda61723ce35205385d3a8f94d7fd31dd9 02-Mar-2010 Anders Carlsson <andersca@mac.com> Simplify code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97551 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
88800669c5523557ef3ecb158129d7be53257cc8 02-Mar-2010 Anders Carlsson <andersca@mac.com> Simplify code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97551 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
77bc0861dbaa71d07b49cfc29d5b4db6cf9f1c01 02-Mar-2010 John McCall <rjmccall@apple.com> Inspired by seeing "MIPS" go by in the commits, I've gone ahead and
implemented a (codegen) target hook for __builtin_extend_pointer.
I'm also making it return a uint64_t instead of an unsigned word; this
comports with typical usage (i.e. the one use I know of).

I don't know if any of the existing targets requires this hook to be
set (other than x86 and x86_64, which I know do not).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97547 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
argetInfo.h
d0b76ca10feefcfda5cb16698e50197e87a7d876 02-Mar-2010 John McCall <rjmccall@apple.com> Inspired by seeing "MIPS" go by in the commits, I've gone ahead and
implemented a (codegen) target hook for __builtin_extend_pointer.
I'm also making it return a uint64_t instead of an unsigned word; this
comports with typical usage (i.e. the one use I know of).

I don't know if any of the existing targets requires this hook to be
set (other than x86 and x86_64, which I know do not).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97547 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
argetInfo.h
0ecac932a0a5e72ea56523e8c7fd0f5bcc1113be 02-Mar-2010 Anders Carlsson <andersca@mac.com> Rename BaseOffset to Offset and make it signed in preparation of more construction vtable work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97546 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d86e5d85ddc8ba9cb0b64655ba26b397ca2afa50 02-Mar-2010 Anders Carlsson <andersca@mac.com> Rename BaseOffset to Offset and make it signed in preparation of more construction vtable work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97546 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
28bbcd9f68afe54de87957346328c8165afec53a 02-Mar-2010 John McCall <rjmccall@apple.com> After much consultation aimed at figuring out what this builtin actually
does, document the results and then implement __builtin_extend_pointer for
platforms where it's a no-op.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97540 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
5e11085830d4d4c53ff75575ab75889ee5126854 02-Mar-2010 John McCall <rjmccall@apple.com> After much consultation aimed at figuring out what this builtin actually
does, document the results and then implement __builtin_extend_pointer for
platforms where it's a no-op.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97540 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
0d432abff06e87a821e4b337339857ff8ea713a4 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
odeGenTypes.cpp
angle.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
odeGenTypes.cpp
angle.cpp
a7c6ef5720892632a748a0bdf6c315690d80908f 01-Mar-2010 John McCall <rjmccall@apple.com> The latest draft uses 'dt' to mangle member expressions, and now so do we.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97479 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
e1e342f4a96f132d8d7e802284417bd520f9f4f8 01-Mar-2010 John McCall <rjmccall@apple.com> The latest draft uses 'dt' to mangle member expressions, and now so do we.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97479 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
1b2a7aa9d2cd78890a809fb1cf447a8ebc790f89 28-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Improve name mangling for dependently-scoped declaration references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97422 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
4b2ccfc302d7eebe9380211e6e2d4f7b4a6d0eba 28-Feb-2010 Douglas Gregor <dgregor@apple.com> Improve name mangling for dependently-scoped declaration references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97422 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
5240b3040df919d01bd26c252ed0842915ce987b 28-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Add name mangling for DeclRefExprs that refer to external names

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97418 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
5ed1bc351f36ca1086d7836baee546c39ce90dd7 28-Feb-2010 Douglas Gregor <dgregor@apple.com> Add name mangling for DeclRefExprs that refer to external names

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97418 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
a9a70a61fbc484a4eaa6aa58712b253c87716aa2 28-Feb-2010 Anders Carlsson <andersca@mac.com> Remove debug output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97407 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f14e14f38ba3822f449eb5ed530d59a61e30f2cf 28-Feb-2010 Anders Carlsson <andersca@mac.com> Remove debug output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97407 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6f3d225832d13293ba3e8122eeea9a6d526e7507 28-Feb-2010 Anders Carlsson <andersca@mac.com> Handle unused functions in construction vtables correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97406 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
dad0f9918a1860cc1a9926d46cd0fb5d2abf174d 28-Feb-2010 Anders Carlsson <andersca@mac.com> Handle unused functions in construction vtables correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97406 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
3f9d5111018214afe261f27e5fef8190c73a4aaf 28-Feb-2010 Anders Carlsson <andersca@mac.com> When laying out vtables for virtual bases in construction vtables, we need to check if the vtable is a primary base in the layout class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97402 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0378bf0840335c6d56b2f1b51079522054f7da4f 28-Feb-2010 Anders Carlsson <andersca@mac.com> When laying out vtables for virtual bases in construction vtables, we need to check if the vtable is a primary base in the layout class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97402 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
508ca3b7399d056923d1ebccac92645c7f6cb861 28-Feb-2010 Anders Carlsson <andersca@mac.com> More improvements to construction vtables; we know handle vbase offsets correctly (I hope).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97361 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
530c40c516427112f76a88958bf7c17769b5ca12 28-Feb-2010 Anders Carlsson <andersca@mac.com> More improvements to construction vtables; we know handle vbase offsets correctly (I hope).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97361 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
3eb7c5d2361da770df7bfb8c9860d3efd72471f2 28-Feb-2010 Anders Carlsson <andersca@mac.com> Pass information about whether a base is virtual or not down to getCtorVtable, we need this information in the vtable builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97356 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVtable.cpp
GVtable.h
5d7af6b0da99f0bede6facb4bb9e5a5872afdb61 28-Feb-2010 Anders Carlsson <andersca@mac.com> Pass information about whether a base is virtual or not down to getCtorVtable, we need this information in the vtable builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97356 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVtable.cpp
GVtable.h
e6b3b835dc0c6f43b2b278ae97141d0910ac1526 28-Feb-2010 Anders Carlsson <andersca@mac.com> Add new function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97353 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
438bc427852a6d1e050727c6ec812bac1f2d669e 28-Feb-2010 Anders Carlsson <andersca@mac.com> Add new function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97353 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e5fb8b55f27a8067b547dcf69a3958e8e2780c2d 28-Feb-2010 Anders Carlsson <andersca@mac.com> Fix to dumpLayout; we want to be able to dump address points even if the vtable doesn't have any methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97350 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d2c3a7c567c0b9c3c19fd6c99a2afd02200f0508 28-Feb-2010 Anders Carlsson <andersca@mac.com> Fix to dumpLayout; we want to be able to dump address points even if the vtable doesn't have any methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97350 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
acf24f0f3f0948591f5bbea7ef8b6e6c60e69b6c 27-Feb-2010 Anders Carlsson <andersca@mac.com> Add a simple construction vtable test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97344 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0041a649338112e388df64c39d45849ce48dfe3f 27-Feb-2010 Anders Carlsson <andersca@mac.com> Add a simple construction vtable test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97344 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ee77326d1e5166a90a3d1f870339c29ae208cf83 27-Feb-2010 Anders Carlsson <andersca@mac.com> Start fleshing out construction vtable support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97342 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d03a3260a27d1d5168e5eb1dbb736747c477dcbb 27-Feb-2010 Anders Carlsson <andersca@mac.com> Start fleshing out construction vtable support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97342 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
26ee0adff218264b0ae99539ca41f072cc0436ea 27-Feb-2010 Anders Carlsson <andersca@mac.com> Enable the new vtable layout code for vtables that aren't construction vtables. (This doesn't mean that we emit LLVM IR using it yet, it just means that it's running and hopefully not crashing or asserting).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97341 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
327568ec139958def07e30f37a1bafac38819676 27-Feb-2010 Anders Carlsson <andersca@mac.com> Enable the new vtable layout code for vtables that aren't construction vtables. (This doesn't mean that we emit LLVM IR using it yet, it just means that it's running and hopefully not crashing or asserting).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97341 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
579c6358abb8d191ebcf4b853000d509546b56be 27-Feb-2010 Anders Carlsson <andersca@mac.com> Move ComputeThisAdjustmentBaseOffset to VtableBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97340 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
379017f5350e5b01e241a5b35cec14e6318f00e6 27-Feb-2010 Anders Carlsson <andersca@mac.com> Move ComputeThisAdjustmentBaseOffset to VtableBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97340 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f6127240171de860b815aed59a069a2a5b4c38f1 27-Feb-2010 Anders Carlsson <andersca@mac.com> Make sure to insert the primary base in the set :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97339 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f89bb6ceeb3045757394ab57a542a566e3eae3d4 27-Feb-2010 Anders Carlsson <andersca@mac.com> Make sure to insert the primary base in the set :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97339 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
837404dea6bd541fbaea025ea92372791f41f98f 27-Feb-2010 Anders Carlsson <andersca@mac.com> Use the real base offset when calculating vbase offsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97338 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6a8c5b2bc266902a3d1138122ef25cbe10e1687b 27-Feb-2010 Anders Carlsson <andersca@mac.com> Use the real base offset when calculating vbase offsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97338 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
65c2e65c8526a1e53053d1b9598bdbb303ecc95d 27-Feb-2010 Anders Carlsson <andersca@mac.com> Figured out why the test was failing, this will hopefully fix it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97336 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e54d1c12d7a53bea988e2b880b66faf04410c1be 27-Feb-2010 Anders Carlsson <andersca@mac.com> Figured out why the test was failing, this will hopefully fix it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97336 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
9fe3db479d6b453200acecf8eb7dbd3bbcf19bd8 27-Feb-2010 Anders Carlsson <andersca@mac.com> Don't add this adjustments for pure virtual member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97334 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
8bc68f7a29f94446852f4d709115a7f4e6765f7a 27-Feb-2010 Anders Carlsson <andersca@mac.com> Don't add this adjustments for pure virtual member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97334 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
906483a327aaa443cc2559f97c341113f64f0170 27-Feb-2010 Anders Carlsson <andersca@mac.com> We want to store method info for unused functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97333 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
cd4e63721eb01f449731741d404409835a32e29b 27-Feb-2010 Anders Carlsson <andersca@mac.com> We want to store method info for unused functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97333 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0585286620713b0b8de6f403d0b239be85d866d0 27-Feb-2010 Anders Carlsson <andersca@mac.com> Finish up the changes to this adjustments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97328 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
2ef9d6bbd3ae2cf53318bb8fabc4fa6cc0743aff 27-Feb-2010 Anders Carlsson <andersca@mac.com> Finish up the changes to this adjustments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97328 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6f969777138733bc09ed962a799269e944762e7f 27-Feb-2010 Anders Carlsson <andersca@mac.com> Stub out more of the 'this' pointer adjustment fixes I've been planning. Start using a set vector for primary bases so they will be ordered.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97326 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
b9021e9955358dcca3aaa3db7a9b8114aa284902 27-Feb-2010 Anders Carlsson <andersca@mac.com> Stub out more of the 'this' pointer adjustment fixes I've been planning. Start using a set vector for primary bases so they will be ordered.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97326 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
769c3bcbf35091c4902e051170ae7641a9e4ba4f 27-Feb-2010 Anders Carlsson <andersca@mac.com> Fix another vtable layout bug; we weren't looking hard enough for overriden functions when determining if an overrider will ever be used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97306 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c784ba21ba14f4cf65fc6fa2e3548c4775819921 27-Feb-2010 Anders Carlsson <andersca@mac.com> Fix another vtable layout bug; we weren't looking hard enough for overriden functions when determining if an overrider will ever be used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97306 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
2657498a6c8ef5a8745d22dc88dc7239e7807f69 27-Feb-2010 Anders Carlsson <andersca@mac.com> Handle vcall offset sharing between destructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97304 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
5560969d73e3e72747972d0f0f37ca4e3b042186 27-Feb-2010 Anders Carlsson <andersca@mac.com> Handle vcall offset sharing between destructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97304 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f3bb6335684886d9a5a06dedc884bec460109fe7 27-Feb-2010 Anders Carlsson <andersca@mac.com> Fix a bug where we were generating an unnecessary vtable for a virtual base that's already a primary virtual base.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97303 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
08c26752efa51fb5dc47bd3382ea21814bd0c5b8 27-Feb-2010 Anders Carlsson <andersca@mac.com> Fix a bug where we were generating an unnecessary vtable for a virtual base that's already a primary virtual base.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97303 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0430685fa988b25b65e6fb56607f94a901ac0969 26-Feb-2010 John McCall <rjmccall@apple.com> Sundry fixes to the new vtable builder.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97258 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
331a03ae3ee069a6daa69381524dc012b60cfab0 26-Feb-2010 John McCall <rjmccall@apple.com> Sundry fixes to the new vtable builder.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97258 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c916a76bc178f74fb31f0aae9346d4675a431ed0 26-Feb-2010 David Chisnall <csdavec@swan.ac.uk> Don't generate method metadata for @dynamic properties. Fixes PR6354.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97199 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
42ba04a072c69d84a6660e4498215086662910ac 26-Feb-2010 David Chisnall <csdavec@swan.ac.uk> Don't generate method metadata for @dynamic properties. Fixes PR6354.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97199 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
cc392fc654e59b8d55df3901a82b193845ee44f4 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
GCall.cpp
GCall.h
GObjCGNU.cpp
GObjCMac.cpp
odeGenTypes.cpp
odeGenTypes.h
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
GCall.cpp
GCall.h
GObjCGNU.cpp
GObjCMac.cpp
odeGenTypes.cpp
odeGenTypes.h
615f679200f59d3d3b8bd6362e14af2ad70fa32e 25-Feb-2010 Anders Carlsson <andersca@mac.com> Improve vcall offset handling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97174 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
dba6ef87a07f0cbab42b4aa98faaf4e6de8126d0 25-Feb-2010 Anders Carlsson <andersca@mac.com> Improve vcall offset handling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97174 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
2ebbafd46c122eaf906fd12c2d0a8ef6ffd71995 25-Feb-2010 Anders Carlsson <andersca@mac.com> Fux a bug where we were trying to add overriders for non-virtual bases of virtual bases more than once.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97173 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
bf554f63bffa7db32b5f343f6fd075501b97d401 25-Feb-2010 Anders Carlsson <andersca@mac.com> Fux a bug where we were trying to add overriders for non-virtual bases of virtual bases more than once.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97173 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
cba63c36e5377b98e8bd69aa15686a848b096a24 25-Feb-2010 Sanjiv Gupta <sanjiv.gupta@microchip.com> Targets (like pic16) may have mangled the name of global variables,
so get the name from Var rather than the original decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97114 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
67b14f0077d6cc508b933100d601ae8e6524b72f 25-Feb-2010 Sanjiv Gupta <sanjiv.gupta@microchip.com> Targets (like pic16) may have mangled the name of global variables,
so get the name from Var rather than the original decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97114 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
c247b5911efeabb03a9b9958d717a900da8a7db9 25-Feb-2010 Anders Carlsson <andersca@mac.com> Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97109 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
5d64f8a05ae080f029f0379ed834572065038e28 25-Feb-2010 Anders Carlsson <andersca@mac.com> Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97109 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e411fc502feb925c8933de6b879277aad0a4054a 25-Feb-2010 Anders Carlsson <andersca@mac.com> Move the vcall and vbase offset layout code out into its own class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97107 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d68c083c185ca0049126c52dfc4191e840c08edc 25-Feb-2010 Anders Carlsson <andersca@mac.com> Move the vcall and vbase offset layout code out into its own class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97107 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f621b402fec8906578b9703567b6b8d4c97dda0f 24-Feb-2010 Anders Carlsson <andersca@mac.com> Get rid of 'this' adjustments from the FinalOverriders class since they can be different for the same overrider in different parts of the vtable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97068 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
83c570b5915d19aa7e7c1a74324367577539d2bc 24-Feb-2010 Anders Carlsson <andersca@mac.com> Get rid of 'this' adjustments from the FinalOverriders class since they can be different for the same overrider in different parts of the vtable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97068 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
3abff99e51d75efe105f42ecacd660d171e0ddf2 24-Feb-2010 Anders Carlsson <andersca@mac.com> Improve this adjustment pointer calculation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97067 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d91e7339577d74c2817b166fbdcbe847103dd85e 24-Feb-2010 Anders Carlsson <andersca@mac.com> Improve this adjustment pointer calculation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97067 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d701064cb339086df653229f7ee772f673f4275a 24-Feb-2010 Anders Carlsson <andersca@mac.com> Make ComputeThisAdjustmentBaseOffset public for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97066 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
2157d30c25e4c4dd24ba3833a397ee79fb82774f 24-Feb-2010 Anders Carlsson <andersca@mac.com> Make ComputeThisAdjustmentBaseOffset public for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97066 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
b6ac25ea84758cf2d44fcc8d7e1ff2530a21f71f 24-Feb-2010 John McCall <rjmccall@apple.com> Fix an iterator-invalidation bug that was causing selfhost errors
on non-darwin platforms. Fixes PR6411. Test case doesn't reduce,
unfortunately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97055 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
1962beee04d3635b12cf6254a53b40ec6c50098d 24-Feb-2010 John McCall <rjmccall@apple.com> Fix an iterator-invalidation bug that was causing selfhost errors
on non-darwin platforms. Fixes PR6411. Test case doesn't reduce,
unfortunately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97055 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
5c4ab639f8c1be58d0e7312575f9b133cc615b94 24-Feb-2010 Anders Carlsson <andersca@mac.com> Generate correct vcall offsets when we have a primary virtual base that is not a primary base in the complete class hierarchy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97039 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
5edcc3752563ae0ed5b26f8c89a472ac84af9cf7 24-Feb-2010 Anders Carlsson <andersca@mac.com> Generate correct vcall offsets when we have a primary virtual base that is not a primary base in the complete class hierarchy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97039 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
84eca4dc962aed2a80ac4934b150bab212cd61bc 24-Feb-2010 John McCall <rjmccall@apple.com> Canonicalize parameter and return types before computing ABI info. Eliminates
a common source of oddities and, in theory, removes some redundant ABI
computations. Also fixes a miscompile I introduced yesterday by refactoring
some code and causing a slightly different code path to be taken that
didn't perform *parameter* type canonicalization, just normal type
canonicalization; this in turn caused a bit of ABI code to misfire because
it was looking for 'double' or 'float' but received 'const float'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97030 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
odeGenTypes.h
argetInfo.cpp
0b0ef0a70b8010c66fad2603e4423ef1c1dc7015 24-Feb-2010 John McCall <rjmccall@apple.com> Canonicalize parameter and return types before computing ABI info. Eliminates
a common source of oddities and, in theory, removes some redundant ABI
computations. Also fixes a miscompile I introduced yesterday by refactoring
some code and causing a slightly different code path to be taken that
didn't perform *parameter* type canonicalization, just normal type
canonicalization; this in turn caused a bit of ABI code to misfire because
it was looking for 'double' or 'float' but received 'const float'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97030 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
odeGenTypes.h
argetInfo.cpp
4008efffc188f460f3297284457a623f6c72de90 23-Feb-2010 Devang Patel <dpatel@apple.com> Emit debug info for VectorType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96999 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
70c23cdf12822edbbd04901f80133b2db9728226 23-Feb-2010 Devang Patel <dpatel@apple.com> Emit debug info for VectorType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96999 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
76741ab2cc358fa7b9287607d06b171ae9691d6b 23-Feb-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for the weakref attribute. We still produce "alias weak" as llvm-gcc does, but are more strict on what uses of weakref we accept.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96992 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
11e8ce7380856abee188b237c2600272df2ed09d 23-Feb-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for the weakref attribute. We still produce "alias weak" as llvm-gcc does, but are more strict on what uses of weakref we accept.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96992 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
48913fa37e15c0644911bffb2282c26aae253f40 23-Feb-2010 Blaine Garst <blaine@apple.com> Unconditionally support block introspection data in a new field at the end
of the block descriptor field. This field is the ObjC style @encode
signature of the implementation function, and was to this point
conditionally provided in the block literal data structure. That
provisional support is removed.

Additionally, eliminate unused enumerations for the block literal flags field.
The first shipping ABI unconditionally set (1<<29) but this bit is unused
by the runtime, so the second ABI will unconditionally have (1<<30) set so
that the runtime can in fact distinguish whether the additional data is
present or not.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96989 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
odeGenFunction.h
2a7eb28397148079cbc8e54e8a3871ef01c4f4bc 23-Feb-2010 Blaine Garst <blaine@apple.com> Unconditionally support block introspection data in a new field at the end
of the block descriptor field. This field is the ObjC style @encode
signature of the implementation function, and was to this point
conditionally provided in the block literal data structure. That
provisional support is removed.

Additionally, eliminate unused enumerations for the block literal flags field.
The first shipping ABI unconditionally set (1<<29) but this bit is unused
by the runtime, so the second ABI will unconditionally have (1<<30) set so
that the runtime can in fact distinguish whether the additional data is
present or not.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96989 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
odeGenFunction.h
adf0415db52c223e848ee2ceb16b2a173b60d710 23-Feb-2010 Eli Friedman <eli.friedman@gmail.com> Make previous fix handle a few more edge cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96962 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
5370ee2389aa9ba8da3274911003631d66f9f1bd 23-Feb-2010 Eli Friedman <eli.friedman@gmail.com> Make previous fix handle a few more edge cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96962 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
3e01c752f3cbdf851c57accb480eb09728ae1604 23-Feb-2010 Eli Friedman <eli.friedman@gmail.com> PR6400: Handle an extreme edge case in mangling correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96961 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
b1162f178feb312b452e1b2095e0ed3413ba47fe 23-Feb-2010 Eli Friedman <eli.friedman@gmail.com> PR6400: Handle an extreme edge case in mangling correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96961 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
ccc1566bc5ee0c0fb549e9ce3999238ea841034b 23-Feb-2010 Eli Friedman <eli.friedman@gmail.com> PR6386: Fix a recent regression in IRGen of cast-to-union constructs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96958 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
18da88a38b82132faa7794120e17352dfacc5155 23-Feb-2010 Eli Friedman <eli.friedman@gmail.com> PR6386: Fix a recent regression in IRGen of cast-to-union constructs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96958 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
ccde6d89292d5faa29835e463f504d2d551be3e1 23-Feb-2010 Anders Carlsson <andersca@mac.com> Implement IsOverriderUsed. This can't be tested yet due to some other bugs :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96897 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f9fbc714da1bbc1f7a41dfd44656bb1a14835cb8 23-Feb-2010 Anders Carlsson <andersca@mac.com> Implement IsOverriderUsed. This can't be tested yet due to some other bugs :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96897 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0b770f8f2fbb348b5fdafa2d1660289fab76c2ff 23-Feb-2010 Anders Carlsson <andersca@mac.com> Stub out IsOverriderUsed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96883 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
464c8f176b4590aa3cab643865ab985423063dd5 23-Feb-2010 Anders Carlsson <andersca@mac.com> Stub out IsOverriderUsed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96883 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
5b61eff4d79bb14fc6948ea7a0862a8cc00749b7 23-Feb-2010 Anders Carlsson <andersca@mac.com> More fixes. Don't try to emit a virtual base vtable if the virtual base in question is a primary virtual base of some other base.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96881 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
af280c03a515b39b4b2c8e221068b3ed6a692cab 23-Feb-2010 Anders Carlsson <andersca@mac.com> More fixes. Don't try to emit a virtual base vtable if the virtual base in question is a primary virtual base of some other base.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96881 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
67b4419828199fb81c697dfb165b35a270e00fdf 23-Feb-2010 Anders Carlsson <andersca@mac.com> Always emit vcall offset for the primary base, not only if it's virtual. Remove a debug printf, and add the test case that now passes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96880 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
92f54325673f2708d911ae3d8a95d77e21b06e37 23-Feb-2010 Anders Carlsson <andersca@mac.com> Always emit vcall offset for the primary base, not only if it's virtual. Remove a debug printf, and add the test case that now passes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96880 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
3561db8bdec41cd7dac30b080b3c68cd191beab8 23-Feb-2010 Anders Carlsson <andersca@mac.com> Simplify the vcall offset calculation and make it give the correct answers :) My test case now has the right values but in the wrong order.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96877 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
cc6bcbb8a77aec056d29f1843b636841ae2a629c 23-Feb-2010 Anders Carlsson <andersca@mac.com> Simplify the vcall offset calculation and make it give the correct answers :) My test case now has the right values but in the wrong order.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96877 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a5dee116a876d4e32b731adcf067305058797691 23-Feb-2010 Anders Carlsson <andersca@mac.com> More work on vcall offsets. We now emit the right number of vcall offsets in my local test case, but not the right values.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96874 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a455c807c8d34e5ecfa32280b262bbbac427cc5b 23-Feb-2010 Anders Carlsson <andersca@mac.com> More work on vcall offsets. We now emit the right number of vcall offsets in my local test case, but not the right values.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96874 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
90caeaa86df1ddcb2db565118818db0592ff7675 23-Feb-2010 Anders Carlsson <andersca@mac.com> Move BaseOffset out of the FinalOverriders class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96853 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
2fca9bed9646e98b00ab0e02b0e601515db5d472 23-Feb-2010 Anders Carlsson <andersca@mac.com> Move BaseOffset out of the FinalOverriders class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96853 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
b85912f3fa881281f014555108851086a1bfb73a 23-Feb-2010 John McCall <rjmccall@apple.com> Perform two more constructor/destructor code-size optimizations:

1) emit base destructors as aliases to their unique base class destructors
under some careful conditions. This is enabled for the same targets that can
support complete-to-base aliases, i.e. not darwin.

2) Emit non-variadic complete constructors for classes with no virtual bases
as calls to the base constructor. This is enabled on all targets and in
theory can trigger in situations that the alias optimization can't (mostly
involving virtual bases, mostly not yet supported).

These are bundled together because I didn't think it worthwhile to split them,
not because they really need to be.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96842 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCall.cpp
GClass.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.h
c0bf462cf35fe050bddbd8bff967298e4a67e79d 23-Feb-2010 John McCall <rjmccall@apple.com> Perform two more constructor/destructor code-size optimizations:

1) emit base destructors as aliases to their unique base class destructors
under some careful conditions. This is enabled for the same targets that can
support complete-to-base aliases, i.e. not darwin.

2) Emit non-variadic complete constructors for classes with no virtual bases
as calls to the base constructor. This is enabled on all targets and in
theory can trigger in situations that the alias optimization can't (mostly
involving virtual bases, mostly not yet supported).

These are bundled together because I didn't think it worthwhile to split them,
not because they really need to be.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96842 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCall.cpp
GClass.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.h
5dca6390b70dd4b665beeeaa839c96d6d770006c 22-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Change the name of the vtable-debugging environment variable to
CLANG_VTABLE_DEBUG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96785 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
12a9109a8cb657582a84817e09019df1b42543ab 22-Feb-2010 Douglas Gregor <dgregor@apple.com> Change the name of the vtable-debugging environment variable to
CLANG_VTABLE_DEBUG.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96785 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a01e84e552c6da280845099c0296a6ace9aa1213 22-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Don't use NamedDecl::getNameAsCString() when dealing with C++ methods,
since they may not have normal identifiers for names. Fixes PR6369.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96784 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
aef605d0089cdff75f1abf90fe121e8dee39d55e 22-Feb-2010 Douglas Gregor <dgregor@apple.com> Don't use NamedDecl::getNameAsCString() when dealing with C++ methods,
since they may not have normal identifiers for names. Fixes PR6369.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96784 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e08f580e7d5f1a9f88448d269395f7a51971d729 21-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate the default arguments to ASTContext::getFunctionType(),
fixing up a few callers that thought they were propagating NoReturn
information but were in fact saying something about exception
specifications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96766 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
ce056bcaa1c97b89a4b2de2112c62d060863be2b 21-Feb-2010 Douglas Gregor <dgregor@apple.com> Eliminate the default arguments to ASTContext::getFunctionType(),
fixing up a few callers that thought they were propagating NoReturn
information but were in fact saying something about exception
specifications.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96766 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
913cbc90bd722447c232f9b524be3bc113382512 19-Feb-2010 Anders Carlsson <andersca@mac.com> Add the CK_UnusedFunctionPointer component kind for unused function pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96695 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
1f4646659fa48b7514553abb0e18edc5b08036bd 19-Feb-2010 Anders Carlsson <andersca@mac.com> Add the CK_UnusedFunctionPointer component kind for unused function pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96695 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f8983605804b956fe6eec360579bd013266d5b3b 19-Feb-2010 John McCall <rjmccall@apple.com> More refactoring around constructor/destructor code generation.
Fix some bugs with function-try-blocks and simplify normal try-block
code generation.

This implementation excludes a deleting destructor's call to
operator delete() from the function-try-block, which I believe
is correct but which I can't find straightforward support for at
a moment's glance.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96670 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GException.cpp
odeGenFunction.cpp
odeGenFunction.h
9fc6a7774643a810c8501dae2323e863fefb623e 19-Feb-2010 John McCall <rjmccall@apple.com> More refactoring around constructor/destructor code generation.
Fix some bugs with function-try-blocks and simplify normal try-block
code generation.

This implementation excludes a deleting destructor's call to
operator delete() from the function-try-block, which I believe
is correct but which I can't find straightforward support for at
a moment's glance.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96670 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GException.cpp
odeGenFunction.cpp
odeGenFunction.h
00f77b5b5bb968afbf7f2baf5d3f5d7a52b352bb 19-Feb-2010 Anders Carlsson <andersca@mac.com> Dump this-adjustments for destructors as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96660 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6065e020a0764ec12b678680ae62e396eb776c7c 19-Feb-2010 Anders Carlsson <andersca@mac.com> Dump this-adjustments for destructors as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96660 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
107572e5f29b64120958bb208e76754099cc4dab 19-Feb-2010 John McCall <rjmccall@apple.com> Re-introduce the ctor/dtor alias optimization, this time hidden behind a
command-line option which defaults off.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96649 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
d46f98573ba104eda102dd3224b2dca69f1c6336 19-Feb-2010 John McCall <rjmccall@apple.com> Re-introduce the ctor/dtor alias optimization, this time hidden behind a
command-line option which defaults off.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96649 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
292f520b74b449be401d37c8da567d631dbb8b96 19-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Patch removes IVars list from ObjCInterfaceDecl and
instead relies on their DeclContext for iteration, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96638 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
11062e11236b7bc689dad150e8b490fd6b063ec3 19-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Patch removes IVars list from ObjCInterfaceDecl and
instead relies on their DeclContext for iteration, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96638 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
fdd7bb6644cad5abc797e17821025afe0d7fd961 19-Feb-2010 Blaine Garst <blaine@apple.com> remove unused function & enumerations


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96635 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
c0ea8855adbc22f5a431f275ba1f7c3b9e0abc6b 19-Feb-2010 Blaine Garst <blaine@apple.com> remove unused function & enumerations


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96635 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
f418bb18e2b984920fb39aa50a6c39f067a62c17 18-Feb-2010 John McCall <rjmccall@apple.com> Revert the ctor/dtor alias optimization for now; the buildbots can detect
some failure here that I can't.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96612 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
8e51a1f5da6ef4a1a168d14116c6eed3a578a263 18-Feb-2010 John McCall <rjmccall@apple.com> Revert the ctor/dtor alias optimization for now; the buildbots can detect
some failure here that I can't.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96612 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
588e1096d9002525a2426da1e820df24f9a336f5 18-Feb-2010 John McCall <rjmccall@apple.com> Make deleting and complete dtor variants defer to other dtor variants by
calling them as subroutines. This triggers whenever the alias optimization
doesn't, i.e. when the dtor has linkonce linkage or there are virtual bases
or it's the deleting dtor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96605 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.cpp
3b47733ceac33306bd54ce9d6c7d8eeeae52c7ca 18-Feb-2010 John McCall <rjmccall@apple.com> Make deleting and complete dtor variants defer to other dtor variants by
calling them as subroutines. This triggers whenever the alias optimization
doesn't, i.e. when the dtor has linkonce linkage or there are virtual bases
or it's the deleting dtor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96605 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.cpp
0ba54cbfc8a5e6f915d060f50e45b1a60df6b50c 18-Feb-2010 Anders Carlsson <andersca@mac.com> Attempt to fix the 32-bit test failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96595 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
71b202e1d1a92aee9e71b126d653652e2114df25 18-Feb-2010 Anders Carlsson <andersca@mac.com> Attempt to fix the 32-bit test failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96595 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0a030fe3f193d153fac77c9a8b928416a99cbb4b 18-Feb-2010 Anders Carlsson <andersca@mac.com> Fix another bug and add another class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96590 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
8b6765fb563a5b03d128d8f53b9b3986128a3405 18-Feb-2010 Anders Carlsson <andersca@mac.com> Fix another bug and add another class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96590 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
bd3e66ae7ddc2feb4dbd30a61355b715a4119b03 18-Feb-2010 Anders Carlsson <andersca@mac.com> More work on vcall offsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96587 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
eb577d0df44df4df974e9b3a538575d92358a3b3 18-Feb-2010 Anders Carlsson <andersca@mac.com> More work on vcall offsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96587 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
b14164b8f6d99e98e19f28c2ad30e4d7c301018f 18-Feb-2010 Anders Carlsson <andersca@mac.com> Start stubbing out vcall offset handling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96585 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
60cc72af073f10050f20aaf11dd1487a310e6c0f 18-Feb-2010 Anders Carlsson <andersca@mac.com> Start stubbing out vcall offset handling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96585 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
38b488b69d6095e7efaa7f87908937d12c37b713 18-Feb-2010 Anders Carlsson <andersca@mac.com> Store the base offset of the final overrider in the OverriderInfo struct, to be used for vcall offsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96582 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
96309c4a3d57184b7adba5cd85edb9bf1777f3b1 18-Feb-2010 Anders Carlsson <andersca@mac.com> Store the base offset of the final overrider in the OverriderInfo struct, to be used for vcall offsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96582 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
713155f5ce6223d0cb520fa6d03040a1bb64545b 18-Feb-2010 Anders Carlsson <andersca@mac.com> Remove some dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96581 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
588f91ae2c96c166644a528cb51593475714f131 18-Feb-2010 Anders Carlsson <andersca@mac.com> Remove some dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96581 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
2547b6c6309546a43023650de21b7b47a13050df 18-Feb-2010 John McCall <rjmccall@apple.com> Extract out function-body code generation into its own method. No functionality
change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96564 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.cpp
odeGenFunction.h
a355e07454463b19829ac92ffd115a097faff0e0 18-Feb-2010 John McCall <rjmccall@apple.com> Extract out function-body code generation into its own method. No functionality
change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96564 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.cpp
odeGenFunction.h
6f073a3b9bdebeb5698b488e4e087726cf3742fd 17-Feb-2010 Chris Lattner <sabre@nondot.org> silence warning in a cleaner way


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96520 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
04a2311982d34269f84362a02a7a76a3e47675bc 17-Feb-2010 Chris Lattner <sabre@nondot.org> silence warning in a cleaner way


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96520 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
1f5831718264fde37e25570e1a8f9668280c1a96 17-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to remove arbitrary imporation of 'self' into
a block without it being used. This causes over release
of objects in certain runtime-senitive apps.
(fixes radar 7581175).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96501 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
0b63ba4d4642467529afbddc227a06979b6080fb 17-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Patch to remove arbitrary imporation of 'self' into
a block without it being used. This causes over release
of objects in certain runtime-senitive apps.
(fixes radar 7581175).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96501 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
6b58840d8c48d7a47de28904a2e52157ffe0ef2b 17-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Did not intend to check this in.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96486 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
1d04e83ee5dc01c52fc6b0218ddcbdc520746abc 17-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Did not intend to check this in.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96486 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
f29f9cddd965d4a78164fa569ea49a7d2ce71f70 17-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Use proper lexcial context for newly added ivars.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96484 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
2f14c4d18fcba4b4577dbe43016d6d42ef9973cf 17-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Use proper lexcial context for newly added ivars.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96484 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
376021e655847d36de2a5f561655e89b32d9fc73 17-Feb-2010 Anders Carlsson <andersca@mac.com> Make FinalOverriders handle virtual bases correctly. Unfortunately this can't be tested just yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96481 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d5c7ccab042670ce43790106dfa19efe64cc30be 17-Feb-2010 Anders Carlsson <andersca@mac.com> Make FinalOverriders handle virtual bases correctly. Unfortunately this can't be tested just yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96481 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
aa315fcdbf987298fe04d2c1f850083a3701e622 17-Feb-2010 Anders Carlsson <andersca@mac.com> Handle primary bases in AddVCallOffsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96461 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c84a8bf7fec968a2daa2431ccbd55633d6a8b1a9 17-Feb-2010 Anders Carlsson <andersca@mac.com> Handle primary bases in AddVCallOffsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96461 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a286ebcc4c24a8066b4a6c81059d8c240e710ce1 17-Feb-2010 Chandler Carruth <chandlerc@gmail.com> Silence GCC warning by marking an assert-only variable as unused.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96459 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
daa401cea267404c66a3123284da79f9026c55f5 17-Feb-2010 Chandler Carruth <chandlerc@gmail.com> Silence GCC warning by marking an assert-only variable as unused.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96459 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
73fad75a639bb5e0a16e766cc9765012a1ae3f65 17-Feb-2010 Anders Carlsson <andersca@mac.com> First cut at emitting vcall offsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96455 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d9a67046ae32f5da7811e003a5dd1bca7f136b5d 17-Feb-2010 Anders Carlsson <andersca@mac.com> First cut at emitting vcall offsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96455 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e27301093b87e27adfff8f1e2c4c720e2024c910 17-Feb-2010 John McCall <rjmccall@apple.com> Emit complete constructors and destructors as aliases to base constructors
and destructors when the two entities are semantically identical, i.e. when
the class has no virtual base classes. We only do this for linkage types
for which aliases are supported, i.e. internal and external, i.e. not linkonce.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96451 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
92ac9ffecd236a6be0d6ab30cef56100e56b171c 17-Feb-2010 John McCall <rjmccall@apple.com> Emit complete constructors and destructors as aliases to base constructors
and destructors when the two entities are semantically identical, i.e. when
the class has no virtual base classes. We only do this for linkage types
for which aliases are supported, i.e. internal and external, i.e. not linkonce.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96451 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
0d9c1e8cdf0c949c7d8f554e85bb7f39d6fe1fc8 17-Feb-2010 Anders Carlsson <andersca@mac.com> Pass through whether a base is virtual or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96449 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
340963fd040d79ebfd868f976743645254113183 17-Feb-2010 Anders Carlsson <andersca@mac.com> Pass through whether a base is virtual or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96449 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
fad82ec6bf99edf21e0eebe8b77498d102bb7a5f 17-Feb-2010 Sanjiv Gupta <sanjiv.gupta@microchip.com> implement EmitVAArg. pretty much the same way other targets do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96446 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
a446ecd13a9cd2c150baa5d3db4f817db4b1eba8 17-Feb-2010 Sanjiv Gupta <sanjiv.gupta@microchip.com> implement EmitVAArg. pretty much the same way other targets do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96446 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
99d0cfdc3b8dbfd449b23175195a2d6802dde105 17-Feb-2010 Anders Carlsson <andersca@mac.com> Correctly calculate base offsets for 'this' pointer adjustments involving virtual bases. This can't be tested yet due to lack of vcall offsets :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96441 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6362fe62ad23e97aea85a3c5e6ba0fde77ba461c 17-Feb-2010 Anders Carlsson <andersca@mac.com> Correctly calculate base offsets for 'this' pointer adjustments involving virtual bases. This can't be tested yet due to lack of vcall offsets :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96441 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e71cef153eb3f4a8d3f06edd87725597d9ea7395 16-Feb-2010 John McCall <rjmccall@apple.com> IRgen optimization: cache the value of 'this' and 'vtt' instead of
repeatedly reloading from an alloca. We still need to create the alloca
for debug info purposes (although we currently create it in all cases
because of some abstraction boundaries that're hard to break down).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96403 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
odeGenFunction.cpp
odeGenFunction.h
2504941793b549323f9d29c62507cf21d865fade 16-Feb-2010 John McCall <rjmccall@apple.com> IRgen optimization: cache the value of 'this' and 'vtt' instead of
repeatedly reloading from an alloca. We still need to create the alloca
for debug info purposes (although we currently create it in all cases
because of some abstraction boundaries that're hard to break down).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96403 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
odeGenFunction.cpp
odeGenFunction.h
02eda9ff9f79a1920918b46b4d6abc188a7b8af2 16-Feb-2010 Devang Patel <dpatel@apple.com> Distinguish two lexical blocks at the same level.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96397 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d19429f01a4169b573cafa466dd7a09a51e5fd92 16-Feb-2010 Devang Patel <dpatel@apple.com> Distinguish two lexical blocks at the same level.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96397 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2f2071dcda5a446bb78b0c167cdec580ccabfcaa 16-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Switch 'retval' to use CreateIRTemp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96376 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
647a1ec397fa13af176d07d9f5d071560a94c7a9 16-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Switch 'retval' to use CreateIRTemp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96376 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
e8f3c37996f392b7698f02d4ec7d8effae118eca 16-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Add CreateIRTemp, which creates a temporary alloca but with type converted "not-for-memory". Dunno a better name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96374 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
9bd4da2cfa8b956b851200db8f9a37e175edbb15 16-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Add CreateIRTemp, which creates a temporary alloca but with type converted "not-for-memory". Dunno a better name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96374 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
6233d1e0ddde1e5625f53dacca6975fb29131a9f 16-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Switch EmitCompoundLiteralLValue to use CreateMemTemp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96373 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
150065722a5f010adb0f801d26d8a129a5243669 16-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Switch EmitCompoundLiteralLValue to use CreateMemTemp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96373 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
00ec7e3cb7519b46c08888fa8acc0f69a4d26b40 16-Feb-2010 Anders Carlsson <andersca@mac.com> Handle layout of vtables for virtual bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96355 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
69dc04e94872616cebbdd8215d1f5036a8add3f7 16-Feb-2010 Anders Carlsson <andersca@mac.com> Handle layout of vtables for virtual bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96355 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e335f4c221c5c4a1ad92b6ce0981d5a95b24c7a4 16-Feb-2010 Anders Carlsson <andersca@mac.com> Move some code around in preparation for virtual base vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96354 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
89ad4219e4ed8f025ef2049e7b1ca6af4624d989 16-Feb-2010 Anders Carlsson <andersca@mac.com> Move some code around in preparation for virtual base vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96354 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c748eb1587eb501abe5d5709a0457848e4c06b83 16-Feb-2010 Anders Carlsson <andersca@mac.com> Fix a bug where we would not emit secondary vtables for bases of a primary base.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96351 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c7b631682f66b5d6144968cf75d3af895b611fc6 16-Feb-2010 Anders Carlsson <andersca@mac.com> Fix a bug where we would not emit secondary vtables for bases of a primary base.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96351 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
04a5d01c4d5b14c74b8589e58f45eb177b3f6c8c 16-Feb-2010 Anders Carlsson <andersca@mac.com> Emit vbase offsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96329 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
852213e54a1b2c2246776b4bb4e9527d70c98807 16-Feb-2010 Anders Carlsson <andersca@mac.com> Emit vbase offsets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96329 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
290cf62cab595672e95c122e0cf0d0503a5ec96c 16-Feb-2010 Anders Carlsson <andersca@mac.com> More work on the new layout code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96328 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a661a54d50e33d8b58735ef4ded06b1ad639b165 16-Feb-2010 Anders Carlsson <andersca@mac.com> More work on the new layout code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96328 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6759e79a2069cbcc88e24e2e57cc66a8d371dfa0 16-Feb-2010 John McCall <rjmccall@apple.com> When emitting complete destructors for classes with virtual bases, compute
the offset to the virtual bases statically inside of relying on the virtual
base offsets in the object's vtable(s). This is both more efficient and
sound against the destructor's manipulation of the vtables.

Also extract a few helper routines.

Oh and we seem to pass all tests with an optimized clang now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96327 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
bff225ecf77fb891596ecb1b27196310d268365e 16-Feb-2010 John McCall <rjmccall@apple.com> When emitting complete destructors for classes with virtual bases, compute
the offset to the virtual bases statically inside of relying on the virtual
base offsets in the object's vtable(s). This is both more efficient and
sound against the destructor's manipulation of the vtables.

Also extract a few helper routines.

Oh and we seem to pass all tests with an optimized clang now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96327 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenFunction.h
c07e097e739b87a2aedf21e793762414231bcb3a 15-Feb-2010 Devang Patel <dpatel@apple.com> Use getLocStart(), instead of getLocEnd(), to record starting location of objc method. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96245 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
a92d613a1a3881fb5002ce99e5721056161bcd28 15-Feb-2010 Devang Patel <dpatel@apple.com> Use getLocStart(), instead of getLocEnd(), to record starting location of objc method. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96245 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
a0ed8c2d75acbbafa8c0a3b3d4e947bec80ce1bf 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
GExprComplex.cpp
GExprScalar.cpp
odeGenTypes.cpp
argetInfo.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
GExprComplex.cpp
GExprScalar.cpp
odeGenTypes.cpp
argetInfo.cpp
d6aa7c26c099026f45ffb4dab852b78962236cc8 15-Feb-2010 John McCall <rjmccall@apple.com> When emitting an aggregate into a temporary, make sure we set the alignment
on the alloca.

The fact that codegen makes this class of bug so wonderfully easy to make is
embarrassing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96204 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
63efd334081c03a29d351e4aefa00dfaf6966d8a 15-Feb-2010 John McCall <rjmccall@apple.com> When emitting an aggregate into a temporary, make sure we set the alignment
on the alloca.

The fact that codegen makes this class of bug so wonderfully easy to make is
embarrassing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96204 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
a9818645d97955cf5a73851357439c0cb68faf39 14-Feb-2010 Anders Carlsson <andersca@mac.com> Don't compute final overriders or build vtables for bases that don't need a vtable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96171 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
b828afa89a3d50c4370199a7c6c04facfd843b47 14-Feb-2010 Anders Carlsson <andersca@mac.com> Don't compute final overriders or build vtables for bases that don't need a vtable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96171 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ab86cb2f25289a3fc3480b72950f9a08dba0f241 14-Feb-2010 Anders Carlsson <andersca@mac.com> Build fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96140 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
8f7af125c0dddb73dfda2ddb6b5c61d61a15cb15 14-Feb-2010 Anders Carlsson <andersca@mac.com> Build fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96140 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
8ecf908c0b6aebad84be315e0adae9815f509bf9 14-Feb-2010 Anders Carlsson <andersca@mac.com> Baby steps towards teaching FinalOverriders about virtual bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96139 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
9d6f0d551bbd08036baef2b892e31b87fc7e4322 14-Feb-2010 Anders Carlsson <andersca@mac.com> Baby steps towards teaching FinalOverriders about virtual bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96139 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d89c329236167ab9504de3135947be34ee30a4c9 14-Feb-2010 Anders Carlsson <andersca@mac.com> Don't try to layout construction vtables for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96138 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c5874296f733b96e41431d30de25376636ed4b75 14-Feb-2010 Anders Carlsson <andersca@mac.com> Don't try to layout construction vtables for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96138 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
77c9c4170b1957afb903127d3d9cb0fc59efbb82 14-Feb-2010 Anders Carlsson <andersca@mac.com> Improve support for non-virtual 'this' pointer adjustments. With this, it should be possible to use the new vtable layout code for all class hierarchies that do not involve virtual bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96137 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e67dc3072522570207a16724ea459f81a58e4621 14-Feb-2010 Anders Carlsson <andersca@mac.com> Improve support for non-virtual 'this' pointer adjustments. With this, it should be possible to use the new vtable layout code for all class hierarchies that do not involve virtual bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96137 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
917f9803635aa7e9368f6410baf78db09231dcea 14-Feb-2010 Anders Carlsson <andersca@mac.com> Add basic support for simple non-virtual 'this' pointer adjustments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96136 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
49bac9a2ea08961b6de77c9a08ed77fbbb7f5a1a 14-Feb-2010 Anders Carlsson <andersca@mac.com> Add basic support for simple non-virtual 'this' pointer adjustments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96136 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
9db73f2bae9296736a917ae5aee5154face8383a 14-Feb-2010 Anders Carlsson <andersca@mac.com> Add support for very simple non-virtual this adjustments in the FinalOverriders class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96133 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
df31af19e68e3600c207199a185b53d21276e52a 14-Feb-2010 Anders Carlsson <andersca@mac.com> Add support for very simple non-virtual this adjustments in the FinalOverriders class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96133 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c50cf707f50a7d52fc41fc0ebca4c73e656815e5 13-Feb-2010 Anders Carlsson <andersca@mac.com> Cleanup; remove some duplicated code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96131 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f877df14cf4fb09244614b2c2a662dc4b6a83cad 13-Feb-2010 Anders Carlsson <andersca@mac.com> Cleanup; remove some duplicated code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96131 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
80def5130039e443fb35c948b2345998ad0d3894 13-Feb-2010 Anders Carlsson <andersca@mac.com> Assert if we encounter this adjustments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96125 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
74c364e4cccb914da2a581e365b056155e1ae932 13-Feb-2010 Anders Carlsson <andersca@mac.com> Assert if we encounter this adjustments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96125 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e2ae6c5246e34a5e351d1553c75975f5d6b05b1c 13-Feb-2010 Anders Carlsson <andersca@mac.com> Start laying out secondary vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96123 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
76f1aa7658c34532785e6f44c99af65f3e4bd194 13-Feb-2010 Anders Carlsson <andersca@mac.com> Start laying out secondary vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96123 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
2c77e2ad046cb0e59b67568540e2f631fd8b1672 13-Feb-2010 Anders Carlsson <andersca@mac.com> Merge base offsets and dump them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96121 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a4699882abd8bedd159fa979508f8f6deb64a121 13-Feb-2010 Anders Carlsson <andersca@mac.com> Merge base offsets and dump them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96121 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
4c3bd2430e435dcac736c49dd15781c30458d637 13-Feb-2010 Anders Carlsson <andersca@mac.com> Don't make return adjustments for pure virtual member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96120 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
1d05be51b09ae1ce65b1ecd6220bade12908586d 13-Feb-2010 Anders Carlsson <andersca@mac.com> Don't make return adjustments for pure virtual member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96120 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a76f9dbc2084b91d9f01db8bda9e2e7e5381d79a 13-Feb-2010 Anders Carlsson <andersca@mac.com> Handle virtual bases in return adjustment types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96119 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
60db0ee2c1d91ea86b04b5e448810ba418058180 13-Feb-2010 Anders Carlsson <andersca@mac.com> Handle virtual bases in return adjustment types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96119 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6b11f10d5b52b0d9e4680f53af3c9ab80356722d 13-Feb-2010 Anders Carlsson <andersca@mac.com> Handle virtual bases in ComputeBaseOffset.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96117 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a4a541708a65184466b97fe562a293891fa7e811 13-Feb-2010 Anders Carlsson <andersca@mac.com> Handle virtual bases in ComputeBaseOffset.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96117 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a76d6f5f9529a0cd8e11749812eb7f8e73a52b69 13-Feb-2010 Anders Carlsson <andersca@mac.com> More work on covariant return types. We now handle non-virtual adjustments fine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96114 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
7dbf47adb8b8ca84484fae0861ffb2f1eaf44011 13-Feb-2010 Anders Carlsson <andersca@mac.com> More work on covariant return types. We now handle non-virtual adjustments fine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96114 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
1a0c581ed602752af6d8a9513db0bcd46d689cbb 13-Feb-2010 Charles Davis <cdavis@mines.edu> Emit the 'alignstack' LLVM function attribute when we encounter a function
marked 'force_align_arg_pointer'. Almost there; now all I need to do is finish
up the backend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96100 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
74f7293eb30bf77355c20a3c2cad7b67d8ce7388 13-Feb-2010 Charles Davis <cdavis@mines.edu> Emit the 'alignstack' LLVM function attribute when we encounter a function
marked 'force_align_arg_pointer'. Almost there; now all I need to do is finish
up the backend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96100 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
bed7cb2f95968b6177ca52066b7f1ab4fa89c22f 13-Feb-2010 Chandler Carruth <chandlerc@gmail.com> Fix think-o, attributes can't come *within* the type of the variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96099 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
fd3194bedbaddadd21458e68ffe810b80d76b0b1 13-Feb-2010 Chandler Carruth <chandlerc@gmail.com> Fix think-o, attributes can't come *within* the type of the variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96099 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
8222225f6918cb91c216d03d4a42780b2b18c49f 13-Feb-2010 Chandler Carruth <chandlerc@gmail.com> Silence unused variable warning in a build without assertions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96098 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e087f0700190760060e56ed9fab119e44e6b95f6 13-Feb-2010 Chandler Carruth <chandlerc@gmail.com> Silence unused variable warning in a build without assertions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96098 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
3aeb2802adf94ad95cfa94ba0a179c30d29393ae 13-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Remove dead {include, semicolon, variable}.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96087 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
03d15f00243d97116097519feff480ae008ab4b8 13-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Remove dead {include, semicolon, variable}.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96087 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
53666a6f99ea524c7eb9853a8f9beaa1cb7da97c 13-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Use a different name for this iterator. MSVC and clang++ didn't like "I" in the same scope twice.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96086 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e3d0b1c1fe6c2f78e276e0a1f1ec8c64c0ace313 13-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Use a different name for this iterator. MSVC and clang++ didn't like "I" in the same scope twice.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96086 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
b6c4ec2c94bccfad6dec8ff61cce2bf49bfe6c1a 13-Feb-2010 Anders Carlsson <andersca@mac.com> More work on return type adjustments in the new vtable builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96070 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0c0eeb2fb0a4deb63a5b6603cfabff026bc8d547 13-Feb-2010 Anders Carlsson <andersca@mac.com> More work on return type adjustments in the new vtable builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96070 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ceeffb036421ad7fd6f361e64d03bf8d0b0caffa 13-Feb-2010 John McCall <rjmccall@apple.com> Switch the standard DeclarationName comparator to be a tri-valued comparator.
Use that while fixing a nasty misuse of qsort in vtable codegen which, somehow,
has not actually caused a crash.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96062 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
7fe0b9ea2c8137c035402e6ea01dfdfbc93214cb 13-Feb-2010 John McCall <rjmccall@apple.com> Switch the standard DeclarationName comparator to be a tri-valued comparator.
Use that while fixing a nasty misuse of qsort in vtable codegen which, somehow,
has not actually caused a crash.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96062 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a407cad7da99d4c953aeb7f72b0530ab0d93f990 13-Feb-2010 Eli Friedman <eli.friedman@gmail.com> if-0 out printf.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96052 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
4967762125eeb722cd65ba588d6f90b4a175e8c9 13-Feb-2010 Eli Friedman <eli.friedman@gmail.com> if-0 out printf.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96052 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e3e395b2d8cdd40f722ef2d8be0424cfec20c592 12-Feb-2010 Anders Carlsson <andersca@mac.com> Fix a refacto that broke the clang-on-clang build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95994 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c1eec891eb008cf3bc89d69d90af82678513f79b 12-Feb-2010 Anders Carlsson <andersca@mac.com> Fix a refacto that broke the clang-on-clang build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95994 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
7ad05f31219843d27e1cc4d357bc8bb6a742460d 12-Feb-2010 Anders Carlsson <andersca@mac.com> Start stubbing out more of the covariant thunk support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95990 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
104f45c685e5a97306aa72c79f4d068e2999db62 12-Feb-2010 Anders Carlsson <andersca@mac.com> Start stubbing out more of the covariant thunk support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95990 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
246cf979502f90285ae64ca962204a561614c0ac 12-Feb-2010 Anders Carlsson <andersca@mac.com> Keep track of whether a final overrider needs a return type adjustment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95985 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
16b7312e60a560cb255ab560fddb4f906645adfc 12-Feb-2010 Anders Carlsson <andersca@mac.com> Keep track of whether a final overrider needs a return type adjustment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95985 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
1a4c7883170f513dfcdc1a886448147e89336b34 12-Feb-2010 Anders Carlsson <andersca@mac.com> Move overrider out into a separate struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95984 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a757582866f345ab54740bd304b5161522b13277 12-Feb-2010 Anders Carlsson <andersca@mac.com> Move overrider out into a separate struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95984 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
039c09db1efdf392dc9baa94ec3d1db8e0342c1a 12-Feb-2010 Anders Carlsson <andersca@mac.com> Keep track of the address points for all primary bases, and add the ability to dump multiple address points for a single offset.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95970 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
28cbc8b512db420748601dba276144d729a0d7a2 12-Feb-2010 Anders Carlsson <andersca@mac.com> Keep track of the address points for all primary bases, and add the ability to dump multiple address points for a single offset.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95970 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c0e08962d08095c7a9c32ff8ee302fbcd1c617ab 12-Feb-2010 John McCall <rjmccall@apple.com> Fix a bug causing an assertion when a covariant return type differed from
an overriden type only by reduced qualification.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95968 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
96058953c72355efb266abe8e333db4f5715dbd2 12-Feb-2010 John McCall <rjmccall@apple.com> Fix a bug causing an assertion when a covariant return type differed from
an overriden type only by reduced qualification.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95968 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
05e640f4526e0cbbb619d82f139ddaf8a0baec4e 12-Feb-2010 Anders Carlsson <andersca@mac.com> More work on vtable layout. We can now layout vtables with primary bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95965 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
57071e29bdb65d21f72e221f2a16f24f6bea72f3 12-Feb-2010 Anders Carlsson <andersca@mac.com> More work on vtable layout. We can now layout vtables with primary bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95965 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e0b653f8ae435ea58f8761471b5340fed08df170 12-Feb-2010 Anders Carlsson <andersca@mac.com> When dumping vtables, dump whether a virtual member function is pure or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95963 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
982414266cbfbb3f2784c6b42f008532336ea64c 12-Feb-2010 Anders Carlsson <andersca@mac.com> When dumping vtables, dump whether a virtual member function is pure or not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95963 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f69c25d790e59c2cfaf833f816548ef464470fc1 12-Feb-2010 Anders Carlsson <andersca@mac.com> More work on the final overriders.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95954 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
b8358d84f41c9f80ea66bfcb9e8e997183fc5a8b 12-Feb-2010 Anders Carlsson <andersca@mac.com> More work on the final overriders.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95954 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
3901ff6f2f7be7e5eef3cad99eb970827af11b9a 12-Feb-2010 Devang Patel <dpatel@apple.com> Do not ignore anonymous records.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95953 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4835fdd4b14376fcaed71c96df1086151a4c055d 12-Feb-2010 Devang Patel <dpatel@apple.com> Do not ignore anonymous records.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95953 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b74d6775d7fe92920651f73e9c30905910364311 12-Feb-2010 Devang Patel <dpatel@apple.com> Cache new compile unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95952 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4cb159ccc67a2b9814c412a47ca751995f8d3b64 12-Feb-2010 Devang Patel <dpatel@apple.com> Cache new compile unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95952 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
70bf1b3bbe8bc80f1e13510b4895404342e2eac5 11-Feb-2010 Anders Carlsson <andersca@mac.com> Stub out the final overriders class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95922 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
bdf73d890598fa0220a3980f8529acdc149c13d6 11-Feb-2010 Anders Carlsson <andersca@mac.com> Stub out the final overriders class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95922 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
00b9c7a3adbf093cb76f8bf8f25b452f16816342 11-Feb-2010 Anders Carlsson <andersca@mac.com> Use getAs instead of cast/dyn_cast on types. (I'm sure Doug will appreciate this).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95911 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
9abb2736f6286578810f733a187d6f9595b62061 11-Feb-2010 Anders Carlsson <andersca@mac.com> Use getAs instead of cast/dyn_cast on types. (I'm sure Doug will appreciate this).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95911 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
612509fa00878e61ea71b9410bddc821adeb243a 11-Feb-2010 Anders Carlsson <andersca@mac.com> Move two functions to the top. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95908 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
9a140606972ef2fdbf31ac04169de41a3067d5b1 11-Feb-2010 Anders Carlsson <andersca@mac.com> Move two functions to the top. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95908 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c0c30b203cd1e17a8688d3719e3ac7400f758709 11-Feb-2010 Anders Carlsson <andersca@mac.com> More vtable layout dumper improvements. Handle destructors, dump the complete function type of the member functions (using PredefinedExpr::ComputeName.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95887 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GVtable.cpp
848fa64143fbe5ae62a601ad61277f741e54dfab 11-Feb-2010 Anders Carlsson <andersca@mac.com> More vtable layout dumper improvements. Handle destructors, dump the complete function type of the member functions (using PredefinedExpr::ComputeName.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95887 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GVtable.cpp
9f3fc18ece5d2659ced4b378350afce080c68e69 11-Feb-2010 Anders Carlsson <andersca@mac.com> Keep track of, and dump, vtable address points.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95874 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
822307bbb12bc1025910d6387b79723087d27d9f 11-Feb-2010 Anders Carlsson <andersca@mac.com> Keep track of, and dump, vtable address points.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95874 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
bbc87477d3d15d12a75e1cf717bcd0631732d259 11-Feb-2010 Anders Carlsson <andersca@mac.com> Check in the beginnings of my new vtable layout builder idea.

Right now, it's off by default but can be tested by passing -fdump-vtable-layouts to clang -cc1. This option will cause all vtables that will normally be emitted as part of codegen to also be dumped using the new layout code.

I've also added a very simple new vtable layout test case.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95865 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
824d7ea07a4e9208925daa6ae9289fb2b39bce9f 11-Feb-2010 Anders Carlsson <andersca@mac.com> Check in the beginnings of my new vtable layout builder idea.

Right now, it's off by default but can be tested by passing -fdump-vtable-layouts to clang -cc1. This option will cause all vtables that will normally be emitted as part of codegen to also be dumped using the new layout code.

I've also added a very simple new vtable layout test case.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95865 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
222ea5b36692d59f7feab62ea52b4c698514a27f 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Remove use of 'std::string' from Attr objects, using instead a byte
array allocated using the allocator in ASTContext. This addresses
these strings getting leaked when using a BumpPtrAllocator (in
ASTContext).

Fixes: <rdar://problem/7636765>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95853 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
3d2c43e9a7ca55f5ddc1f0c77d8f5e5ea7c1b573 11-Feb-2010 Ted Kremenek <kremenek@apple.com> Remove use of 'std::string' from Attr objects, using instead a byte
array allocated using the allocator in ASTContext. This addresses
these strings getting leaked when using a BumpPtrAllocator (in
ASTContext).

Fixes: <rdar://problem/7636765>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95853 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
47bedd03ccebfcf7f6156aed64ef45a9e6318145 11-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate a bunch of unnecessary ASTContexts from members functions of
Decl subclasses. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95841 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
838db383b69b9fb55f55c8e9546477df198a4faa 11-Feb-2010 Douglas Gregor <dgregor@apple.com> Eliminate a bunch of unnecessary ASTContexts from members functions of
Decl subclasses. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95841 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0953831bd17a3ec879d4ddbbf33cbb2c67560fb0 11-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate the ASTContext parameter from RecordDecl::getDefinition()
and CXXRecordDecl::getDefinition(); it's totally unnecessary. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95836 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
952b017601f9c82b51119c3a1600f1312a833db9 11-Feb-2010 Douglas Gregor <dgregor@apple.com> Eliminate the ASTContext parameter from RecordDecl::getDefinition()
and CXXRecordDecl::getDefinition(); it's totally unnecessary. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95836 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
52755f034e2453ca86aa759890f3a34764ef4738 11-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Generate the objc_read_weak API when calling
a __weak block. Fixes radar 7628591.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95822 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
263c4dec5f0fda5a77ed99f3ccd456c15cb8720f 11-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Generate the objc_read_weak API when calling
a __weak block. Fixes radar 7628591.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95822 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
c9fd01271c703a5d0a91154eac5ee739d9684a1e 10-Feb-2010 Chris Lattner <sabre@nondot.org> hopefully silence a warning on the clang-i386-darwin9 tester.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95812 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
c0f3df3245fa2737b459e198273762a27b76f75a 10-Feb-2010 Chris Lattner <sabre@nondot.org> hopefully silence a warning on the clang-i386-darwin9 tester.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95812 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
f8fd82ba49827db0f6a6ba00c55a7b56b12a19fa 10-Feb-2010 Shih-wei Liao <sliao@google.com> Check in LLVM r95781.
BIInfo.h
GBlocks.cpp
GBlocks.h
GBuilder.h
GBuiltin.cpp
GCXX.cpp
GCXX.h
GCall.cpp
GCall.h
GClass.cpp
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
GDeclCXX.cpp
GException.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GRTTI.cpp
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
GStmt.cpp
GTemporaries.cpp
GVTT.cpp
GValue.h
GVtable.cpp
GVtable.h
MakeLists.txt
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
lobalDecl.h
akefile
angle.cpp
angle.h
oduleBuilder.cpp
EADME.txt
argetInfo.cpp
argetInfo.h
21f7bcaa607ffc73866f7b0c2141f449c2943bbf 10-Feb-2010 Daniel Dunbar <daniel@zuster.org> Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixes
calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling,
for Darwin ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95787 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCMac.cpp
b2987d159a88ab0ee2e40c884eb4d77b42ab89b6 10-Feb-2010 Daniel Dunbar <daniel@zuster.org> Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixes
calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling,
for Darwin ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95787 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GObjCMac.cpp
d5530b8420a08a591542f24f154641984933f528 10-Feb-2010 Devang Patel <dpatel@apple.com> Refactor code that generates debug info for variables that has BlocksAttr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95786 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
809b9bb733d6b65883a89eae0cf20c1635cff141 10-Feb-2010 Devang Patel <dpatel@apple.com> Refactor code that generates debug info for variables that has BlocksAttr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95786 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
3bbd2dcc9e782f16f4b890be07fbc20d2f70b264 10-Feb-2010 Devang Patel <dpatel@apple.com> Use current location as the location of compiler generated arguments, e.g. self, _cmd etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95743 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d263e7bb725c7d7600948c4ea8f38715998e598e 10-Feb-2010 Devang Patel <dpatel@apple.com> Use current location as the location of compiler generated arguments, e.g. self, _cmd etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95743 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
6d753df06120a084f5d1ef012c63be1c2550fbb2 09-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> StringRefize two random methods, remove a dead variable and a weird constructor call.
This maybe fixes some of the errors GCC 4.5 gives on this code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95684 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
74a8bbf0654fbbf37be04b240b5bbe591f37f242 09-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> StringRefize two random methods, remove a dead variable and a weird constructor call.
This maybe fixes some of the errors GCC 4.5 gives on this code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95684 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
cc702acac0129c832d03dfe508e7b3949e00e5aa 09-Feb-2010 Devang Patel <dpatel@apple.com> Fix virtual bases' debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95678 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d5322da6ba08728fe4ee9b14f468961eddc915dc 09-Feb-2010 Devang Patel <dpatel@apple.com> Fix virtual bases' debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95678 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d9911ea9681ae48a6e918284548de9273f3b4093 09-Feb-2010 Devang Patel <dpatel@apple.com> Mark implicit "this" argument as an artificial argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95673 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
337472dcb74e302717f16bc5a4ef3763228c49e4 09-Feb-2010 Devang Patel <dpatel@apple.com> Mark implicit "this" argument as an artificial argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95673 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
122686170521b5177c0aeeb9fc07f36744345801 09-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Add CreateMemTemp, for creating an temporary memory object for a particular type, and flood fill. - CreateMemTemp sets the alignment on the alloca correctly, which fixes a great many places in IRgen where we were doing the wrong thing.

- This fixes many many more places than the test case, but my feeling is we need to audit alignment systematically so I'm not inclined to try hard to test the individual fixes in this patch. If this bothers you, patches welcome!

PR6240.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95648 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCall.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GObjC.cpp
odeGenFunction.h
195337d2e5d4625ae9dc1328c7cdbc7115b0261b 09-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Add CreateMemTemp, for creating an temporary memory object for a particular type, and flood fill. - CreateMemTemp sets the alignment on the alloca correctly, which fixes a great many places in IRgen where we were doing the wrong thing.

- This fixes many many more places than the test case, but my feeling is we need to audit alignment systematically so I'm not inclined to try hard to test the individual fixes in this patch. If this bothers you, patches welcome!

PR6240.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95648 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCall.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprCXX.cpp
GObjC.cpp
odeGenFunction.h
334242783ed87b3ede9e794cece86176ea86c4d9 09-Feb-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Pass inline keyword to optimizer as the new InlineHint function attribute.

At the moment the inlinehint attribute is ignored by the Inliner unless you
pass a -respect-inlinehint option. This will soon be the default.

The inlinehint attribute is set if the inline keyword is explicitly specified
on any declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95623 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
a3fe2842e0cf953241ccc05809afdf84f13798e9 09-Feb-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Pass inline keyword to optimizer as the new InlineHint function attribute.

At the moment the inlinehint attribute is ignored by the Inliner unless you
pass a -respect-inlinehint option. This will soon be the default.

The inlinehint attribute is set if the inline keyword is explicitly specified
on any declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95623 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
401bc34e2bf9dd5e8003d00f45fce26ff1ff8244 08-Feb-2010 Daniel Dunbar <daniel@zuster.org> Reapply r95393, without the change to CGExpr. I was wrong in assuming that the
element type always matched the converted LLVM type for ExprType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95596 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
GStmt.cpp
e86bcf0d9ea62cc75e545787896083f8a6bc81a1 08-Feb-2010 Daniel Dunbar <daniel@zuster.org> Reapply r95393, without the change to CGExpr. I was wrong in assuming that the
element type always matched the converted LLVM type for ExprType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95596 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
GStmt.cpp
0d2df85f0fbc5f3c0fa4db9e451a2d75986345af 08-Feb-2010 John McCall <rjmccall@apple.com> Emit global references with constant initializers as constants. Fixes PR5585.

The standard actually says that such references should have internal linkage,
but gcc doesn't do that, so we probably can't get away with it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95577 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
88786862424cb2d478516d911709dc19c962af9c 08-Feb-2010 John McCall <rjmccall@apple.com> Emit global references with constant initializers as constants. Fixes PR5585.

The standard actually says that such references should have internal linkage,
but gcc doesn't do that, so we probably can't get away with it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95577 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5fa94e93ccbf162b5e1cd20ecea6b6ccfc198c1c 07-Feb-2010 Anders Carlsson <andersca@mac.com> Make sure to set vtable pointers in the destructors as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95525 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GException.cpp
odeGenFunction.cpp
1851a12605bc6f1ea70d11974a315340ebaab6eb 07-Feb-2010 Anders Carlsson <andersca@mac.com> Make sure to set vtable pointers in the destructors as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95525 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GException.cpp
odeGenFunction.cpp
f42107ad22957aa24bd13888c444f1c36ee8e64a 07-Feb-2010 Anders Carlsson <andersca@mac.com> Use the right type when taking the address of a non-virtual member function pointer. Fixes PR6258.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95524 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
585fa68ca00421af6c8289866a7bde27a8e8c0ce 07-Feb-2010 Anders Carlsson <andersca@mac.com> Use the right type when taking the address of a non-virtual member function pointer. Fixes PR6258.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95524 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
e7e419dcbc47068ad4c72198a518b51853c64cb0 07-Feb-2010 Anders Carlsson <andersca@mac.com> Use the right linkage for static variables inside C++ inline functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95512 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.h
f6b89a173827457c28ac77b7cf091a24ef484e8a 07-Feb-2010 Anders Carlsson <andersca@mac.com> Use the right linkage for static variables inside C++ inline functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95512 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.h
2ef3344ec4be06e3dbbf1ba1890abbff1b2d3a31 07-Feb-2010 Anders Carlsson <andersca@mac.com> Improved handling of the visibility attribute. Declarations now inherit their parent's visibility.

(This is kind of a risky change, but I did a self-host build and everything appears to work fine!)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95511 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
39de84d671bac60662251e98f20a5a6039795dfc 07-Feb-2010 Anders Carlsson <andersca@mac.com> Improved handling of the visibility attribute. Declarations now inherit their parent's visibility.

(This is kind of a risky change, but I did a self-host build and everything appears to work fine!)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95511 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a7cccbb4e1107e4199754c09ffa6b47a740ceb98 07-Feb-2010 Anders Carlsson <andersca@mac.com> Make EmitStartEHSpec and EmitEndEHSpec return early when exceptions are disabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95509 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
a994ee4b197554282ae6b222c3284ccaa3a6484c 07-Feb-2010 Anders Carlsson <andersca@mac.com> Make EmitStartEHSpec and EmitEndEHSpec return early when exceptions are disabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95509 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
05326029789a06dbdbf8b3feaada84a7556e8ff7 07-Feb-2010 Anders Carlsson <andersca@mac.com> Add support for threadsafe statics, and make them the default (matching gcc).

Daniel, I'd appreciate a review of the driver/cc1 parts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95508 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
a508b7de6c5246ab04ed69d0ab4e9977ec1fb4d4 07-Feb-2010 Anders Carlsson <andersca@mac.com> Add support for threadsafe statics, and make them the default (matching gcc).

Daniel, I'd appreciate a review of the driver/cc1 parts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95508 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
8ca94c1ad37cdd90a17b656ee4801eb045a0d7eb 06-Feb-2010 Anders Carlsson <andersca@mac.com> Call destructors for constructed bases as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95502 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
594d5e8bd9870080aad6a761538e272bc2dfcc13 06-Feb-2010 Anders Carlsson <andersca@mac.com> Call destructors for constructed bases as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95502 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
c0eb4d7cbae98717ff6416221a7c17c3ba57ca0e 06-Feb-2010 Anders Carlsson <andersca@mac.com> If a constructor throws an exception we need to execute the destructors for all fully constructed members. Fixes ctor_dtor_count.cpp in the test suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95501 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
9405dcd83f090d86d5d06ab3a4e59cc39e7edd93 06-Feb-2010 Anders Carlsson <andersca@mac.com> If a constructor throws an exception we need to execute the destructors for all fully constructed members. Fixes ctor_dtor_count.cpp in the test suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95501 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
113eb4b6f41b0d5314fc73a52ca9ddc2a8a4d2e0 06-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Switch CodeGen's "is this variable declaration a definition?" logic
over to VarDecl::isThisDeclarationADefinition(), which handles
variables declared with linkage specifications better (among other
things). CMake 2.9 (from CVS) now builds with clang++ and is somewhat
functional.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95486 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a9a55c063e9e59c6ab0a6d7a21302660f7bde9f9 06-Feb-2010 Douglas Gregor <dgregor@apple.com> Switch CodeGen's "is this variable declaration a definition?" logic
over to VarDecl::isThisDeclarationADefinition(), which handles
variables declared with linkage specifications better (among other
things). CMake 2.9 (from CVS) now builds with clang++ and is somewhat
functional.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95486 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
cc79138382403786004b4e1ed8a4df86c0c33170 06-Feb-2010 Anders Carlsson <andersca@mac.com> Only append 'L' for internal variable declarations, not all declarations. (Found by the mangle checker, yay)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95485 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
aec2523ab2c91413ef2f66dc944d0d6ac6a58abe 06-Feb-2010 Anders Carlsson <andersca@mac.com> Only append 'L' for internal variable declarations, not all declarations. (Found by the mangle checker, yay)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95485 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
a8c2464f4ac8f625589b5a938a58504fe7621f5d 06-Feb-2010 Ted Kremenek <kremenek@apple.com> Remove unused variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95476 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
eafd1d60fdf4ad076aae64d148046251344ffb13 06-Feb-2010 Ted Kremenek <kremenek@apple.com> Remove unused variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95476 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
bfd10db743eea04f297514feac94387ea680662f 06-Feb-2010 Anders Carlsson <andersca@mac.com> Use the correct function info for constructors when applying function attributes. Fixes PR6245.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95474 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenModule.cpp
odeGenModule.h
odeGenTypes.h
lobalDecl.h
b2bcf1c176b200b36f371e189ce22f93c86cdf45 06-Feb-2010 Anders Carlsson <andersca@mac.com> Use the correct function info for constructors when applying function attributes. Fixes PR6245.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95474 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenModule.cpp
odeGenModule.h
odeGenTypes.h
lobalDecl.h
d42487a96f4d6239b697d0170a3a491fb00a3fa2 06-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Assert when we try to mangle a dependent template name, rather than
crashing unceremoniously.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95464 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
2d565b30689c5f79f22de7bad8723c48006d3a06 06-Feb-2010 Douglas Gregor <dgregor@apple.com> Assert when we try to mangle a dependent template name, rather than
crashing unceremoniously.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95464 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
87d2ff33aac952138d215a94cf0a8291dd02fcb8 06-Feb-2010 John McCall <rjmccall@apple.com> Rearrange some checks to avoid call to isCopyConstructor() and clarify path
taken for non-trivial constructors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95457 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
8b6bbeb2a3eb59df77ce69f4eeb28aa6a81015ea 06-Feb-2010 John McCall <rjmccall@apple.com> Rearrange some checks to avoid call to isCopyConstructor() and clarify path
taken for non-trivial constructors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95457 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
ad760b38613b3f7f1024b011f6109bed1487b32e 05-Feb-2010 John McCall <rjmccall@apple.com> Standardize the parsing of function type attributes in a way that
follows (as conservatively as possible) gcc's current behavior: attributes
written on return types that don't apply there are applied to the function
instead, etc. Only parse CC attributes as type attributes, not as decl attributes;
don't accepet noreturn as a decl attribute on ValueDecls, either (it still
needs to apply to other decls, like blocks). Consistently consume CC/noreturn
information throughout codegen; enforce this by removing their default values
in CodeGenTypes::getFunctionInfo().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95436 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GCall.cpp
GCall.h
GClass.cpp
GException.cpp
GExpr.cpp
GExprCXX.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenTypes.h
04a67a6aa3dfdc92d57f7f8d93ba397348c868a4 05-Feb-2010 John McCall <rjmccall@apple.com> Standardize the parsing of function type attributes in a way that
follows (as conservatively as possible) gcc's current behavior: attributes
written on return types that don't apply there are applied to the function
instead, etc. Only parse CC attributes as type attributes, not as decl attributes;
don't accepet noreturn as a decl attribute on ValueDecls, either (it still
needs to apply to other decls, like blocks). Consistently consume CC/noreturn
information throughout codegen; enforce this by removing their default values
in CodeGenTypes::getFunctionInfo().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95436 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GCall.cpp
GCall.h
GClass.cpp
GException.cpp
GExpr.cpp
GExprCXX.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenTypes.h
4dc3b63eabca125f8a7b0cd1775b84235a69dcf6 05-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Revert r95393, which broke Clang's self-host.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95430 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
GStmt.cpp
a5002106fbe5563aa59eba007416074d5b1ffecf 05-Feb-2010 Douglas Gregor <dgregor@apple.com> Revert r95393, which broke Clang's self-host.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95430 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
GStmt.cpp
24841eb0ebbeb41db503d2a2e830ebaa62a222be 05-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Implement name mangling for template template parameters

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95427 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
32fb4e1fd1cbd2ff006cc0e06c997e4eea2f0e28 05-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement name mangling for template template parameters

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95427 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
4488420952c371d956e2c0f9fa3eff398a260631 05-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: A few more ConvertType cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95423 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
b2cd777d4885b5b863863f892cef85b4884ee677 05-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: A few more ConvertType cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95423 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
7807bdf6a24ba9b3b1526a835042bf1280050cbd 05-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Factor out EmitAggExprToLValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95416 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
18aba0dd518e486d8b50523e7dafb4b5657135d2 05-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Factor out EmitAggExprToLValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95416 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
a8e8a6e80b472dbf8a165dfbdbca05256065a4ad 05-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a code gen bug accessing 'isa' field via a message call
(Fixes radar 7609722).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95406 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
5ed676c90c839c89093b605d76c7e581ab69ebb8 05-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a code gen bug accessing 'isa' field via a message call
(Fixes radar 7609722).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95406 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
b4f10072cbcd19898414b48ee66d8774d94e2b19 05-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix some CreateTempAlloca calls to use ConvertTypeForMem when that is
conceptually correct. Review appreciated (Chris, Eli, Anders).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95401 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprCXX.cpp
GObjC.cpp
ea48522e979957889fdaaa550beb4385601f66d3 05-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix some CreateTempAlloca calls to use ConvertTypeForMem when that is
conceptually correct. Review appreciated (Chris, Eli, Anders).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95401 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprCXX.cpp
GObjC.cpp
fc12e64bb94bb9d363098344e2d57701977cc3ba 05-Feb-2010 Anders Carlsson <andersca@mac.com> Fix the bug that was breaking self-host, and re-land the static ctor fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95400 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
2ca4f633b21c65e1a4edc2405a768d7f5db564eb 05-Feb-2010 Anders Carlsson <andersca@mac.com> Fix the bug that was breaking self-host, and re-land the static ctor fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95400 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
bca014ee84cc26ace42738df074f153cbf4d0717 05-Feb-2010 Charles Davis <cdavis@mines.edu> Now that we store calling conventions in the types, use them instead of
getting the calling convention from the target function, which may or may not
exist. Fixes PR5280.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95399 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
16c4f3c7d44289e30f5066dce7ce9efe7ff67bbc 05-Feb-2010 Charles Davis <cdavis@mines.edu> Now that we store calling conventions in the types, use them instead of
getting the calling convention from the target function, which may or may not
exist. Fixes PR5280.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95399 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
2b916af5e8b4a8394e650980a246479d690b56b7 05-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Use hasAggregateLLVMType instead of isSingleValueType() for cases that
need to deal with aggregates specially; this is consistent with the rest of IRgen.

Also, simplify EmitParmDecl and don't worry about using Decl::getNameAsString.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95393 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
GStmt.cpp
027627115ca1c486e420db7cd8439f25531135bb 05-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Use hasAggregateLLVMType instead of isSingleValueType() for cases that
need to deal with aggregates specially; this is consistent with the rest of IRgen.

Also, simplify EmitParmDecl and don't worry about using Decl::getNameAsString.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95393 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
GStmt.cpp
2547147689b279b0415b50544ef9ebcff16017cf 05-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Revert r95363 and r95375, which broke self-host.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95389 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
90c1c58aa72fecb8c3211aa25d0ef726ca6bf876 05-Feb-2010 Douglas Gregor <dgregor@apple.com> Revert r95363 and r95375, which broke self-host.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95389 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
5fa6af2bf333f21db3eae96be51979203893eda2 05-Feb-2010 Anders Carlsson <andersca@mac.com> Check in a mangle checker that's turned off by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95377 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
f98574ba5cbb1c0bc80d66c411fabfd279e823c0 05-Feb-2010 Anders Carlsson <andersca@mac.com> Check in a mangle checker that's turned off by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95377 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
9b4d7314056718a90be0e73048180c2db4d07766 05-Feb-2010 Anders Carlsson <andersca@mac.com> Fix array initialization test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95375 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
b054e3804ca95255ecbc4521af7d2626367de0cf 05-Feb-2010 Anders Carlsson <andersca@mac.com> Fix array initialization test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95375 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
a5d4c2f97fe4d581ed017f91d26bc34b30749281 05-Feb-2010 Anders Carlsson <andersca@mac.com> If a global initializer has a non-trivial destructor it can't be emitted as a constant (even if it has a trivial constructor).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95363 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
7d94a9503c90fd26cd41a5cae3831d79e334526f 05-Feb-2010 Anders Carlsson <andersca@mac.com> If a global initializer has a non-trivial destructor it can't be emitted as a constant (even if it has a trivial constructor).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95363 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
e9fdd8930642637f5121b3f227dc6a2331d73e1d 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
odeGenTypes.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
odeGenTypes.cpp
ff48492bf0bafea3cc3f549bad578259ccc67a81 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
GRTTI.cpp
odeGenTypes.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
GRTTI.cpp
odeGenTypes.cpp
9d1fa7f99abcb724f8eae3f66091b117ea95467e 04-Feb-2010 Anders Carlsson <andersca@mac.com> When binding an lvalue to a reference, we always need to pop temporaries.

With this fix, and the other fixes committed today a make check-all with a clang-built LLVM now gives:

Expected Passes : 6933
Expected Failures : 46
Unsupported Tests : 40
Unexpected Failures: 27

which means that we pass 99.96% of all tests :) The resulting 27 tests are all LLVMC tests and seem to be because of differences in the clang and gcc drivers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95313 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
0dc736627614b476ec696fa216dd2a524d0bafad 04-Feb-2010 Anders Carlsson <andersca@mac.com> When binding an lvalue to a reference, we always need to pop temporaries.

With this fix, and the other fixes committed today a make check-all with a clang-built LLVM now gives:

Expected Passes : 6933
Expected Failures : 46
Unsupported Tests : 40
Unexpected Failures: 27

which means that we pass 99.96% of all tests :) The resulting 27 tests are all LLVMC tests and seem to be because of differences in the clang and gcc drivers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95313 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
8bc37de6ac9a16124167c8ecd21c26ba0ece776c 04-Feb-2010 Anders Carlsson <andersca@mac.com> Fix a bug where we would not mark temporaries as conditional when emitting a conditional operator as an lvalue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95311 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
c1b32f69687ed289fb1150df34965ada250caf70 04-Feb-2010 Anders Carlsson <andersca@mac.com> Fix a bug where we would not mark temporaries as conditional when emitting a conditional operator as an lvalue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95311 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
f5dc3e6629ee3fe22dc990a26c335f97a9e9ce90 04-Feb-2010 Anders Carlsson <andersca@mac.com> Rename StartConditionalBranch/FinishConditionalBranch to BeginConditionalBranch/EndConditionalBranch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95308 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
72119a887c4af39c90f10b6bdc158389071f42ea 04-Feb-2010 Anders Carlsson <andersca@mac.com> Rename StartConditionalBranch/FinishConditionalBranch to BeginConditionalBranch/EndConditionalBranch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95308 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
55b8bb43a896284224544f3a318da1c262e53af2 04-Feb-2010 Anders Carlsson <andersca@mac.com> Fix another pointer-to-member function miscompile, this time when trying to call a virtual member function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95307 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
51591bed1050827c23691cf36e2e1621dfe08b00 04-Feb-2010 Anders Carlsson <andersca@mac.com> Fix another pointer-to-member function miscompile, this time when trying to call a virtual member function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95307 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
b8f2b25c56da4502688925ff596e1cf49f72a898 04-Feb-2010 Anders Carlsson <andersca@mac.com> Calculate offset correctly when taking the address of a virtual member function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95305 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
e8a81f7e8e26275d91c073bf908a7d6d246106c5 04-Feb-2010 Anders Carlsson <andersca@mac.com> Calculate offset correctly when taking the address of a virtual member function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95305 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
14ae946ce5c568b2fdfe7512bb9ef0294f8d2ef5 04-Feb-2010 John McCall <rjmccall@apple.com> Mangle member expressions. Also invented.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95284 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
2f27bf854f0519810b34afd209089cc75536b757 04-Feb-2010 John McCall <rjmccall@apple.com> Mangle member expressions. Also invented.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95284 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
f79bdcd5493dbfc881b9ab79bb6084fab1eefcca 04-Feb-2010 John McCall <rjmccall@apple.com> Add a cautionary note about the mangling I just invented.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95275 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
a3218e7399a99ec7f64c2efc027d9f61eaeb0ad4 04-Feb-2010 John McCall <rjmccall@apple.com> Add a cautionary note about the mangling I just invented.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95275 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
9f628a7a92013f6114687ebb063ff4f5a982ee6a 04-Feb-2010 John McCall <rjmccall@apple.com> Add mangling support for calls, sizeof/alignof, constructor calls,
float literals, and unresolved lookups (which required hand-wavey extensions).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95273 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
1dd7383dc48718c452e71a625b29531dd96fbb9d 04-Feb-2010 John McCall <rjmccall@apple.com> Add mangling support for calls, sizeof/alignof, constructor calls,
float literals, and unresolved lookups (which required hand-wavey extensions).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95273 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
a3af6913e8d3eef8e1fb5c42534a97702fb3bf98 03-Feb-2010 Daniel Dunbar <daniel@zuster.org> Revert "Numerous changes to selector handling:", this breaks a whole bunch of
working code, for no apparent reason.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95244 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
6d5a1c28593443f3973ef38f8fa042d59182412d 03-Feb-2010 Daniel Dunbar <daniel@zuster.org> Revert "Numerous changes to selector handling:", this breaks a whole bunch of
working code, for no apparent reason.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95244 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
a5af2b23adbb4438c2c35225737a6a3df941c2b1 03-Feb-2010 Anders Carlsson <andersca@mac.com> Handle reference binding in aggregate initializers. Fixes another 47 tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95235 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
e78ccb4d609a113c3e06a9c4583e845e90b1a037 03-Feb-2010 Anders Carlsson <andersca@mac.com> Handle reference binding in aggregate initializers. Fixes another 47 tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95235 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
b23649ff4bfa02ae23a6789a3a3fe6bda66613f4 03-Feb-2010 Anders Carlsson <andersca@mac.com> Add a band-aid fix for clang self-hosting. A better fix will follow shortly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95232 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
0f01a331918cefe21fcd567e5f40cd00de2beccf 03-Feb-2010 Anders Carlsson <andersca@mac.com> Add a band-aid fix for clang self-hosting. A better fix will follow shortly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95232 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
e9d4d5490021b28206ea3500748dd424e1edb488 03-Feb-2010 Anders Carlsson <andersca@mac.com> More cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95226 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
78e83f881e59d4b8648a7b85ec6f2d36ef5cc680 03-Feb-2010 Anders Carlsson <andersca@mac.com> More cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95226 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
21cdb9d52625532b43f0db3effd869080b7434a5 03-Feb-2010 Anders Carlsson <andersca@mac.com> Revert the new reference binding code; I came up with a way simpler solution for the reference binding bug that is preventing self-hosting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95223 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GExpr.cpp
odeGenFunction.h
a64a869312066ff6119d1d7ae03f88ce499e3f82 03-Feb-2010 Anders Carlsson <andersca@mac.com> Revert the new reference binding code; I came up with a way simpler solution for the reference binding bug that is preventing self-hosting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95223 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GClass.cpp
GDecl.cpp
GDeclCXX.cpp
GExpr.cpp
odeGenFunction.h
ef54dcbc4a5abe4a69816dbcd0fb2e9e1321329b 03-Feb-2010 David Chisnall <csdavec@swan.ac.uk> First pass at adding GC support for GNU runtime. GC ivar maps not yet constructed, GC flag not set.

Please don't try using this yet - the runtime support is still very immature and your code will almost certainly crash if you do.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95222 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
ef6e0f3218b64d8ea3b8b57ee657fec8da228a43 03-Feb-2010 David Chisnall <csdavec@swan.ac.uk> First pass at adding GC support for GNU runtime. GC ivar maps not yet constructed, GC flag not set.

Please don't try using this yet - the runtime support is still very immature and your code will almost certainly crash if you do.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95222 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
b93a009003f19418ef0ef0d8a42a3895562c7391 03-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> When a function or variable somehow depends on a type or declaration
that is in an anonymous namespace, give that function or variable
internal linkage.

This change models an oddity of the C++ standard, where names declared
in an anonymous namespace have external linkage but, because anonymous
namespace are really "uniquely-named" namespaces, the names cannot be
referenced from other translation units. That means that they have
external linkage for semantic analysis, but the only sensible
implementation for code generation is to give them internal
linkage. We now model this notion via the UniqueExternalLinkage
linkage type. There are several changes here:

- Extended NamedDecl::getLinkage() to produce UniqueExternalLinkage
when the declaration is in an anonymous namespace.
- Added Type::getLinkage() to determine the linkage of a type, which
is defined as the minimum linkage of the types (when we're dealing
with a compound type that is not a struct/class/union).
- Extended NamedDecl::getLinkage() to consider the linkage of the
template arguments and template parameters of function template
specializations and class template specializations.
- Taught code generation to rely on NamedDecl::getLinkage() when
determining the linkage of variables and functions, also
considering the linkage of the types of those variables and
functions (C++ only). Map UniqueExternalLinkage to internal
linkage, taking out the explicit checks for
isInAnonymousNamespace().

This fixes much of PR5792, which, as discovered by Anders Carlsson, is
actually the reason behind the pass-manager assertion that causes the
majority of clang-on-clang regression test failures. With this fix,
Clang-built-Clang+LLVM passes 88% of its regression tests (up from
67%). The specific numbers are:

LLVM:
Expected Passes : 4006
Expected Failures : 32
Unsupported Tests : 40
Unexpected Failures: 736

Clang:
Expected Passes : 1903
Expected Failures : 14
Unexpected Failures: 75

Overall:
Expected Passes : 5909
Expected Failures : 46
Unsupported Tests : 40
Unexpected Failures: 811

Still to do:
- Improve testing
- Check whether we should allow the presence of types with
InternalLinkage (in addition to UniqueExternalLinkage) given
variables/functions internal linkage in C++, as mentioned in
PR5792.
- Determine how expensive the getLinkage() calls are in practice;
consider caching the result in NamedDecl.
- Assess the feasibility of Chris's idea in comment #1 of PR5792.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95216 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
angle.cpp
0b6bc8bd7a1d2a7d7478d13d78cff94cacad61fc 03-Feb-2010 Douglas Gregor <dgregor@apple.com> When a function or variable somehow depends on a type or declaration
that is in an anonymous namespace, give that function or variable
internal linkage.

This change models an oddity of the C++ standard, where names declared
in an anonymous namespace have external linkage but, because anonymous
namespace are really "uniquely-named" namespaces, the names cannot be
referenced from other translation units. That means that they have
external linkage for semantic analysis, but the only sensible
implementation for code generation is to give them internal
linkage. We now model this notion via the UniqueExternalLinkage
linkage type. There are several changes here:

- Extended NamedDecl::getLinkage() to produce UniqueExternalLinkage
when the declaration is in an anonymous namespace.
- Added Type::getLinkage() to determine the linkage of a type, which
is defined as the minimum linkage of the types (when we're dealing
with a compound type that is not a struct/class/union).
- Extended NamedDecl::getLinkage() to consider the linkage of the
template arguments and template parameters of function template
specializations and class template specializations.
- Taught code generation to rely on NamedDecl::getLinkage() when
determining the linkage of variables and functions, also
considering the linkage of the types of those variables and
functions (C++ only). Map UniqueExternalLinkage to internal
linkage, taking out the explicit checks for
isInAnonymousNamespace().

This fixes much of PR5792, which, as discovered by Anders Carlsson, is
actually the reason behind the pass-manager assertion that causes the
majority of clang-on-clang regression test failures. With this fix,
Clang-built-Clang+LLVM passes 88% of its regression tests (up from
67%). The specific numbers are:

LLVM:
Expected Passes : 4006
Expected Failures : 32
Unsupported Tests : 40
Unexpected Failures: 736

Clang:
Expected Passes : 1903
Expected Failures : 14
Unexpected Failures: 75

Overall:
Expected Passes : 5909
Expected Failures : 46
Unsupported Tests : 40
Unexpected Failures: 811

Still to do:
- Improve testing
- Check whether we should allow the presence of types with
InternalLinkage (in addition to UniqueExternalLinkage) given
variables/functions internal linkage in C++, as mentioned in
PR5792.
- Determine how expensive the getLinkage() calls are in practice;
consider caching the result in NamedDecl.
- Assess the feasibility of Chris's idea in comment #1 of PR5792.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95216 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
angle.cpp
3e2d381a1b804fb2c1a7529c615baf5d03b0b448 03-Feb-2010 Chris Lattner <sabre@nondot.org> remove a big chunk of #if 0 code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95201 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
01c7a850bb106a1ef9a98733f7d28101aab50c46 03-Feb-2010 Chris Lattner <sabre@nondot.org> remove a big chunk of #if 0 code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95201 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
49f0449d08c97becf449345297d206dd8e9e7d1a 03-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Provide a real fix for PR6199, reverting the old workaround. Here, we
realize that CXXConstructExpr is always implicit, so we should just
return its argument (if there is only one) rather than directly
invoking the constructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95192 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
321725d95d331d1612ac386d7d4235eca94b0021 03-Feb-2010 Douglas Gregor <dgregor@apple.com> Provide a real fix for PR6199, reverting the old workaround. Here, we
realize that CXXConstructExpr is always implicit, so we should just
return its argument (if there is only one) rather than directly
invoking the constructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95192 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
f1f1590dc4c3ddec947ce5b0c6d7c03c057fbea7 03-Feb-2010 David Chisnall <csdavec@swan.ac.uk> Numerous changes to selector handling:

- Don't use GlobalAliases with non-0 GEPs (GNU runtime) - this was unsupported and LLVM will be generating errors if you do it soon. This also simplifies the code generated by the GNU runtime a bit.

- Make GetSelector() return a constant (GNU runtime), not a load of a store of a constant.

- Recognise @selector() expressions as valid static initialisers (as GCC does).

- Add methods to GCObjCRuntime to emit selectors as constants (needed for using @selector() expressions as constants. These need implementing for the Mac runtimes - I couldn't figure out how to do this, they seem to require a load.

- Store an ObjCMethodDecl in an ObjCSelectorExpr so that we can get at the type information for the selector. This is needed for generating typed selectors from @selector() expressions (as GCC does). Ideally, this information should be stored in the Selector, but that would be an invasive change. We should eventually add checks for common uses of @selector() expressions. Possibly adding an attribute that can be applied to method args providing the types of a selector so, for example, you'd do something like this:

- (id)performSelector: __attribute__((selector_types(id, SEL, id)))(SEL)
withObject: (id)object;

Then, any @selector() expressions passed to the method will be check to ensure that it conforms to this signature. We do this at run time on the GNU runtime already, but it would be nice to do it at compile time on all runtimes.

- Made @selector() expressions emit type info if available and the runtime supports it.

Someone more familiar with the Mac runtime needs to implement the GetConstantSelector() function in CGObjCMac. This currently just assert()s.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95189 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
a8fa96e366ab36145a5500dd4fbea717c217f131 03-Feb-2010 David Chisnall <csdavec@swan.ac.uk> Numerous changes to selector handling:

- Don't use GlobalAliases with non-0 GEPs (GNU runtime) - this was unsupported and LLVM will be generating errors if you do it soon. This also simplifies the code generated by the GNU runtime a bit.

- Make GetSelector() return a constant (GNU runtime), not a load of a store of a constant.

- Recognise @selector() expressions as valid static initialisers (as GCC does).

- Add methods to GCObjCRuntime to emit selectors as constants (needed for using @selector() expressions as constants. These need implementing for the Mac runtimes - I couldn't figure out how to do this, they seem to require a load.

- Store an ObjCMethodDecl in an ObjCSelectorExpr so that we can get at the type information for the selector. This is needed for generating typed selectors from @selector() expressions (as GCC does). Ideally, this information should be stored in the Selector, but that would be an invasive change. We should eventually add checks for common uses of @selector() expressions. Possibly adding an attribute that can be applied to method args providing the types of a selector so, for example, you'd do something like this:

- (id)performSelector: __attribute__((selector_types(id, SEL, id)))(SEL)
withObject: (id)object;

Then, any @selector() expressions passed to the method will be check to ensure that it conforms to this signature. We do this at run time on the GNU runtime already, but it would be nice to do it at compile time on all runtimes.

- Made @selector() expressions emit type info if available and the runtime supports it.

Someone more familiar with the Mac runtime needs to implement the GetConstantSelector() function in CGObjCMac. This currently just assert()s.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95189 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
19f36e292e6a6dabde1156d1aaa342cfa805ea8a 03-Feb-2010 John McCall <rjmccall@apple.com> Remove abstract expression kinds from the StmtClass enum. Update a few users
appropriately. Call out a few missing cases in the expression mangler.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95176 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
09cc141c89a5e9f305c17d7a88298647df16cedd 03-Feb-2010 John McCall <rjmccall@apple.com> Remove abstract expression kinds from the StmtClass enum. Update a few users
appropriately. Call out a few missing cases in the expression mangler.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95176 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
43ec96da71b94f064ed6a3031025208d23acd592 02-Feb-2010 Douglas Gregor <doug.gregor@gmail.com> Implement promotion for enumeration types.

WHAT!?!

It turns out that Type::isPromotableIntegerType() was not considering
enumeration types to be promotable, so we would never do the
promotion despite having properly computed the promotion type when the
enum was defined. Various operations on values of enum type just
"worked" because we could still compute the integer rank of an enum
type; the oddity, however, is that operations such as "add an enum and
an unsigned" would often have an enum result type (!). The bug
actually showed up as a spurious -Wformat diagnostic
(<rdar://problem/7595366>), but in theory it could cause miscompiles.

In this commit:
- Enum types with a promotion type of "int" or "unsigned int" are
promotable.
- Tweaked the computation of promotable types for enums
- For all of the ABIs, treat enum types the same way as their
underlying types (*not* their promotion types) for argument passing
and return values
- Extend the ABI tester with support for enumeration types



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95117 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
aa74a1e49f7c4b89539830290f76fe2c3e97187f 02-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement promotion for enumeration types.

WHAT!?!

It turns out that Type::isPromotableIntegerType() was not considering
enumeration types to be promotable, so we would never do the
promotion despite having properly computed the promotion type when the
enum was defined. Various operations on values of enum type just
"worked" because we could still compute the integer rank of an enum
type; the oddity, however, is that operations such as "add an enum and
an unsigned" would often have an enum result type (!). The bug
actually showed up as a spurious -Wformat diagnostic
(<rdar://problem/7595366>), but in theory it could cause miscompiles.

In this commit:
- Enum types with a promotion type of "int" or "unsigned int" are
promotable.
- Tweaked the computation of promotable types for enums
- For all of the ABIs, treat enum types the same way as their
underlying types (*not* their promotion types) for argument passing
and return values
- Extend the ABI tester with support for enumeration types



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95117 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
7f93a990158d08ab57dbc5691b3fa5b3849f8f0c 02-Feb-2010 Anders Carlsson <andersca@mac.com> Set the correct vtable pointers _before_ generating code for any member initializers. Fixes about ~2000 clang/LLVM tests in the clang-on-clang build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95116 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
a78fa2c40fbbe505485e7d120dc68a292ee0c968 02-Feb-2010 Anders Carlsson <andersca@mac.com> Set the correct vtable pointers _before_ generating code for any member initializers. Fixes about ~2000 clang/LLVM tests in the clang-on-clang build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95116 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
8dbd1c99db9a9e2b8d1b3c39d07b2f7e663c0fee 02-Feb-2010 Chandler Carruth <chandlerc@gmail.com> Use the Arg variable rather than re-computing it. This also silences GCC's
unused variable warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95085 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
878b55ce6cbbf62461c796163f586cc75202f7d4 02-Feb-2010 Chandler Carruth <chandlerc@gmail.com> Use the Arg variable rather than re-computing it. This also silences GCC's
unused variable warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95085 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
07a357a96349b25e4fe88b4d33b3717ab7663a4d 02-Feb-2010 John McCall <rjmccall@apple.com> Codegen CXXConstructExprs with trivial constructors as constants.
Eliminates a lot of spurious global initializers, fixing PR6205.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95077 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
fb8b69aef3377aaa786d1278aaae7e7b04ac095f 02-Feb-2010 John McCall <rjmccall@apple.com> Codegen CXXConstructExprs with trivial constructors as constants.
Eliminates a lot of spurious global initializers, fixing PR6205.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95077 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
9afaa47e7878cdd2be9b6d7e5efc4ce380c261df 02-Feb-2010 Anders Carlsson <andersca@mac.com> Check in a test case and a nasty workaround for PR6199.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95076 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
2e13db8bc64bc99922b0aeb45443c681c1643c82 02-Feb-2010 Anders Carlsson <andersca@mac.com> Check in a test case and a nasty workaround for PR6199.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95076 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
ef834337aa91f81fa47f5a6c39509b798c79b922 02-Feb-2010 Anders Carlsson <andersca@mac.com> Improve handling of emitting 'null' pointers to data members.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95066 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
odeGenTypes.h
2c12d0319a267b844cb7d569d84426cd344b90f7 02-Feb-2010 Anders Carlsson <andersca@mac.com> Improve handling of emitting 'null' pointers to data members.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95066 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
odeGenTypes.h
a5553ec1f09e157f11eb8bfd2313588fbbc59d7d 02-Feb-2010 Anders Carlsson <andersca@mac.com> Move pointer to data member emission to CodeGenModule and use it in CGExprConstant. Fixes PR5674.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95063 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
GVtable.cpp
odeGenFunction.h
odeGenModule.h
45147d0098a34c3705f74ca121b27d7736ac113a 02-Feb-2010 Anders Carlsson <andersca@mac.com> Move pointer to data member emission to CodeGenModule and use it in CGExprConstant. Fixes PR5674.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95063 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
GVtable.cpp
odeGenFunction.h
odeGenModule.h
e20fdbd7a1d7f8c1036313d9a4a959f2ba53aa68 02-Feb-2010 Daniel Dunbar <daniel@zuster.org> ARM/APCS: Fix classification of small complex integer types as "integer like".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95030 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
4581581881d3f7349bf5a4b39d761bce688f9164 02-Feb-2010 Daniel Dunbar <daniel@zuster.org> ARM/APCS: Fix classification of small complex integer types as "integer like".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95030 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
6948ba893242e9b27c1cb37fae41155ab93ac257 02-Feb-2010 Daniel Dunbar <daniel@zuster.org> ARM/APCS: Pass Complex types following llvm-gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95029 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
4cc753f4503931763cfb762a95928b44fcbe64e9 02-Feb-2010 Daniel Dunbar <daniel@zuster.org> ARM/APCS: Pass Complex types following llvm-gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95029 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
299f308c8b24f14674f31df88eaf7b40da1b3496 01-Feb-2010 Devang Patel <dpatel@apple.com> Fix FIXME and surrounding comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95023 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ce78c9743aa8272b880a2874393fceff766c3fa3 01-Feb-2010 Devang Patel <dpatel@apple.com> Fix FIXME and surrounding comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95023 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7312ebbdbc13b771d8cab120e964a7794688ee27 01-Feb-2010 Devang Patel <dpatel@apple.com> Use appropriate context descriptor in RecordDecl's debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95016 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
411894b96fdf5a1ae67742b1fdce552802a6a5bb 01-Feb-2010 Devang Patel <dpatel@apple.com> Use appropriate context descriptor in RecordDecl's debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95016 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
8865cbc608cf51d777ac1688def7ccff2a7028b8 01-Feb-2010 Devang Patel <dpatel@apple.com> Do not use clang type name to name a local variable, e.g. Decl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95010 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d6c5a26b331367f4d85de9dfc9f99748057b1ba1 01-Feb-2010 Devang Patel <dpatel@apple.com> Do not use clang type name to name a local variable, e.g. Decl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95010 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
40c3c181f4250a5971870951df8899a4b20ddbb6 01-Feb-2010 Devang Patel <dpatel@apple.com> Do not use clang type name to name a local variable, e.g. Decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95009 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
239cec6179ec419e9e4f83f4a9fe78b6d3276902 01-Feb-2010 Devang Patel <dpatel@apple.com> Do not use clang type name to name a local variable, e.g. Decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95009 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f4098fca0d9fcad1c67a8ffc3cfa0fb18e1bc640 01-Feb-2010 Devang Patel <dpatel@apple.com> Use DeclContext as getContextDescriptor() argument.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95008 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
eb6d79b5900f0fa9bcea98de662f2668ebc32623 01-Feb-2010 Devang Patel <dpatel@apple.com> Use DeclContext as getContextDescriptor() argument.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95008 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ce4c80581013803dacd7b7d02a0647d42e13f9a5 01-Feb-2010 Daniel Dunbar <daniel@zuster.org> NeXT: Add support for -fobjc-legacy-dispatch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95005 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
2feefe8c195694d134b77503d67f535e04ca2a8b 01-Feb-2010 Daniel Dunbar <daniel@zuster.org> NeXT: Add support for -fobjc-legacy-dispatch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95005 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
50349fac9368c25c7ac0ecd28009cb11051129e2 01-Feb-2010 Chris Lattner <sabre@nondot.org> Don't explicitly force utf strings into the __TEXT,__ustring
by setting the section of the generated global. This is an
optimization done by the code generator, and the code being
removed didn't handle the case when the string contained an
embedded nul (which the code generator does correctly
handle). This is rdar://7589850



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95003 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b9f709665a6fe9da5c67d0431de2e63c55dd5322 01-Feb-2010 Chris Lattner <sabre@nondot.org> Don't explicitly force utf strings into the __TEXT,__ustring
by setting the section of the generated global. This is an
optimization done by the code generator, and the code being
removed didn't handle the case when the string contained an
embedded nul (which the code generator does correctly
handle). This is rdar://7589850



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95003 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8cb23faaa8f07087e40d95432b575a810a4e1417 01-Feb-2010 Sebastian Redl <sebastian.redl@getdesigned.at> In C++, an initializer on a variable doesn't necessarily mean it's the definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in terms of isThisDeclarationADefinition. Update all code to use this new function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94999 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
31310a21fb2a9f13950f864f681c86080b05d5b2 01-Feb-2010 Sebastian Redl <sebastian.redl@getdesigned.at> In C++, an initializer on a variable doesn't necessarily mean it's the definition. With that in mind, rename getDefinition to getAnyInitializer (to distinguish it from getInit) and reimplement it in terms of isThisDeclarationADefinition. Update all code to use this new function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94999 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
1e3a32e534419e1743cd8abf33a1b61e30fddc4b 01-Feb-2010 Devang Patel <dpatel@apple.com> Emit debug info for namespaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94991 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
abb485f0b58dd3d2da20f9b34f99695899a68cf2 01-Feb-2010 Devang Patel <dpatel@apple.com> Emit debug info for namespaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94991 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
4e1d873d4b43555067bed1ce199ca0c4cb85273b 31-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Switch expressions like T() and T(1,2) over to new-style initialization. I'm
not quite sure what we want to do about the AST representation; comments
welcome.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94967 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
6997aae42800d95a1189a6186af438feb19ecc54 31-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Switch expressions like T() and T(1,2) over to new-style initialization. I'm
not quite sure what we want to do about the AST representation; comments
welcome.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94967 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
200ce78ed460dd332c943484b74cd73aa03f8c07 31-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Simplify EmitMemberInitializer; no intended functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94965 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
3bb9412788e04755cb509ec576f41afbed4efdd3 31-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Simplify EmitMemberInitializer; no intended functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94965 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
b24ba0bb90d86be896e4c683b11ac4d0175f20e3 31-Jan-2010 Anders Carlsson <andersca@mac.com> Start creating CXXBindReferenceExpr nodes when binding complex types to references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94964 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDecl.cpp
GExpr.cpp
odeGenFunction.h
3aba09376c5f49c4c8d176109ea4835bc2c528ee 31-Jan-2010 Anders Carlsson <andersca@mac.com> Start creating CXXBindReferenceExpr nodes when binding complex types to references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94964 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDecl.cpp
GExpr.cpp
odeGenFunction.h
e3129df6079a8e0028250d71a10b71dcf728d78a 31-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Rework base and member initialization in constructors, with several
(necessarily simultaneous) changes:

- CXXBaseOrMemberInitializer now contains only a single initializer
rather than a set of initialiation arguments + a constructor. The
single initializer covers all aspects of initialization, including
constructor calls as necessary but also cleanup of temporaries
created by the initializer (which we never handled
before!).

- Rework + simplify code generation for CXXBaseOrMemberInitializers,
since we can now just emit the initializer as an initializer.

- Switched base and member initialization over to the new
initialization code (InitializationSequence), so that it

- Improved diagnostics for the new initialization code when
initializing bases and members, to match the diagnostics produced
by the previous (special-purpose) code.

- Simplify the representation of type-checked constructor initializers in
templates; instead of keeping the fully-type-checked AST, which is
rather hard to undo at template instantiation time, throw away the
type-checked AST and store the raw expressions in the AST. This
simplifies instantiation, but loses a little but of information in
the AST.

- When type-checking implicit base or member initializers within a
dependent context, don't add the generated initializers into the
AST, because they'll look like they were explicit.

- Record in CXXConstructExpr when the constructor call is to
initialize a base class, so that CodeGen does not have to infer it
from context. This ensures that we call the right kind of
constructor.

There are also a few "opportunity" fixes here that were needed to not
regress, for example:

- Diagnose default-initialization of a const-qualified class that
does not have a user-declared default constructor. We had this
diagnostic specifically for bases and members, but missed it for
variables. That's fixed now.

- When defining the implicit constructors, destructor, and
copy-assignment operator, set the CurContext to that constructor
when we're defining the body.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94952 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
9db7dbb918ca49f4ee6c181e4917e7b6ec547353 31-Jan-2010 Douglas Gregor <dgregor@apple.com> Rework base and member initialization in constructors, with several
(necessarily simultaneous) changes:

- CXXBaseOrMemberInitializer now contains only a single initializer
rather than a set of initialiation arguments + a constructor. The
single initializer covers all aspects of initialization, including
constructor calls as necessary but also cleanup of temporaries
created by the initializer (which we never handled
before!).

- Rework + simplify code generation for CXXBaseOrMemberInitializers,
since we can now just emit the initializer as an initializer.

- Switched base and member initialization over to the new
initialization code (InitializationSequence), so that it

- Improved diagnostics for the new initialization code when
initializing bases and members, to match the diagnostics produced
by the previous (special-purpose) code.

- Simplify the representation of type-checked constructor initializers in
templates; instead of keeping the fully-type-checked AST, which is
rather hard to undo at template instantiation time, throw away the
type-checked AST and store the raw expressions in the AST. This
simplifies instantiation, but loses a little but of information in
the AST.

- When type-checking implicit base or member initializers within a
dependent context, don't add the generated initializers into the
AST, because they'll look like they were explicit.

- Record in CXXConstructExpr when the constructor call is to
initialize a base class, so that CodeGen does not have to infer it
from context. This ensures that we call the right kind of
constructor.

There are also a few "opportunity" fixes here that were needed to not
regress, for example:

- Diagnose default-initialization of a const-qualified class that
does not have a user-declared default constructor. We had this
diagnostic specifically for bases and members, but missed it for
variables. That's fixed now.

- When defining the implicit constructors, destructor, and
copy-assignment operator, set the CurContext to that constructor
when we're defining the body.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94952 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
b4113635a2fb5e3656492382a818daec165600b3 31-Jan-2010 Anders Carlsson <andersca@mac.com> When performing a derived-to-base cast that we know will not change the offset, we don't need to null check the input pointer. Fixes PR5965.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94942 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
905a100f3d03039f6f3e3aecf2996a05cef4a267 31-Jan-2010 Anders Carlsson <andersca@mac.com> When performing a derived-to-base cast that we know will not change the offset, we don't need to null check the input pointer. Fixes PR5965.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94942 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
2690e4e7b9a3b148443340c6cadedb085f197b11 31-Jan-2010 Anders Carlsson <andersca@mac.com> When doing a base-to-derived cast we don't need to null check the derived value if the class offset is 0.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94939 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
a552ea76b0e4ce4ccdbb845667f0a12da6608c52 31-Jan-2010 Anders Carlsson <andersca@mac.com> When doing a base-to-derived cast we don't need to null check the derived value if the class offset is 0.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94939 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
3a43ef94ea512df772a1d29989b949a074ef7e15 31-Jan-2010 Anders Carlsson <andersca@mac.com> Some class related cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94938 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenFunction.h
odeGenModule.h
bb7e17b52ffaa4097b4c4d7935746d23539ffe2a 31-Jan-2010 Anders Carlsson <andersca@mac.com> Some class related cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94938 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenFunction.h
odeGenModule.h
22b9be9e2cf26a261e4aeb9de19ea2c3a27a1e43 30-Jan-2010 Anders Carlsson <andersca@mac.com> More asm cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94920 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
a5a79f7d16b48d3be8bcc8c7650e31aefd92b657 30-Jan-2010 Anders Carlsson <andersca@mac.com> More asm cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94920 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
4a8f819bdd8f3af76f47146ffdc53a169a96a09f 30-Jan-2010 Anders Carlsson <andersca@mac.com> Yay for more StringRefs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94917 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
83c021c6d33aa173cf1a6e3bc61006dabb042703 30-Jan-2010 Anders Carlsson <andersca@mac.com> Yay for more StringRefs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94917 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
f3557c0bd61680bc8464fc89c691c107e1a91078 29-Jan-2010 Devang Patel <dpatel@apple.com> Use appropriate context for typedefs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94849 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d528905966546edaabbf90d88c8d754faf961d8a 29-Jan-2010 Devang Patel <dpatel@apple.com> Use appropriate context for typedefs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94849 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
07ded00ae842768210a0c361a5379c8a82af0695 29-Jan-2010 Devang Patel <dpatel@apple.com> Maintain a map of regions (lexical scopes) and use it to find context for a global variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94817 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
3dd96a1489498deb03208f7011f48b9f3d7901db 29-Jan-2010 Devang Patel <dpatel@apple.com> Maintain a map of regions (lexical scopes) and use it to find context for a global variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94817 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
3cf214a5a9a7d3b09145591f6303df8daafd1603 29-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Name mangling for cast expressions, from Matthias Schiffer! Fixes PR5876.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94811 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
46287c7922b1c715b6ade87478e91409b19f0247 29-Jan-2010 Douglas Gregor <dgregor@apple.com> Name mangling for cast expressions, from Matthias Schiffer! Fixes PR5876.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94811 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
cc8661c8c5b0bfc6dc9f6fcb6fa843323214a0be 29-Jan-2010 Anders Carlsson <andersca@mac.com> Use EmitLValueForFieldInitialization when synthesizing the copy ctor as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94800 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
9cfe0ec4decfd19a0387bb737f28eb0ea2c3a476 29-Jan-2010 Anders Carlsson <andersca@mac.com> Use EmitLValueForFieldInitialization when synthesizing the copy ctor as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94800 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
570a1eed7fb5b1acdd4ed083aa24779e34d78c72 29-Jan-2010 Anders Carlsson <andersca@mac.com> Add a new EmitLValueForFieldInitialization that will be used for initializing fields (and reference type fields in particular).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94799 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
odeGenFunction.h
06a2970e9480c6d02b367b2f970baff29b9f9721 29-Jan-2010 Anders Carlsson <andersca@mac.com> Add a new EmitLValueForFieldInitialization that will be used for initializing fields (and reference type fields in particular).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94799 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExpr.cpp
odeGenFunction.h
437b9a1e67de664cecba5cbbbdf51ccf5da23bed 29-Jan-2010 Anders Carlsson <andersca@mac.com> Simplify EmitLValueForField - we can get whether the field is part of a union or not from the FieldDecl (through its DeclContext).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94798 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GClass.cpp
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
e6d2a534851a649485cb087e9dfcaf8a65886858 29-Jan-2010 Anders Carlsson <andersca@mac.com> Simplify EmitLValueForField - we can get whether the field is part of a union or not from the FieldDecl (through its DeclContext).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94798 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GClass.cpp
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
62780e54691546642fd6bbe2a7c601882a201f97 29-Jan-2010 Daniel Dunbar <daniel@zuster.org> ARM/APCS ABI: Fix some problems with bit-fields in structures. After rereading
the ABI spec, this turns out to simplify the code. We still have some annoying
code which mismatches the spec with regard to empty structures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94796 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
679855a6e14fbc6c6838c566aa74c32f52f4f946 29-Jan-2010 Daniel Dunbar <daniel@zuster.org> ARM/APCS ABI: Fix some problems with bit-fields in structures. After rereading
the ABI spec, this turns out to simplify the code. We still have some annoying
code which mismatches the spec with regard to empty structures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94796 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
9d995ff111efce46ec3b76316b1d97268e7fe2dc 29-Jan-2010 Anders Carlsson <andersca@mac.com> Add an CXXBindReferenceExpr (not used just yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94791 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
eb60edffa147e061278c436e513b0df9b4c4e7f6 29-Jan-2010 Anders Carlsson <andersca@mac.com> Add an CXXBindReferenceExpr (not used just yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94791 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
9fac1ac5cd5da8e69ff34635c8c88358691bb829 29-Jan-2010 Devang Patel <dpatel@apple.com> s/CGDebugInfo::getContext/CGDebugInfo::getContextDescriptor/g to avoid confusion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94760 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
335830555806629d53c00a80ec3ecb61ead86f03 29-Jan-2010 Devang Patel <dpatel@apple.com> s/CGDebugInfo::getContext/CGDebugInfo::getContextDescriptor/g to avoid confusion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94760 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
a6f6bf9da82fe732b420a889779d5a90995d8ada 28-Jan-2010 Devang Patel <dpatel@apple.com> Fix indentation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94758 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ca7daeddfad1be5a517ff93649af7de8d4c6b50b 28-Jan-2010 Devang Patel <dpatel@apple.com> Fix indentation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94758 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
450ecb60b7d08bba417e59dddc1f657ecfea370f 28-Jan-2010 Devang Patel <dpatel@apple.com> Static methods do not need "this" pointer argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94756 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d774d1e697694f39bdfbea499cd852564cf81107 28-Jan-2010 Devang Patel <dpatel@apple.com> Static methods do not need "this" pointer argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94756 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
638c7ef1493942c52d5e4d2ef92da8138e644583 28-Jan-2010 Devang Patel <dpatel@apple.com> Emit base classes info first, as expected by the debugger.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94755 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3064afebf823e3909d19b9cea5c1ddadb1d12b0e 28-Jan-2010 Devang Patel <dpatel@apple.com> Emit base classes info first, as expected by the debugger.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94755 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
14e989d2fd34cd55cc9ce9a8029b55a58a083072 28-Jan-2010 Anders Carlsson <andersca@mac.com> Fix an incorrect union layout assert. Fixes PR6164.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94754 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
21fd7d7347358994ee6d944c22a51e82d22409d9 28-Jan-2010 Anders Carlsson <andersca@mac.com> Fix an incorrect union layout assert. Fixes PR6164.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94754 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
15caefd3e7b6633f434963a01a678c593d8e7bc1 28-Jan-2010 Devang Patel <dpatel@apple.com> s/FunctionNames/DebugInfoNames/g


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94753 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
89f05f80233082b55aa7a8706c04be7e63ef78b3 28-Jan-2010 Devang Patel <dpatel@apple.com> s/FunctionNames/DebugInfoNames/g


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94753 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
06f1c3cb606640c5f53da6636efbf7e48a971f96 28-Jan-2010 Devang Patel <dpatel@apple.com> Emit vtable info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94751 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
4ce3f2026a8f1422e549089a58aa0a4d1cc76f99 28-Jan-2010 Devang Patel <dpatel@apple.com> Emit vtable info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94751 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
841d96c2008997417933919d97f653e7c037e241 28-Jan-2010 Devang Patel <dpatel@apple.com> While emitting debugging infor for a C++ class, identify the holder of class's vtable, if any.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94712 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0ac8f31af4a8f669700ab8fcad4ae1afc3517373 28-Jan-2010 Devang Patel <dpatel@apple.com> While emitting debugging infor for a C++ class, identify the holder of class's vtable, if any.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94712 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
81767f52b12ba1af34253a64292c249623390523 28-Jan-2010 Devang Patel <dpatel@apple.com> Include "this" pointer argument while emitting debug info for a C++ method.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94710 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
a6da192bbb3cb2b99200f60726b78e2d3d1f1598 28-Jan-2010 Devang Patel <dpatel@apple.com> Include "this" pointer argument while emitting debug info for a C++ method.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94710 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
07c3d6914503af0fe4ab23fedfe848ff527f0e9d 27-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Change the return type of ASTContext::getDeclAlignInBytes() to CharUnits and,
now that the "InBytes" part of the name is implied by the return type, rename
it to getDeclAlign().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94681 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDebugInfo.cpp
GDecl.cpp
odeGenModule.cpp
8b752f10c394b140f9ef89e049cbad1a7676fc25 27-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Change the return type of ASTContext::getDeclAlignInBytes() to CharUnits and,
now that the "InBytes" part of the name is implied by the return type, rename
it to getDeclAlign().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94681 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDebugInfo.cpp
GDecl.cpp
odeGenModule.cpp
61f16e0fdbc0a8fd812eb26ce71b4d22184e1252 27-Jan-2010 David Chisnall <csdavec@swan.ac.uk> Unique ObjC strings (GNU Runtime); fix for PR6142. Note: Doing this in the runtime-specific code is a bit ugly. It would be a good idea to hoist all of the string / protocol uniqueing code up into CGObjCRuntime or CodeGenModule and only handle emitting the original versions in the runtime-specific code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94676 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
48272a078e54d501cb05edd797c54b8e82ceb520 27-Jan-2010 David Chisnall <csdavec@swan.ac.uk> Unique ObjC strings (GNU Runtime); fix for PR6142. Note: Doing this in the runtime-specific code is a bit ugly. It would be a good idea to hoist all of the string / protocol uniqueing code up into CGObjCRuntime or CodeGenModule and only handle emitting the original versions in the runtime-specific code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94676 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
371b0bae60500c5e64b61c2a12da7bc779fa849f 27-Jan-2010 Anders Carlsson <andersca@mac.com> Structs and classes with non-trivial destructors or copy constructors should be passed indirectly in the 32-bit ABI. Fixes PR6094.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94656 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
a887423cf580e19b2d03e3a0499c065730c96b28 27-Jan-2010 Anders Carlsson <andersca@mac.com> Structs and classes with non-trivial destructors or copy constructors should be passed indirectly in the 32-bit ABI. Fixes PR6094.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94656 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
2079cf62fdba03b92d799685c6cacbad77b636b9 26-Jan-2010 Mike Stump <mrs@apple.com> Refine the non-virtual this adjustments for thunks by using the offset
to the declaring class from the nearest virtual base class. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94606 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
852f5ce688eb90543f72f1012edce8d12a319216 26-Jan-2010 Mike Stump <mrs@apple.com> Refine the non-virtual this adjustments for thunks by using the offset
to the declaring class from the nearest virtual base class. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94606 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
5abddddce33dec32c715050da657629d9d167516 26-Jan-2010 Mike Stump <mrs@apple.com> Refine the non-virtual this adjustments for thunks by using the offset
to the declaring class from the nearest virtual base class. WIP.

This fixes 40% of all the problems remaining in one of my testcases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94592 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
15189fb2fb2b3b3df678e94b036b77b994704655 26-Jan-2010 Mike Stump <mrs@apple.com> Refine the non-virtual this adjustments for thunks by using the offset
to the declaring class from the nearest virtual base class. WIP.

This fixes 40% of all the problems remaining in one of my testcases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94592 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d78b7eb74dd3edcf740d2731473f46b373f4ead4 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Convert one last size variable to CharUnits (follow-on to 94577).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94579 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
4f122ef0ca7683486d78c84ed87455d5f35ee1b1 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Convert one last size variable to CharUnits (follow-on to 94577).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94579 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
ff0d371c73a6565be29ced582b3a56999f93e484 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Use CharUnits for sizes, offsets, alignments, and padding amounts for values
that are in character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94577 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
caf647c33ad74621c352c21d6c50d149ba49e89d 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Use CharUnits for sizes, offsets, alignments, and padding amounts for values
that are in character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94577 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
3aaee46f2610a8612699478ac84d112f1ed846a6 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Use CharUnits for alignments in character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94571 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
odeGenFunction.h
30a8a272f091054ce92b9daa1992bcff887c3ee4 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Use CharUnits for alignments in character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94571 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
odeGenFunction.h
5a6138309b85be35abbdfd53c798eb955f83d14b 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Use CharUnits for alignment of UTF16 string in GetAddrOfConstantCFString().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94564 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4da244c23d6093adbbbc41654aa5c5111b38f431 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Use CharUnits for alignment of UTF16 string in GetAddrOfConstantCFString().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94564 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
20b9a4afb8a52c93ab3a2a09b3db16f09a2180cd 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Use CharUnits for alignment in EmitNullInitializationLValue().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94563 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
3228f42b12c24c76f5d5ae4ebf80837b752d1683 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Use CharUnits for alignment in EmitNullInitializationLValue().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94563 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
d8b5014c8b689915eb87797060fd5c183ef600da 26-Jan-2010 Anders Carlsson <andersca@mac.com> Use the right definition when emitting a global variable. Fixes PR5564.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94555 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
3bb92693c3332c1e99870a4e45afff3892e1c6ae 26-Jan-2010 Anders Carlsson <andersca@mac.com> Use the right definition when emitting a global variable. Fixes PR5564.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94555 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
06c23d6eb5cf66c28c4cd34e9c2c4a4fbc946b74 26-Jan-2010 Anders Carlsson <andersca@mac.com> Change getUnique to return a GlobalDecl. Fixes PR6147.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94554 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0f0bbbca56b706af9c0feca0e5ffc6ba29320f8c 26-Jan-2010 Anders Carlsson <andersca@mac.com> Change getUnique to return a GlobalDecl. Fixes PR6147.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94554 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d02033b8fb7f2592fc5a957772c40fba208ee001 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Introduce CodeGenModule::GetTargetTypeStoreSize() to calculate the store size
of LLVM types in character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94542 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
odeGenModule.cpp
odeGenModule.h
687cc4a850b59116efee061018f0d8df50728b82 26-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Introduce CodeGenModule::GetTargetTypeStoreSize() to calculate the store size
of LLVM types in character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94542 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
odeGenModule.cpp
odeGenModule.h
55dbbf14f742ff86c9eb8179f7986224e6c27e79 26-Jan-2010 Anders Carlsson <andersca@mac.com> If a global variable has an initializer with side effects, it can never be deferred (even if it's in an anonymous namespace).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94525 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d0c4792ca6bde9d60002760c10eb605ed2eebde8 26-Jan-2010 Anders Carlsson <andersca@mac.com> If a global variable has an initializer with side effects, it can never be deferred (even if it's in an anonymous namespace).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94525 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
dc9b0e566ceb93f8ed889926372114680458e8d9 26-Jan-2010 Anders Carlsson <andersca@mac.com> Fix another debug info crash with virtual bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94520 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e70d391ed56839841e4ace189d22ae3ee789b044 26-Jan-2010 Anders Carlsson <andersca@mac.com> Fix another debug info crash with virtual bases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94520 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
347465a4f9d4aa63403b4e9c4b3ec7a556e7b6e1 26-Jan-2010 Anders Carlsson <andersca@mac.com> Fix the test I broke, and also fix a crash when declaring a virtual destructor. Add debug info support for pure virtual member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94519 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
4433f1cf8a2704395e509d020d8f79da4e273458 26-Jan-2010 Anders Carlsson <andersca@mac.com> Fix the test I broke, and also fix a crash when declaring a virtual destructor. Add debug info support for pure virtual member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94519 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
eb9e631ed34192792348469ea8da41021b4683cc 26-Jan-2010 Anders Carlsson <andersca@mac.com> Factor creating the DISubprogram for a member function out into a separate function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94513 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
d6f9a0d14b47e7ea9739623544d967682f41b86d 26-Jan-2010 Anders Carlsson <andersca@mac.com> Factor creating the DISubprogram for a member function out into a separate function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94513 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
0c43aed61066191892963b7023764e64a0fbb50e 26-Jan-2010 Anders Carlsson <andersca@mac.com> Simplify CGDebugInfo::CollectCXXMemberFunctions a little. More to come.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94511 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
bea9b2375a6c5c121dcd83d4f2d544803bacd962 26-Jan-2010 Anders Carlsson <andersca@mac.com> Simplify CGDebugInfo::CollectCXXMemberFunctions a little. More to come.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94511 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2f073a27cec20f26b9c5b411c3ff5af967925815 26-Jan-2010 Anders Carlsson <andersca@mac.com> Make sure to always mark a global variable as not being constant if it has a C++ initializer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94504 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
071c81065a282edba989bcf7c260b5838a59db50 26-Jan-2010 Anders Carlsson <andersca@mac.com> Make sure to always mark a global variable as not being constant if it has a C++ initializer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94504 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
3d2f05bf50b0b2628ebea07796afcc515a8db2ec 26-Jan-2010 Mike Stump <mrs@apple.com> Be sure to track the non-virtual part of the vcall offset in complex
multiple inheritance cases. WIP.

This fixes 20% of the outstanding problems found by the randomized
tester.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94499 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d99a4d2407a9d10d97db2b9bebed6ef4238c9d7a 26-Jan-2010 Mike Stump <mrs@apple.com> Be sure to track the non-virtual part of the vcall offset in complex
multiple inheritance cases. WIP.

This fixes 20% of the outstanding problems found by the randomized
tester.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94499 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0d0fe67b84c34308abee54a4aee1d2150c77cbf4 26-Jan-2010 Mike Stump <mrs@apple.com> Fixup a missing vcall entry. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94478 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
cf0b9cc2f72d0bc9e23a423c90836cb092f213cd 26-Jan-2010 Mike Stump <mrs@apple.com> Fixup a missing vcall entry. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94478 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
2cd07337ddc32bd94ec9564a3383f9d91e550ffc 26-Jan-2010 Devang Patel <dpatel@apple.com> First cut at emitting inheritance info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94473 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
a245c5b36a12e7a879abc038964d0b9821c7e901 26-Jan-2010 Devang Patel <dpatel@apple.com> First cut at emitting inheritance info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94473 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
04b736422813f840a8e214fbfa30fd4029053485 26-Jan-2010 Devang Patel <dpatel@apple.com> Emit debug info for virtual functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94467 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
c002464ae56bbd069cb0c204ce2b766c7ae5063a 26-Jan-2010 Devang Patel <dpatel@apple.com> Emit debug info for virtual functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94467 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7b41ac9cf14188f89f369cb1d99f1aff7dafb306 25-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> global variable that binds reference to a non-lvalue reproted
as NYI now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94453 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
616c1738099ec52e1973197b8b9447df92461d3f 25-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> global variable that binds reference to a non-lvalue reproted
as NYI now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94453 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
78e64aa4c93197478cd96f69303557586f660d08 25-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a code gen. bug involving compiling global references.
(fixes radar 7574896).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94434 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
f7c00eda7f21ef89cfec48fa90b743a403b89d4b 25-Jan-2010 Fariborz Jahanian <fjahanian@apple.com> Fix a code gen. bug involving compiling global references.
(fixes radar 7574896).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94434 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
99c289a05080e9447cf7039a309dcf0270d58dd1 25-Jan-2010 Chris Lattner <sabre@nondot.org> fix rdar://7556129 a crash in blocks debug info codegen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94402 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
165714e026f96e6014d190f166feecc0b1fb80f8 25-Jan-2010 Chris Lattner <sabre@nondot.org> fix rdar://7556129 a crash in blocks debug info codegen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94402 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e60f97a257a039567ac9c5f65dcf9ed322af0ec1 25-Jan-2010 Chris Lattner <sabre@nondot.org> simplify code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94401 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDebugInfo.cpp
14b1a363fbc42f3bac7e6a08a5a7bc425d3537bf 25-Jan-2010 Chris Lattner <sabre@nondot.org> simplify code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94401 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDebugInfo.cpp
f4b34a030729fff07d8a6501bfabbbd097c15045 24-Jan-2010 Chris Lattner <sabre@nondot.org> -fno-rtti is now the default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94379 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
0bb46d285cb2bb0f582d0935f58f57a9be8bf2cd 24-Jan-2010 Chris Lattner <sabre@nondot.org> -fno-rtti is now the default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94379 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
859c854df9fcb5f872d4b382c96ab3b9e9413f89 24-Jan-2010 Sean Hunt <rideau3@gmail.com> Mangle static variables with an extra name to distinguish them from non-static variables in the same TU.
Fixes PR5966 for real this time; also reverts r92911, which had a incorrect fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94352 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
31455256ae26cc7069111643ec4429ea564377da 24-Jan-2010 Sean Hunt <rideau3@gmail.com> Mangle static variables with an extra name to distinguish them from non-static variables in the same TU.
Fixes PR5966 for real this time; also reverts r92911, which had a incorrect fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94352 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
bbfcf86f57ca0b0d8acb6b052b33280771c4ba38 24-Jan-2010 Anders Carlsson <andersca@mac.com> Fix a nasty bug where temporaries weren't marked as being conditional in some cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94341 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
08e9e453f40aff95a59bd67db49b8f050765e1f0 24-Jan-2010 Anders Carlsson <andersca@mac.com> Fix a nasty bug where temporaries weren't marked as being conditional in some cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94341 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
4fafa2add8bce615d15891872a5b5b8c9d3a93b4 23-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Add bzero builtin; this should help codegen quality for code using this
function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94320 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
e6dddfd907f6ea58daed5e26eeaacd893d98db9b 23-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Add bzero builtin; this should help codegen quality for code using this
function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94320 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
c1e1557ce2743caaae931a123c578a1be477019e 23-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> No need to terminate this buffer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94313 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1b627dc566f9f6fd7b8acfbb47fef4bedab688cf 23-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> No need to terminate this buffer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94313 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ee1ca8b4a4c64beb8384e54e69576a6b409a0d05 23-Jan-2010 David Chisnall <csdavec@swan.ac.uk> Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94274 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprConstant.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
odeGenModule.h
0d13f6fdbdd6f06e2449b8834dda53334abd399a 23-Jan-2010 David Chisnall <csdavec@swan.ac.uk> Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94274 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprConstant.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
odeGenModule.h
48e1a91623a44c69c2e862f7dd3a1161a4a1d7fb 22-Jan-2010 Mike Stump <mrs@apple.com> Finish off fixing up debug information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94193 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
372ade25bd4c56355172210dfc2a308cfa75b55a 22-Jan-2010 Mike Stump <mrs@apple.com> Finish off fixing up debug information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94193 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
8e664a754bfff9db20b62cfaeaf741b396494a35 22-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Eliminate some Clang warnings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94177 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
argetInfo.h
568bb2d3189108b6d510a6233d1e6e003a47cbdc 22-Jan-2010 Douglas Gregor <dgregor@apple.com> Eliminate some Clang warnings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94177 91177308-0d34-0410-b5e6-96231b3b80d8
argetInfo.cpp
argetInfo.h
b809c46233fd2849c63de16db0516255a81e5098 22-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Simplify code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94175 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
3cf7c5dc23569ae76bd4bddaed22f696233d8e44 22-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Simplify code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94175 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
e3fb8c56bb531e6e067514127af62409a10a771b 22-Jan-2010 Mike Stump <mrs@apple.com> Ensure we output all non-virtual base vtables. Fixes PR5890.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94163 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
fc9f16c9e64fa145b454ce4e7b7ecdbb3aecdcf3 22-Jan-2010 Mike Stump <mrs@apple.com> Ensure we output all non-virtual base vtables. Fixes PR5890.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94163 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
b866fdd93af6880e2c885f405b17accfc8e0bb81 22-Jan-2010 Mike Stump <mrs@apple.com> Update debugging code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94145 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d65849025f1d30f51b2f315d2ded17b1d7e6ecd8 22-Jan-2010 Mike Stump <mrs@apple.com> Update debugging code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94145 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0927d9da20360e6c0f07c40b69148e7e7c7b1510 21-Jan-2010 Anders Carlsson <andersca@mac.com> Move the VTT related code into its own file, CGVTT.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94079 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVtable.cpp
MakeLists.txt
58b7eee13b88e4d3eccfd37d85e61dceb44e4bfb 21-Jan-2010 Anders Carlsson <andersca@mac.com> Move the VTT related code into its own file, CGVTT.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94079 91177308-0d34-0410-b5e6-96231b3b80d8
GVTT.cpp
GVtable.cpp
MakeLists.txt
539ec1924258d4532432bdfcb7b7136cad34a9eb 21-Jan-2010 Devang Patel <dpatel@apple.com> A Decl->getName() is not unique. However, the debug info descriptors
are uniqued. The debug info descriptor describing record's context is
necessary to keep two Decl's descriptor unique if their name match.

There is more work to do to create descriptors for DeclContext.
As a temp. step use type's name in FwdDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94050 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d0f251b4cd60c9746bbd5ebbed5058cd7769d8c3 21-Jan-2010 Devang Patel <dpatel@apple.com> A Decl->getName() is not unique. However, the debug info descriptors
are uniqued. The debug info descriptor describing record's context is
necessary to keep two Decl's descriptor unique if their name match.

There is more work to do to create descriptors for DeclContext.
As a temp. step use type's name in FwdDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94050 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
156c694537107a5ea61f4bf3352ef68a73bb82f5 19-Jan-2010 Devang Patel <dpatel@apple.com> Emit human readable names for operators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93837 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
6d012768a291a62d901d34f115eca36cbc1a3652 19-Jan-2010 Devang Patel <dpatel@apple.com> Emit human readable names for operators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93837 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2eb30602d3ab7ff3af41598bb3af0c95105c90a1 19-Jan-2010 Devang Patel <dpatel@apple.com> First cut at emitting debugging information for C++ member functions.
There is lot more work to do in this area.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93836 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
4125fd20ef7e5ad6436c7b02bbbbe2e82c342c36 19-Jan-2010 Devang Patel <dpatel@apple.com> First cut at emitting debugging information for C++ member functions.
There is lot more work to do in this area.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93836 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
965b537ab2168a4f41d5d6d60818fc99a2b61b04 19-Jan-2010 Devang Patel <dpatel@apple.com> Use llvm::Function name as the linkage name, but strip off leading '01' from display name.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93822 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
17584204c2f527d4ed06ddb74afdd7622e70545d 19-Jan-2010 Devang Patel <dpatel@apple.com> Use llvm::Function name as the linkage name, but strip off leading '01' from display name.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93822 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
407b9c16f741254fd61a382ad323d005f6d154ab 19-Jan-2010 Devang Patel <dpatel@apple.com> Refactor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93814 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
428deb524a262709095d5e5a088e924b9fd47202 19-Jan-2010 Devang Patel <dpatel@apple.com> Refactor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93814 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
fa0289fd75b432a3092c51a5db4f645feec4a5a8 19-Jan-2010 Devang Patel <dpatel@apple.com> llvm::Function name is the linkage name. If it has a '01' as a prefix then probably there is a reason.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93808 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0d0d327aeb2c823ce0363a9b584662f9b03c52a6 19-Jan-2010 Devang Patel <dpatel@apple.com> llvm::Function name is the linkage name. If it has a '01' as a prefix then probably there is a reason.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93808 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
debdb09ef849fd4cc392ba5af8eeee25ae6a45d6 18-Jan-2010 Anders Carlsson <andersca@mac.com> More VTT builder fixes. With these fixes we now correctly handle the very complex VTT example from the Itanium ABI spec.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93725 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
35aa62aacf2b644f2ff2f0bdfd89136323698a39 18-Jan-2010 Anders Carlsson <andersca@mac.com> More VTT builder fixes. With these fixes we now correctly handle the very complex VTT example from the Itanium ABI spec.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93725 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
734012705eb5f2d8ad9ed0a2bf15c407505dba98 18-Jan-2010 Anders Carlsson <andersca@mac.com> Move some common code into BuildVTT.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93710 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
7a2132a5d2fead49f6fddc39137e1c14b70c0193 18-Jan-2010 Anders Carlsson <andersca@mac.com> Move some common code into BuildVTT.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93710 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ee1fe51c7ecb192672f3ede3c22217a59eb9f9ca 18-Jan-2010 Anders Carlsson <andersca@mac.com> Fix a bunch of VTT layout bugs, add simple tests for VTT layout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93709 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
20314fffcf5d97bab58686cdcb914637b453a166 18-Jan-2010 Anders Carlsson <andersca@mac.com> Fix a bunch of VTT layout bugs, add simple tests for VTT layout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93709 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
23881060b961e09d7ac343612e27b64a084aa044 18-Jan-2010 Anders Carlsson <andersca@mac.com> Minor VTT builder cleanup, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93696 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d478cc7c1cd737c3033b96a883f619f0b1beaf24 18-Jan-2010 Anders Carlsson <andersca@mac.com> Minor VTT builder cleanup, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93696 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
642736928542002bfaa1ec973707e99491f9cf9e 17-Jan-2010 Anders Carlsson <andersca@mac.com> Get the ctor vtable address points directly from the VTT builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93681 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e74f3d07f075914dd250cadca24dd708916b4d55 17-Jan-2010 Anders Carlsson <andersca@mac.com> Get the ctor vtable address points directly from the VTT builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93681 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
fce6d1d39a7c475c0cc6ab187e47db752c673907 16-Jan-2010 Tanya Lattner <tonic@nondot.org> Add codgen for BI__builtin_llvm_memory_barrier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93611 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
0b5716469b4be89adeb15a9819ac82a86ef19ca8 16-Jan-2010 Tanya Lattner <tonic@nondot.org> Add codgen for BI__builtin_llvm_memory_barrier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93611 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
602e8d20fdda9c76d14be381b995510ec1405157 16-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Fix crash generating debug info for constructor for anonymous struct.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93601 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3364e626147dd6fc5e33d12cda0eaaa50baf2206 16-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Fix crash generating debug info for constructor for anonymous struct.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93601 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0f101185778641d56e368d179fef30e3c2032db9 15-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Fix a couple bugs in copy assignment operator synthesis.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93546 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
8a850baa41ea9015b949183667ad96a981f10b09 15-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Fix a couple bugs in copy assignment operator synthesis.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93546 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
710d1169e49242b6852b7e6611528917f2cb77ec 15-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Convert the type of the LValue offset variable in APValue to CharUnits, moving
the LValue-related methods of APValue out of line to avoid header file leaching.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93512 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
a73058324197b7bdfd19307965954f626e26199d 15-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Convert the type of the LValue offset variable in APValue to CharUnits, moving
the LValue-related methods of APValue out of line to avoid header file leaching.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93512 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
825efd89fe05e66da2e007c7a34864cf50e81b1e 14-Jan-2010 Devang Patel <dpatel@apple.com> Emit linkage name even if it matches regular name. The code generator uses linkage name to find subprogram entry for the current function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93461 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
aa97d7051ed3517c7b64787bcb65ae04e1a52594 14-Jan-2010 Devang Patel <dpatel@apple.com> Emit linkage name even if it matches regular name. The code generator uses linkage name to find subprogram entry for the current function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93461 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
8cc8760fbcd2e6b9832c4203991e6ee7405c943d 14-Jan-2010 Devang Patel <dpatel@apple.com> Add comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93434 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
98a200bfe19f4cf255bd3ca0220e2f68e616ee2c 14-Jan-2010 Devang Patel <dpatel@apple.com> Add comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93434 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
113cd5cfc3806d2f1fef2f22b8152a730f591c0a 14-Jan-2010 David Chisnall <csdavec@swan.ac.uk> Made ObjC method name mangling match GCC (which does it in a stupid and broken way that can give conflicts on method names containing underscores, but is needed for gdb to work because gdb does not know how to read ObjC class tables and relies on the mangling).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93427 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
d346736dfe5ef584a2d0c9d27d217408ee394b9b 14-Jan-2010 David Chisnall <csdavec@swan.ac.uk> Made ObjC method name mangling match GCC (which does it in a stupid and broken way that can give conflicts on method names containing underscores, but is needed for gdb to work because gdb does not know how to read ObjC class tables and relies on the mangling).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93427 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
00da275a63393439a01f048a9e7388d5f7c105bf 14-Jan-2010 Anders Carlsson <andersca@mac.com> Store the address points for constructor vtables directly in the VTT builder, because that's the only time they're needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93412 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
1bb60990317ba8b8ed138876e70c42f44882bc52 14-Jan-2010 Anders Carlsson <andersca@mac.com> Store the address points for constructor vtables directly in the VTT builder, because that's the only time they're needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93412 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
74914c02554caa91e1b758633cd0a49c075b9415 14-Jan-2010 Anders Carlsson <andersca@mac.com> Add a DenseMapInfo specialization for BaseSubobject.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93399 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.h
7e37a6981b8d8c7dc4caee4d05487978ff2cd770 14-Jan-2010 Anders Carlsson <andersca@mac.com> Add a DenseMapInfo specialization for BaseSubobject.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93399 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.h
07702182503c66280ce4bee9ba49f11138c14dc9 14-Jan-2010 Devang Patel <dpatel@apple.com> Because CurLoc is the current source location as far as CGDebugInfo is concerned. It is expected that this is set (usually left bracket location of function body compound statement) before EmitfunctionStart() is used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93389 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
bca10069a9d5243da33cfc9a471ea239bb49e1b8 14-Jan-2010 Devang Patel <dpatel@apple.com> Because CurLoc is the current source location as far as CGDebugInfo is concerned. It is expected that this is set (usually left bracket location of function body compound statement) before EmitfunctionStart() is used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93389 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f905a190faf30c8bac84904e85effd99f0204aee 14-Jan-2010 Devang Patel <dpatel@apple.com> Emit human readable names for c/c++ functions. Avoid emitting linkage name if it matches regular name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93383 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
odeGenFunction.cpp
9c6c3a0e3ae09626d2d4b04e4ffa42c3d7cab32b 14-Jan-2010 Devang Patel <dpatel@apple.com> Emit human readable names for c/c++ functions. Avoid emitting linkage name if it matches regular name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93383 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
odeGenFunction.cpp
315ff8dc7e3789cbda2ec8016d0117f811e19095 13-Jan-2010 Anders Carlsson <andersca@mac.com> Add a BaseSubobject class to uniquely identify a base class subobject. Not yet used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93345 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.h
6b4333db17d0901eb832abfc1940e63cae43479b 13-Jan-2010 Anders Carlsson <andersca@mac.com> Add a BaseSubobject class to uniquely identify a base class subobject. Not yet used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93345 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.h
8f55361f996cb4f226437bc79cda5464e51f98b0 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
odeGenTypes.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
odeGenTypes.cpp
e12d5b586b0388cb02328b3a1d9dae11e0c434ea 11-Jan-2010 David Chisnall <csdavec@swan.ac.uk> Fix type mismatch on 64-bit platforms (GNU ObjC).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93169 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
f950837b8250c7f08d0b7b15ace0b35740721c9d 11-Jan-2010 David Chisnall <csdavec@swan.ac.uk> Fix type mismatch on 64-bit platforms (GNU ObjC).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93169 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
549ba49e99494d17bcade748696f3f48384a46cb 11-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Roll out ASTContext::getTypeSizeInChars(), replacing instances of
"ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits
ones as appropriate.

Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType,
fromQuantity(), and getQuantity() for clarity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93153 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDebugInfo.cpp
GDecl.cpp
GExpr.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
199c3d6cd16aebbb9c7f0d42af9d922c9628bf70 11-Jan-2010 Ken Dyck <ken.dyck@onsemi.com> Roll out ASTContext::getTypeSizeInChars(), replacing instances of
"ASTContext::getTypeSize() / 8". Replace [u]int64_t variables with CharUnits
ones as appropriate.

Also rename RawType, fromRaw(), and getRaw() in CharUnits to QuantityType,
fromQuantity(), and getQuantity() for clarity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93153 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDebugInfo.cpp
GDecl.cpp
GExpr.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
2625fe1f13bd905a3f12bb738da887ad8025ac15 10-Jan-2010 Anton Korobeynikov <asl@math.spbu.ru> Try to make cmake happy

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93119 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
f3e27bf71d9f157071ef65258945abe57f49a6a1 10-Jan-2010 Anton Korobeynikov <asl@math.spbu.ru> Try to make cmake happy

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93119 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
698d8f3d012663fd816aece0570f291926fb35d0 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
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
argetInfo.cpp
argetInfo.h
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
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
argetInfo.cpp
argetInfo.h
8a3cc6c10cb69a04d9375bac139e8e96242d0ba9 10-Jan-2010 Anton Korobeynikov <asl@math.spbu.ru> Rename file to generalization in next commits

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93117 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
argetInfo.cpp
82bac50fc0ab125ff5b4308ee91a731e3761eb63 10-Jan-2010 Anton Korobeynikov <asl@math.spbu.ru> Rename file to generalization in next commits

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93117 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
argetInfo.cpp
01a46924878a85e2b8db914277801f747675fe8b 09-Jan-2010 Chris Lattner <sabre@nondot.org> implement codegen support for preinc as an lvalue, PR5514.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93076 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
197a338f57a9a44efd5f025ce3d462430d260016 09-Jan-2010 Chris Lattner <sabre@nondot.org> implement codegen support for preinc as an lvalue, PR5514.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93076 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
a72d10102770d54a971d1fbba415d5621517d3fa 09-Jan-2010 Chris Lattner <sabre@nondot.org> refactor pre/postinc logic into CGF and require the caller to pass in the
lvalue to poke, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93075 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
dd36d328730d8c02915d0884541b45ec6ca0049d 09-Jan-2010 Chris Lattner <sabre@nondot.org> refactor pre/postinc logic into CGF and require the caller to pass in the
lvalue to poke, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93075 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
24804e241789424d71b369366f9924a372b9e193 09-Jan-2010 Chris Lattner <sabre@nondot.org> revert r92749, which is just dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93074 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
031421bc8f641dcfea110eda1492fe13e1292d1e 09-Jan-2010 Chris Lattner <sabre@nondot.org> revert r92749, which is just dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93074 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
25bc7392faea04b2d6350d5a352e9eda21fea47d 08-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Fix for PR5967: Make const-marking for LLVM globals correct for cases requiring
run-time initialization, and emit run-time initializers aggresively to avoid
ordering issues with deferred globals.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92976 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
6c6bda3b0b1d8adaac2ba3f4da7056e9f1eef52e 08-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Fix for PR5967: Make const-marking for LLVM globals correct for cases requiring
run-time initialization, and emit run-time initializers aggresively to avoid
ordering issues with deferred globals.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92976 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
9a174203f112c2af050c32f94d723a36db27ea93 08-Jan-2010 David Chisnall <csdavec@swan.ac.uk> Export a public symbol for classes with the GNU runtime.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92973 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
41d63ed274d1bf7ba7459f218c8f6a385fc5c6d6 08-Jan-2010 David Chisnall <csdavec@swan.ac.uk> Export a public symbol for classes with the GNU runtime.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92973 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
8c33c8a66f08528b34d446b437e0cad53ccbd836 07-Jan-2010 Nuno Lopes <nunoplopes@sapo.pt> fix PR5869: mangle static symbols like gcc does to make it easier to diff symbol tables

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92911 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
a9efbf009468f36df0bb66551677339055757d51 07-Jan-2010 Nuno Lopes <nunoplopes@sapo.pt> fix PR5869: mangle static symbols like gcc does to make it easier to diff symbol tables

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92911 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
f1ee8a02a9bf3c2441b12049bd5f7cfc41c0528e 06-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Fix linkage for RTTI names by re-using the logic for computing the
linkage of vtables. Before this, we were emitting RTTI names for
template instantiations with strong external linkage rather than with
weak ODR linkage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92857 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
odeGenModule.cpp
odeGenModule.h
dffb8010a130733f1b55acf0af01deb0a2e083d3 06-Jan-2010 Douglas Gregor <dgregor@apple.com> Fix linkage for RTTI names by re-using the logic for computing the
linkage of vtables. Before this, we were emitting RTTI names for
template instantiations with strong external linkage rather than with
weak ODR linkage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92857 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
odeGenModule.cpp
odeGenModule.h
523e1537f65f1a591a9a7c4706c199d6c796fa0a 06-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Fix marking of virtual members for nested classes whose first non-pure virtual function has a body inlined in the class

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92855 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
odeGenModule.cpp
odeGenModule.h
4b0f21c0f8bed0e2a7dc62d73be64e7e277d6c9a 06-Jan-2010 Douglas Gregor <dgregor@apple.com> Fix marking of virtual members for nested classes whose first non-pure virtual function has a body inlined in the class

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92855 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
odeGenModule.cpp
odeGenModule.h
651c42b654bba69e65e352a1b354d64055300c1a 06-Jan-2010 David Chisnall <csdavec@swan.ac.uk> Fix for PR5691

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92846 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
90665bd87f4ef7c230742e038cd0bad68e40fc78 06-Jan-2010 David Chisnall <csdavec@swan.ac.uk> Fix for PR5691

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92846 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
210926425ca03dc49e75490b7dfc91d72d8ee0f6 06-Jan-2010 Daniel Dunbar <daniel@zuster.org> Fix (invalid) may-be-uninitialized warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92828 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d87bcfafc340b06322ee4fb3bb249088e1f87b7a 06-Jan-2010 Daniel Dunbar <daniel@zuster.org> Fix (invalid) may-be-uninitialized warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92828 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
9126fef41a1d89994701c44356fdde0f9e604102 06-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Revert my available_externally vtables experiment. It's breaking the LLVM-with-Clang build with linker errors that I have yet to investigate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92822 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
1a78afbde2257d01bd38a36e094d3e3231a9b412 06-Jan-2010 Douglas Gregor <dgregor@apple.com> Revert my available_externally vtables experiment. It's breaking the LLVM-with-Clang build with linker errors that I have yet to investigate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92822 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
95072c6499008be5c286372861c8a425b17ecd78 06-Jan-2010 Mike Stump <mrs@apple.com> Reorder to avoid invalidating idx which is an accessor into VCall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92819 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
faef8a402c3cc50eea556abc7340ef8bb895440b 06-Jan-2010 Mike Stump <mrs@apple.com> Reorder to avoid invalidating idx which is an accessor into VCall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92819 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
b7f3fa911801945fcf616706b7925cd57d699806 05-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Silence bogus GCC warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92787 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6356a62485a42afda2d0506fdcc6cfb878849d54 05-Jan-2010 Douglas Gregor <dgregor@apple.com> Silence bogus GCC warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92787 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e2a0f5ffc75e549690a6e34e31901dbe29bb00ac 05-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Make use of available_externally linkage for vtables when the
non-inline key function of a class template instantiation, when no key
function is present, the class template instantiation itself was
instantiated with an explicit instantiation declaration (aka extern
template). I'm fairly certain that the C++0x specification gives us
this lattitude, although GCC doesn't take advantage of it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92779 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
074a2cf3c51229b90b77e998463530c9b06470e6 05-Jan-2010 Douglas Gregor <dgregor@apple.com> Make use of available_externally linkage for vtables when the
non-inline key function of a class template instantiation, when no key
function is present, the class template instantiation itself was
instantiated with an explicit instantiation declaration (aka extern
template). I'm fairly certain that the C++0x specification gives us
this lattitude, although GCC doesn't take advantage of it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92779 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a32cdfb7f79b52f2f533002207b5262b6ba3e24e 05-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> Improve key-function computation for templates. In particular:
- All classes can have a key function; templates don't change that.
non-template classes when computing the key function.
- We always mark all of the virtual member functions of class
template instantiations.
- The vtable for an instantiation of a class template has weak
linkage.

We could probably use available_externally linkage for vtables of
classes instantiated by explicit instantiation declarations (extern
templates), but GCC doesn't do this and I'm not 100% that the ABI
permits it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92753 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
odeGenModule.cpp
bd6d6197fcfc98356ea60e816365eb0648b69556 05-Jan-2010 Douglas Gregor <dgregor@apple.com> Improve key-function computation for templates. In particular:
- All classes can have a key function; templates don't change that.
non-template classes when computing the key function.
- We always mark all of the virtual member functions of class
template instantiations.
- The vtable for an instantiation of a class template has weak
linkage.

We could probably use available_externally linkage for vtables of
classes instantiated by explicit instantiation declarations (extern
templates), but GCC doesn't do this and I'm not 100% that the ABI
permits it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92753 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
odeGenModule.cpp
0a1584fd082516775a5bd103e68258dff2a5de75 05-Jan-2010 Mike Stump <mrs@apple.com> Add code to skip the emission of available externally functions at -O0. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92749 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ef372018c2dc0f8c2e5c34698401b87077eef6ed 05-Jan-2010 Mike Stump <mrs@apple.com> Add code to skip the emission of available externally functions at -O0. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92749 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
bc8196ce078c2f0bc3f384fffd2cb6993812f1d1 05-Jan-2010 Anders Carlsson <andersca@mac.com> When emitting member function pointers, use the canonical decl if the member function is virtual. Fixes PR5940.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92680 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
7af4ec744e30d573482aef7a37089d0d32cc07ef 05-Jan-2010 Anders Carlsson <andersca@mac.com> When emitting member function pointers, use the canonical decl if the member function is virtual. Fixes PR5940.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92680 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
6e398d274fa0e0d0aad0a55a848072914a5fb083 04-Jan-2010 Daniel Dunbar <daniel@zuster.org> Revert r92431, this code isn't dead and broke the ntfs build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92493 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
5be028f84243e0f6906c259e67cbdaf9bee431b2 04-Jan-2010 Daniel Dunbar <daniel@zuster.org> Revert r92431, this code isn't dead and broke the ntfs build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92493 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
e0c4255315af6ea5e635712ed0f54ff967e97dae 04-Jan-2010 Daniel Dunbar <daniel@zuster.org> Fix -Asserts warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92491 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
302c3c23905de41c3720158cca262e8f87e52014 04-Jan-2010 Daniel Dunbar <daniel@zuster.org> Fix -Asserts warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92491 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
075edc378182203df71e3c82e6b4ffc6137857ea 03-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Get rid of more dead code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92439 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
odeGenFunction.h
696f87bc39652992516fa7ca8399c38f3faae826 03-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Get rid of more dead code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92439 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
odeGenFunction.h
7dae639a09d582b5c8e6c2aef96b3c522d4ed12c 03-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Get rid of some unnecessary code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92432 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
8ac5549e726f67c2d37647ecad6d543e71f82950 03-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Get rid of some unnecessary code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92432 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
65e22ac13324cbc6e9948749fe123ab7407d7509 03-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Delete impossible case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92431 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
12c6d260d57e6baab4e329d73d9d97594eac6c24 03-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Delete impossible case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92431 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
9113a18cd58a76ba2c6d542427a2a65aabc055f9 02-Jan-2010 Anders Carlsson <andersca@mac.com> Speculative MSVC fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92421 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
9ed2059d7b0da1775bcd0e64621aa3d90c014dc0 02-Jan-2010 Anders Carlsson <andersca@mac.com> Speculative MSVC fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92421 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
e0bf253a26786e5e9616f2f24481313ea32d8f27 02-Jan-2010 Anders Carlsson <andersca@mac.com> Move address points to CGVtableInfo, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92420 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GVtable.cpp
GVtable.h
odeGenFunction.h
odeGenModule.h
21431c551d867962c66c92f0f96f652678f64c1c 02-Jan-2010 Anders Carlsson <andersca@mac.com> Move address points to CGVtableInfo, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92420 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GVtable.cpp
GVtable.h
odeGenFunction.h
odeGenModule.h
9146ebe3e7a8f45b32448e0d24b1a1a86f2821ce 02-Jan-2010 Anders Carlsson <andersca@mac.com> Correctly pass VTT parameters to constructors and destructors. The VTTs aren't yet used in the ctors/dtors, but that will follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92409 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
GVtable.cpp
GVtable.h
odeGenFunction.cpp
odeGenFunction.h
c997d4278d329e18891aac9698fb991b2d4622eb 02-Jan-2010 Anders Carlsson <andersca@mac.com> Correctly pass VTT parameters to constructors and destructors. The VTTs aren't yet used in the ctors/dtors, but that will follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92409 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
GExprCXX.cpp
GVtable.cpp
GVtable.h
odeGenFunction.cpp
odeGenFunction.h
f04b08e769cffa620541f1764ac90cb4596b0eb1 01-Jan-2010 Anders Carlsson <andersca@mac.com> Move a few more functions away from CGCXX and to CGClass and CGExprCXX.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92399 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
GExprCXX.cpp
GVtable.cpp
3b5ad2283c999f6edf7d42332a655447b7386b2e 01-Jan-2010 Anders Carlsson <andersca@mac.com> Move a few more functions away from CGCXX and to CGClass and CGExprCXX.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92399 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
GExprCXX.cpp
GVtable.cpp
ee279b3ca53360add251f2a8529e014a4bc8cc74 01-Jan-2010 Mike Stump <mrs@apple.com> Fix last patch, catch of reference to non-pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92386 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
13b2f92184bb7a310b800dd7e22c320361a72c4d 01-Jan-2010 Mike Stump <mrs@apple.com> Fix last patch, catch of reference to non-pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92386 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
bb409b407ecf90ad6d0db03e77056bf960d535e9 01-Jan-2010 Mike Stump <mrs@apple.com> Fix catching a reference to a pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92385 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
b606c384684f317cd75cdb1a2b2b172a42ee7706 01-Jan-2010 Mike Stump <mrs@apple.com> Fix catching a reference to a pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92385 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
22afc83b92673c2723c7c43b5e935f96a14bbcaf 31-Dec-2009 Anders Carlsson <andersca@mac.com> If the key function of a record is inline, then the RTTI data should have weak_odr linkage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92371 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
e8f90389c43efbbe820574f674a98ac701bf48a2 31-Dec-2009 Anders Carlsson <andersca@mac.com> If the key function of a record is inline, then the RTTI data should have weak_odr linkage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92371 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
d61c86ccc449759822794f490ec3294cb97c71b9 31-Dec-2009 Anders Carlsson <andersca@mac.com> More RTTI builder cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92360 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
531d55ff7b3ab8910487f916c340c7eccd7ef27e 31-Dec-2009 Anders Carlsson <andersca@mac.com> More RTTI builder cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92360 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
fe85433cbddab96e0df074d8036fcb6d1eecc562 31-Dec-2009 Anders Carlsson <andersca@mac.com> Fix a bunch of bugs with VMI RTTI building, and add a whole bunch of tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92319 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
GVtable.cpp
0814809e5bc27cccd59b63e99ab1eb52042dc13c 31-Dec-2009 Anders Carlsson <andersca@mac.com> Fix a bunch of bugs with VMI RTTI building, and add a whole bunch of tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92319 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
GVtable.cpp
670d57b34267b190978d37f0ec9ce800dfaac44f 30-Dec-2009 Anders Carlsson <andersca@mac.com> More RTTI cleanup, test that RTTI classes have the correct vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92284 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
f64531a17037faa9e0119e90961d2db77d06865d 30-Dec-2009 Anders Carlsson <andersca@mac.com> More RTTI cleanup, test that RTTI classes have the correct vtables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92284 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
2c82485f6863c4fa73c91f502636df83b7a21cce 29-Dec-2009 Anders Carlsson <andersca@mac.com> Match gcc and treat vector types as fundamental types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92278 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
c8cfd636f645bdd4f8a519a925c697e528eb7f3f 29-Dec-2009 Anders Carlsson <andersca@mac.com> Match gcc and treat vector types as fundamental types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92278 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
8568e4f6243eeaefe59034543f0f4d4e9a209638 29-Dec-2009 Anders Carlsson <andersca@mac.com> Handle enum types as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92276 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
9c7b6bb952672b9d184a4426138579d55c370afc 29-Dec-2009 Anders Carlsson <andersca@mac.com> Handle enum types as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92276 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
05453e5e726636ad43782e12396a6c0b5c89f3cf 29-Dec-2009 Anders Carlsson <andersca@mac.com> Test linkage of RTTI descriptors of array types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92274 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
978ef68bc4cde1448a1f6c8ab0e20543cec1a486 29-Dec-2009 Anders Carlsson <andersca@mac.com> Test linkage of RTTI descriptors of array types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92274 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
79d659fd9b47b3fe2de1599006abd26fd0408913 29-Dec-2009 Anders Carlsson <andersca@mac.com> Fix function type RTTI linkage and add tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92266 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
09b6e6e8854cc4a824060101a9633082e55d7a33 29-Dec-2009 Anders Carlsson <andersca@mac.com> Fix function type RTTI linkage and add tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92266 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
3211055af7a538bcb2307cc87f35190e9dc75b2b 29-Dec-2009 Chris Lattner <sabre@nondot.org> strength reduce this call away.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92253 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
1280708c17d373762ea4110b4f989d6c7239f6fb 29-Dec-2009 Chris Lattner <sabre@nondot.org> strength reduce this call away.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92253 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
79f414435ef406f9fb3dc7733b93715ac6313425 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
GDebugInfo.cpp
odeGenTypes.cpp
angle.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
GDebugInfo.cpp
odeGenTypes.cpp
angle.cpp
0bd85f6fa97214ecf6d680d76614e4af7d664002 29-Dec-2009 Chris Lattner <sabre@nondot.org> adjust for llvm api changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92236 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
23e92c059ccb9ed7bb3129b5ff3c5ecae1b3c256 29-Dec-2009 Chris Lattner <sabre@nondot.org> adjust for llvm api changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92236 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e0b71f006fa0790fd74a3fb776e4198839cb8c8f 28-Dec-2009 Chris Lattner <sabre@nondot.org> this form of SetDebugLocation is about to go away, add some #includes that
are about to not come in implicitly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92228 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
odeGenModule.cpp
d5b8902c0329d80a216803b58dc3b689349a0c11 28-Dec-2009 Chris Lattner <sabre@nondot.org> this form of SetDebugLocation is about to go away, add some #includes that
are about to not come in implicitly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92228 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
odeGenModule.cpp
2ca63011a30114acd61ec1cd5f1ba70c84a6dac8 27-Dec-2009 Anton Korobeynikov <asl@math.spbu.ru> Promote arguments of frameaddr / returnaddr builtins to i32 type, when needed.
This is needed for the platforms, where bitwidth of "int" is not 32 bits
(e.g. 16 on msp430).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92176 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
83c2a98012a65b51be66fd76c3a1b13ed782c558 27-Dec-2009 Anton Korobeynikov <asl@math.spbu.ru> Promote arguments of frameaddr / returnaddr builtins to i32 type, when needed.
This is needed for the platforms, where bitwidth of "int" is not 32 bits
(e.g. 16 on msp430).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92176 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
0b76c8f8f552c7339c7cbd9b05db5019e31b9d24 27-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Add a sanity assertion so that we don't silently generate bad code; I'll file
a bug with a testcase hitting this assertion in a moment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92175 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
8f5d7404da36f689b0005fc0fb5bba398c3919a9 27-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Add a sanity assertion so that we don't silently generate bad code; I'll file
a bug with a testcase hitting this assertion in a moment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92175 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
f25b446a67464c15830613a839d8e4f2de40f981 27-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix obvious mistake.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92172 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
a6f98fb644c4e37a880c497ad999a36c7b62e934 27-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix obvious mistake.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92172 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
3cc4b35bacf2de5e7ac286b8d0ba949947dc8527 25-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove some dead variables clang-analyzer found.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92162 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
GExprScalar.cpp
GObjCMac.cpp
54d76db0aa7107597cac0b80d8e138a37e6d1de9 25-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove some dead variables clang-analyzer found.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92162 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
GExprScalar.cpp
GObjCMac.cpp
604cb26d87eb422a853d16eb2865ad0d04e06e6e 25-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Minor optimization; emit proper unsupported messages for a couple of cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92153 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
8e274bd14bcca8466542477844b88e90e90cde1a 25-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Minor optimization; emit proper unsupported messages for a couple of cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92153 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
27f5d7389e0f996558335a9af4607e829118c1e6 25-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Some small improvements to dead code elimination; helps a bit on
LLVM-Code-Symbols test.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92152 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenModule.cpp
ab189950908fc08dd2533692f0e8253e807c73ac 25-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Some small improvements to dead code elimination; helps a bit on
LLVM-Code-Symbols test.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92152 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenModule.cpp
02bd998ac81cc220e353508bc0356991cde2b148 25-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Make copy constructor elimination work in more cases; the case in question
here affects clang-on-clang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92151 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
cb48f8a60ad26b56d299cca9a57f8ea683d8a909 25-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Make copy constructor elimination work in more cases; the case in question
here affects clang-on-clang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92151 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
155910d6f84b8e090a77f1ce633a5a44817535d9 24-Dec-2009 Anders Carlsson <andersca@mac.com> Move a bunch of class related functions to CGClass.cpp, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92148 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
607d037c3f4376cbc8979d0eb9cd2f49a58ea033 24-Dec-2009 Anders Carlsson <andersca@mac.com> Move a bunch of class related functions to CGClass.cpp, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92148 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GClass.cpp
2cba0237ec6ab0cf11e83d2deaeee9f3a99df7ca 24-Dec-2009 Anders Carlsson <andersca@mac.com> Pass the return value slot to all call exprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92145 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GExpr.cpp
GExprCXX.cpp
odeGenFunction.h
a1736c0c750d4514a5d8fda36670addf1e4de54a 24-Dec-2009 Anders Carlsson <andersca@mac.com> Pass the return value slot to all call exprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92145 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GExpr.cpp
GExprCXX.cpp
odeGenFunction.h
a18e45ad1f09feb1d7e801e3d21b24393393f2e0 24-Dec-2009 Anders Carlsson <andersca@mac.com> Fill in the return value slot in CGExprAgg::VisitCallExpr. This takes us halfway towards fixing PR5824.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92142 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCXX.cpp
GCall.cpp
GCall.h
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
d2490a91341b57df7a7e54f8a707e7ecde2eeb4e 24-Dec-2009 Anders Carlsson <andersca@mac.com> Fill in the return value slot in CGExprAgg::VisitCallExpr. This takes us halfway towards fixing PR5824.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92142 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCXX.cpp
GCall.cpp
GCall.h
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
8cc9dd5dfaecb5f61ac834a8bdbae7055c2de2c0 24-Dec-2009 Anders Carlsson <andersca@mac.com> Pass ReturnValueSlot to EmitCall. No functionality change yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92138 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GCall.cpp
GDecl.cpp
GException.cpp
GExpr.cpp
GExprCXX.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.h
f3c47c9525153aea2de0ec4bd615b9cf2d81c103 24-Dec-2009 Anders Carlsson <andersca@mac.com> Pass ReturnValueSlot to EmitCall. No functionality change yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92138 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GCall.cpp
GDecl.cpp
GException.cpp
GExpr.cpp
GExprCXX.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.h
ecb049b1e358660a53c841d5e2581dfb85e8017f 24-Dec-2009 Anders Carlsson <andersca@mac.com> Add a ReturnValueSlot class. Change the argument order in EmitCall to match the other overload better.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92136 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCXX.cpp
GCall.h
GExpr.cpp
odeGenFunction.h
31777a2540879051a3c643b90e02c3fd3d315243 24-Dec-2009 Anders Carlsson <andersca@mac.com> Add a ReturnValueSlot class. Change the argument order in EmitCall to match the other overload better.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92136 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCXX.cpp
GCall.h
GExpr.cpp
odeGenFunction.h
bc722eb25c992f4b65d6c8c1e14e2e90200a45ab 24-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Fix double-destruction assertion to account for temporaries in conditionals

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92134 91177308-0d34-0410-b5e6-96231b3b80d8
GTemporaries.cpp
0c94c029331f56fd086024950cebd30620148e55 24-Dec-2009 Douglas Gregor <dgregor@apple.com> Fix double-destruction assertion to account for temporaries in conditionals

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92134 91177308-0d34-0410-b5e6-96231b3b80d8
GTemporaries.cpp
6c0cb34c5fb7e1d18c2b7afa7f95efd855776c68 24-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Assert that we aren't trying to push the same C++ temporary onto the live temporary stack twice. A little insurance against PR5867 surprising us again

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92132 91177308-0d34-0410-b5e6-96231b3b80d8
GTemporaries.cpp
400fd3d80997c401a1bbe69e5d1e94370fcf80cc 24-Dec-2009 Douglas Gregor <dgregor@apple.com> Assert that we aren't trying to push the same C++ temporary onto the live temporary stack twice. A little insurance against PR5867 surprising us again

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92132 91177308-0d34-0410-b5e6-96231b3b80d8
GTemporaries.cpp
54b4204cabd4343138ca36ab71341dc9bf920477 24-Dec-2009 Mike Stump <mrs@apple.com> Remove some dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92123 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
8cc4f1036608c7538ad38f397afc13de94aa8dc3 24-Dec-2009 Mike Stump <mrs@apple.com> Remove some dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92123 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f39f6a38bfd50dff1256998d61fbf34f050d4d1d 24-Dec-2009 Mike Stump <mrs@apple.com> Cleanup some dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92122 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
63df2ae96bd0477a7d516814750640b7ce348a71 24-Dec-2009 Mike Stump <mrs@apple.com> Cleanup some dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92122 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
664b7ae7c23912741039b4ae4ebaca063dc4d12d 24-Dec-2009 Mike Stump <mrs@apple.com> Don't set hidden for a non-external symbol as that would make it extenal.

Refine codegen for visibility and hidden. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92118 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
4e6f8ee45d9b822b437529e2334b146bb8c3537f 24-Dec-2009 Mike Stump <mrs@apple.com> Don't set hidden for a non-external symbol as that would make it extenal.

Refine codegen for visibility and hidden. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92118 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
eae80548fb1c56b620d15b132deba5e58164735b 24-Dec-2009 David Chisnall <csdavec@swan.ac.uk> Fix for bug 5691.

This fixes throwing exceptions inside @catch blocks nested inside outer @try blocks and also fixes jumping from an inner @finally to an outer @finally (via any relevant @catch blocks).

The code exhibiting this bug was based on code from CGObjCMac. I believe that this bug may still be present on the Mac runtimes, although the test case in the bug contains a few GNUisms and won't compile without some minor tweaks with Apple's libobjc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92117 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
0faa51632584b8d56311d5792a2a275729bc67e3 24-Dec-2009 David Chisnall <csdavec@swan.ac.uk> Fix for bug 5691.

This fixes throwing exceptions inside @catch blocks nested inside outer @try blocks and also fixes jumping from an inner @finally to an outer @finally (via any relevant @catch blocks).

The code exhibiting this bug was based on code from CGObjCMac. I believe that this bug may still be present on the Mac runtimes, although the test case in the bug contains a few GNUisms and won't compile without some minor tweaks with Apple's libobjc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92117 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
f46e74d16051b4f37c8fd95be04251c17be790b4 24-Dec-2009 Mike Stump <mrs@apple.com> Fix recent regression caught by g++.old-deja/g++.mike/eh19.C.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92109 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
c8f76f557c4839c8e5f142ac4681ad010e07c855 24-Dec-2009 Mike Stump <mrs@apple.com> Fix recent regression caught by g++.old-deja/g++.mike/eh19.C.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92109 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
a3f7130fab890f0729d361a03ad68274167e307d 23-Dec-2009 Mike Stump <mrs@apple.com> Fix regression found by g++.dg/eh/alias1.C.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92072 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
8d9fb9b21364892b5e41ebfacdad8f41414d2b89 23-Dec-2009 Mike Stump <mrs@apple.com> Fix regression found by g++.dg/eh/alias1.C.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92072 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
9c88fc5e3edc598fab520ab25c211cb6fb1fcc27 23-Dec-2009 Anders Carlsson <andersca@mac.com> Mangle block pointer types. Fixes PR5858.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92069 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
f28c687866aed1ed7b4b9ddf44a51673861236cf 23-Dec-2009 Anders Carlsson <andersca@mac.com> Mangle block pointer types. Fixes PR5858.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92069 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
41764a048865ace23b13521528910c4fb03a2118 23-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> There is no such thing as typeinfo for a cv-qualified type. Assert
that this is true when mangling, then fix up the various places in
Sema and/or CodeGen that need to remove qualifiers. Addresses a
linking issue when building LLVM with Clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92064 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GExprCXX.cpp
angle.cpp
154fe9812faddcd94568a64aee5f3cb0d47003d9 23-Dec-2009 Douglas Gregor <dgregor@apple.com> There is no such thing as typeinfo for a cv-qualified type. Assert
that this is true when mangling, then fix up the various places in
Sema and/or CodeGen that need to remove qualifiers. Addresses a
linking issue when building LLVM with Clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92064 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GExprCXX.cpp
angle.cpp
b4b19448922dbc20c27fe21b7d54c68182ac9454 23-Dec-2009 Chris Lattner <sabre@nondot.org> simplify my previous patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92057 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
0ad57fb93ae53ac94ebcd247201f60d87600188f 23-Dec-2009 Chris Lattner <sabre@nondot.org> simplify my previous patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92057 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4b11b8debc6beeb407780751d3b18a63e9a850ec 23-Dec-2009 Chris Lattner <sabre@nondot.org> fix opencl extvector element extraction on rvalues. We previously
error_unsupported on test10 and crashed on test11.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92056 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
998eab186790b7246a572a9950174f7f36442c06 23-Dec-2009 Chris Lattner <sabre@nondot.org> fix opencl extvector element extraction on rvalues. We previously
error_unsupported on test10 and crashed on test11.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92056 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
a4d827b73ba690577b1f572d0f038265ecc08fbf 23-Dec-2009 Anders Carlsson <andersca@mac.com> Mangle template template parameters. Fixes PR5861.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92030 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
9e85c743a4cefff7386764bba3f3f2cdbe5c06e2 23-Dec-2009 Anders Carlsson <andersca@mac.com> Mangle template template parameters. Fixes PR5861.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92030 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
1de3142b329b55ac8682e8af4e639cf2827c976d 23-Dec-2009 Eric Christopher <echristo@apple.com> Update for the intrinsic changes in llvm: the object size intrinsic
only takes a boolean second argument now. Update tests accordingly.
Currently the builtin still accepts the full range for compatibility.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91983 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
fee667f35e64751baa7fefe70b4e7bab06c8cd86 23-Dec-2009 Eric Christopher <echristo@apple.com> Update for the intrinsic changes in llvm: the object size intrinsic
only takes a boolean second argument now. Update tests accordingly.
Currently the builtin still accepts the full range for compatibility.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91983 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
d2d3b515609587914cd5afc33c899b73492014d2 22-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Move the implementation of ASTContext::getTypeSizeInChars() to the .cpp file to
avoid #including CharUnits.h in ASTContext.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91903 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
bdc601b196c48d4cd56a5ceb45d41ae4e87371ab 22-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Move the implementation of ASTContext::getTypeSizeInChars() to the .cpp file to
avoid #including CharUnits.h in ASTContext.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91903 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
f9d871a87c32dcd3f96a16ee29797507d502d64c 22-Dec-2009 Anders Carlsson <andersca@mac.com> Make sure that we mangle overloaded operators that are member functions correctly, giving them the correct arity.

With this seemingly insignificant fix, we are now able to build and link clang using clang itself! (LLVM still has to be built with gcc for the time being).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91893 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
8257d411a759b91921681c3b7f79e50e0d9252db 22-Dec-2009 Anders Carlsson <andersca@mac.com> Make sure that we mangle overloaded operators that are member functions correctly, giving them the correct arity.

With this seemingly insignificant fix, we are now able to build and link clang using clang itself! (LLVM still has to be built with gcc for the time being).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91893 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
3cc93acc02e68c921df505c2f0c2efc8321edbb1 22-Dec-2009 Daniel Dunbar <daniel@zuster.org> x86_64: Structures with no fields but which have padding should be classified as
integer.
- This is consistent, but may not be correct. I will revisit x86_64 ABI handling for C++ as a whole at some point.
- PR5831.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91874 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
4971ff8eea7800bd2a73652add6dcf7a4adf5f74 22-Dec-2009 Daniel Dunbar <daniel@zuster.org> x86_64: Structures with no fields but which have padding should be classified as
integer.
- This is consistent, but may not be correct. I will revisit x86_64 ABI handling for C++ as a whole at some point.
- PR5831.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91874 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
b94a110b0e81aad5bb0156e4bf55eed7adc9ff56 22-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate the ASTContext argument to CXXConstructorDecl::isCopyConstructor, since the context is available in the Decl

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91862 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
9e9199d8649cf3e10c98a69403f05dbb666d8fb1 22-Dec-2009 Douglas Gregor <dgregor@apple.com> Eliminate the ASTContext argument to CXXConstructorDecl::isCopyConstructor, since the context is available in the Decl

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91862 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
fc66fb48f67e28abeb680f9436f0c1c59d09adc3 21-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Improve on my previous fix for debug information. Rather than
recursing in CGDebugInfo::CreateTypeNode, teach
CanonicalizeTypeForDebugInfo---now called UnwrapTypeForDebugInfo---to
keep unwrapping the type until we hit something that can be
represented by debug information. Thanks to Anders for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91840 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
840943d633fa6e1ea25419022f936cc20abb2148 21-Dec-2009 Douglas Gregor <dgregor@apple.com> Improve on my previous fix for debug information. Rather than
recursing in CGDebugInfo::CreateTypeNode, teach
CanonicalizeTypeForDebugInfo---now called UnwrapTypeForDebugInfo---to
keep unwrapping the type until we hit something that can be
represented by debug information. Thanks to Anders for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91840 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d8c1c1fbebaba9730b812bd2ea4c888c77e2710f 21-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Teach debug info generation to handle TemplateSpecializationType,
ElaboratedType, QualifiedNameType, and SubstTemplateTypeParmType type
nodes. Also, produce an "unsupported" diagnostic for C++0x type nodes
and "typeof" nodes, rather than asserting nondescriptly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91837 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2101a821df49884df6d78d8770400a48ed3c8ef6 21-Dec-2009 Douglas Gregor <dgregor@apple.com> Teach debug info generation to handle TemplateSpecializationType,
ElaboratedType, QualifiedNameType, and SubstTemplateTypeParmType type
nodes. Also, produce an "unsupported" diagnostic for C++0x type nodes
and "typeof" nodes, rather than asserting nondescriptly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91837 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
75d6efab612a0312a9f0e056253186152aedd325 21-Dec-2009 Anders Carlsson <andersca@mac.com> Incomplete structs should also have internal linkage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91805 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
625c1ae781e3b8973bc9ec520268fe3301e4caf5 21-Dec-2009 Anders Carlsson <andersca@mac.com> Incomplete structs should also have internal linkage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91805 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
a3d643782d009368911dfe25b6111e61c10906c3 21-Dec-2009 Anders Carlsson <andersca@mac.com> Correcly handle pointers to member pointer types where the class or the pointee is incomplete.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91804 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
17fa6f971c1912c77aa10bdac4b7991b5e1646e2 21-Dec-2009 Anders Carlsson <andersca@mac.com> Correcly handle pointers to member pointer types where the class or the pointee is incomplete.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91804 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
c1f2ad1c8a5ccfcf6ac20a233af333ec478717da 20-Dec-2009 Anders Carlsson <andersca@mac.com> Rework the way pointer types are handled by the RTTI builder. We now get the right linkage for indirect pointers to incomplete structs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91799 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
8d1451535524cb21a6f8347bad9fed371b9d9ecb 20-Dec-2009 Anders Carlsson <andersca@mac.com> Rework the way pointer types are handled by the RTTI builder. We now get the right linkage for indirect pointers to incomplete structs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91799 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
917c9e1d36105d8b37c8029b15d1e18dd90c17ad 19-Dec-2009 Daniel Dunbar <daniel@zuster.org> Remove ';' after method definition. Noticed by clang++, which one would think
would have a higher respect for its own code. This is getting old, is this
warning really adding value?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91779 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GRTTI.cpp
oduleBuilder.cpp
7177dee8aee4b432911c91f1b788963bec0cac9f 19-Dec-2009 Daniel Dunbar <daniel@zuster.org> Remove ';' after method definition. Noticed by clang++, which one would think
would have a higher respect for its own code. This is getting old, is this
warning really adding value?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91779 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GRTTI.cpp
oduleBuilder.cpp
b1b3b536049d210c5f812c653a919a2f316dd049 19-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5524: make reference binding in default argument work correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91733 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
27a9b72bf1e4fe9f1d3ee9a5db1b9d614b0ee01c 19-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5524: make reference binding in default argument work correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91733 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
7662daa7adcaf9c1fee453fda4d86363a603e597 19-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Work in progress for setting the vtable pointers for all bases correctly in
the constructor. This doesn't handle cases requiring the VTT at the moment,
and generates unnecessary stores, but I think it's essentially correct.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91731 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
odeGenModule.h
e12e77bed10f87bdc7305d0dbd1de89e48f280c1 19-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Work in progress for setting the vtable pointers for all bases correctly in
the constructor. This doesn't handle cases requiring the VTT at the moment,
and generates unnecessary stores, but I think it's essentially correct.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91731 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
odeGenModule.h
4a5431e7f93a88cc1c57ada8044baae49e10d58c 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
odeGenTypes.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
odeGenTypes.cpp
f333004f51ea01662e447b2385486c119fb36a29 19-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5830: fix the computation of the offset to a virtual base.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91724 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
edd63718cce8eb3893a924b0b7d27e96b46001ad 19-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5830: fix the computation of the offset to a virtual base.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91724 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
26cda1c17aff55dc626f894cd101319742a7eba7 18-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix a few MSVC warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91714 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
b0b84385f0cb0ea4036579f5f384f1c19b917c7e 18-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix a few MSVC warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91714 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
f947c85d66b604bbd698bc24b9a597b85aa63779 18-Dec-2009 Anders Carlsson <andersca@mac.com> CK_UserDefinedConversion is a valid kind when doing copy ctor elision.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91695 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
5617bc03e2e886aafe8bdcecf0fcdeab5f3868c6 18-Dec-2009 Anders Carlsson <andersca@mac.com> CK_UserDefinedConversion is a valid kind when doing copy ctor elision.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91695 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
85246b1219cf9ebc357874c81a1c84263b82288a 18-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Change the return type of ASTContext::getTypeSizeInChars() from uint64_t to the
new opaque value type, CharUnits. This will help us avoid accidentally mixing
quantities that are in bit and character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91689 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
4273f7068f16863f2469b45a3f00c3b4217bdbb4 18-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Change the return type of ASTContext::getTypeSizeInChars() from uint64_t to the
new opaque value type, CharUnits. This will help us avoid accidentally mixing
quantities that are in bit and character units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91689 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
3294366fb304e88e780aa86c78594f4978e4a16f 18-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Rename getByteSize() and getTypeSizeInBytes() in ASTContext to getCharWidth()
and getTypeSizeInChars() to reflect their basis in character type units, not
that of a possibly independent architecture-specific byte.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91688 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
cc906ef220c9be2644ad942457766d46a0b3651e 18-Dec-2009 Ken Dyck <ken.dyck@onsemi.com> Rename getByteSize() and getTypeSizeInBytes() in ASTContext to getCharWidth()
and getTypeSizeInChars() to reflect their basis in character type units, not
that of a possibly independent architecture-specific byte.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91688 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
6266d60a137ccf93ec9bbb1b839f56eabd56f1ae 18-Dec-2009 Anders Carlsson <andersca@mac.com> Fix regression I introduced when dynamic_cast-ing to a reference type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91687 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
6f0e485a5cc120c5b30f5a5d11b2784de0c9c767 18-Dec-2009 Anders Carlsson <andersca@mac.com> Fix regression I introduced when dynamic_cast-ing to a reference type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91687 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
5abd1fc96a9e00b39f4183d0d197e5b172595e03 18-Dec-2009 Anders Carlsson <andersca@mac.com> It's perfectly fine to see UserDefinedConversion casts when emitting scalar expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91686 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
0ddb6f7506d3bffe4e526f877d3ef48e8d942b1d 18-Dec-2009 Anders Carlsson <andersca@mac.com> It's perfectly fine to see UserDefinedConversion casts when emitting scalar expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91686 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
0a34c2bd60614b03fd62964f614a50589db5a549 18-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Address some of Anders comments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91670 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
9657c443688998dc84915e841a10509017b209db 18-Dec-2009 Douglas Gregor <dgregor@apple.com> Address some of Anders comments

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91670 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
ccfe15ea60d055936a15b370765006c10c25d81a 18-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> Switch the initialization required by return statements over to the
new InitializationSequence. This fixes some bugs (e.g., PR5808),
changed some diagnostics, and caused more churn than expected. What's
new:

- InitializationSequence now has a "C conversion sequence" category
and step kind, which falls back to
- Changed the diagnostics for returns to always have the result type
of the function first and the type of the expression second.
CheckSingleAssignmentConstraints to peform checking in C.
- Improved ASTs for initialization of return values. The ASTs now
capture all of the temporaries we need to create, but
intentionally do not bind the tempoary that is actually returned,
so that it won't get destroyed twice.
- Make sure to perform an (elidable!) copy of the class object that
is returned from a class.
- Fix copy elision in CodeGen to properly see through the
subexpressions that occur with elidable copies.
- Give "new" its own entity kind; as with return values and thrown
objects, we don't bind the expression so we don't call a
destructor for it.

Note that, with this patch, I've broken returning move-only types in
C++0x. We'll fix it later, when we tackle NRVO.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91669 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
18ef5e28a9a2677f8b1dce1fb2638d66e0a1621f 18-Dec-2009 Douglas Gregor <dgregor@apple.com> Switch the initialization required by return statements over to the
new InitializationSequence. This fixes some bugs (e.g., PR5808),
changed some diagnostics, and caused more churn than expected. What's
new:

- InitializationSequence now has a "C conversion sequence" category
and step kind, which falls back to
- Changed the diagnostics for returns to always have the result type
of the function first and the type of the expression second.
CheckSingleAssignmentConstraints to peform checking in C.
- Improved ASTs for initialization of return values. The ASTs now
capture all of the temporaries we need to create, but
intentionally do not bind the tempoary that is actually returned,
so that it won't get destroyed twice.
- Make sure to perform an (elidable!) copy of the class object that
is returned from a class.
- Fix copy elision in CodeGen to properly see through the
subexpressions that occur with elidable copies.
- Give "new" its own entity kind; as with return values and thrown
objects, we don't bind the expression so we don't call a
destructor for it.

Note that, with this patch, I've broken returning move-only types in
C++0x. We'll fix it later, when we tackle NRVO.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91669 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
e9756514b410b0ac5afa00cdb4569e1f62f4a7f4 18-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add -dwarf-debug-flags, which provides a way to embed the cc1 level options used
to compile a translation unit into the debug info for that file.
- Used by parts of Darwin build process to check compiler flags, etc.
- <rdar://problem/7256886> clang does not emit AT_APPLE_flags

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91661 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f2d8b9f967a1ab53ee9fdbcc3ac0a4ee0a83a26e 18-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add -dwarf-debug-flags, which provides a way to embed the cc1 level options used
to compile a translation unit into the debug info for that file.
- Used by parts of Darwin build process to check compiler flags, etc.
- <rdar://problem/7256886> clang does not emit AT_APPLE_flags

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91661 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ed5bdcfc699b9eaddcc0149093b3bf9e3539482a 18-Dec-2009 Mike Stump <mrs@apple.com> Handle case when DestPtr is 0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91658 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
dd5614b18cbe4c528b0589b4ba722346bdb9fcce 18-Dec-2009 Mike Stump <mrs@apple.com> Handle case when DestPtr is 0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91658 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
1be796e0291202a683baeba84bde835ce9950443 17-Dec-2009 Anders Carlsson <andersca@mac.com> Rename GetAddrOfRTTI to GetAddrOfRTTIDescriptor. Remove the overload that takes a CXXRecordDecl since we were just creating a QualType from it anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91590 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GExprCXX.cpp
GRTTI.cpp
GVtable.cpp
odeGenModule.h
1d7088d1d9dc99e5478c0184a3e21cafef2a0b53 17-Dec-2009 Anders Carlsson <andersca@mac.com> Rename GetAddrOfRTTI to GetAddrOfRTTIDescriptor. Remove the overload that takes a CXXRecordDecl since we were just creating a QualType from it anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91590 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GExprCXX.cpp
GRTTI.cpp
GVtable.cpp
odeGenModule.h
c540a93337391d4209119eb8ce764557a9187d7c 17-Dec-2009 Mike Stump <mrs@apple.com> Ensure we run cleanups for CXXTemporaries on the exceptional edge. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91588 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GTemporaries.cpp
f2945c0a74ec15d4d171b34a98e7ef109b9b414b 17-Dec-2009 Mike Stump <mrs@apple.com> Ensure we run cleanups for CXXTemporaries on the exceptional edge. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91588 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GTemporaries.cpp
8b791c73209f70fa6194f20d6d40bcaea639a094 17-Dec-2009 Anders Carlsson <andersca@mac.com> Simplify RTTIBuilder::finish.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91585 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
ab6faf34259881cbaf0197430831ebac1fb98a34 17-Dec-2009 Anders Carlsson <andersca@mac.com> Simplify RTTIBuilder::finish.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91585 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
520c44ef1917ee0ee710e4efbca1551473b52862 17-Dec-2009 Anders Carlsson <andersca@mac.com> Move the Info vector into the RTTIBuilder struct. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91583 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
234407793b43179f56268fbbb459e5a480df6dc5 17-Dec-2009 Anders Carlsson <andersca@mac.com> Move the Info vector into the RTTIBuilder struct. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91583 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
44416ae5fce39a9a6ea15b423ab22981719ba0f5 17-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5801: codegen memcpy, memmove, memset directly to LLVM intrinsics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91573 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
e6ec205d6d0f4aec27bf49ca1e8fbb139acc2f2b 17-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5801: codegen memcpy, memmove, memset directly to LLVM intrinsics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91573 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
158df1c7b4604fbde219753ec23cd931ca1612f7 16-Dec-2009 Douglas Gregor <doug.gregor@gmail.com> When value-initializing a class with no user-defined constructors but
with a non-trivial default constructor, zero-initialize the storage
and then call the default constructor. Fixes PR5800.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91548 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprAgg.cpp
16006c901315fa12a108b4e571f187f4b676e426 16-Dec-2009 Douglas Gregor <dgregor@apple.com> When value-initializing a class with no user-defined constructors but
with a non-trivial default constructor, zero-initialize the storage
and then call the default constructor. Fixes PR5800.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91548 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprAgg.cpp
f67ba4dfbda2a9122b34d2ae9e2cdc8d197b74a9 16-Dec-2009 Anders Carlsson <andersca@mac.com> Baby steps towards fixing PR5589. If a class needs a vtable pointer, add one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91545 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
4b3e5be334c93c3f48af2a49c0ea7cd9bae2a0e5 16-Dec-2009 Anders Carlsson <andersca@mac.com> Baby steps towards fixing PR5589. If a class needs a vtable pointer, add one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91545 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
419e25dac09b6cd1aa40fd76e8a7567bb9fb2dc6 16-Dec-2009 Anders Carlsson <andersca@mac.com> Use GetAddrOfRTTI everywhere and remove GenerateRTTI and GenerateRTTIRef. With this change, we can now compile and link TableGen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91520 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GExprCXX.cpp
GRTTI.cpp
odeGenModule.h
e8e4a1c0bf2e3dd26dd0721a102307bbb589e96a 16-Dec-2009 Anders Carlsson <andersca@mac.com> Use GetAddrOfRTTI everywhere and remove GenerateRTTI and GenerateRTTIRef. With this change, we can now compile and link TableGen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91520 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GExprCXX.cpp
GRTTI.cpp
odeGenModule.h
fc0f9c9cc8d393e3a0d20a0eeee2a8a02ecab055 16-Dec-2009 Anders Carlsson <andersca@mac.com> Handle ImplicitValueInitExpr in AggExprEmitter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91519 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
30311fa6b0735b9cb73b01e25bf9652a4b9b0c53 16-Dec-2009 Anders Carlsson <andersca@mac.com> Handle ImplicitValueInitExpr in AggExprEmitter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91519 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
e937b701b2078588ce5fb0a477f81f25dec2fa58 16-Dec-2009 Anders Carlsson <andersca@mac.com> Mangle CXXOperatorCallExprs, fixes PR5796.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91507 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
58040a5ee50bcaebbcbebe47fbdc5fd70be90e83 16-Dec-2009 Anders Carlsson <andersca@mac.com> Mangle CXXOperatorCallExprs, fixes PR5796.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91507 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
a0d1d11935ed090d93de028d3cbd9571f9033583 16-Dec-2009 Mike Stump <mrs@apple.com> Add an addition check for undefined behavior for when we hit a
__builtin_unreachable. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91499 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
fba565d044a8979cfd916ce52655a6847bfaa601 16-Dec-2009 Mike Stump <mrs@apple.com> Add an addition check for undefined behavior for when we hit a
__builtin_unreachable. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91499 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
d9ec565c4a07c9b7f7dd5c42f8b44d68c5069e5f 16-Dec-2009 Mike Stump <mrs@apple.com> Implement additional undefined checks for additional loads and stores. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91498 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
b14e62d5aee7522b98c410ee65bd750c2cfe6f01 16-Dec-2009 Mike Stump <mrs@apple.com> Implement additional undefined checks for additional loads and stores. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91498 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
358674dd4933c52e876f36af273b55f34af2342d 15-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a code gen bug related to accessing a now
non-existing 'isa' field of a non-existing struct type
all related to legacy type definition for 'id' which we have
dropped in clang in favor of a built-in type.
(fixes radar 7470820).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91455 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
a7fa7cd3eaa5459dfb2d1495384ece9786f8434c 15-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a code gen bug related to accessing a now
non-existing 'isa' field of a non-existing struct type
all related to legacy type definition for 'id' which we have
dropped in clang in favor of a built-in type.
(fixes radar 7470820).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91455 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
aa43f81f2f155a0ed8d0c9dfce11eaec516b85a3 15-Dec-2009 Anders Carlsson <andersca@mac.com> ShouldDestroyTemporaries? I don't think so.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91450 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GTemporaries.cpp
0ece491d8f62ce67f047491a6703fac0d3bd4ff4 15-Dec-2009 Anders Carlsson <andersca@mac.com> ShouldDestroyTemporaries? I don't think so.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91450 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GTemporaries.cpp
dbf0031fbbd30144c3ac070baa4f2d0e551a8de9 15-Dec-2009 Chris Lattner <sabre@nondot.org> update to match LLVM API change:

Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait. This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91422 91177308-0d34-0410-b5e6-96231b3b80d8
lobalDecl.h
06159e878569e5f39bf0e8f11b84ac3ad0970597 15-Dec-2009 Chris Lattner <sabre@nondot.org> update to match LLVM API change:

Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait. This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91422 91177308-0d34-0410-b5e6-96231b3b80d8
lobalDecl.h
5141996c08e262a9ae4e6311e3acad8ae1ed8a85 15-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix a small bug in ComputeMethodVtableIndices.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91411 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ea5ae3170d8022c2007295ec794bdaf63f0273a1 15-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix a small bug in ComputeMethodVtableIndices.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91411 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ad5e4910334fa17df3101b44c13f0e70aecc9963 15-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Don't force the emission of destructor definitions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91394 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
624c7d704dc9f1dbb5dd3e5a0ef7eacfb3b699e2 15-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Don't force the emission of destructor definitions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91394 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
b28288ceca9f4b1dfc2aaf252e10bbd89f642a8a 15-Dec-2009 Mike Stump <mrs@apple.com> Fix spacing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91386 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
d8af3601a5cddad7c6cf9a0e4a8563dcc6484664 15-Dec-2009 Mike Stump <mrs@apple.com> Fix spacing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91386 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
46c6911c42cb09cb3709db1891019864df9e6e76 15-Dec-2009 Mike Stump <mrs@apple.com> Ensure we preserve line information for each trap for
-fcatch-undefined-behavior if we aren't optimizing. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91382 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
41513444fe9d032dc74660c581d3689865bf32d3 15-Dec-2009 Mike Stump <mrs@apple.com> Ensure we preserve line information for each trap for
-fcatch-undefined-behavior if we aren't optimizing. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91382 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
67a292f2f2380a9c332a452709972c8ede1ba2c9 15-Dec-2009 Mike Stump <mrs@apple.com> Switch codegen for -fcatch-undefined-bahavior over to __builtin_trap
instead of abort to improve codesize and codegen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91374 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
15037caa1542bb810ad54c653aeb80f61df7b00c 15-Dec-2009 Mike Stump <mrs@apple.com> Switch codegen for -fcatch-undefined-bahavior over to __builtin_trap
instead of abort to improve codesize and codegen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91374 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
24edccf331a86441a264033ce96c580550ebb59a 14-Dec-2009 Mike Stump <mrs@apple.com> We have to allow one to form an address for one past the end. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91347 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
750c85ea8efd0f899cdf7ba9060d1286ba14be9a 14-Dec-2009 Mike Stump <mrs@apple.com> We have to allow one to form an address for one past the end. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91347 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
1345f1d7f6af6439d67cb89f0eb76eacb581920e 14-Dec-2009 Mike Stump <mrs@apple.com> Add support for detecting undefined shift behavior. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91341 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
be07f60131bc6f8d6696f4644df1ef667a1730d5 14-Dec-2009 Mike Stump <mrs@apple.com> Add support for detecting undefined shift behavior. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91341 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
2c7e0e0ef38b6cf61a412938304089eb03c820c5 14-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to fix 32-bit @try failure with internal assertion when compiling
an Objective-C rethrow nested inside another try/catch block. (fixes radar 7466728).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91335 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
8c89ff9b0923083f4838d9c6fcf858e3aa311b40 14-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to fix 32-bit @try failure with internal assertion when compiling
an Objective-C rethrow nested inside another try/catch block. (fixes radar 7466728).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91335 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7e883a19ca3469beef9ef70acd14f0d6af7e0799 14-Dec-2009 Mike Stump <mrs@apple.com> Simplifiy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91324 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
96a063a70ca6374c401642c2a88ec1f11697b7ae 14-Dec-2009 Mike Stump <mrs@apple.com> Simplifiy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91324 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4d154df87f43a3d9f464498e218c583fe15f1ce2 14-Dec-2009 Nate Begeman <natebegeman@mac.com> Revert mmx palignr to use an intrinsic, since mmx shuffle patterns are missing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91269 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
c3420ffb282c6ffc0192013bf8045b6c21eddece 14-Dec-2009 Nate Begeman <natebegeman@mac.com> Revert mmx palignr to use an intrinsic, since mmx shuffle patterns are missing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91269 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
2af4a5e3d32de12b2c7c36ca8256411b3969da8a 14-Dec-2009 Nate Begeman <natebegeman@mac.com> Support x86's PALIGNR instruction without the use of a palignr intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91264 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
ce5818a19a8f77d1540d0352649d6687eca4af6b 14-Dec-2009 Nate Begeman <natebegeman@mac.com> Support x86's PALIGNR instruction without the use of a palignr intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91264 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
0693d936822f600d66c550f569565489a10ac407 14-Dec-2009 Anders Carlsson <andersca@mac.com> Mangle unary, binary and ternary expressions correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91257 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
e170ba7846bc4cae4b376b52eb4448645c141e59 14-Dec-2009 Anders Carlsson <andersca@mac.com> Mangle unary, binary and ternary expressions correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91257 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
7e554c9b184434ce69c4aa280df9e710078ec1f3 14-Dec-2009 Anders Carlsson <andersca@mac.com> Simplify BuildSimpleType in the RTTBuilder to avoid using an std::vector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91255 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
3bf190ebefb861fd05c77d5f47d4709386735a12 14-Dec-2009 Anders Carlsson <andersca@mac.com> Simplify BuildSimpleType in the RTTBuilder to avoid using an std::vector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91255 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
4bbdc68c6fbb02c837fdf04033a6d36f5b15b5af 13-Dec-2009 Anders Carlsson <andersca@mac.com> Don't use a cookie if the global placement new function is used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91251 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
dd9375513db874caadaeff62ef10becbe32bd7fb 13-Dec-2009 Anders Carlsson <andersca@mac.com> Don't use a cookie if the global placement new function is used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91251 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
a0eb0ecdc90c9fc64efe8d988ff573f9fa6bcdcf 13-Dec-2009 Anders Carlsson <andersca@mac.com> Fix regression in my last commit - if a struct has a trivial destructor but no usual deallocation function we don't need a cookie.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91249 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
710f7058400e0e5accae0ce92e9c1fbfd0c15232 13-Dec-2009 Anders Carlsson <andersca@mac.com> Fix regression in my last commit - if a struct has a trivial destructor but no usual deallocation function we don't need a cookie.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91249 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
0157de3061881457ac995fd5223cd5d1352fd6f9 13-Dec-2009 Anders Carlsson <andersca@mac.com> More array cookie improvements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91247 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprCXX.cpp
871d078f5ae5505553c02deeabdd4b83b4820211 13-Dec-2009 Anders Carlsson <andersca@mac.com> More array cookie improvements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91247 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprCXX.cpp
5e49902dd56af8ad1752034c8b474ba97f2282e3 13-Dec-2009 Anders Carlsson <andersca@mac.com> If the usual array deallocation function of a class takes two arguments, we need to pass the number of bytes allocated to the deallocation function, just not the number of bytes in a single element.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91246 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
6153710ee3e7dc3014d5fb992bfb77d4af56ccac 13-Dec-2009 Anders Carlsson <andersca@mac.com> If the usual array deallocation function of a class takes two arguments, we need to pass the number of bytes allocated to the deallocation function, just not the number of bytes in a single element.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91246 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
0bd99af81003a5278ce554ae1b54e6cd3ccddc8a 13-Dec-2009 Anders Carlsson <andersca@mac.com> Change the RTTIBuilder's finish member function to take a pointer to the constants array + the length of the array.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91241 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
5ba7d2156f5b3f7b078b33fa9cd264762bc6779b 13-Dec-2009 Anders Carlsson <andersca@mac.com> Change the RTTIBuilder's finish member function to take a pointer to the constants array + the length of the array.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91241 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
00874ad5bb1845b7dfa3d39411ecfc09df321ad7 13-Dec-2009 Chandler Carruth <chandlerc@gmail.com> Silence some release build warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91234 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
60cfcecaf48e4310339dcfbdb0e3f0e6d2853855 13-Dec-2009 Chandler Carruth <chandlerc@gmail.com> Silence some release build warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91234 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
16b3756d7f8e0a3bdc8b84266dfcb642dd4c7347 12-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> patch to add a property from a protocol to a class that adopts the protocol.
(fixes radar 7466494).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91227 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
191dcd76046ea751f21aae008df21bb3468a2188 12-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> patch to add a property from a protocol to a class that adopts the protocol.
(fixes radar 7466494).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91227 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9d02e7c5fa4e30ceb52a2956c0018ec41a5b6da0 12-Dec-2009 Jeffrey Yasskin <jyasskin@google.com> Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
no extra safety anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91207 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenModule.cpp
angle.cpp
9f61aa9e280adea9fbf3365f0e4f6ed568c9885a 12-Dec-2009 Jeffrey Yasskin <jyasskin@google.com> Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
no extra safety anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91207 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenModule.cpp
angle.cpp
669046aad17057d6778610a835f59bc311942f49 12-Dec-2009 Mike Stump <mrs@apple.com> Implement runtime checks for undefined behavior. WIP.

This implements a new flag -fcatch-undefined-behavior. The flag turns
on additional runtime checks for:

T a[I];

a[i] abort when i < 0 or i >= I.

Future stuff includes shifts by >= bitwidth amounts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91198 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.cpp
odeGenFunction.h
9c276ae0f24d4cee8f7954069d4b8eae45d0447d 12-Dec-2009 Mike Stump <mrs@apple.com> Implement runtime checks for undefined behavior. WIP.

This implements a new flag -fcatch-undefined-behavior. The flag turns
on additional runtime checks for:

T a[I];

a[i] abort when i < 0 or i >= I.

Future stuff includes shifts by >= bitwidth amounts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91198 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.cpp
odeGenFunction.h
eb264b1e729713043c0921ef84559dac75af9fdc 11-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to allow C-style cast from 'void *' to block pointer type.
(fixes radar 7465023).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91171 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
3b27f1a80e4e433b503efd344c909eeafaa9033c 11-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to allow C-style cast from 'void *' to block pointer type.
(fixes radar 7465023).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91171 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
0961553e38072cef26da891ce3b7eba6663ce2f9 11-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5714: make sure globals that will be modified aren't marked const.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91156 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
20e098b7e7fda6bed1d67441b56cce77cd3aa918 11-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5714: make sure globals that will be modified aren't marked const.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91156 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a5ab7ba366459fe979658b4fc44a15075e42e7d7 11-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix linkage of type info and vtable for classes without linkage.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91152 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
GVtable.cpp
470fb73d4e09e1dfe62cb545d7fe0e567ac6e8d6 11-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix linkage of type info and vtable for classes without linkage.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91152 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
GVtable.cpp
2b145e0809f326b6c3135d93d763644d5041cd54 11-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Make sure mangling doesn't crash in another case. Add some more tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91149 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
6f9f25dfc7bf9cc1ab1282d6d7e9cf7916d8a09c 11-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Make sure mangling doesn't crash in another case. Add some more tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91149 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
f24c953ae724491f6a66c8086f85324080563cbe 11-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5706: let mangleName deal with mangling names without identifiers
correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91136 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
ecb7e932e9274a0628477d17931a06b3b109024a 11-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5706: let mangleName deal with mangling names without identifiers
correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91136 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
771fb97c6fb6729fc8eea5881ceb7784f458572a 11-Dec-2009 Anders Carlsson <andersca@mac.com> Move info vectors and add assertions in preparation of moving the vector directly into RTTIBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91129 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
44636d11eab74ea3948393f889173766096916ae 11-Dec-2009 Anders Carlsson <andersca@mac.com> Move info vectors and add assertions in preparation of moving the vector directly into RTTIBuilder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91129 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
8696b6ac67912def2d440d9fdb0aabc40c093758 11-Dec-2009 Anders Carlsson <andersca@mac.com> Use GetAddrOfRTTI when getting the RTTI pointer for a base class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91127 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
4e7135613a558020f003972b2a5ae5f8d5306508 11-Dec-2009 Anders Carlsson <andersca@mac.com> Use GetAddrOfRTTI when getting the RTTI pointer for a base class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91127 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
51d39d3978afa5bc5e2b8ebd81ea8f555113a518 11-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Random string-related cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91119 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
8d04258483be6583f0865464234d014807a3e1cc 11-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Random string-related cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91119 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
5b6313ca95c2496ccfb7c0c3e0467c6533957970 11-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Move the code for converting a member pointer to a bool so that it is usable
for logical not.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91112 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
3a1737030e3c8d209987325c61dacb8e4a65123b 11-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Move the code for converting a member pointer to a bool so that it is usable
for logical not.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91112 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
4a0d25090789f5709811f7692b17764549be2516 11-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5718: implement equality comparisons for member function pointers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91108 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
b81c786de58ce484230dc04f9a7c78bc48990106 11-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5718: implement equality comparisons for member function pointers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91108 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1d0258bb95897de50625b6a58489c176ab3bd1d5 11-Dec-2009 Anders Carlsson <andersca@mac.com> Improve linkage of RTTI data structures. Introduce CodeGenModule::GetAddrOfRTTI which figures out the right linkage of the RTTI information for the given type and whether it should be defined or not. I will migrate clients over to GetAddrOfRTTI in subsequent commits (with tests).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91098 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
GRTTI.cpp
GVtable.cpp
odeGenModule.h
31b7f52d8c8d459e80d2a72176cc7fcc4b7d8d38 11-Dec-2009 Anders Carlsson <andersca@mac.com> Improve linkage of RTTI data structures. Introduce CodeGenModule::GetAddrOfRTTI which figures out the right linkage of the RTTI information for the given type and whether it should be defined or not. I will migrate clients over to GetAddrOfRTTI in subsequent commits (with tests).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91098 91177308-0d34-0410-b5e6-96231b3b80d8
GExprCXX.cpp
GRTTI.cpp
GVtable.cpp
odeGenModule.h
6f225eeef855a926d3890ceb294d37e0e5d2e056 11-Dec-2009 Anders Carlsson <andersca@mac.com> Use named flags in RTTIBuilder::BuildPointerType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91088 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
d6baec80f2e7763bbcc9aefd7eaa1580223b1389 11-Dec-2009 Anders Carlsson <andersca@mac.com> Use named flags in RTTIBuilder::BuildPointerType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91088 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
67c05f48a6f58507bf2fffd28c00b2d341bf5350 11-Dec-2009 Anders Carlsson <andersca@mac.com> When extending the lifetime of a temporary, make sure to emit a branch to the cleanup exit block. This fixes a broken module error in LLVMCConfigurationEmitter.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91086 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
6ec687d2ad8b4968675f7baec15ba302b4d7e199 11-Dec-2009 Anders Carlsson <andersca@mac.com> When extending the lifetime of a temporary, make sure to emit a branch to the cleanup exit block. This fixes a broken module error in LLVMCConfigurationEmitter.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91086 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
5357d3f73d18a80b0ee4d43b294457534e5f1890 11-Dec-2009 Anders Carlsson <andersca@mac.com> When an exception needs to be freed by calling __cxa_exception_free, make sure to stash away the exception pointer somewhere.

This fixes an "Instruction does not dominate all uses!" verification error when compiling TableGen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91084 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
8370c58b9295b32bee50443fe3ac43a47a2047e8 11-Dec-2009 Anders Carlsson <andersca@mac.com> When an exception needs to be freed by calling __cxa_exception_free, make sure to stash away the exception pointer somewhere.

This fixes an "Instruction does not dominate all uses!" verification error when compiling TableGen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91084 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
01a294d40cf0a932616127ea21a05e514d705db1 11-Dec-2009 Mike Stump <mrs@apple.com> Fix spacing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91078 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
0924a8a06f6b5ccf0c34d26ce25d680c045ea915 11-Dec-2009 Mike Stump <mrs@apple.com> Fix spacing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91078 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
5ab497a95c607428dd979f3f0f72e446bb5da719 10-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Support unary type traits in a scalar context. Not that I've actually seen
this construct, but might as well for completeness.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91071 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
9dfebdcdcdcc0cad8a3ef205d33b84f33233072b 10-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Support unary type traits in a scalar context. Not that I've actually seen
this construct, but might as well for completeness.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91071 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
ffcf2f2fd40cb7146268e7a3246681e79d055b1a 10-Dec-2009 Anders Carlsson <andersca@mac.com> Make sure that explicitly instantiated functions get the right linkage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91069 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
548e60efea9a1d2c31679e11e9ff0d2f19b96694 10-Dec-2009 Anders Carlsson <andersca@mac.com> Make sure that explicitly instantiated functions get the right linkage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91069 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b08c1ea18306c7009270d68684e367c9cd51a8af 10-Dec-2009 Anders Carlsson <andersca@mac.com> Mangle static variables inside Objective-C methods in Objective-C++. We currently mangle them the same way as gcc does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91042 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
7b06f6c20e124afa4d1fde85b1dd721462f2d912 10-Dec-2009 Anders Carlsson <andersca@mac.com> Mangle static variables inside Objective-C methods in Objective-C++. We currently mangle them the same way as gcc does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91042 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
9f4d799adc4720afcecb9b443e1e1b75b5d7820c 10-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Get rid of static variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91041 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
940670512d7c3d93389bb38a426abcb7ef44271e 10-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Get rid of static variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91041 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
dde0e5c4ca278d0c20b6fa4b269f0ec85b841329 10-Dec-2009 Anders Carlsson <andersca@mac.com> Actually store the pointer into the global variable, spotted by Eli.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91036 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
864143fe14b8059eed1413d38854b689f7b21016 10-Dec-2009 Anders Carlsson <andersca@mac.com> Actually store the pointer into the global variable, spotted by Eli.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91036 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
34c67b697fdb9395e8560b7a663e6c2f8d2335ad 10-Dec-2009 Mike Stump <mrs@apple.com> Setup cleanup on eh edge out of the construction of the cleanup object
during throw to deallocate the exception object. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91035 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
5030a98e20e7501366cf50a7e8b92dc016b98bfb 10-Dec-2009 Mike Stump <mrs@apple.com> Setup cleanup on eh edge out of the construction of the cleanup object
during throw to deallocate the exception object. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91035 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
a37578879643cd85de184d8c7cba83842a96b7e8 10-Dec-2009 Anders Carlsson <andersca@mac.com> Handle emitting static variables that have reference type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91027 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
c7974ca5312eefd00b9e927203def9fbd8c1d169 10-Dec-2009 Anders Carlsson <andersca@mac.com> Handle emitting static variables that have reference type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91027 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
c52cf16e422f0f58af6cbb36daa7f7f6eddbc05d 10-Dec-2009 Anders Carlsson <andersca@mac.com> Separate generating code for static variables and global variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91026 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
fcbfdc1a93325471a262f0d94461273ae67ad3b6 10-Dec-2009 Anders Carlsson <andersca@mac.com> Separate generating code for static variables and global variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91026 91177308-0d34-0410-b5e6-96231b3b80d8
GDeclCXX.cpp
8fd16cea580a2b09a574df413a7e04c749efa2f2 10-Dec-2009 Anders Carlsson <andersca@mac.com> Move more decl related functions to CGDeclCXX.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91012 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDeclCXX.cpp
eb4072ed06c884f1053047ad88846cbffd5ac62e 10-Dec-2009 Anders Carlsson <andersca@mac.com> Move more decl related functions to CGDeclCXX.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91012 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDeclCXX.cpp
a62de82ac2a24edd03dc362d49ec0111e6ee5317 10-Dec-2009 Anders Carlsson <andersca@mac.com> Add CGDeclCXX.cpp and move EmitCXXGlobalVarDeclInit there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91006 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDeclCXX.cpp
MakeLists.txt
5ec2e7ccb08b2a1598f12b2c6f59c6f31d035b5b 10-Dec-2009 Anders Carlsson <andersca@mac.com> Add CGDeclCXX.cpp and move EmitCXXGlobalVarDeclInit there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91006 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDeclCXX.cpp
MakeLists.txt
f2eb35e6640193732d22860d212177b18fb46dd6 10-Dec-2009 Mike Stump <mrs@apple.com> Fixup spacing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91001 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
8755ec336108839b9621c3b18f0e175f8a3b671c 10-Dec-2009 Mike Stump <mrs@apple.com> Fixup spacing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91001 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
1199c0e8cc3090fe053ccefead87bd02371c843c 10-Dec-2009 Mike Stump <mrs@apple.com> Fix spacing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91000 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
c83ebb592a7c2f7d66969fdfda06b9390b02034c 10-Dec-2009 Mike Stump <mrs@apple.com> Fix spacing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91000 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
254213247a4cfc877ce4fb07a0b3e137eff63b66 10-Dec-2009 Mike Stump <mrs@apple.com> Ensure we only generate one terminate handler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90998 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.cpp
odeGenFunction.h
182f383db1782af752ecaf607fdff72a8542088b 10-Dec-2009 Mike Stump <mrs@apple.com> Ensure we only generate one terminate handler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90998 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.cpp
odeGenFunction.h
d6e0f975c782a1792538c2911e54aa044a57c09f 10-Dec-2009 Mike Stump <mrs@apple.com> Remove obsolete FIXME and some dead fallback code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90997 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
23e17c81d508a124c980ae8d198a7b70292298b5 10-Dec-2009 Mike Stump <mrs@apple.com> Remove obsolete FIXME and some dead fallback code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90997 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
df1d5c5de2c821e36764706f89b46158b7b666fb 10-Dec-2009 Mike Stump <mrs@apple.com> Add terminate handler to cleanups on exceptional edges.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90996 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
20d3a53cef96ed1d42ec82a313e8453cfef6512b 10-Dec-2009 Mike Stump <mrs@apple.com> Add terminate handler to cleanups on exceptional edges.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90996 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
99abc5f70b22a4b9ff6ea396f91cb1979732674d 10-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen for ObjCIsaExpr AST used as lvalue.
(fixes radar 7457534).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90995 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
820bca41c3899374775d2a1dfc2ef2e22aaf1c7b 10-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen for ObjCIsaExpr AST used as lvalue.
(fixes radar 7457534).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90995 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
537183c72ba9ba5314ae1a394f1b262fa0d1b8be 10-Dec-2009 Mike Stump <mrs@apple.com> Add terminate handler for copy constructors for thrown objects. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90994 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
76958099828bac6ebd45abef9f76934b3e99e397 10-Dec-2009 Mike Stump <mrs@apple.com> Add terminate handler for copy constructors for thrown objects. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90994 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
0bbf0a1eca5a4bb1713ad448c6d6955ec4295bcc 09-Dec-2009 Mike Stump <mrs@apple.com> Break out code for reuse. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90991 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.h
9b39c51ae3c547568ac42325f94b4197618f6b18 09-Dec-2009 Mike Stump <mrs@apple.com> Break out code for reuse. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90991 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.h
aac340e09bdfd4fa148adc2d0ff5a8140967a0f3 09-Dec-2009 Mike Stump <mrs@apple.com> Add throw support. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90982 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
39406b1395f69341c045e863a6620310abdc55b6 09-Dec-2009 Mike Stump <mrs@apple.com> Add throw support. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90982 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
ca404a5c6408dddb2463009d6d56d1043b428a7e 09-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Codegen. support for ObjCIsaExpr AST which until now
was not needed (fixes radar 7453430).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90981 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
83dc32594cde6bd083bd8b98b24bde2346585cad 09-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Codegen. support for ObjCIsaExpr AST which until now
was not needed (fixes radar 7453430).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90981 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
bca3d155d1564f538c7f3cb1788765c6acf931fa 09-Dec-2009 Mike Stump <mrs@apple.com> Add cleanups for exceptional edges. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90940 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GException.cpp
GExpr.cpp
odeGenFunction.cpp
odeGenFunction.h
d88ea5687968640ada2bc5a10211cbeb68a671ec 09-Dec-2009 Mike Stump <mrs@apple.com> Add cleanups for exceptional edges. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90940 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GException.cpp
GExpr.cpp
odeGenFunction.cpp
odeGenFunction.h
b1c6623c7da77c3dfda062038566597cd604c128 09-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5709: use the computed type of the declaration instead of the
type of the builtin when generating the function declaration for a builtin
library call.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90936 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
386ca78d0b03b1fb519e60d1a14cd12a220364a6 09-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5709: use the computed type of the declaration instead of the
type of the builtin when generating the function declaration for a builtin
library call.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90936 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ac5ad7ebb178bbc9e7b1bb0983852de795c7d027 09-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> More detailed analysis of typecast to an objective-c pointer
in objective-c++ mode without being too lenient.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90895 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
92ef5d75720c032808181133e4d7c5f82230237e 09-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> More detailed analysis of typecast to an objective-c pointer
in objective-c++ mode without being too lenient.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90895 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1606568ccc9009af8fc0b4bebef38c707b40a09f 08-Dec-2009 Mike Stump <mrs@apple.com> Add fixme.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90884 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
4e0179f03074f7a280da2c9691dc344500c79c90 08-Dec-2009 Mike Stump <mrs@apple.com> Add fixme.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90884 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
b8bb0588e16a3fa713a3a5748e33621bc7acd575 08-Dec-2009 Mike Stump <mrs@apple.com> Remove some old code. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90882 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
e64d434a3450c803beebc09920e111374397a4d2 08-Dec-2009 Mike Stump <mrs@apple.com> Remove some old code. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90882 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
af2d1f0954378423abbe663229dca4f1a94a32ea 08-Dec-2009 Daniel Dunbar <daniel@zuster.org> Update CGExprConstant for change to emit padding values as undef.
- This fixes 2003-05-21-BitfieldHandling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90876 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
88b172cd206aa94f8eab071787f4a7ec2442c407 08-Dec-2009 Daniel Dunbar <daniel@zuster.org> Update CGExprConstant for change to emit padding values as undef.
- This fixes 2003-05-21-BitfieldHandling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90876 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
dd711c106c214bbee686575cc784caf6aa5ab944 08-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Use StringRef in CGDebugInfo::EmitFunctionStart.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90856 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
odeGenFunction.cpp
155fd79b3a6dd25fbac1716fa3f8148de1e53c49 08-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Use StringRef in CGDebugInfo::EmitFunctionStart.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90856 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
odeGenFunction.cpp
b5fd27c2e3e21621e774aa4eba2b2054b6eb472d 08-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Use a Twine to concatenate the name instead of going through std::string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90854 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
a4d6ca174b7b8ffeee7392e74b69242f78e94b51 08-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Use a Twine to concatenate the name instead of going through std::string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90854 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
63e8ef03ff7845f33a2849c6296ad76533951732 08-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Use Path.makeAbsolute() and make a constant std::string a const char*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90851 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
47daf68c15bb80c8feb1d49962a33daa0d228a07 08-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Use Path.makeAbsolute() and make a constant std::string a const char*.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90851 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b85c1556de06cc741c9465e669cbe8c2c559ffde 08-Dec-2009 John McCall <rjmccall@apple.com> DeclRefExpr stores a ValueDecl internally.

Template instantiation can re-use DeclRefExprs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90848 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
dbd872f273a8dbf22e089b3def6c09f0a460965d 08-Dec-2009 John McCall <rjmccall@apple.com> DeclRefExpr stores a ValueDecl internally.

Template instantiation can re-use DeclRefExprs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90848 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
5eb58814f1c12c79bb60820de2d55c857afd8bb9 08-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Build fix.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90841 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
ceb9bb3038c830f446bd761568e724fa9c0e0d69 08-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Build fix.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90841 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
3d8e2cdbe70844e11f251492b7944be21991cbaa 08-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5707: make sure implicit copy constructors initialize the vtable
pointer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90840 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
77a259c6dbf582949af8a243b472c0c7faa373a6 08-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5707: make sure implicit copy constructors initialize the vtable
pointer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90840 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
ad17443492f41fc133f6095d6910d388bb395741 08-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Slight tweak to vtable linkage.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90832 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0259ce2b4a94b7d1b28a084b76650cbf448e3eb8 08-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Slight tweak to vtable linkage.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90832 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
bcf561b40e745eb53b3df99ddb93c8a4e97083d0 08-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Misc key function fixes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90831 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
61eab8872168af6eb1e0047a82901096cf145e27 08-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Misc key function fixes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90831 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d9c046fa4e139b011a675abb30f659e6138c5a72 08-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix some direct checks of expressions which might be surrounded by parentheses.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90825 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
c4451dbb4fd3858a3ee7354fcca4ab452192ddb4 08-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix some direct checks of expressions which might be surrounded by parentheses.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90825 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
aec4987139d72d6ce1972ba573167bdd8cb35a4a 08-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Make copy assignment operator synthesis not explode for classes with complex
or non-record aggregate members.

It might be worth spending some time to optimize this code (and the parallel
code for copy constructors) to memcpy in larger chunks, rather than copying
one member at a time. Not sure exactly how beneficial that would be, but
it seems like could help for large classes with, for example, a vtable pointer
forcing the generation of a copy constructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90823 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
ebc3317c66638a05a089abb348877b9b823f52b0 08-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Make copy assignment operator synthesis not explode for classes with complex
or non-record aggregate members.

It might be worth spending some time to optimize this code (and the parallel
code for copy constructors) to memcpy in larger chunks, rather than copying
one member at a time. Not sure exactly how beneficial that would be, but
it seems like could help for large classes with, for example, a vtable pointer
forcing the generation of a copy constructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90823 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
2ab887915142c46b8c6d5dae98f1e6ec7cb07fbe 08-Dec-2009 Jeffrey Yasskin <jyasskin@google.com> Remove several .c_str() to be forward-compatible with StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90822 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e3fdca2ee0346a41d9cc5ee417a75e66274216f5 08-Dec-2009 Jeffrey Yasskin <jyasskin@google.com> Remove several .c_str() to be forward-compatible with StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90822 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
77a22d2014e7fe49457ba8ca7ae9d584e8e733cc 08-Dec-2009 Mike Stump <mrs@apple.com> Fixup catch parameters with class reference type. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90821 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
b2debeb96da2b1d47ecffddbc35ade97b64af1c2 08-Dec-2009 Mike Stump <mrs@apple.com> Fixup catch parameters with class reference type. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90821 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
6b487cda3f25001b8cd5ceb2707aaef7e614507b 08-Dec-2009 Anders Carlsson <andersca@mac.com> No need to add tail padding if the resulting LLVM struct type will have the same size as the final record size.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90820 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
c2456824a106455bae5d738fe65d80b14a6804c4 08-Dec-2009 Anders Carlsson <andersca@mac.com> No need to add tail padding if the resulting LLVM struct type will have the same size as the final record size.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90820 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
75b6af88515f4be7bcccd02832c2c797f0ce8454 08-Dec-2009 Eli Friedman <eli.friedman@gmail.com> A bunch more thunk fixes from misc testing.

(Yes, I do intend to commit some tests for this.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90818 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
GVtable.h
odeGenModule.cpp
b455f0e74be0144ab9738ef574d07bd661959525 08-Dec-2009 Eli Friedman <eli.friedman@gmail.com> A bunch more thunk fixes from misc testing.

(Yes, I do intend to commit some tests for this.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90818 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
GVtable.h
odeGenModule.cpp
a59d3463f1052f24338bf28e9f50bc2ad2d30adf 08-Dec-2009 Mike Stump <mrs@apple.com> Add codegen support for exception specifications. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90817 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.cpp
odeGenFunction.h
cce3d4f9812182ed4e551b7cf0fc86576be8d9c5 08-Dec-2009 Mike Stump <mrs@apple.com> Add codegen support for exception specifications. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90817 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.cpp
odeGenFunction.h
457d0d5a2f5bf7ec1f71da60cd8c67dffb26908f 07-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Correctly handle conditional operators involving throw.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90800 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
48daf59c9f52856ca80074f1f5a30aa29c235726 07-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Correctly handle conditional operators involving throw.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90800 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1b4fa3aebda33fbde25825de87b10b3d4f8965a7 07-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Make the comma operator consistently call EnsureInsertPoint.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90799 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
130c69e969a785ff3be9e909f8eba7f89e42ac10 07-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Make the comma operator consistently call EnsureInsertPoint.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90799 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
7bbdacb639ed238c7871e0154ced64cc1daead49 07-Dec-2009 Mike Stump <mrs@apple.com> Work around emitters that can't deal with dead code contexts yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90796 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
c2ab48698094f3e6f3acebc38a19b8cb04069b41 07-Dec-2009 Mike Stump <mrs@apple.com> Work around emitters that can't deal with dead code contexts yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90796 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
292e43b1f098db2fa2485f9bc3e1b1a763ef1acc 07-Dec-2009 Anders Carlsson <andersca@mac.com> Mangle basic_ostream and basic_iostream specializations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90794 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
91f8860de5f4280607e74c9d653751cd3f891ca7 07-Dec-2009 Anders Carlsson <andersca@mac.com> Mangle basic_ostream and basic_iostream specializations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90794 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
e4f5e5c6bc1067902f269ec1e79e725b94d67117 07-Dec-2009 Mike Stump <mrs@apple.com> Remove obsolete fallback code for objectsize.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90780 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
4bda1e448757ddf076622caf011eeb050ca893f1 07-Dec-2009 Mike Stump <mrs@apple.com> Remove obsolete fallback code for objectsize.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90780 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
f6f181f9e662263a35468b21d792a110552abece 07-Dec-2009 Nuno Lopes <nunoplopes@sapo.pt> implement PR5274: mark 'restrict' parameters as noalias

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90778 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
079b49550dafc5eefa27c58817e613fd1b1c4309 07-Dec-2009 Nuno Lopes <nunoplopes@sapo.pt> implement PR5274: mark 'restrict' parameters as noalias

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90778 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
80db0fc4e8f57afd8cc5b189715ecef3966e087a 07-Dec-2009 Anders Carlsson <andersca@mac.com> It's OK to try to emit a vtable definition more than once. Fixes PR5697.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90751 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d58987c67d0fa02a71af98a9fa66ffd73c1501ed 07-Dec-2009 Anders Carlsson <andersca@mac.com> It's OK to try to emit a vtable definition more than once. Fixes PR5697.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90751 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c77895c4ea356e40b53cd6cfec326a598c863a54 07-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Erm, revert for the moment; I didn't test this as thoroughly as I should have
(although it does pass regression tests).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90747 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
85301e264436a3b8172ab275fc603044bfd551aa 07-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Erm, revert for the moment; I didn't test this as thoroughly as I should have
(although it does pass regression tests).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90747 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0c2dfa00c449b6cf3ece5f148aff351e6fb852b6 07-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Tweak the formula for non-virtual offsets to something which appears a bit
more accurate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90746 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a10c22b796a5fa0bdc2b1565e375dac40dc1405a 07-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Tweak the formula for non-virtual offsets to something which appears a bit
more accurate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90746 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
39cf32a9e9019054816da59a27b52416d9a664e0 07-Dec-2009 Anders Carlsson <andersca@mac.com> Move key functions to a separate map.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90745 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f53df2398e07d13be9962b95aebc19b31706fa33 07-Dec-2009 Anders Carlsson <andersca@mac.com> Move key functions to a separate map.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90745 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f3fbc9afce1f756407f21bd353f7c908f7b3d53c 06-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Be a bit more complete about accumulating SavedThisAdjustments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90723 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f062d9d443865413af5b9c9c55238c2ee0799d31 06-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Be a bit more complete about accumulating SavedThisAdjustments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90723 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
88ecec8b26bce9206d1de366a77ef7e035485cfb 06-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Work-in-progess rewrite of thunks: move thunk generation outside of vtable
generation, and make sure we generate thunks when the function is defined
rather than when the vtable is defined.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90722 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
GVtable.h
odeGenModule.cpp
odeGenModule.h
72649ed78a25365d003b5218cae7b332c418800e 06-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Work-in-progess rewrite of thunks: move thunk generation outside of vtable
generation, and make sure we generate thunks when the function is defined
rather than when the vtable is defined.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90722 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
GVtable.h
odeGenModule.cpp
odeGenModule.h
cd60cac52f1bba21c35af9b0091465a0c66b558c 06-Dec-2009 Anders Carlsson <andersca@mac.com> Add rudimentary support for member pointers to CGDebugInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90711 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
odeGenModule.cpp
20f12a20ba9cfa6f8d53c8304e24f50903c45184 06-Dec-2009 Anders Carlsson <andersca@mac.com> Add rudimentary support for member pointers to CGDebugInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90711 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
odeGenModule.cpp
e2336aff9dde79857eb84e32fc7730cc76bcf682 06-Dec-2009 Chris Lattner <sabre@nondot.org> use new helpers to simplify code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90709 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
86b85b20349c8d931a0a25d85cb35b93a945fa64 06-Dec-2009 Chris Lattner <sabre@nondot.org> use new helpers to simplify code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90709 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
ed2e7a03436cff91fba8f5ae75c423e08d2da286 06-Dec-2009 Anders Carlsson <andersca@mac.com> Set the correct linkage for VTTs as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90689 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
odeGenModule.h
c3a46ef9f86aa0b38d3baf75d59cacc55cd7ba24 06-Dec-2009 Anders Carlsson <andersca@mac.com> Set the correct linkage for VTTs as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90689 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
odeGenModule.h
71052e52a60b1eee24f47b6a02e4e8d7624fb24c 06-Dec-2009 Anders Carlsson <andersca@mac.com> More linkage improvements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90687 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
5794c9714a7d8c7eb8003d3e2616ab389ba9e45b 06-Dec-2009 Anders Carlsson <andersca@mac.com> More linkage improvements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90687 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
4186a17226c4900a4aef3c899557e95345c49161 06-Dec-2009 Anders Carlsson <andersca@mac.com> Pass the desired vtable linkage to GenerateVtable directly. Only call MaybeMarkVirtualImplicitMembersReferenced for non-inline functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90686 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
3527225899adf04e7b966e533da72e4550f9c7e5 06-Dec-2009 Anders Carlsson <andersca@mac.com> Pass the desired vtable linkage to GenerateVtable directly. Only call MaybeMarkVirtualImplicitMembersReferenced for non-inline functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90686 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
6ca75ae63d91de14c4f6417c10d89fa0f8a438a0 06-Dec-2009 Anders Carlsson <andersca@mac.com> Make GenerateVtable a private member function of CGVtableInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90684 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
odeGenModule.h
8c2d36ffc82c6c616c02f4a231a39f0fe5ab4e54 06-Dec-2009 Anders Carlsson <andersca@mac.com> Make GenerateVtable a private member function of CGVtableInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90684 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
odeGenModule.h
d99cc9f78a6c66054892c856b7533632d3b76085 05-Dec-2009 Anders Carlsson <andersca@mac.com> Only emit the vtable definition if the class has a key function and we're emitting it, or if the class doesn't have a key function and we are emitting the complete constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90681 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
224c312179700095238e5fb28bd215b541bffee9 05-Dec-2009 Anders Carlsson <andersca@mac.com> Only emit the vtable definition if the class has a key function and we're emitting it, or if the class doesn't have a key function and we are emitting the complete constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90681 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
fbf61eaa8edce50ace15e0191009430819d3213f 05-Dec-2009 Anders Carlsson <andersca@mac.com> If a class does not have a key function, its linkage should be weak_odr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90680 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
891c8b739917ec4d171a62ceaefc640115089e7d 05-Dec-2009 Anders Carlsson <andersca@mac.com> If a class does not have a key function, its linkage should be weak_odr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90680 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
611ae9545d6c97af5353bdfcc96a03b2dce36c2f 05-Dec-2009 Anders Carlsson <andersca@mac.com> Use createGlobalVariable for creating vtable variables too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90679 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
152d4dce59a123b9a103b3087dc3be7f0b71033e 05-Dec-2009 Anders Carlsson <andersca@mac.com> Use createGlobalVariable for creating vtable variables too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90679 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
1acd5d700c61c5a7843bbe0e26c6c1d6d385badb 05-Dec-2009 Anders Carlsson <andersca@mac.com> CodeGenModule::GenerateVtable now returns a pointer directly to the vtable and not to the address point.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90676 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
bb27d868ac3ca429bfe0f52c5f091f849368fff8 05-Dec-2009 Anders Carlsson <andersca@mac.com> CodeGenModule::GenerateVtable now returns a pointer directly to the vtable and not to the address point.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90676 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
004d26f1b7d879307ab0e59b53443794b06d2968 05-Dec-2009 Anders Carlsson <andersca@mac.com> Make sure that hte vtable always has an i8* array type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90675 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e40477cd57d5297ff5e4cc5e4515744c42a96ce2 05-Dec-2009 Anders Carlsson <andersca@mac.com> Make sure that hte vtable always has an i8* array type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90675 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c3c274aca9c2b50f7caa13a0da68be42b4f89994 05-Dec-2009 Anders Carlsson <andersca@mac.com> Add a function for getting the vtable address point of a class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90674 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
9ac95b99acf6b4e1f54fe70e02cbb0d3c72f9f2d 05-Dec-2009 Anders Carlsson <andersca@mac.com> Add a function for getting the vtable address point of a class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90674 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
b4b33523c20f89a1a018cd0ed18a24fab040ce33 05-Dec-2009 Anders Carlsson <andersca@mac.com> Simplify BuildVTT.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90673 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
4282edfe696a0c15bb8656f3e13dd6643fd3057d 05-Dec-2009 Anders Carlsson <andersca@mac.com> Simplify BuildVTT.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90673 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
5b8c01e8074b50ed78612dac1cf206e5e3b96b00 05-Dec-2009 Anders Carlsson <andersca@mac.com> Let the VTT builder pretend that getVtable returns a pointer to the vtable and not to the vtable address point.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90672 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
2e32aaef378f9f098c9ce59bc26ddc8876c0199f 05-Dec-2009 Anders Carlsson <andersca@mac.com> Let the VTT builder pretend that getVtable returns a pointer to the vtable and not to the vtable address point.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90672 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a05f8968900697d5d691185baf34e60eb64afe0b 05-Dec-2009 Anders Carlsson <andersca@mac.com> Change getCtorVtable to not return the address point offset, but the global variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90671 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
be58b390ebaf64ffc455916a11fe231bcfa5a648 05-Dec-2009 Anders Carlsson <andersca@mac.com> Change getCtorVtable to not return the address point offset, but the global variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90671 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a831b315f42597d7bb2333431fb7437d2839864d 05-Dec-2009 Anders Carlsson <andersca@mac.com> Simplify some code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90670 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
9428b67b065816247b50d438948841fe0521fc08 05-Dec-2009 Anders Carlsson <andersca@mac.com> Simplify some code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90670 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
b203b1fb283f5c7e0bf919c155e69b09b425a265 05-Dec-2009 Anders Carlsson <andersca@mac.com> Factor vtable related GlobalVariable creation out into a separate function. Add vtable linkage test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90667 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
7ca464366349e6b197cb521794517fa026259ee4 05-Dec-2009 Anders Carlsson <andersca@mac.com> Factor vtable related GlobalVariable creation out into a separate function. Add vtable linkage test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90667 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a0578f6c81f63191be63bc958407f3e3f374f38e 05-Dec-2009 Chris Lattner <sabre@nondot.org> implement rdar://7346691 by codegen'ing struct/array initializers
to a memset or a memcpy from a global when possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90658 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.h
761acc19d966a67f2175783d09412d6ac9463400 05-Dec-2009 Chris Lattner <sabre@nondot.org> implement rdar://7346691 by codegen'ing struct/array initializers
to a memset or a memcpy from a global when possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90658 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.h
c8466e7871024decb6a3f334d65d116ad17a05e6 05-Dec-2009 Chris Lattner <sabre@nondot.org> various cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90657 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
10976d99e4e129dfc66c19fd425408cdd9a90268 05-Dec-2009 Chris Lattner <sabre@nondot.org> various cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90657 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
e9d64961175fd874af597bee27e67e730e8d3f18 05-Dec-2009 Chris Lattner <sabre@nondot.org> simplify a condition and add a testcase.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90652 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
ff933b709777ce535efb455a10dd487de5694998 05-Dec-2009 Chris Lattner <sabre@nondot.org> simplify a condition and add a testcase.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90652 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
3347436408546a7088e48015ce267fa4fbed72a5 05-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Skip actually generating the vtable unless we are defining it. This avoids
the side-effects of generating the methods in the vtable (including PR5676).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90635 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
152b5b13260c4caa98f9ae959048fa9b25bc7f20 05-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Skip actually generating the vtable unless we are defining it. This avoids
the side-effects of generating the methods in the vtable (including PR5676).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90635 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f9cfcbc541952f3a22ec53a9346ae26d465fe91a 05-Dec-2009 Anders Carlsson <andersca@mac.com> Don't emit explicit specializations of static member variable declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90624 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
1b3171dd6c7c319655f79de80ed8fed03f758e51 05-Dec-2009 Anders Carlsson <andersca@mac.com> Don't emit explicit specializations of static member variable declarations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90624 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6078b83396373000d1468d3199f84d1c99e8777a 05-Dec-2009 Mike Stump <mrs@apple.com> Add support for function try blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90622 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.cpp
odeGenFunction.h
6a1e0eb557d47e85185e09bdf8721f53f4bf9c9c 05-Dec-2009 Mike Stump <mrs@apple.com> Add support for function try blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90622 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.cpp
odeGenFunction.h
caf383ae337966d67380b6b161fab17ec2b53d04 04-Dec-2009 John McCall <rjmccall@apple.com> Fix "using typename" and the instantiation of non-dependent using declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90614 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
ed97649e9574b9d854fa4d6109c9333ae0993554 04-Dec-2009 John McCall <rjmccall@apple.com> Fix "using typename" and the instantiation of non-dependent using declarations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90614 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
6da0d4cbae3c3a5780673c8ceb3ac463a7926593 04-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Return bool as a bool instead of a uint64_t.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90610 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
cce9fde82ad99cb96c820084d636c9bfdfcff30a 04-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Return bool as a bool instead of a uint64_t.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90610 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
465c504986839bb7dfabecfba2722cf0437a06f3 04-Dec-2009 Sean Hunt <rideau3@gmail.com> Put in FIXME that this mangling is not official in.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90594 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
5dd6b39fb585f252bd87fb8032888bb208059f0d 04-Dec-2009 Sean Hunt <rideau3@gmail.com> Put in FIXME that this mangling is not official in.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90594 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
7a626383513f4fd522c4d8e5e7169511f8f3acbb 04-Dec-2009 Sean Hunt <rideau3@gmail.com> Switch mangling of literal operator names to a string that's
a) legal
b) likely to be chosen as the official mangling

This will break ABI compatibility with all literal operator names,
so you may need to recompile any such code. Sorry.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90587 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
2421f66b945510c7d049f6d89e7cc57d0013add8 04-Dec-2009 Sean Hunt <rideau3@gmail.com> Switch mangling of literal operator names to a string that's
a) legal
b) likely to be chosen as the official mangling

This will break ABI compatibility with all literal operator names,
so you may need to recompile any such code. Sorry.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90587 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
b547c98869475f494130be81cf21997e4347d0e8 04-Dec-2009 Mike Stump <mrs@apple.com> Be sure to instantiate rtti for non-polymorphic bases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90586 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
1c4269a9d9a61b48d1ad7c180fb8f8fc07c2ad8c 04-Dec-2009 Mike Stump <mrs@apple.com> Be sure to instantiate rtti for non-polymorphic bases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90586 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
412b19d3e00f18120e7a2165bcea5df5c9a2aa2d 04-Dec-2009 Anders Carlsson <andersca@mac.com> When generating a virtual destructor, don't try to make a virtual call to the base class destructor because then we'll just re-enter the same destructor!

This was done to fix PR5619, so I went ahead and passed a dummy VTT pointer for now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90578 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
fd12649cd54074ca9efa0774a7812e330619d198 04-Dec-2009 Anders Carlsson <andersca@mac.com> When generating a virtual destructor, don't try to make a virtual call to the base class destructor because then we'll just re-enter the same destructor!

This was done to fix PR5619, so I went ahead and passed a dummy VTT pointer for now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90578 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
410383c2ad86e2a980002b3ec88919913390cc1c 04-Dec-2009 Mike Stump <mrs@apple.com> Fixup nested try blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90576 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
b2c9c0b1c5e25cfbee1403cde12b98f180e6b315 04-Dec-2009 Mike Stump <mrs@apple.com> Fixup nested try blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90576 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
71091f6a50785920c6bd236899d93562e25a1003 04-Dec-2009 Mike Stump <mrs@apple.com> Fix warning and be sure to set up the rethrow pointer if we fall off
the end of all the catches.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90574 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
a086783570f76062a345e761811296dc8df571c8 04-Dec-2009 Mike Stump <mrs@apple.com> Fix warning and be sure to set up the rethrow pointer if we fall off
the end of all the catches.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90574 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
0e44df392ad4c7d910251c091a09aae16eb07bfc 04-Dec-2009 Anders Carlsson <andersca@mac.com> Rename 'Class' to 'MostDerivedClass'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90573 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ac3f7bdb26c0229baa5ba8a6c68e63f73e39700f 04-Dec-2009 Anders Carlsson <andersca@mac.com> Rename 'Class' to 'MostDerivedClass'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90573 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
718857e2a7b71acef8118028f980fe42cc90c4b6 04-Dec-2009 Anders Carlsson <andersca@mac.com> Store the vtable components in a SmallVector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90571 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a22fd857d31137f2f0c68c2075002f60164eabaf 04-Dec-2009 Anders Carlsson <andersca@mac.com> Store the vtable components in a SmallVector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90571 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0f5d3533de3abc15e52191871b06789c9a022c4e 04-Dec-2009 Anders Carlsson <andersca@mac.com> Use a different ConstantArray::get.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90570 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
9d4dd3e3e325e17dec3f449eef9f6cd7159bad82 04-Dec-2009 Anders Carlsson <andersca@mac.com> Use a different ConstantArray::get.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90570 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ecc49d8f5415934915864a7cf53f25a1cfbd2929 04-Dec-2009 Anders Carlsson <andersca@mac.com> Move the vtable vector directly into the Vtable builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90569 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
15318f47620cd77cc3f0bbba6a2bc9ff0f2cc856 04-Dec-2009 Anders Carlsson <andersca@mac.com> Move the vtable vector directly into the Vtable builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90569 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
25fbc59a3aaa8ff7a93bb25b7405323438d11330 04-Dec-2009 Anders Carlsson <andersca@mac.com> Change getIndex to return false if the index wasn't found. Avoids an extra hash lookup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90568 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
77c23e5a49c30f829bf041a88ad6c60e6b662cc9 04-Dec-2009 Anders Carlsson <andersca@mac.com> Change getIndex to return false if the index wasn't found. Avoids an extra hash lookup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90568 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0838d0bacb6c3a84f59e0cfb977e772da0269f1f 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup; no functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90565 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
dfe33bbd41959dba8ce45f21db5f09badde5bf60 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup; no functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90565 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
4e0317accf8482e8d6b7b84038cca3b3fd057bea 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Remove unused argument.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90563 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
367d1223650cd1b94dc48e886237783692fe6059 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Remove unused argument.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90563 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
047dd9bce86acd99501d1dd27d8657f201787a0b 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Eliminate submethods vector.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90562 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ca9b56c26a8ab2a01439b191cffb4b8329260268 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Eliminate submethods vector.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90562 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
00835e561579b8bea1b983be1471a4f6961c088b 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Eliminate the inner loop in VtableBuilder::OverrideMethod.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90561 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
4714583d5a6d53a1fe42b77ecaa7c7ecb40990a6 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Eliminate the inner loop in VtableBuilder::OverrideMethod.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90561 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
35f1f1b9c9f450f7a65681e16e282310d91a5cc5 04-Dec-2009 Anders Carlsson <andersca@mac.com> Correctly mangle the 'std' namespace inside extern "C++" blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90544 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
47846d2b4c19972e57563bb05a777748939bfb47 04-Dec-2009 Anders Carlsson <andersca@mac.com> Correctly mangle the 'std' namespace inside extern "C++" blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90544 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
ed499d2ef7d56bd48a9da678e3db71cf00c18013 04-Dec-2009 Anders Carlsson <andersca@mac.com> Make sure that overridden method decls are always canonical.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90542 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
3aaf486af649d6be464e6b937c8181529ffef931 04-Dec-2009 Anders Carlsson <andersca@mac.com> Make sure that overridden method decls are always canonical.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90542 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
13cf5a9593c44bbee919db2d3feca8dc1568b385 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix regression in vtable improvements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90540 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
8b9006f4e86b51a812f57f3d402094eda61b147e 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix regression in vtable improvements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90540 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
077d06d8e293de9b93e78c3a01127be896c07113 04-Dec-2009 Mike Stump <mrs@apple.com> Try/catch statements seem to be working well enough to turn on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90538 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
fffefeb8ecafa1e1a191a276361fd5acaa0f8c5e 04-Dec-2009 Mike Stump <mrs@apple.com> Try/catch statements seem to be working well enough to turn on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90538 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
6da22e2f1933e50e5c7d7c73d339ddcd10011c98 04-Dec-2009 Mike Stump <mrs@apple.com> Disable for now, doesn't play nice with the temporary code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90537 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
ce0339032a08012cdda99c3e8660b9fc4dfd9baf 04-Dec-2009 Mike Stump <mrs@apple.com> Disable for now, doesn't play nice with the temporary code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90537 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
16c15e41abd5207689ff6c478a80b439c414eebe 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Rename method to something easier to search for.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90536 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d6a3e67f3742ef32c4f577cb37e6cea4b8fb51bb 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Rename method to something easier to search for.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90536 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d684b818ee504b58c8ab2f8d91b9b319d5d2cfa6 04-Dec-2009 Anders Carlsson <andersca@mac.com> More work in preparation of getting rid of the submethods loop.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90535 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
dd454bee6b17ba7fe83fff3ce6b63fed0c0498ab 04-Dec-2009 Anders Carlsson <andersca@mac.com> More work in preparation of getting rid of the submethods loop.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90535 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
22c274bab0202da7b977a22551e1a95c7af07714 04-Dec-2009 Anders Carlsson <andersca@mac.com> Remove an unused member variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90534 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0e881169afe062b9336d626ac5522d57cbcbc6d4 04-Dec-2009 Anders Carlsson <andersca@mac.com> Remove an unused member variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90534 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e99f10be18fccedb93b95eabc3c5e4f26742117a 04-Dec-2009 Anders Carlsson <andersca@mac.com> Add a way to get the index of a method. Assert that we have the same index for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90533 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c0c4993d1c0ba633520abe0fb51bcb6c16d8a649 04-Dec-2009 Anders Carlsson <andersca@mac.com> Add a way to get the index of a method. Assert that we have the same index for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90533 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d2d99b2d74f0ac8ddbf35ac897fce5aa1bdce7b1 04-Dec-2009 Anders Carlsson <andersca@mac.com> Add a premature optimization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90532 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
29202d506509cf470a1698d205c38f880b4130d5 04-Dec-2009 Anders Carlsson <andersca@mac.com> Add a premature optimization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90532 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f596802a6bbd7e169e9ee8f5011d8382f4f934ca 04-Dec-2009 Anders Carlsson <andersca@mac.com> Add the method directly to the vtable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90531 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
2fce216955f754d661e2d86cf2778dbad2db2f0a 04-Dec-2009 Anders Carlsson <andersca@mac.com> Add the method directly to the vtable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90531 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
4e33bb65eb069ae6a100bd59f01da99a7b72ec51 04-Dec-2009 Anders Carlsson <andersca@mac.com> Get rid of the PureVirtualMethods map.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90530 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
1e2180bf322f537468f3d94d2ee731cffd994b0a 04-Dec-2009 Anders Carlsson <andersca@mac.com> Get rid of the PureVirtualMethods map.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90530 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ad387fa9a64de103d6d4f1b2aed5585971da65f4 04-Dec-2009 Anders Carlsson <andersca@mac.com> Move handling of pure virtual methods to AppendMethods (and rename it to AppendMethodsToVtable).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90529 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
bf54027d277650809b5957fc4165890e7202aca5 04-Dec-2009 Anders Carlsson <andersca@mac.com> Move handling of pure virtual methods to AppendMethods (and rename it to AppendMethodsToVtable).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90529 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
289c53e132bd09a119f4509e916a24f77f7bde19 04-Dec-2009 Anders Carlsson <andersca@mac.com> Move covariant thunk handling to AppendMethods too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90528 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ea357223e50bb4ecefaa9c69f421e5b37750ccc6 04-Dec-2009 Anders Carlsson <andersca@mac.com> Move covariant thunk handling to AppendMethods too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90528 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
73b4a31908c3e05b4e1b352b90ea99c88dfd5974 04-Dec-2009 Anders Carlsson <andersca@mac.com> Move 'this' pointer adjustment thunks to AppendMethods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90527 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
b73ba39f389bd80eac4a35c867604600b0098f53 04-Dec-2009 Anders Carlsson <andersca@mac.com> Move 'this' pointer adjustment thunks to AppendMethods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90527 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
53c2cd34949ac03c39b45d4e0b25ab179a6333cb 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Make functions returning a struct indirectly evaluate the returned struct
directly into the sret pointer. This is an optimization in C, but is required
for correctness in C++ for classes with a non-trivial copy constructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90526 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.cpp
odeGenFunction.h
b17daf9ab790ae71aacad2cc4aa11cd8d86c25d1 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Make functions returning a struct indirectly evaluate the returned struct
directly into the sret pointer. This is an optimization in C, but is required
for correctness in C++ for classes with a non-trivial copy constructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90526 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.cpp
odeGenFunction.h
d7bee4f0825423ce3ce10a19e4bfa1c56f5af57a 04-Dec-2009 Anders Carlsson <andersca@mac.com> Factor appending methods to a vtable out into a separate function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90525 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
adfa26773c0157cc1ce92213ed6e9c76fa570677 04-Dec-2009 Anders Carlsson <andersca@mac.com> Factor appending methods to a vtable out into a separate function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90525 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0034e09bd71e0807f6a8308aaa7a80d09980e3a9 04-Dec-2009 Anders Carlsson <andersca@mac.com> Get rid of the Thunks struct too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90524 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
98fdb2468797d920adf60fcafb5060e76aed3324 04-Dec-2009 Anders Carlsson <andersca@mac.com> Get rid of the Thunks struct too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90524 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
7bcff7dd950e40c3f0f4b8a461e38590a24e77d2 04-Dec-2009 Anders Carlsson <andersca@mac.com> Remove the CovariantThunk struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90523 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a875670a66f1248ff52687413b2c73260c2c50b6 04-Dec-2009 Anders Carlsson <andersca@mac.com> Remove the CovariantThunk struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90523 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
62c166e9fe0e78e624d4c1a10bad583dda0d6d0e 04-Dec-2009 Anders Carlsson <andersca@mac.com> Remove the GlobalDecl from the Thunk as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90522 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
4644b8bb2cc11aa423d50b8b8b2874368c3a5c94 04-Dec-2009 Anders Carlsson <andersca@mac.com> Remove the GlobalDecl from the Thunk as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90522 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ba3d6579d4b27bf3b77154b421ce5e600fc03603 04-Dec-2009 Anders Carlsson <andersca@mac.com> Remove the GlobalDecl from the CovariantThunk struct, we can just look it up in the Methods table now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90519 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c71a5234c0277f64eb07b99d3e9dc862dffb057f 04-Dec-2009 Anders Carlsson <andersca@mac.com> Remove the GlobalDecl from the CovariantThunk struct, we can just look it up in the Methods table now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90519 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e72a5142333a3335012a29e98a1a57050d499b8f 04-Dec-2009 Anders Carlsson <andersca@mac.com> Start populating the VtableMembers structure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90517 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a7f1911db2ec8c203f6d9ccf3206e0ba1738433e 04-Dec-2009 Anders Carlsson <andersca@mac.com> Start populating the VtableMembers structure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90517 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
7e56223ec81d77fe278b9601afd2e9309e1364f1 04-Dec-2009 Anders Carlsson <andersca@mac.com> Add a data structure for efficient storing of vtable methods. Not used yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90515 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c7ab1a8dfc3e37b7c2967ff6a97ed684f0ac1015 04-Dec-2009 Anders Carlsson <andersca@mac.com> Add a data structure for efficient storing of vtable methods. Not used yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90515 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
07a13c8505e9e8406e47b5c18a2bab6dbad2c60c 04-Dec-2009 Mike Stump <mrs@apple.com> Fixup reference binding for catch parameters.
Fixup throws and rethrows to use invoke as appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90513 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
0a3816e566db7cd6084310a2f5a3167d0ec30b31 04-Dec-2009 Mike Stump <mrs@apple.com> Fixup reference binding for catch parameters.
Fixup throws and rethrows to use invoke as appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90513 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
83a875f78d6c21f5730713cbbc7db035ad0e235f 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Update chunk of #if 0'ed code to remove fixed FIXME and make it compile. We
probably want to do some sort of performance assessment before enabling it,
though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90510 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
13a5be10b198a5dc7e3e72c54481cd8b70f68495 04-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Update chunk of #if 0'ed code to remove fixed FIXME and make it compile. We
probably want to do some sort of performance assessment before enabling it,
though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90510 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
4b705178d0b4a7c439f56e8755e9a01d9137228c 03-Dec-2009 Mike Stump <mrs@apple.com> These are done.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90494 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
3faae56c3bf75e12e09f3d0f1b7643bffa0479d2 03-Dec-2009 Mike Stump <mrs@apple.com> These are done.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90494 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
efacd5c73a2283a73168347f5f06093772cea9d6 03-Dec-2009 Mike Stump <mrs@apple.com> Improve catch parameter bindings for scalar non-pointers. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90492 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
d9cb7e97327e148cfc54db5b991d0925686934fb 03-Dec-2009 Mike Stump <mrs@apple.com> Improve catch parameter bindings for scalar non-pointers. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90492 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
e8501c1c89eb58764007ae71c83b4f91a12b5674 03-Dec-2009 Anders Carlsson <andersca@mac.com> Handle static_assert inside functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90461 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
7b0ca3fa6f9e89d81db96fe51d4d73bf69d17edc 03-Dec-2009 Anders Carlsson <andersca@mac.com> Handle static_assert inside functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90461 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
13a5efe1a4d71e518ecc48d97e9ea75f68f15967 03-Dec-2009 Mike Stump <mrs@apple.com> Eli, I copied my code from this code... Let's fix the souce of the bad idea!

Thanks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90458 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c085a981cec80d1c2e39182116700f200c98c880 03-Dec-2009 Mike Stump <mrs@apple.com> Eli, I copied my code from this code... Let's fix the souce of the bad idea!

Thanks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90458 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
4fde59eae03b87d2bcdee464af0b75108de7a339 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
odeGenTypes.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
odeGenTypes.cpp
fe5843d461d0741754074825f50cb73feb427336 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Convert ABIArgInfo::dump to raw_ostream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90440 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
28df7a5813d94ff32904c31195d7f6fd74db8c53 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Convert ABIArgInfo::dump to raw_ostream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90440 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
bd3ac7c9087dca1a95ec0ecb1acf62bc992353ae 03-Dec-2009 Anders Carlsson <andersca@mac.com> Attempt to fix the MSVC build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90427 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
08a87f4a75594916fe9fe7f03330315c6dadba6f 03-Dec-2009 Anders Carlsson <andersca@mac.com> Attempt to fix the MSVC build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90427 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
28a6bbede5dbbf0a20fd15e2803d5b76744c2061 03-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix thunk generation for thunks with a parameter with reference type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90412 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
6804fa27eb17567f8a783f92ab8c768ca0b561ba 03-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix thunk generation for thunks with a parameter with reference type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90412 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
9fb580d173d4bbbc387627ced41f59e0163b798c 03-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90411 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
odeGenModule.h
35c98cc4c00efcfe47ad0b716e7c50afb9c5ff75 03-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90411 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
odeGenModule.h
dcf613ba9e91bc2f7d755befd142662fa31067a7 03-Dec-2009 Mike Stump <mrs@apple.com> Add support for thunking dtors. Oh why does this make my head hurt?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90409 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
odeGenFunction.h
odeGenModule.h
919d5e51fd0a1b6e52028c8aa42edf44ee036954 03-Dec-2009 Mike Stump <mrs@apple.com> Add support for thunking dtors. Oh why does this make my head hurt?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90409 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
odeGenFunction.h
odeGenModule.h
95084423af8864ff6c77f3b89a032243a83902b6 03-Dec-2009 Mike Stump <mrs@apple.com> Reflow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90407 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
f668bd0e059774e44fd3571d998a5ca74cceb97f 03-Dec-2009 Mike Stump <mrs@apple.com> Reflow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90407 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
2ebd360b398e4d0487d3f9230e63ce1d839df30b 03-Dec-2009 Anders Carlsson <andersca@mac.com> Revert r90402 for now, virt.cpp is failing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90406 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
1750b4f1bd2544c3596239a68cd4645a0be02c56 03-Dec-2009 Anders Carlsson <andersca@mac.com> Revert r90402 for now, virt.cpp is failing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90406 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c5fd78a5e1cbff15b6c1630e34ba8e1f5e4ba6a1 03-Dec-2009 Anders Carlsson <andersca@mac.com> Use Eli's ComputeThunkAdjustment for calculating the return adjustment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90402 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
b5b32f5292a8c4e1be8fd5c2865ce48767ec63d5 03-Dec-2009 Anders Carlsson <andersca@mac.com> Use Eli's ComputeThunkAdjustment for calculating the return adjustment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90402 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
176aa2ee773f9d729247faea8b21eb5877beae37 03-Dec-2009 Anders Carlsson <andersca@mac.com> Add CodeGenModule::ComputeThunkAdjustment, which Eli wrote.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90401 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenModule.h
9fcfc421d3bf124beed5b185b8d6d795edcbf83a 03-Dec-2009 Anders Carlsson <andersca@mac.com> Add CodeGenModule::ComputeThunkAdjustment, which Eli wrote.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90401 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
odeGenModule.h
e281a3f8bce97dc42185c80360221143bdb65cb5 03-Dec-2009 Anders Carlsson <andersca@mac.com> Remove the index from the Thunk struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90400 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
3b908ce403318fbf38932c7ab566ed3a8d6ee85d 03-Dec-2009 Anders Carlsson <andersca@mac.com> Remove the index from the Thunk struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90400 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
1415746e565add49204ae1c888403cba6a9a6c85 03-Dec-2009 Anders Carlsson <andersca@mac.com> Change the Thunks map to use the vtable index as the key.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90399 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
491b95577b03b8583831b3d906fa246f00e69c20 03-Dec-2009 Anders Carlsson <andersca@mac.com> Change the Thunks map to use the vtable index as the key.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90399 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
deb82d728f28ccb0f79a7bed59cbbd48c7270e00 03-Dec-2009 Anders Carlsson <andersca@mac.com> Add the global decl to the Thunk struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90398 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6fd247bf89707fd79597408432b1e4b01a56f615 03-Dec-2009 Anders Carlsson <andersca@mac.com> Add the global decl to the Thunk struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90398 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
5c318ad110cb04b6e1f835f379710ddc3092815e 03-Dec-2009 Anders Carlsson <andersca@mac.com> Remove unused struct fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90397 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
1345f4aa9c1d707305cc4f87e231d268b3edc2d2 03-Dec-2009 Anders Carlsson <andersca@mac.com> Remove unused struct fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90397 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
5ee771486b5190e8173a2d7191ea7d367746fad2 03-Dec-2009 Anders Carlsson <andersca@mac.com> Delay computing the return adjustments for covariant thunks until when they are added to the vtable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90396 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
891bb4b6a51346838e15c4c381d782e800fb3390 03-Dec-2009 Anders Carlsson <andersca@mac.com> Delay computing the return adjustments for covariant thunks until when they are added to the vtable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90396 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
ff5eec22edfc07d5e6dd08ebfbaa6ef6feeeb1f9 03-Dec-2009 Anders Carlsson <andersca@mac.com> No need to create the covariant thunk in both places now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90394 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
bc0e3396c441015a77ccd18bf507fd8c784c76f5 03-Dec-2009 Anders Carlsson <andersca@mac.com> No need to create the covariant thunk in both places now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90394 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
86e074b792322b25700725f8bb9ad6e3ae92f259 03-Dec-2009 Anders Carlsson <andersca@mac.com> Whoops, forgot to save :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90393 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
1db4a9b11b459bbd777806bdee6fa341f134187f 03-Dec-2009 Anders Carlsson <andersca@mac.com> Whoops, forgot to save :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90393 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
4a3219b56a27e8837caddfbb8a52fec22328ba9d 03-Dec-2009 Anders Carlsson <andersca@mac.com> Remove the index field from the CovariantThunk structure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90392 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
5f96bc1281133d325f7f28037e5cdddc88de76fa 03-Dec-2009 Anders Carlsson <andersca@mac.com> Remove the index field from the CovariantThunk structure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90392 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
861d94761c130a8f91156547a27cbb4109eb5bbf 03-Dec-2009 Anders Carlsson <andersca@mac.com> Change the CovariantThunk map to use the vtable index as its key.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90391 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d6f7af5087ff637d559b815f5f2dd748677185da 03-Dec-2009 Anders Carlsson <andersca@mac.com> Change the CovariantThunk map to use the vtable index as its key.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90391 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
133b17e09688adf0687ecbe2c4a26ff19fdbff8a 03-Dec-2009 Anders Carlsson <andersca@mac.com> Store a GlobalDecl in the return adjustment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90387 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
bdd8e38385f2d2accd4b0acf98a280525990cb6c 03-Dec-2009 Anders Carlsson <andersca@mac.com> Store a GlobalDecl in the return adjustment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90387 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f2e42d3726138e9e18988d3b2c452bb982da2dc8 03-Dec-2009 Anders Carlsson <andersca@mac.com> Do not include the 'this' pointer adjustment in the covariant return type. Instead, store it in the (now oddly named) Thunks map.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90386 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d8ddffc6d129a2b76639042bb1b581fd742f81ec 03-Dec-2009 Anders Carlsson <andersca@mac.com> Do not include the 'this' pointer adjustment in the covariant return type. Instead, store it in the (now oddly named) Thunks map.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90386 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
3f189e0b8704753a781e65a6144c3bcb5a7d4bcc 03-Dec-2009 Anders Carlsson <andersca@mac.com> Move VtableBuilder::OverrideMethod out of line in preparation of other changes to it. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90382 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
27682a3e9339168ec42c0d6a1dd82ee9d75ecced 03-Dec-2009 Anders Carlsson <andersca@mac.com> Move VtableBuilder::OverrideMethod out of line in preparation of other changes to it. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90382 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
c540e0fc59cff66f9159f8189df6ec79a6b5895c 03-Dec-2009 Mike Stump <mrs@apple.com> Remove untrue statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90377 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
6b85fa41214d9d3e8ef635f964fdc1c74f4702d6 03-Dec-2009 Mike Stump <mrs@apple.com> Remove untrue statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90377 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
7f9d85865f0b94882a8f23f188f8e242f37345d3 03-Dec-2009 Mike Stump <mrs@apple.com> Note a failure I saw from the g++ testsuite:

FAIL: g++.old-deja/g++.mike/eh23.C (test for excess errors)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90374 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
7087d75db1df40b450ebe59acad8d15550348e02 03-Dec-2009 Mike Stump <mrs@apple.com> Note a failure I saw from the g++ testsuite:

FAIL: g++.old-deja/g++.mike/eh23.C (test for excess errors)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90374 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
387447f3836dbf86ceecd47a93d593fdd54a98df 03-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Work-in-progress: teach mangler how to mangle thunks for destructors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90360 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
61d89b61d4f22a226139c36a88b4fe2f7a2e368f 03-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Work-in-progress: teach mangler how to mangle thunks for destructors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90360 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
e51e2d6892deed9bb2d150d9278a2541b474fdf4 03-Dec-2009 Mike Stump <mrs@apple.com> Cleanups on exceptional edges don't work at all, yet. This doesn't
catch very many of them and if we caught all of them, the errors would
be annoying. I'm working on this next. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90358 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
be7c144fcbcc27eec3efaab5f744e3591995dde1 03-Dec-2009 Mike Stump <mrs@apple.com> Cleanups on exceptional edges don't work at all, yet. This doesn't
catch very many of them and if we caught all of them, the errors would
be annoying. I'm working on this next. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90358 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
95d6549cc0cc68ae8219580f0309e323ffc50023 03-Dec-2009 Mike Stump <mrs@apple.com> Add a cleanup scope for each catch clause.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90357 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
f7f74675d4e63c4529a4b890c0dd62cf6dc4c476 03-Dec-2009 Mike Stump <mrs@apple.com> Add a cleanup scope for each catch clause.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90357 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
5769fcec59ff8109e66b9b53f71f50230311280f 03-Dec-2009 Mike Stump <mrs@apple.com> Add missing branch to exit. Seemingly obvious when I look at the
code, but to track this down was laborious.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90356 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
730203088e9909e304c4868cbca72ee2652335bf 03-Dec-2009 Mike Stump <mrs@apple.com> Add missing branch to exit. Seemingly obvious when I look at the
code, but to track this down was laborious.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90356 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
aa803cac1eede63cc8dfd1dd768f995a0c3d0767 02-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5522 and PR5666: fix a bunch of mangling issues with extern variables
and funcctions declared locally within a function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90344 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
7facf8408ff426be732b9eb62c58d42e6177dd7b 02-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5522 and PR5666: fix a bunch of mangling issues with extern variables
and funcctions declared locally within a function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90344 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
1a9eac538967971def36fee9fdfc51a2fab6a7dc 02-Dec-2009 Mike Stump <mrs@apple.com> Pull the terminate handler up so that we can use it for the catch
parameter setup code and set up the catch parameter setup code to
protect that code with terminate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90340 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
639787c8e989d4c5381da01cff156abf888817c2 02-Dec-2009 Mike Stump <mrs@apple.com> Pull the terminate handler up so that we can use it for the catch
parameter setup code and set up the catch parameter setup code to
protect that code with terminate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90340 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
dd8972e34a31a6b7486bf1e174cffd46efabb660 02-Dec-2009 Mike Stump <mrs@apple.com> Turn off for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90339 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
79336285af0bc55431c1df1bb7ea45c5b5bfb3c1 02-Dec-2009 Mike Stump <mrs@apple.com> Turn off for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90339 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
fc7b4fa1ba779d2ad159f86356f1c09df383aa74 02-Dec-2009 Mike Stump <mrs@apple.com> Put the Builder classes into the anonymous namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90335 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
GVtable.cpp
92f2fe2541c60d2130677a1613b0d5f257798b8f 02-Dec-2009 Mike Stump <mrs@apple.com> Put the Builder classes into the anonymous namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90335 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
GVtable.cpp
d60cad99e4fdac287de5e3cc192b6a7231d582b1 02-Dec-2009 Mike Stump <mrs@apple.com> Change rtti/Rtti to RTTI, as it is an acronym.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90334 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GExprCXX.cpp
GRTTI.cpp
GVtable.cpp
odeGenModule.h
angle.cpp
angle.h
de05057932cebc3f43911f87d75869cb7b705a19 02-Dec-2009 Mike Stump <mrs@apple.com> Change rtti/Rtti to RTTI, as it is an acronym.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90334 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GExprCXX.cpp
GRTTI.cpp
GVtable.cpp
odeGenModule.h
angle.cpp
angle.h
ac6cf307b539553014abefffa79579c3f3374e50 02-Dec-2009 Mike Stump <mrs@apple.com> Rename CGRtti.cpp to CGRTTI.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90331 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
GRtti.cpp
MakeLists.txt
0cb6c19e466e640853568386e35ee77b34ecbcea 02-Dec-2009 Mike Stump <mrs@apple.com> Rename CGRtti.cpp to CGRTTI.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90331 91177308-0d34-0410-b5e6-96231b3b80d8
GRTTI.cpp
GRtti.cpp
MakeLists.txt
d8f545b61ddf7ac127f1b2579bb4cf7fe07f2f02 02-Dec-2009 Mike Stump <mrs@apple.com> Avoid warning for getTerminateFn defined but not used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90330 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
c88b6735ea8d2c0c5126239c0761e0e139117349 02-Dec-2009 Mike Stump <mrs@apple.com> Avoid warning for getTerminateFn defined but not used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90330 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
c67e26d6407008c7107c1a31ff8a1d448a0013af 02-Dec-2009 Mike Stump <mrs@apple.com> terminate doesn't throw.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90308 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
666571afadd9dc472da9696377a05b50c9b3f2ab 02-Dec-2009 Mike Stump <mrs@apple.com> terminate doesn't throw.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90308 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
2be14eab373d21fc0c1d266a58bbbc8d4ae31ec2 02-Dec-2009 Mike Stump <mrs@apple.com> More exception handling improvements... WIP.

Highlights include:

Add a helper to generate __cxa_free_exception and _ZSt9terminatev.
Add a region to handle EH object deallocation for ctor failures for throw.
Add a terminate handler for __cxa_end_catch.
A framework for adding cleanup actions for the exceptional edges only.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90305 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.cpp
odeGenFunction.h
99533834ba8f3658559f334e68a518ebb6388cea 02-Dec-2009 Mike Stump <mrs@apple.com> More exception handling improvements... WIP.

Highlights include:

Add a helper to generate __cxa_free_exception and _ZSt9terminatev.
Add a region to handle EH object deallocation for ctor failures for throw.
Add a terminate handler for __cxa_end_catch.
A framework for adding cleanup actions for the exceptional edges only.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90305 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
odeGenFunction.cpp
odeGenFunction.h
be3a7a9b38fc6a7c637e9825ed53e96849a9b7df 02-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Added an assert.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90285 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
affe67eae3790c08aba524617d0a68ad618034ac 02-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> Added an assert.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90285 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
1ecd3477ba4d27c2772d4f1f3159e43f5493f7e5 01-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Make EmitStoreOfScalar generate a more sane representation of boolean stores.
"Fixes" PR5645.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90272 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
2b06d3485e20fffdeea7ebc0eb7dc9a489c3fb44 01-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Make EmitStoreOfScalar generate a more sane representation of boolean stores.
"Fixes" PR5645.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90272 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
154b0775e341447f49fc4ac44d2e1eef125500f7 01-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> (objc2 nonfragile-abi specific). If the translation unit includes an implementation
of a subclass (direct or indirect) of a weak_import root class, emit a weak reference
for the root class's metaclass (should complete radar 6815425).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90249 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0e93d259ad19a0f70d3536d4f0f49710af52a169 01-Dec-2009 Fariborz Jahanian <fjahanian@apple.com> (objc2 nonfragile-abi specific). If the translation unit includes an implementation
of a subclass (direct or indirect) of a weak_import root class, emit a weak reference
for the root class's metaclass (should complete radar 6815425).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90249 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
71d933f3d1c62e8bff5d1834b494fc57d1f4ce5f 01-Dec-2009 Eric Christopher <echristo@apple.com> Update for llvm intrinsics change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90208 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
91b59274439f776cdd545bd7bf5849fdb1842160 01-Dec-2009 Eric Christopher <echristo@apple.com> Update for llvm intrinsics change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90208 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
25124ae75261a2f27ca39b9c19345d3fa84afdd3 01-Dec-2009 Mike Stump <mrs@apple.com> Much work on try/catch statement. WIP.

Highlights include:

Fix __cxa_begin_catch so it now returns a value.
Added getUnwindResumeOrRethrowFn helper to build up calls to
_Unwind_Resume_or_Rethrow.
Broke out object copying code into CopyObject from EmitCXXThrowExpr.
Built up another version of CopyObject that can copy from memory for
use in the catch parameter code.
RTTI generation for type matching for catch.
Code to check for the type match for catch.
Code to generate the catch parameter, WIP, need make sure references
and pointers and copy ctors work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90205 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
0f590be3808365e851352543faa6acbece50b686 01-Dec-2009 Mike Stump <mrs@apple.com> Much work on try/catch statement. WIP.

Highlights include:

Fix __cxa_begin_catch so it now returns a value.
Added getUnwindResumeOrRethrowFn helper to build up calls to
_Unwind_Resume_or_Rethrow.
Broke out object copying code into CopyObject from EmitCXXThrowExpr.
Built up another version of CopyObject that can copy from memory for
use in the catch parameter code.
RTTI generation for type matching for catch.
Code to check for the type match for catch.
Code to generate the catch parameter, WIP, need make sure references
and pointers and copy ctors work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90205 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
79af29e9baa26318af6fda91db377c863c997412 01-Dec-2009 Anders Carlsson <andersca@mac.com> Have ASTRecordLayout keep track of the key function, in preparation of fixing a synthetic ctor/dtor bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90168 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
GVtable.cpp
GVtable.h
odeGenModule.cpp
odeGenTypes.h
1a5e0d7f18485e4fb958f96dcddff3e4486a4069 01-Dec-2009 Anders Carlsson <andersca@mac.com> Have ASTRecordLayout keep track of the key function, in preparation of fixing a synthetic ctor/dtor bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90168 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
GVtable.cpp
GVtable.h
odeGenModule.cpp
odeGenTypes.h
f6455cb541f076583f14043a739ec545521aa989 30-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> More support for virtual destructor calls.
Fixes pr5619


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90158 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
ba2253f234d27d3ecc5b2b88e9cd9198658eb312 30-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> More support for virtual destructor calls.
Fixes pr5619


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90158 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
f6138ccc86f11b8934fbef8d051573dd93089e47 30-Nov-2009 Mike Stump <mrs@apple.com> Reflow comments and fix 80-col violation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90152 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
f71d232ce5354bd2f0c94ded30fb936c2a3d968b 30-Nov-2009 Mike Stump <mrs@apple.com> Reflow comments and fix 80-col violation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90152 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
2441d0c3876fb61de8e67232eb1c0aa7fe4bb7bd 30-Nov-2009 Anders Carlsson <andersca@mac.com> Fix an assert.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90149 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0121fbdee132f6fcf957956ae5c18ff53fb1dde6 30-Nov-2009 Anders Carlsson <andersca@mac.com> Fix an assert.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90149 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
8736980d77112c3bdb2b4d366d94b9ead0d3519f 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Don't try to generate common globals for C++ files, instead of depending on the FE to set NoCommon, and simplify CodeGenOptions initialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90119 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
1bc5c03a7f08b04f4ac26abd705418aaf4109062 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Don't try to generate common globals for C++ files, instead of depending on the FE to set NoCommon, and simplify CodeGenOptions initialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90119 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
589a04ed4686c3837d8d10da8545ad830428c739 30-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup (no functionality change).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90105 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
76ed1f76f986a2c052654b81e2ed9dfb86dd79d8 30-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup (no functionality change).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90105 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
4f9e1a15272a9a33011cf1c9067598aaed223639 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Don't pass false (default) for isVolatile parameter to CreateLoad.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90098 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GExpr.cpp
GExprScalar.cpp
GObjCMac.cpp
2da84ff228a231adbd3f6f236b857f752d02959a 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Don't pass false (default) for isVolatile parameter to CreateLoad.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90098 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GExpr.cpp
GExprScalar.cpp
GObjCMac.cpp
3453fcd0af8b1daf1095f293ed02b5e0bf4dece6 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Explicitly use setVolatile instead of extra IRBuilder argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90095 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
007b56738b00426688ee85baa75174358bd849f9 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Explicitly use setVolatile instead of extra IRBuilder argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90095 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
62d097577ba3363141077603803167de29bf193b 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Don't pass false (default) for isVolatile parameter to CreateStore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90094 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
7fda03b2543bd4ec7421058088aea2242885e1f9 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Don't pass false (default) for isVolatile parameter to CreateStore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90094 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
d9fcd50f04fa7d6760a742d3c010273db7b00bcc 29-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Simplify code. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90087 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
56a44f7db048032e21b55a89453cbd8c4079077d 29-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Simplify code. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90087 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
c481191979b4ca7f2c5511ce9cc4d0fe65fd1d46 29-Nov-2009 Sean Hunt <rideau3@gmail.com> Add DeclarationName support for C++0x operator literals. They should now work as
function names outside of templates - they'll probably cause some damage there as
they're largely untested.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90064 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
3e518bda00d710754ca077cf9be8dd821e16a854 29-Nov-2009 Sean Hunt <rideau3@gmail.com> Add DeclarationName support for C++0x operator literals. They should now work as
function names outside of templates - they'll probably cause some damage there as
they're largely untested.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90064 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
97306e57626414a11dbaeda3f03069d16a8ec46d 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Change LangOptions::ObjCConstantStringClass to an std::string to avoid worrying about the lifetime.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90052 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
1b0969590e712d7d52fc9c0d43d3ab85c36d07a6 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Change LangOptions::ObjCConstantStringClass to an std::string to avoid worrying about the lifetime.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90052 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
42c06b5340576b23978aaea160013c7edbb2b27f 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move MainFileName option variable into CodeGenOptions instead of LangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90051 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7d065d0f21b35f445cee13730398bc2bec6edff2 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move MainFileName option variable into CodeGenOptions instead of LangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90051 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
27bfc13423e9aa70bce84e04ae98ade156b2960d 28-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove remaining VISIBILITY_HIDDEN from anonymous namespaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90044 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GVtable.cpp
angle.cpp
oduleBuilder.cpp
85b4521e34dcd4a0a4a1f0819e1123128e5a3125 28-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove remaining VISIBILITY_HIDDEN from anonymous namespaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90044 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GVtable.cpp
angle.cpp
oduleBuilder.cpp
b5d156c0684c25e42b13bf9322e192b499ae7e5b 28-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Tests now pass with the assertion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90026 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
fa3e82ba04d175c89d622440def682f651542061 28-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Tests now pass with the assertion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90026 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
30ed1830e56bef4dd8bce5a4fa9c37bd7a1b572e 28-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Add a much more thorough test of casts to virtual bases, and fix
GetCXXBaseClassOffset to actually pass the test.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90025 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
8432f25cb242cbc809f9b10672e8e2074d362f80 28-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Add a much more thorough test of casts to virtual bases, and fix
GetCXXBaseClassOffset to actually pass the test.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90025 91177308-0d34-0410-b5e6-96231b3b80d8
GClass.cpp
4008612f6651ff55ca70c11029021c1bf7fcfa4d 28-Nov-2009 Anders Carlsson <andersca@mac.com> We always want to create a virtual function pointer entry if the path from the derived return value to the base overridden return value contains a virtual base class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90024 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
724e3e24ddf968d364b4e3dcff022377a8a72328 28-Nov-2009 Anders Carlsson <andersca@mac.com> We always want to create a virtual function pointer entry if the path from the derived return value to the base overridden return value contains a virtual base class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90024 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
30da7ec4f5f13002c499718a61fb2d5364bd2a58 27-Nov-2009 Anders Carlsson <andersca@mac.com> Move the vtable builder to an anonymous namespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90021 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
27f69d0793978d92aba2ac68a41353f73cbdcaf2 27-Nov-2009 Anders Carlsson <andersca@mac.com> Move the vtable builder to an anonymous namespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90021 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a50e98ba67a9280017df469aa58d9bb01de36a4e 27-Nov-2009 Anders Carlsson <andersca@mac.com> Don't build the entire vtable when all we want is the index of a virtual method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90017 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprConstant.cpp
GVtable.cpp
GVtable.h
d6b07fb9ca2c3207773de1d8e305f99076598a2e 27-Nov-2009 Anders Carlsson <andersca@mac.com> Don't build the entire vtable when all we want is the index of a virtual method.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90017 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprConstant.cpp
GVtable.cpp
GVtable.h
bd51bc6d0808f8f08b26561d704d0bba3754cc39 27-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Add case for CK_DerivedToBaseMemberPointer cast kind to
AggExprEmitter::VisitCastExpr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89988 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
c6fdb7765fc872eea8dfc5fb0ee984c0fbac1068 27-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Add case for CK_DerivedToBaseMemberPointer cast kind to
AggExprEmitter::VisitCastExpr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89988 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
13cf977e8adae4823d644c73285fa4b7ec74f9be 27-Nov-2009 Eli Friedman <eli.friedman@gmail.com> More work on ScalarExprEmitter::EmitCastExpr: for every cast kind, either
implement it explicitly or assert that it doesn't make sense for a scalar.
This caught a couple interesting issues: one, CK_BaseToDerivedMemberPointer
casts were getting silently miscompiled, and two, Sema was constructing some
strange implicit casts of type CK_UserDefinedConversion.

The change in SemaExprCXX makes sure the cast kinds are getting set correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89987 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
d888962cff03b543fbe9ac6051ec6addf5b993b4 27-Nov-2009 Eli Friedman <eli.friedman@gmail.com> More work on ScalarExprEmitter::EmitCastExpr: for every cast kind, either
implement it explicitly or assert that it doesn't make sense for a scalar.
This caught a couple interesting issues: one, CK_BaseToDerivedMemberPointer
casts were getting silently miscompiled, and two, Sema was constructing some
strange implicit casts of type CK_UserDefinedConversion.

The change in SemaExprCXX makes sure the cast kinds are getting set correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89987 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
303eddbc14f694ae5e42825ca2934953ce174ec0 27-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Cleanup for ScalarExprEmitter::EmitCastExpr; no functional changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89986 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
8c3e7e7ddafe26f236741fb25e2898be4f3230ea 27-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Cleanup for ScalarExprEmitter::EmitCastExpr; no functional changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89986 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
a9cb38b724dc2e39006fb61519bf56ee3ddb79e9 27-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5594: use EmitGlobalDefinition instead of EmitCXXDestructor so that
we check whether the vtable needs to be generated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89984 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
c16668acc904bec0ee20f6bfc2a72d6a3821a589 27-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5594: use EmitGlobalDefinition instead of EmitCXXDestructor so that
we check whether the vtable needs to be generated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89984 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
0c78f6069e657541050535ff1383fb1ada3fdcda 26-Nov-2009 Anders Carlsson <andersca@mac.com> Lazily create the __cxa_pure_virtual reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89965 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6d4ccb729c8073731439eafd272d257dac51f69a 26-Nov-2009 Anders Carlsson <andersca@mac.com> Lazily create the __cxa_pure_virtual reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89965 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e9200a08f1dd534dd5a8c3b1826ed86232599060 26-Nov-2009 Anders Carlsson <andersca@mac.com> Use the new CovariantThunkAdjustment in the vtable builder.

Make the pure virtual methods map a set instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89961 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
5dd730ae2935fa078466a95e005e781654305b86 26-Nov-2009 Anders Carlsson <andersca@mac.com> Use the new CovariantThunkAdjustment in the vtable builder.

Make the pure virtual methods map a set instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89961 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
8da55a5df1849f68732a42cc82ce1c2517d3b33f 26-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove dead forward declaration. Fix struct/class mismatch. Remove trailing whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89947 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.h
39411b9e90f17124ed41fd0c621538ec9d97af70 26-Nov-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove dead forward declaration. Fix struct/class mismatch. Remove trailing whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89947 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.h
7937d270c952c2a94f322e96f94237e5a5b62e3a 26-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Remove unused variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89945 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
552a43b2977493c2e5daf5331fba90ed966d9c8e 26-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Remove unused variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89945 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
4710484136b646809963015f42a47055ee3f7d39 26-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Shortcut explicit calls to a trivial copy assignment operator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89944 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
ae32e2459edad5cd13384c70a726d7ecb78c9b5c 26-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Shortcut explicit calls to a trivial copy assignment operator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89944 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
bde4fbf5c6345a55f9dcb3102604c8860437fef9 26-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Simplify and fix up the handling of implicit constructors, copy assignment
operators, and destructors. Avoids generating declarations/definitions of
trivial constructors/destructors, and makes sure the trivial copy assignment
operator is generated when necessary.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89943 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
15233e5a4d98b66b3c6cfcc4e6413ad776a79481 26-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Simplify and fix up the handling of implicit constructors, copy assignment
operators, and destructors. Avoids generating declarations/definitions of
trivial constructors/destructors, and makes sure the trivial copy assignment
operator is generated when necessary.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89943 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
2474289690b8d1ac4c703f0b63cafb3007fb6b3b 26-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Implement IRGen for MemberExpr referring to static member function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89938 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
9a14630714da7176c981e3c8d050f82bc42c2643 26-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Implement IRGen for MemberExpr referring to static member function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89938 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
f0ee01b9729b0b715ea37bff0599e240c26a7b8f 26-Nov-2009 Anders Carlsson <andersca@mac.com> Add a Thunk struct to the vtable builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89935 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
db13151d17e0387056dbaa0eaed6d165fc590116 26-Nov-2009 Anders Carlsson <andersca@mac.com> Add a Thunk struct to the vtable builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89935 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a1afb16173044cd8ea978981c953d86ba78a7af8 26-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Use the more general Evaluate infrastructure for folding constant DeclRefs
instead of checking explicitly for an EnumConstantDecl. This folds references
to constant integer VarDecls, which has two benefits:

1. Slightly smaller emitted code from emitting a constant instead of a load,
and skipping emitting some constant globals.
2. Some code forgets to define static constant member variables; emitting a
load instead of the value in that case leads to a link error. (Such programs
are technically not well-formed, but in practice build with g++.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89934 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
28665272c36cccb1014a6ea1217354b0519e2b59 26-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Use the more general Evaluate infrastructure for folding constant DeclRefs
instead of checking explicitly for an EnumConstantDecl. This folds references
to constant integer VarDecls, which has two benefits:

1. Slightly smaller emitted code from emitting a constant instead of a load,
and skipping emitting some constant globals.
2. Some code forgets to define static constant member variables; emitting a
load instead of the value in that case leads to a link error. (Such programs
are technically not well-formed, but in practice build with g++.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89934 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
9927a7bae0520f02e36a5b806ebc8e59a3a1b276 26-Nov-2009 Anders Carlsson <andersca@mac.com> Add a CovariantThunkAdjustment struct that represents the adjustments needed for a covariant thunk.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89933 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
GVtable.h
odeGenFunction.h
odeGenModule.h
angle.cpp
angle.h
7622cd3410846d28862ecfe862117894a259a7fa 26-Nov-2009 Anders Carlsson <andersca@mac.com> Add a CovariantThunkAdjustment struct that represents the adjustments needed for a covariant thunk.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89933 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
GVtable.h
odeGenFunction.h
odeGenModule.h
angle.cpp
angle.h
548b8c151947b79a72cd19330e59bf6c4076d6b2 26-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Use new getLinkage() method to correctly compute whether a variable has
internal linkage. Fixes PR5433.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89931 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
bd94ab9a19cb4bed55ecae9558533da9606bedcf 26-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Use new getLinkage() method to correctly compute whether a variable has
internal linkage. Fixes PR5433.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89931 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
eac2445c1d95af4b5f6f1d238d5ba9bdc00aad0b 26-Nov-2009 Anders Carlsson <andersca@mac.com> Move the mangler into the CodeGen namespace. Change mangleThunk to take a ThunkAdjustment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89930 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.h
angle.cpp
angle.h
b73a5be8a85f1823c6e63f85dafaca413d6de40c 26-Nov-2009 Anders Carlsson <andersca@mac.com> Move the mangler into the CodeGen namespace. Change mangleThunk to take a ThunkAdjustment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89930 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.h
angle.cpp
angle.h
43ac12f3386653dc213db0b1c40e8d450dacfac5 26-Nov-2009 Anders Carlsson <andersca@mac.com> Add a ThunkAdjustment struct which holds a non-virtual and a virtual adjustment offset. Start using it. General cleanup in Mangle.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89925 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
GVtable.h
odeGenFunction.h
odeGenModule.h
angle.cpp
angle.h
a94822e8937eeb340a653b88024f805a07a2d2ee 26-Nov-2009 Anders Carlsson <andersca@mac.com> Add a ThunkAdjustment struct which holds a non-virtual and a virtual adjustment offset. Start using it. General cleanup in Mangle.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89925 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
GVtable.h
odeGenFunction.h
odeGenModule.h
angle.cpp
angle.h
9faa6c1e9b03d8dc29bf8274f14de1cd07d0f307 25-Nov-2009 Devang Patel <dpatel@apple.com> Use StringRef (again) in DebugInfo interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89867 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7362162e635942fc6efa1a5bd63fe734479e0eb6 25-Nov-2009 Devang Patel <dpatel@apple.com> Use StringRef (again) in DebugInfo interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89867 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b1226d7c5a33c50598bbdbf4f52df02d723ac8a1 25-Nov-2009 Anders Carlsson <andersca@mac.com> Add VTT parameter to base ctors/dtors with virtual bases. (They aren't used yet).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89835 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCall.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenTypes.h
f6c56e2323c3f973253805a2f35629f3253ebed4 25-Nov-2009 Anders Carlsson <andersca@mac.com> Add VTT parameter to base ctors/dtors with virtual bases. (They aren't used yet).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89835 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCall.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenTypes.h
6a4813857c96df35367578e3f1181a43a2920abd 25-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Implement proper cleanup semantics for condition variables in for
statements, e.g.,

for(; X x = X(); ) { ... }

Daniel or Anders, please review!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89832 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
d975206755e26a391f4a1cd8bf8f96a6a65b05e6 25-Nov-2009 Douglas Gregor <dgregor@apple.com> Implement proper cleanup semantics for condition variables in for
statements, e.g.,

for(; X x = X(); ) { ... }

Daniel or Anders, please review!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89832 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
e16949907574662cb76b58caf13b1a4601276bc5 25-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate CXXConditionDeclExpr with extreme prejudice.

All statements that involve conditions can now hold on to a separate
condition declaration (a VarDecl), and will use a DeclRefExpr
referring to that VarDecl for the condition expression. ForStmts now
have such a VarDecl (I'd missed those in previous commits).

Also, since this change reworks the Action interface for
if/while/switch/for, use FullExprArg for the full expressions in those
expressions, to ensure that we're emitting

Note that we are (still) not generating the right cleanups for
condition variables in for statements. That will be a follow-on
commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89817 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GStmt.cpp
odeGenFunction.h
99e9b4d172f6877e6ba5ebe75bb8238721f5e01c 25-Nov-2009 Douglas Gregor <dgregor@apple.com> Eliminate CXXConditionDeclExpr with extreme prejudice.

All statements that involve conditions can now hold on to a separate
condition declaration (a VarDecl), and will use a DeclRefExpr
referring to that VarDecl for the condition expression. ForStmts now
have such a VarDecl (I'd missed those in previous commits).

Also, since this change reworks the Action interface for
if/while/switch/for, use FullExprArg for the full expressions in those
expressions, to ensure that we're emitting

Note that we are (still) not generating the right cleanups for
condition variables in for statements. That will be a follow-on
commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89817 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GStmt.cpp
odeGenFunction.h
64ba265d4b05c2621add63b6d5959ac321bd5dc3 24-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Clean up the AST for while loops and fix several problems with
cleanups for while loops:

1) Make sure that we destroy the condition variable of a while statement each time through the loop for, e.g.,

while (shared_ptr<WorkInt> p = getWorkItem()) {
// ...
}

2) Make sure that we always enter a new cleanup scope for the body of the while loop, even when there is no compound expression, e.g.,

while (blah)
RAIIObject raii(blah+1);



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89800 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
5656e14d91405417182171a705ed3e3d2d6d7aa3 24-Nov-2009 Douglas Gregor <dgregor@apple.com> Clean up the AST for while loops and fix several problems with
cleanups for while loops:

1) Make sure that we destroy the condition variable of a while statement each time through the loop for, e.g.,

while (shared_ptr<WorkInt> p = getWorkItem()) {
// ...
}

2) Make sure that we always enter a new cleanup scope for the body of the while loop, even when there is no compound expression, e.g.,

while (blah)
RAIIObject raii(blah+1);



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89800 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
c341016c9cd92ed64071b3659f29fab2530c8746 24-Nov-2009 Anders Carlsson <andersca@mac.com> Handle references correctly when synthesizing copy constructors.

With this change, the clang-on-clang test result is now

Expected Passes : 224
Unexpected Failures: 37

Which means that we can compile over 80% of clang with clang! :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89799 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
e9cbf15b2ebedebc8bb8e162bb5cf25abd70f578 24-Nov-2009 Anders Carlsson <andersca@mac.com> Handle references correctly when synthesizing copy constructors.

With this change, the clang-on-clang test result is now

Expected Passes : 224
Unexpected Failures: 37

Which means that we can compile over 80% of clang with clang! :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89799 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
5160c9859cae17bc27ec672d39bcf51faf82a442 24-Nov-2009 Anders Carlsson <andersca@mac.com> Handle cases where we're constructing an array of objects and the constructor has default arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89783 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprCXX.cpp
odeGenFunction.h
5d4d946ec2d88696fd8422aeb64dc29688e6a2c1 24-Nov-2009 Anders Carlsson <andersca@mac.com> Handle cases where we're constructing an array of objects and the constructor has default arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89783 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprCXX.cpp
odeGenFunction.h
a4b8172b40e73af01884d28c0e832ab117951eb6 24-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Explicitly store the condition variable within switch statements, and
make sure that this variable is destroyed when we exit the switch
statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89776 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
d3d5301c44138b92bf01286183f5bf310cdd37cf 24-Nov-2009 Douglas Gregor <dgregor@apple.com> Explicitly store the condition variable within switch statements, and
make sure that this variable is destroyed when we exit the switch
statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89776 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
e412cbe02b0727d1c1f2d55a9622a2891f1e611f 24-Nov-2009 Anders Carlsson <andersca@mac.com> We always need to emit the base expression of a member expression, even when the member decl refers to an enum. Thanks to Eli for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89775 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
c102297fb2857ef1af191a8e85e842cc3ac3239e 24-Nov-2009 Anders Carlsson <andersca@mac.com> We always need to emit the base expression of a member expression, even when the member decl refers to an enum. Thanks to Eli for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89775 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
654728c0b1b777b2dbba8ea295cce82c6a5a7bfe 24-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce cleanup scopes for "if" statements in two places:
- Outside the "if", to ensure that we destroy the condition variable
at the end of the "if" statement rather than at the end of the
block containing the "if" statement.
- Inside the "then" and "else" branches, so that we emit then- or
else-local cleanups at the end of the corresponding block when the
block is not a compound statement.

To make adding these new cleanup scopes easier (and since
switch/do/while will all need the same treatment), added the
CleanupScope RAII object to introduce a new cleanup scope and make
sure it gets cleaned up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89773 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
01234bbc1cb94946df8046ad95e17537082b4f71 24-Nov-2009 Douglas Gregor <dgregor@apple.com> Introduce cleanup scopes for "if" statements in two places:
- Outside the "if", to ensure that we destroy the condition variable
at the end of the "if" statement rather than at the end of the
block containing the "if" statement.
- Inside the "then" and "else" branches, so that we emit then- or
else-local cleanups at the end of the corresponding block when the
block is not a compound statement.

To make adding these new cleanup scopes easier (and since
switch/do/while will all need the same treatment), added the
CleanupScope RAII object to introduce a new cleanup scope and make
sure it gets cleaned up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89773 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
24e158241e1ffcf341c8c32efcbf5ee69a7c66a0 24-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Rename CleanupScope -> DelayedCleanupBlock. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89769 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
odeGenFunction.h
d5782d5013ef5dbe033d1c3d1334e01c5996e06b 24-Nov-2009 Douglas Gregor <dgregor@apple.com> Rename CleanupScope -> DelayedCleanupBlock. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89769 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
odeGenFunction.h
de1bdfaa327cc7000d9c8cb09708a3ef37475f94 24-Nov-2009 Anders Carlsson <andersca@mac.com> Get rid of the ugly CGCXX names and replace them with CGClass, CGExprCXX and CGTemporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89742 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXClass.cpp
GCXXExpr.cpp
GCXXTemp.cpp
GClass.cpp
GExprCXX.cpp
GTemporaries.cpp
MakeLists.txt
5b955920c1d8f2cd35aae3c85b656578286a8bc1 24-Nov-2009 Anders Carlsson <andersca@mac.com> Get rid of the ugly CGCXX names and replace them with CGClass, CGExprCXX and CGTemporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89742 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXClass.cpp
GCXXExpr.cpp
GCXXTemp.cpp
GClass.cpp
GExprCXX.cpp
GTemporaries.cpp
MakeLists.txt
ea483eed55eb05cb31f8186b4055f089600474e7 24-Nov-2009 Anders Carlsson <andersca@mac.com> When mangling a ctor/dtor we need to take into consideration whether it's a member template.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89741 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
7e120030a07ad8c4365526b1c5cd22a641297635 24-Nov-2009 Anders Carlsson <andersca@mac.com> When mangling a ctor/dtor we need to take into consideration whether it's a member template.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89741 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
76bb397708cae8afe4a7eff3033892806eb6e89f 24-Nov-2009 Anders Carlsson <andersca@mac.com> Ignore constructor member templates in CodeGenModule::EmitTopLevelDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89737 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
1fe598c026dc03fddbd65efb8119eb1afd9b1520 24-Nov-2009 Anders Carlsson <andersca@mac.com> Ignore constructor member templates in CodeGenModule::EmitTopLevelDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89737 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
35d7179b33c1716150f29fb391bbd9db7e096ccc 24-Nov-2009 Anders Carlsson <andersca@mac.com> It is common for vtables to contain pointers to functions that have either incomplete return types or incomplete argument types.

Handle this by returning the llvm::OpaqueType for those cases, which CodeGenModule::GetOrCreateLLVMFunction knows about, and treats as being an "incomplete function".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89736 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GVtable.cpp
odeGenTypes.h
ecf282b0486873309fd58ec4d3ec0dbf983b33d4 24-Nov-2009 Anders Carlsson <andersca@mac.com> It is common for vtables to contain pointers to functions that have either incomplete return types or incomplete argument types.

Handle this by returning the llvm::OpaqueType for those cases, which CodeGenModule::GetOrCreateLLVMFunction knows about, and treats as being an "incomplete function".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89736 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GVtable.cpp
odeGenTypes.h
ccb5a3248dbe899ccd0081c0b4e62e2842956496 24-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Explicitly track the condition variable within an "if" statement,
rather than burying it in a CXXConditionDeclExpr (that occassionally
hides behind implicit conversions). Similar changes for
switch, while, and do-while will follow, then the removal of
CXXConditionDeclExpr. This commit is the canary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89717 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
8cfe5a784133d90bf329fd20801824a6f71bb8ca 24-Nov-2009 Douglas Gregor <dgregor@apple.com> Explicitly track the condition variable within an "if" statement,
rather than burying it in a CXXConditionDeclExpr (that occassionally
hides behind implicit conversions). Similar changes for
switch, while, and do-while will follow, then the removal of
CXXConditionDeclExpr. This commit is the canary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89717 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
d26fc9652d72b52acf0f4758166f95b91ddb5610 23-Nov-2009 Anders Carlsson <andersca@mac.com> Don't try to treat an enum constant as an lvalue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89705 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
a1b29a74eb702067f18f4cac184bc705e915fd6b 23-Nov-2009 Anders Carlsson <andersca@mac.com> Don't try to treat an enum constant as an lvalue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89705 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
7deb1a5f25fa38306fec3b79129df808fdb90eb6 23-Nov-2009 Anders Carlsson <andersca@mac.com> Handle converting member pointers to bool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89692 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
bc0e0781da778bd5eb41a810419912893ae20448 23-Nov-2009 Anders Carlsson <andersca@mac.com> Handle converting member pointers to bool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89692 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
63b816f375e0f272b7cb929d9ee6ac6587acfabd 23-Nov-2009 Anders Carlsson <andersca@mac.com> Handle base-to-derived casts. Will land test case shortly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89678 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXClass.cpp
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
a3697c9c155bda93fd2802f37084b620f4738822 23-Nov-2009 Anders Carlsson <andersca@mac.com> Handle base-to-derived casts. Will land test case shortly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89678 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXClass.cpp
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
39e1291cdbae6ce02b7642b12dd39af8762cfa93 23-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Centralize and complete the computation of value- and type-dependence for DeclRefExprs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89649 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
0da76df9218d7c27b471b0a4d83a5b29fe24e5b4 23-Nov-2009 Douglas Gregor <dgregor@apple.com> Centralize and complete the computation of value- and type-dependence for DeclRefExprs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89649 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
6849c80a253a2a314a1111dce04015e6304454ce 23-Nov-2009 Daniel Dunbar <daniel@zuster.org> Teach CodeGenFunction::EmitDecl to ignore Using and UsingShadow decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89633 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
fa133a183cb546a70fd5b029db72cb8f8561bec2 23-Nov-2009 Daniel Dunbar <daniel@zuster.org> Teach CodeGenFunction::EmitDecl to ignore Using and UsingShadow decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89633 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
07740c01dddce0ca933d353b0107db51a22dc022 23-Nov-2009 Daniel Dunbar <daniel@zuster.org> x86_64, PR5582: Layout bases for C++ records.
- Ideally we would have an single iteration interface for this, but this works
for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89632 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
ce9f423d2ce4b8699d9f6c7623053f645ac4dc6d 23-Nov-2009 Daniel Dunbar <daniel@zuster.org> x86_64, PR5582: Layout bases for C++ records.
- Ideally we would have an single iteration interface for this, but this works
for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89632 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
5010ed8afe9528eb50d8612bd7a563bc29439170 22-Nov-2009 Anders Carlsson <andersca@mac.com> Use EmitStoreOfScalar when copying the scalar to the space allocated by 'new'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89613 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
09edb9c38cc7dc596d97d68ba6d23545c7ad3abd 22-Nov-2009 Anders Carlsson <andersca@mac.com> Use EmitStoreOfScalar when copying the scalar to the space allocated by 'new'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89613 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
d293e3654889134125522b243634353c6a8f4d02 22-Nov-2009 Anders Carlsson <andersca@mac.com> Support emitting aggregate class initializers. Fixes PR5581.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89569 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
01a79acd9a5a701c7ddb46174ddfcb0e54349f4a 22-Nov-2009 Anders Carlsson <andersca@mac.com> Support emitting aggregate class initializers. Fixes PR5581.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89569 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
a238d6daa15f845738a8b15a3bc9f5b84617744b 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
odeGenTypes.cpp
angle.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
odeGenTypes.cpp
angle.cpp
901c08cbe8e0e36a42c242b9e37bcc051dedcae9 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Mangler: Sketch mangling for TemplateArgument::Declaration kind.
- Several important FIXMEs related to whether arguments are expressions or external names, and the mangling of extern "C" names (c.f., PR5522).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89556 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
7e0c1957d19ab012e372c1e5e75a9264e3bacf41 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Mangler: Sketch mangling for TemplateArgument::Declaration kind.
- Several important FIXMEs related to whether arguments are expressions or external names, and the mangling of extern "C" names (c.f., PR5522).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89556 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
812fe14432a8254a7919b64d386af42f0a2c2839 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Mangler: Lift shouldMangleDeclName predicate out of CXXNameMangler::mangle.
- Sometimes we have to mangle things we wouldn't normally (e.g., because they appear in a template expression).

- This also tidies up the predicate to be more obvious what is getting mangled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89555 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
angle.cpp
angle.h
f981bf84ad7745861bc9c971f46417527e1e5db5 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Mangler: Lift shouldMangleDeclName predicate out of CXXNameMangler::mangle.
- Sometimes we have to mangle things we wouldn't normally (e.g., because they appear in a template expression).

- This also tidies up the predicate to be more obvious what is getting mangled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89555 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
angle.cpp
angle.h
565d88abf4dd92fbddd0df6b8357cf7b9c9d31f8 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Mangler: Strengthen invariants, MangleContext::mangleName should only be called on var or function decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89554 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
c02ab4c76d7f8e672cda266436d64dd23bd2ad26 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Mangler: Strengthen invariants, MangleContext::mangleName should only be called on var or function decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89554 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
28e7672aa5201a7d5314cc4167bc9393403c28ee 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Mangler: Inline a bunch of functions into their sole caller, not that I don't love typing for typings sake, but...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89553 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
c074771f7ff302dd96e2caa3c29ab6c94bef9f3b 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Mangler: Inline a bunch of functions into their sole caller, not that I don't love typing for typings sake, but...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89553 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
fbfd9a7a3c4fdae4a13df074bca6e5a8a0e69589 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89551 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
c7bced47fd68beee14cbc7ea7074cf524e666deb 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89551 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
2bd00d3541ce2f1fb0807ff920d805c159de99b2 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Mangler: Split isStdNamespace for when the caller already has a NamespaceDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89550 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
1308af913ecd176341caa506d8dfb637e1b25486 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Mangler: Split isStdNamespace for when the caller already has a NamespaceDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89550 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
8752e3ad54d526a3bb5b5f62e7d8229a2972ae1a 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> IRgen: Eliminate CXXNameMangler::mangleCXX{C,D}tor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89549 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
77939c995da4ec0ed6c7e5bc8afa901d8cea9001 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> IRgen: Eliminate CXXNameMangler::mangleCXX{C,D}tor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89549 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
bdc311de9b41767fa7b6ccb57afdb3b5093ac8e0 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> IRgen: Switch the C++ mangler interfaces to take the SmallVector to write into,
instead of requiring clients to make a raw_svector_ostream, which is just an
implementation detail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89548 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GRtti.cpp
GVtable.cpp
odeGenModule.cpp
angle.cpp
angle.h
94fd26de3ae77f29496ca22d5276b2fb71b2311d 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> IRgen: Switch the C++ mangler interfaces to take the SmallVector to write into,
instead of requiring clients to make a raw_svector_ostream, which is just an
implementation detail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89548 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GRtti.cpp
GVtable.cpp
odeGenModule.cpp
angle.cpp
angle.h
196278fae95c852c42bc13b07b90436fde6aef79 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Sink free mangle* methods into MangleContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89547 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GRtti.cpp
GVtable.cpp
odeGenModule.cpp
angle.cpp
angle.h
1b0771170921b9e752a50ea2cf87814bff92c834 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Sink free mangle* methods into MangleContext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89547 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GRtti.cpp
GVtable.cpp
odeGenModule.cpp
angle.cpp
angle.h
1457b662c1e3077882d96694812def392548dedc 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Delete trailing space.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89545 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
3c9e463762243affcb0223d853ba10e07e321747 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Delete trailing space.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89545 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
53529e8c71aa94b2ea008510a577d59ba8afe3f6 21-Nov-2009 Sean Hunt <rideau3@gmail.com> Added rudimentary C++0x attribute support.
The following attributes are currently supported in C++0x attribute
lists (and in GNU ones as well):
- align() - semantics believed to be conformant to n3000, except for
redeclarations and what entities it may apply to
- final - semantics believed to be conformant to CWG issue 817's proposed
wording, except for redeclarations
- noreturn - semantics believed to be conformant to n3000, except for
redeclarations
- carries_dependency - currently ignored (this is an optimization hint)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89543 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
bbd37c62e34db3f5a95c899723484a76c71d7757 21-Nov-2009 Sean Hunt <rideau3@gmail.com> Added rudimentary C++0x attribute support.
The following attributes are currently supported in C++0x attribute
lists (and in GNU ones as well):
- align() - semantics believed to be conformant to n3000, except for
redeclarations and what entities it may apply to
- final - semantics believed to be conformant to CWG issue 817's proposed
wording, except for redeclarations
- noreturn - semantics believed to be conformant to n3000, except for
redeclarations
- carries_dependency - currently ignored (this is an optimization hint)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89543 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
9ae4976e33e484b05a6ed1910a10570fcafce8f5 21-Nov-2009 Mike Stump <mrs@apple.com> Checkpoint current work. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89513 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GException.cpp
2bf701ee4babb5c4a9ea99ca4675c5ef040bd402 21-Nov-2009 Mike Stump <mrs@apple.com> Checkpoint current work. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89513 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GException.cpp
141ef6a860644304e8de38f5c0affd19bb8e899b 20-Nov-2009 Anders Carlsson <andersca@mac.com> Fix lifetime of conditional temporaries. Patch by Victor Zverovich!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89467 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
GExprAgg.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
a36bf8f74180e834c6bf2db867796fd5338495ab 20-Nov-2009 Anders Carlsson <andersca@mac.com> Fix lifetime of conditional temporaries. Patch by Victor Zverovich!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89467 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
GExprAgg.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
51691756e44db75d3b7e0f0c02be97a0a91897f4 20-Nov-2009 David Chisnall <csdavec@swan.ac.uk> Fixed crash when using undefined protocols (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89457 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
ff80fabfa42d4aadbbaab4d61fa518d80b5a981a 20-Nov-2009 David Chisnall <csdavec@swan.ac.uk> Fixed crash when using undefined protocols (GNU runtime).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89457 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
ed4210ebbd6fa2c97efad865ebe64892a2438d31 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
odeGenTypes.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
odeGenTypes.cpp
a62ad1741fabddfc0cc7c9377f963ad038d5b7ab 20-Nov-2009 Mike Stump <mrs@apple.com> Implement throw d, where d is a class type that requires copy
construction. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89442 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
d1abf673bf133bd779a94978286c92cef86d7d36 20-Nov-2009 Mike Stump <mrs@apple.com> Implement throw d, where d is a class type that requires copy
construction. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89442 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
b5ee634bbaa945cf15bd675969d3b33015539336 20-Nov-2009 Mike Stump <mrs@apple.com> Handle throw d, where d is a class type but only has a trivial copy
constructor. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89438 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
e36c9abd383267775a5079166e5e02119866c129 20-Nov-2009 Mike Stump <mrs@apple.com> Handle throw d, where d is a class type but only has a trivial copy
constructor. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89438 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
9d3bea8f07d7d747b30b54a058f7eee88b56436d 20-Nov-2009 Mike Stump <mrs@apple.com> Add suport for throw;. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89424 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
b4eea691866a3fa75722da9eba735c44f140398a 20-Nov-2009 Mike Stump <mrs@apple.com> Add suport for throw;. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89424 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
a968bdb78afce896f7df0e35a9e5861384ceafc8 20-Nov-2009 Mike Stump <mrs@apple.com> Fix rtti generation for throws. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89420 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
23886d0dd3294b7b84a171fc9231bdded7f52cd1 20-Nov-2009 Mike Stump <mrs@apple.com> Fix rtti generation for throws. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89420 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
1470804482d0b3c37989506e4068482a8d117b34 20-Nov-2009 Mike Stump <mrs@apple.com> Simplify rtti building code a little. Prep for reuse for throw rtti
generation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89416 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
GRtti.cpp
odeGenModule.h
7e1365a163cde50b1972f05db7884fb124e6b2d7 20-Nov-2009 Mike Stump <mrs@apple.com> Simplify rtti building code a little. Prep for reuse for throw rtti
generation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89416 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
GRtti.cpp
odeGenModule.h
8880ef7b7d4b010eb26d40cd195b8ee3b54b478a 20-Nov-2009 Mike Stump <mrs@apple.com> Fixup key function calculations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89412 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
odeGenModule.cpp
a84b4044b79f2cc424c6ae7ee5edb97e948ba806 20-Nov-2009 Mike Stump <mrs@apple.com> Fixup key function calculations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89412 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
odeGenModule.cpp
ccb556aedb901dfaad70f5ea8b815e7c47a533e6 19-Nov-2009 John McCall <rjmccall@apple.com> Draw a brighter line between "unresolved" expressions, where we have done the
appropriate lookup and simply can't resolve the referrent yet, and
"dependent scope" expressions, where we can't do the lookup yet because the
entity we need to look into is a dependent type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89402 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
865d447ac6a4721ab58e898d014a21f2eff74b06 19-Nov-2009 John McCall <rjmccall@apple.com> Draw a brighter line between "unresolved" expressions, where we have done the
appropriate lookup and simply can't resolve the referrent yet, and
"dependent scope" expressions, where we can't do the lookup yet because the
entity we need to look into is a dependent type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89402 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
ed0c6d6eb354354dffa3f6d6d203d65d5b2adca9 19-Nov-2009 Mike Stump <mrs@apple.com> Fixup address point computations. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89386 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
23a3542aaa0049f6510e0da89f547806de928408 19-Nov-2009 Mike Stump <mrs@apple.com> Fixup address point computations. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89386 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e4b7a1508e58cfd22f9ccd39ce5dc269d897ff53 19-Nov-2009 Mike Stump <mrs@apple.com> Refine vtable, rtti and rtti name instantiation so that they follow
the key function. All the code is wired up, but won't work yet, as I
had to turn off key function calculation as it doesn't work yet.

Also, we refine visibility of the vtable, rtti and rtti name to match
the class, as well as as arrange for all the symbols to be internal
for anonymous namespace entities.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89309 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
85615df8ccb51bc5a22cb941b06e5f36ad42eabe 19-Nov-2009 Mike Stump <mrs@apple.com> Refine vtable, rtti and rtti name instantiation so that they follow
the key function. All the code is wired up, but won't work yet, as I
had to turn off key function calculation as it doesn't work yet.

Also, we refine visibility of the vtable, rtti and rtti name to match
the class, as well as as arrange for all the symbols to be internal
for anonymous namespace entities.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89309 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
b3fc1ffeccb7461d0e3158dad33042c534eca19e 19-Nov-2009 Mike Stump <mrs@apple.com> This doesn't work yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89307 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
88bd0094d8784b0a6a785ddeca18e5061417dcce 19-Nov-2009 Mike Stump <mrs@apple.com> This doesn't work yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89307 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
47bef74f2d81563a21379bf75cfd00c28e08be63 19-Nov-2009 Mike Stump <mrs@apple.com> Improve instantiation control for rtti data and allow key functions to
instantiate a class. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89289 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
GVtable.cpp
GVtable.h
odeGenModule.cpp
58588943a8283baf17815d56275bdb381560970c 19-Nov-2009 Mike Stump <mrs@apple.com> Improve instantiation control for rtti data and allow key functions to
instantiate a class. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89289 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
GVtable.cpp
GVtable.h
odeGenModule.cpp
f69a4ed4ba048fff550db02a9ecef69a65c1f23e 19-Nov-2009 Mike Stump <mrs@apple.com> Refine linkage on thunks. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89287 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6be2b1798b452104d2f093fe010e39181da56cd9 19-Nov-2009 Mike Stump <mrs@apple.com> Refine linkage on thunks. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89287 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
a75a50907312e275714888c65c5cd6674b9b9e0e 18-Nov-2009 Mike Stump <mrs@apple.com> Reflow to fit 80-col.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89222 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
6d60ca9c5015a7e7eceab31bed24425aeb47db67 18-Nov-2009 Mike Stump <mrs@apple.com> Reflow to fit 80-col.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89222 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
0109007347bd82f9e73750979eab9fc2723f49f4 18-Nov-2009 Mike Stump <mrs@apple.com> Trim whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89219 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
19df37c55437bf3b8de85f93e55d05a57e900dff 18-Nov-2009 Mike Stump <mrs@apple.com> Trim whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89219 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
75761b69282777fbf48bc3987e71e3857b6dbc9a 18-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup to member pointer handling.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89201 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
25b825d1a48fb4d64cb553bef7a316469e89c46a 18-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup to member pointer handling.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89201 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
3ad1f5988ddc735fb4f108d741b3645cdcb970a0 18-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Clean up EmitPointerToDataMemberBinaryExpr a bit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89197 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
1c5c1a09a4a224c5c01f0a2a0d69224c8356f0be 18-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Clean up EmitPointerToDataMemberBinaryExpr a bit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89197 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
591e08c2146bca7de7a7ce78d0c6889c9453dcdb 18-Nov-2009 Mike Stump <mrs@apple.com> Set up vtable visibility appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89193 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e56ceca66c5fdd4374c589da5127510ffe66de35 18-Nov-2009 Mike Stump <mrs@apple.com> Set up vtable visibility appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89193 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
aace670360c8fa7ca18e5e2bc84423b04390ea0d 18-Nov-2009 Mike Stump <mrs@apple.com> Propagate hidden to the _ZTS symbols appropriately. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89191 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
582b037149f235caee7f71a5c8f81b868bd283ca 18-Nov-2009 Mike Stump <mrs@apple.com> Propagate hidden to the _ZTS symbols appropriately. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89191 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
1dbe324e0f0ba93bb9530d140ba8d33b150054a6 18-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Add an assertion to catch bad calls to EmitCallArgs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89190 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
44b0a3e858af7b19f489619e52cd58970611cd15 18-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Add an assertion to catch bad calls to EmitCallArgs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89190 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
f4765982b15dec1c0e2d07fcdb69ae15894397d3 18-Nov-2009 Mike Stump <mrs@apple.com> Be sure to set visibility for ZTI symbols for classes from the class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89186 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
88a4a62b8a18dc24006ef9d44e28de6c7dc987ba 18-Nov-2009 Mike Stump <mrs@apple.com> Be sure to set visibility for ZTI symbols for classes from the class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89186 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
8459e4649971a7a10b43ba22539783177b422657 18-Nov-2009 Mike Stump <mrs@apple.com> Make _ZTI symbols hidden. This speeds up the dynamic linker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89185 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
066b983348e06a5f9dbbb72041077bbf1a0fb9c1 18-Nov-2009 Mike Stump <mrs@apple.com> Make _ZTI symbols hidden. This speeds up the dynamic linker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89185 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
62e7426bd181773d616e78fa4c9b1afdaf7dcb3a 18-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Missing piece of r89173.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89174 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
4bf8152799ec41796f989ea1b94f6f1bac349117 18-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Missing piece of r89173.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89174 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
255ae6891b7fb8ce4419dec668bc295f53977e84 18-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Refactor emitting call to delete operator into common function EmitDeleteCall.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89173 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXExpr.cpp
5fe05986473c4ff780508dec4cd2cf4822168125 18-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Refactor emitting call to delete operator into common function EmitDeleteCall.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89173 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXExpr.cpp
4dc2b934b6d41d63242d5262d91e8214324fa76e 18-Nov-2009 Mike Stump <mrs@apple.com> Fix one last gotcha with typeid.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89172 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
2710c4159ff4761ba9867aca18f60a178b297686 18-Nov-2009 Mike Stump <mrs@apple.com> Fix one last gotcha with typeid.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89172 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
35eb2787623199bcb91ab0ab2c96830c3c6e4eec 18-Nov-2009 Mike Stump <mrs@apple.com> Cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89166 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
265df6267ca214a05d1098b53390c1a28cbb2424 18-Nov-2009 Mike Stump <mrs@apple.com> Cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89166 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
3e74d0b56ef0fc2399e9d5d0d0c4ef2c20989101 18-Nov-2009 Mike Stump <mrs@apple.com> Add rtti support for arrays, functiond without prototypes, vectors and
enums.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89165 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
ae9b2be5a3771a0d45cfaba171b80e5b0c71c6ca 18-Nov-2009 Mike Stump <mrs@apple.com> Add rtti support for arrays, functiond without prototypes, vectors and
enums.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89165 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
0ea9cc2033fb52cbb00d197b80d9c0049b984e8c 18-Nov-2009 Mike Stump <mrs@apple.com> Add rtti info for function prototypes and refactor. This allows
pointer to member functions to work. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89161 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
64989f04d13d9a4a62cc7ebee6351b7c4dbe2e74 18-Nov-2009 Mike Stump <mrs@apple.com> Add rtti info for function prototypes and refactor. This allows
pointer to member functions to work. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89161 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
f841685ad8560649f396109ca29770ace1d486fd 17-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> This patch finalizes implementatin of weak_import
objective-c2 classes (radar 6815425).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89157 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
269f8bc10a33e29e2951df7720cad0abb45c74cb 17-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> This patch finalizes implementatin of weak_import
objective-c2 classes (radar 6815425).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89157 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f677db6d5d693126447ce34d1d0b2bd3a31a93ad 17-Nov-2009 Mike Stump <mrs@apple.com> Add rtti support for pointer to data members.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89155 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
GRtti.cpp
5fae856de2520b63fd371c281a9d36c1547e17f3 17-Nov-2009 Mike Stump <mrs@apple.com> Add rtti support for pointer to data members.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89155 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
GRtti.cpp
92cf7da0d2075e88f0593328087a6a0d34dd9d08 17-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> More cases for weak_import objective-c2 classes.
(still radar 6815425).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89152 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
2cdcc4c4314b9db36028b10da8805fe02b1c85eb 17-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> More cases for weak_import objective-c2 classes.
(still radar 6815425).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89152 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
50f02e11a5011c816cc1c9cedb3a7af4d015c662 17-Nov-2009 Mike Stump <mrs@apple.com> Add rtti support for non-member pointers. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89148 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
61c38012571dbabf1bf8f12c31bb64af1fc8d1d5 17-Nov-2009 Mike Stump <mrs@apple.com> Add rtti support for non-member pointers. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89148 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
f7d070c6588884560d85ba78a8f9e306035301bb 17-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> More support for weak_import objective-c2 class.
(radar 6815425).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89146 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a03d0dd528573d0fc340370dc30ee7767c9cae9c 17-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> More support for weak_import objective-c2 class.
(radar 6815425).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89146 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
93e324813bd8c55ac19aaac0123eb4e294a6fa44 17-Nov-2009 David Chisnall <csdavec@swan.ac.uk> Added block type introspection support.

As per Fariborz's suggestion, committed now but can be reverted later if the used flag is problematic for Apple.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89134 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
5e530af5d51572a0ed5dbe50da54bd333840c63d 17-Nov-2009 David Chisnall <csdavec@swan.ac.uk> Added block type introspection support.

As per Fariborz's suggestion, committed now but can be reverted later if the used flag is problematic for Apple.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89134 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
791b95aa248234a1bf73b1c822a44019eda4bd28 17-Nov-2009 David Chisnall <csdavec@swan.ac.uk> Fixed bug where ivar offsets were being initialized as 0 with the fragile GNU ABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89133 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
aecbf24a6bad049437f8fec97e557d414003a3db 17-Nov-2009 David Chisnall <csdavec@swan.ac.uk> Fixed bug where ivar offsets were being initialized as 0 with the fragile GNU ABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89133 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
46e237d4f638a9ed90a8d9229a64ba60a4dacdbb 17-Nov-2009 John McCall <rjmccall@apple.com> Skip over shadow using decls during codegen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89079 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
9d0c6613ec040ad8d952556be909232a7f25dede 17-Nov-2009 John McCall <rjmccall@apple.com> Skip over shadow using decls during codegen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89079 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2fb7bee22e3174d9103071aee16fc9ab7affe879 17-Nov-2009 Anders Carlsson <andersca@mac.com> Unify the way destructor epilogues are generated for synthesized and regular destructors. Also fix PR5529.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89034 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
9f853df0d3c25c646907a7b7ef22398370def00f 17-Nov-2009 Anders Carlsson <andersca@mac.com> Unify the way destructor epilogues are generated for synthesized and regular destructors. Also fix PR5529.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89034 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
a614ba6902ec9f6e0ffd7c9aefb19907a1b11e59 17-Nov-2009 Anders Carlsson <andersca@mac.com> More const is always good.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89033 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
0ed303c918915cbe2c611cddbfabd00404664831 17-Nov-2009 Anders Carlsson <andersca@mac.com> More const is always good.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89033 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
f96ffb9373a5eb0ba5585bed984ce03dba5a76f5 17-Nov-2009 Mike Stump <mrs@apple.com> Fix typo. Thanks Ted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89031 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
fde17be1ca72e541308d228a5f837e2021ffa942 17-Nov-2009 Mike Stump <mrs@apple.com> Fix typo. Thanks Ted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89031 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
a70a34a95a85bd9868550a3fc97a829c1a74da73 17-Nov-2009 Mike Stump <mrs@apple.com> Add typeinfo support for T* and const T* for all builtin types T.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89030 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
21f5d5d74a1d8c750c29e5fc68fb45e4abfbae58 17-Nov-2009 Mike Stump <mrs@apple.com> Add typeinfo support for T* and const T* for all builtin types T.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89030 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
e1b7a10a61cc5f340d60dd10f888a7ddc1ae83ad 17-Nov-2009 Mike Stump <mrs@apple.com> Add typeid for the builtin types. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89028 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
GRtti.cpp
odeGenModule.h
ea2c0b5dec07c28222856e66177f0922c9f508b1 17-Nov-2009 Mike Stump <mrs@apple.com> Add typeid for the builtin types. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89028 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
GRtti.cpp
odeGenModule.h
eb3eca8695f72fd6a2b094d9f1e5f5c757978d3d 17-Nov-2009 Mike Stump <mrs@apple.com> Ensure we peer through () when handling typeid(*p).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89015 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
db519a4bb2082b98e03162ac1a4399978833643b 17-Nov-2009 Mike Stump <mrs@apple.com> Ensure we peer through () when handling typeid(*p).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89015 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
025ec76ed2d38ce3d11cf3ae8c94b486b3de279c 17-Nov-2009 Mike Stump <mrs@apple.com> Since we always have 2 edges, we don't need to reserve 3 slot for the
PHI node.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89005 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
14431c16d131560265254201df5ee575b8e3578f 17-Nov-2009 Mike Stump <mrs@apple.com> Since we always have 2 edges, we don't need to reserve 3 slot for the
PHI node.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89005 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
5e02a4223e0d9db537cc2c98a4378f40bde43c1c 17-Nov-2009 Mike Stump <mrs@apple.com> Minor CFG refinements for typeid and dynamic_cast.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89004 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
8b152b85b7a6cd51a1c4452e7f8425fb8e32b619 17-Nov-2009 Mike Stump <mrs@apple.com> Minor CFG refinements for typeid and dynamic_cast.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89004 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
1db9257e3ff78e2c6597b28423ae3a736c7fbed7 17-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Fix up EmitMemberInitializer to handle many more cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88999 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
4d26b43f7c6fc9d2974da7e7389337fe32dc29d0 17-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Fix up EmitMemberInitializer to handle many more cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88999 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
d97027c73e76bc78cb6d9163c4ba257eeb5987be 17-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Reorganize EmitMemberInitializer to put anonymous unions on the common codepath.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88995 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
ebf5065440d880089284c65e0c23745e6ff394f9 17-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Reorganize EmitMemberInitializer to put anonymous unions on the common codepath.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88995 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
5353f4ffda0ef79e74485076284a7d29e2ee68a5 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Make member initializers for union members work correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88989 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
1db5345eec54f8c57d4d448e490715025cb9b9bb 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Make member initializers for union members work correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88989 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
7b2afb22176ccacc3a1cc1a8bd2c882fc1497ef3 16-Nov-2009 Mike Stump <mrs@apple.com> Implement dynamic_cast<void*>(E).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88988 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
2b35bafd4460d1b6c8e069e93384e5459ff35242 16-Nov-2009 Mike Stump <mrs@apple.com> Implement dynamic_cast<void*>(E).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88988 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
75748b3928873c87cdbc610f9595776ee8af49b3 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Implement a few more cases for copy constructor synthesis.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88971 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
6d10ac9ef3435993d0ceae7782fbeee7659af30e 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Implement a few more cases for copy constructor synthesis.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88971 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
c79209789205c9de5fcc7aedfd6308057d40b618 16-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> First part of changes to eliminate problems with cv-qualifiers and
sugared types. The basic problem is that our qualifier accessors
(getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at
the current QualType and not at any qualifiers that come from sugared
types, meaning that we won't see these qualifiers through, e.g.,
typedefs:

typedef const int CInt;
typedef CInt Self;

Self.isConstQualified() currently returns false!

Various bugs (e.g., PR5383) have cropped up all over the front end due
to such problems. I'm addressing this problem by splitting each
qualifier accessor into two versions:

- the "local" version only returns qualifiers on this particular
QualType instance
- the "normal" version that will eventually combine qualifiers from this
QualType instance with the qualifiers on the canonical type to
produce the full set of qualifiers.

This commit adds the local versions and switches a few callers from
the "normal" version (e.g., isConstQualified) over to the "local"
version (e.g., isLocalConstQualified) when that is the right thing to
do, e.g., because we're printing or serializing the qualifiers. Also,
switch a bunch of

Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType()

expressions over to

Context.hasSameUnqualifiedType(T1, T2)




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88969 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
angle.cpp
a4923eb7c4b04d360cb2747641a5e92818edf804 16-Nov-2009 Douglas Gregor <dgregor@apple.com> First part of changes to eliminate problems with cv-qualifiers and
sugared types. The basic problem is that our qualifier accessors
(getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at
the current QualType and not at any qualifiers that come from sugared
types, meaning that we won't see these qualifiers through, e.g.,
typedefs:

typedef const int CInt;
typedef CInt Self;

Self.isConstQualified() currently returns false!

Various bugs (e.g., PR5383) have cropped up all over the front end due
to such problems. I'm addressing this problem by splitting each
qualifier accessor into two versions:

- the "local" version only returns qualifiers on this particular
QualType instance
- the "normal" version that will eventually combine qualifiers from this
QualType instance with the qualifiers on the canonical type to
produce the full set of qualifiers.

This commit adds the local versions and switches a few callers from
the "normal" version (e.g., isConstQualified) over to the "local"
version (e.g., isLocalConstQualified) when that is the right thing to
do, e.g., because we're printing or serializing the qualifiers. Also,
switch a bunch of

Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType()

expressions over to

Context.hasSameUnqualifiedType(T1, T2)




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88969 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
angle.cpp
039cec1a79a6017a8347afb12936965484dd2b0f 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Clean up scalar cast kind handling; make cast kind handling explicitly handle
more cases. No intended visible change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88968 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
ad35a83102683b00a7e28707eee7f2d8c994b742 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Clean up scalar cast kind handling; make cast kind handling explicitly handle
more cases. No intended visible change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88968 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
5bb7df0c6c2462d3669c0b6f20278b44229f6dc7 16-Nov-2009 Mike Stump <mrs@apple.com> Audit done, all the required casts are already done.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88966 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
81c2e60a56d4728c3f4a595f3ff511a1cfa6ed9c 16-Nov-2009 Mike Stump <mrs@apple.com> Audit done, all the required casts are already done.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88966 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
93be35943d4199fe16f89de1359e1187ea71ecb6 16-Nov-2009 Devang Patel <dpatel@apple.com> revert r88963.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88965 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e705641ba59a7eb6b211057865ea894b99c9e602 16-Nov-2009 Devang Patel <dpatel@apple.com> revert r88963.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88965 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
41bf758b78be061e07fe96a3540875943a64740e 16-Nov-2009 Devang Patel <dpatel@apple.com> Use TrackingVH to hold forward decl. This one is for RecordType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88963 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9464ec45f97c2b7dccbac4f5fd5b30d30e2cfc60 16-Nov-2009 Devang Patel <dpatel@apple.com> Use TrackingVH to hold forward decl. This one is for RecordType.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88963 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d5671104397066ec2f9bf126308f4ece16f19559 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Parallel fix to r88951: use TrackingVH to hold forward decl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88962 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
14d6365b6d927ec6f42293b05a713e3f2a262677 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Parallel fix to r88951: use TrackingVH to hold forward decl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88962 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a2d7c89f6149b3200aad11b17207b28b0a435b0d 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Fix valgrind uninitialized error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88952 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1468ac71124bc689d95e07a048505a21e8980269 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Fix valgrind uninitialized error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88952 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
6a1c77861df0d6e0df6b3ccd561772ffe45dd2f7 16-Nov-2009 Devang Patel <dpatel@apple.com> Use TrackingVH to hold forward decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88951 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ffffb03de0f6d7e162f461c03d954df50277a476 16-Nov-2009 Devang Patel <dpatel@apple.com> Use TrackingVH to hold forward decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88951 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d8ce40d7b0e0028fa46236560114d51bcac64167 16-Nov-2009 David Chisnall <csdavec@swan.ac.uk> Fixed two minor differences between clang and GCC-generated runtime structures for the GNU runtime.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88937 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
1804463ee790ac3cc73f72597ccb38b983f7d263 16-Nov-2009 David Chisnall <csdavec@swan.ac.uk> Fixed two minor differences between clang and GCC-generated runtime structures for the GNU runtime.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88937 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
96603e8fc385da29b3741419c95d3c5d7e95fcf1 16-Nov-2009 Anders Carlsson <andersca@mac.com> The ssp and sspreq function attributes should only be applied to function definitions, not declarations or calls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88915 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenModule.cpp
fd015353a3c4f528216276f25df5b4d464d7a0cd 16-Nov-2009 Anders Carlsson <andersca@mac.com> The ssp and sspreq function attributes should only be applied to function definitions, not declarations or calls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88915 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenModule.cpp
6518214d34a65914b06cbd5c0576e2699019d5e2 16-Nov-2009 Duncan Sands <baldrick@free.fr> Pass a value for the isSigned parameter of CreateIntCast, rather than
passing the name (an exotic way of specifying that the result is signed!).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88909 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
eac73e5b3eb3862945bcaa2770c71a727a3ee542 16-Nov-2009 Duncan Sands <baldrick@free.fr> Pass a value for the isSigned parameter of CreateIntCast, rather than
passing the name (an exotic way of specifying that the result is signed!).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88909 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
7107a3fb9ce8e83d81b8cb919e6a405171f61266 16-Nov-2009 Mike Stump <mrs@apple.com> Implement most of dynamic_cast. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88901 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
c849c052d6b4b70f2651c1969531861a5f230053 16-Nov-2009 Mike Stump <mrs@apple.com> Implement most of dynamic_cast. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88901 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
78b1dd4b159daf1c7b50eb7df9b6a6b5860deea0 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Make GetAddrOfConstantStringFromLiteral return a constant of the correct type.
This doesn't have any visible effects at the moment because normally the
implicit cast code forces the type to the expected type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88896 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7eb79c1010c8d30b852768bec96e81cd3e6def2e 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Make GetAddrOfConstantStringFromLiteral return a constant of the correct type.
This doesn't have any visible effects at the moment because normally the
implicit cast code forces the type to the expected type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88896 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
dc6e50c3e21110514a3a376569bd41997d8d187a 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Some minor cleanup for EmitCastLValue.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88894 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
eaae78a6fbd762c0ac6e75fa6fdfa4d167ceb4f2 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Some minor cleanup for EmitCastLValue.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88894 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
984402aae8c2c2784302151da2ff95c6908a3461 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Fix a couple of cases where we weren't generating the right kind of call
for a call to a virtual function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88891 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
8dfa2b3a5b818aa888d21eed8585e3d1b9d3506b 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Fix a couple of cases where we weren't generating the right kind of call
for a call to a virtual function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88891 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
213baf26d55a0ec16b6134dafbde5ca7d4904da5 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Implement two-argument form of delete operator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88890 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
eaea8c4c23b6892c82640c6f67034d9ed4498d45 16-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Implement two-argument form of delete operator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88890 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
f55e42356928607d53c94daa3b24a490035be7ce 16-Nov-2009 Anders Carlsson <andersca@mac.com> When generating the deleting ctor, emit a call to delete.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88878 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
bc0d83b86646faaf411cb40a3aacbc5dbe3e9bd0 16-Nov-2009 Anders Carlsson <andersca@mac.com> When generating the deleting ctor, emit a call to delete.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88878 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
b572909f9869ab215bc2d25b2b8138c0107dd093 15-Nov-2009 Mike Stump <mrs@apple.com> Peer through refernces for typeid. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88871 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
80556320e7e22692060f793a7d30aa6630bdd96a 15-Nov-2009 Mike Stump <mrs@apple.com> Peer through refernces for typeid. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88871 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
cda24f4037c113b14eef4efc85a8309810aef41e 15-Nov-2009 Mike Stump <mrs@apple.com> Finish off zero check for typeid(*p) so that it will do a __cxa_bad_typeid.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88852 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
f549e898a44fe91aca46fe34e9ba04a2f08318bf 15-Nov-2009 Mike Stump <mrs@apple.com> Finish off zero check for typeid(*p) so that it will do a __cxa_bad_typeid.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88852 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
bc753a52b284ab8ef68dee637155f4f1d6ed0f35 15-Nov-2009 Mike Stump <mrs@apple.com> Implement typeid for class types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88843 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
GExpr.cpp
odeGenFunction.h
angle.cpp
c2e84ae9a6d25cea3e583c768e576b4c981ec028 15-Nov-2009 Mike Stump <mrs@apple.com> Implement typeid for class types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88843 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
GExpr.cpp
odeGenFunction.h
angle.cpp
b9746153e3e877a27fe7635ed08859907cfeb083 15-Nov-2009 Mike Stump <mrs@apple.com> Finish off support for typeinfo generation for classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88828 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
a8285a88647805b294e946527ecee8e5ececc4ff 15-Nov-2009 Mike Stump <mrs@apple.com> Finish off support for typeinfo generation for classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88828 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
5a11ed53686377dbc1c8d122610da52dba7e9455 15-Nov-2009 Mike Stump <mrs@apple.com> Finisgh off rest of class_type_info rtti generation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88823 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
GVtable.cpp
odeGenModule.h
cbcd4e5d9d4c6148d47c6c05038b295c1eb037b2 15-Nov-2009 Mike Stump <mrs@apple.com> Finisgh off rest of class_type_info rtti generation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88823 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
GVtable.cpp
odeGenModule.h
b8e348d6b374915b7afdbb1aec8314a650037c53 14-Nov-2009 Anders Carlsson <andersca@mac.com> Handle CK_BitCast in EmitCastLValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88810 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
658e8123a80d0e62f227a0c1532f2a4f106b3e73 14-Nov-2009 Anders Carlsson <andersca@mac.com> Handle CK_BitCast in EmitCastLValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88810 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
e82743ba26fc7d8cf8a08982cdb0a2dab77b68f2 14-Nov-2009 Anders Carlsson <andersca@mac.com> Canonicalize the type before trying to create a debug type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88808 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5b6117a7727565be9fcaf709706c7d720bf191ad 14-Nov-2009 Anders Carlsson <andersca@mac.com> Canonicalize the type before trying to create a debug type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88808 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5871eeff39bc416f246204e9252d9b179a184ee1 14-Nov-2009 Anders Carlsson <andersca@mac.com> Have CGDebugInfo::getOrCreateType cache the QualType instead of having every ConvertType overload do it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88807 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0dd57c6cf8c6f6e4ee1a8e42daccf8ad1bb6fa4a 14-Nov-2009 Anders Carlsson <andersca@mac.com> Have CGDebugInfo::getOrCreateType cache the QualType instead of having every ConvertType overload do it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88807 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4f5ee5d50de0f5d98538c8e2d5dcc8335cdaf2ca 14-Nov-2009 Mike Stump <mrs@apple.com> Build up more of the rtti info for a class. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88795 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
c7a05bdff8c52990d0987ceefad33166fe2fd2cc 14-Nov-2009 Mike Stump <mrs@apple.com> Build up more of the rtti info for a class. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88795 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
377ac3474585ea41c4d97cc1726cd22d20f2f065 14-Nov-2009 Mike Stump <mrs@apple.com> Add the name to the rtti data structure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88792 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
2b1bf3134e31ff7513244f4932949597ec800e3f 14-Nov-2009 Mike Stump <mrs@apple.com> Add the name to the rtti data structure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88792 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
c8a2b1108fafb1c71d2fed3471a8da094b8093dd 14-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Avoid assert-crash in a case where the expression passed to EmitConstantExpr
legitimately has side-effects (and needs to be generated as a non-constant).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88767 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
55f9bdd88c93b5c8dab631c0808f7f7a541cea14 14-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Avoid assert-crash in a case where the expression passed to EmitConstantExpr
legitimately has side-effects (and needs to be generated as a non-constant).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88767 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
ed545432dfb5f6774e9f5abc328b591b01023d25 14-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Make __func__ and friends work correctly within the initializer for a static
local variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88766 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
f70b24e7fa15d72506534af43d4090bb37a32694 14-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Make __func__ and friends work correctly within the initializer for a static
local variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88766 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
b2f2674604a308a420f1d8422785cfcd85392c1c 14-Nov-2009 Eli Friedman <eli.friedman@gmail.com> PR5483: Generate missing form of destructor when it is virtual. (Someone
more familiar with this stuff should double-check that there isn't some more
general rule; this is purely from inspecting g++ output.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88755 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
ea9a20834cf9311fdf758cfbd73b8daa8e655f15 14-Nov-2009 Eli Friedman <eli.friedman@gmail.com> PR5483: Generate missing form of destructor when it is virtual. (Someone
more familiar with this stuff should double-check that there isn't some more
general rule; this is purely from inspecting g++ output.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88755 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
658986eaf74e04f37f22d0053042d570806bdb10 14-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Generate the old API when sending message to super
in a category implementation (objc 32bit api related).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88741 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
182f2681e75565c9ec3099c90bbc4fcc7782140c 14-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Generate the old API when sending message to super
in a category implementation (objc 32bit api related).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88741 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c343b787ed648b8f484e1f68ada5e24be86e1cf6 14-Nov-2009 Anders Carlsson <andersca@mac.com> Handle CXXDefaultArgExprs in EmitLValue. Fixes PR5484.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88735 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
370e53864aaed0288afdf532e127efe35d4b49f1 14-Nov-2009 Anders Carlsson <andersca@mac.com> Handle CXXDefaultArgExprs in EmitLValue. Fixes PR5484.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88735 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
8618a089265cdf89019bf5d939dd23d41e87bdef 14-Nov-2009 Mike Stump <mrs@apple.com> Mangling support for typeinfo names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88726 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
67795980157a48b51a59737a9478470eb0871dbb 14-Nov-2009 Mike Stump <mrs@apple.com> Mangling support for typeinfo names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88726 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
8ef4d6d0e48603e51b1214ce5cd2b161cd124d93 14-Nov-2009 Mike Stump <mrs@apple.com> Handle descructor printing better.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88723 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e99cc4504946718e4f288f6ba4652c3c7ffa6996 14-Nov-2009 Mike Stump <mrs@apple.com> Handle descructor printing better.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88723 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6456500e2a6809c9f2158ca72e6d13b3a9e5130e 14-Nov-2009 Mike Stump <mrs@apple.com> Also track address points for primaries bases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88717 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
65d0e28583ac050ec9aa71b469285faad48d137e 14-Nov-2009 Mike Stump <mrs@apple.com> Also track address points for primaries bases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88717 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
35165aa37c1a65bfb655c5fc5204e01d9463fab1 13-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen. For virtual destructor call on array objects
(still part of pr5472).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88712 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXExpr.cpp
534ba90a1b865f3731aa56423e8f02d49ff62ec7 13-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen. For virtual destructor call on array objects
(still part of pr5472).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88712 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXExpr.cpp
5edeb10c4a7dcf69748fa9a34857d3247276adeb 13-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Obvious fix for PR5474.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88696 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
64241fc930e0b2247e8c5b5af9d48d13c4bec8ae 13-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Obvious fix for PR5474.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88696 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
b5e7203206a2ddc0f208f4be02b0ad7ba538cb7c 13-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a code gen. bug for array delete operator call
int 32bit abi (pr5472 related).

-This line, and those below, will be ignored--

M lib/CodeGen/CGCXXExpr.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88695 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
6fb98d9172ebbb73e14db5e08ecc4361eccc76e1 13-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a code gen. bug for array delete operator call
int 32bit abi (pr5472 related).

-This line, and those below, will be ignored--

M lib/CodeGen/CGCXXExpr.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88695 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
092b596480c8ee2c30c980163d71ed6c9db04f37 13-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen for arrady delete operator. Fixes pr5472.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88680 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXExpr.cpp
odeGenFunction.h
72c2153b466263a21870b2b1c817900d4981493e 13-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen for arrady delete operator. Fixes pr5472.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88680 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXExpr.cpp
odeGenFunction.h
b68ceb5eb0a8e0d0c4cf626a368b8608598c1b71 13-Nov-2009 Devang Patel <dpatel@apple.com> Do not store DIDescriptor directly into a container. Store MDNode directly, through TrackingVH.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88677 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
8fae060d6ef78d4cdd19ebff7dea9c3a566f8b23 13-Nov-2009 Devang Patel <dpatel@apple.com> Do not store DIDescriptor directly into a container. Store MDNode directly, through TrackingVH.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88677 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
a43f29dc841563191f4d4b7cb77fbe289caa630c 13-Nov-2009 Mike Stump <mrs@apple.com> This falls into the category of stupid pet tricks. I hate to do this,
but this is necessary to continue work on virtual vtables. We don't
want to penalize virtual table building testcases, just because
complex virtual conversions don't yet work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88676 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXClass.cpp
a660440263ceb3a2502f5dbd48b4e166544ed9fe 13-Nov-2009 Mike Stump <mrs@apple.com> This falls into the category of stupid pet tricks. I hate to do this,
but this is necessary to continue work on virtual vtables. We don't
want to penalize virtual table building testcases, just because
complex virtual conversions don't yet work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88676 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXClass.cpp
1f5aa62eb7adfd39ec81ba52107f676604876f9a 13-Nov-2009 Anders Carlsson <andersca@mac.com> Instead of storing CXXMethodDecls in the vtable builder, store GlobalDecls so we can represent both the complete and deleting destructors. Also, when encountering a destructor decl, emit entries for both the complete and deleting destructors. Mike, please review.

With this change, FileCheck builds and runs the clang test suite without failures!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88663 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
GVtable.h
a0fdd916bbaede20b4ef257af0f61487cb6ed85a 13-Nov-2009 Anders Carlsson <andersca@mac.com> Instead of storing CXXMethodDecls in the vtable builder, store GlobalDecls so we can represent both the complete and deleting destructors. Also, when encountering a destructor decl, emit entries for both the complete and deleting destructors. Mike, please review.

With this change, FileCheck builds and runs the clang test suite without failures!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88663 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
GVtable.h
840186769433bb1743097e3144d9b90b9aacce88 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Wherein the TargetInfo argument to Preprocessor is made 'const' and propogated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87087 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
odeGenTypes.h
444be7366d0a1e172c0290a1ea54c1cb16b5947c 13-Nov-2009 Daniel Dunbar <daniel@zuster.org> Wherein the TargetInfo argument to Preprocessor is made 'const' and propogated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87087 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
odeGenTypes.h
41bc82689be6e500d36df2bc74f9c611dfd130d1 13-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Include header for printf.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87086 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
7fe26ac635d4ca61b3d09af619753a7df1cd80ce 13-Nov-2009 Zhongxing Xu <xuzhongxing@gmail.com> Include header for printf.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87086 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
126b8bea1a94af4938ef11fc723afd3a6cdc7470 13-Nov-2009 Anders Carlsson <andersca@mac.com> Add a special BuildVirtualCall that's going to be used for building calls to destructors. This is needed because when compiling:

struct A {
virtual ~A();
};

void f(A* a) {
delete a;
}

A's deleting destructor should be called.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87083 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXExpr.cpp
odeGenFunction.h
566abee1e9828a7700b51e4d17ea08234fde3bb4 13-Nov-2009 Anders Carlsson <andersca@mac.com> Add a special BuildVirtualCall that's going to be used for building calls to destructors. This is needed because when compiling:

struct A {
virtual ~A();
};

void f(A* a) {
delete a;
}

A's deleting destructor should be called.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87083 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXExpr.cpp
odeGenFunction.h
b2ef7f62d3d139813349b2c041afd3510ab673c1 13-Nov-2009 Anders Carlsson <andersca@mac.com> Fix two bugs with temporaries:

1. For

A f() {
return A();
}

we were incorrectly calling the A destructor on the returned object.

2. For

void f(A);
void g() {
A a;
f(a);
}

we were incorrectly not calling the copy constructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87082 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
03d8ed439f55b692634f9c71721ecfabbe347c4d 13-Nov-2009 Anders Carlsson <andersca@mac.com> Fix two bugs with temporaries:

1. For

A f() {
return A();
}

we were incorrectly calling the A destructor on the returned object.

2. For

void f(A);
void g() {
A a;
f(a);
}

we were incorrectly not calling the copy constructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87082 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
2abefd115331b17b5264fec5e32a7c9491b75af1 13-Nov-2009 Anders Carlsson <andersca@mac.com> Move GlobalDecl to its own file. Also add DenseMapInfo traits.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87081 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
lobalDecl.h
764d0c23724b3671dcbe20af152fa1ad45f45e15 13-Nov-2009 Anders Carlsson <andersca@mac.com> Move GlobalDecl to its own file. Also add DenseMapInfo traits.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87081 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
lobalDecl.h
c25a99e3fc1ae16c3b84258603891b5c5854d019 13-Nov-2009 Mike Stump <mrs@apple.com> Refine construction vtables; they don't include bits that don't have
virtual bases unless they are morally virtual.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87071 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
92774d1051f5315052fd63d39673c42c9c03a1c4 13-Nov-2009 Mike Stump <mrs@apple.com> Refine construction vtables; they don't include bits that don't have
virtual bases unless they are morally virtual.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87071 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
be486bcccc05af8519981ae814d664af0a4f87fb 13-Nov-2009 Mike Stump <mrs@apple.com> Refine the construction vtables with respect to offsets. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87067 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
4cde626be951472ceac7ca429c343c479ff26c87 13-Nov-2009 Mike Stump <mrs@apple.com> Refine the construction vtables with respect to offsets. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87067 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
b060cc19249b3e31fe28062b04b9e8cbc213fb84 13-Nov-2009 Mike Stump <mrs@apple.com> Allow the tracking of address points for construction vtables as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87063 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
odeGenModule.h
acfd1e5ea124ee1f6af74293ba5235771d237456 13-Nov-2009 Mike Stump <mrs@apple.com> Allow the tracking of address points for construction vtables as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87063 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
odeGenModule.h
38fd9664ca0ef50d12f57c1a6a5dcc21056d814b 13-Nov-2009 Mike Stump <mrs@apple.com> Refine which vtbl is refernced in VTTs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87043 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
80ac2358bbf3e18a941d54d481d372c7a0155199 13-Nov-2009 Mike Stump <mrs@apple.com> Refine which vtbl is refernced in VTTs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87043 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
544f7564d86e2d4efcbacf10c1d3604673c1c5f9 13-Nov-2009 Mike Stump <mrs@apple.com> Refine offsets into vtables for the VTT.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87041 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
12e3e4f594c1ed896b7db72527668894434940d2 13-Nov-2009 Mike Stump <mrs@apple.com> Refine offsets into vtables for the VTT.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87041 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
9a1a93d556f3fcff8575f54300c8b17cd84d80a8 12-Nov-2009 Mike Stump <mrs@apple.com> Refine vtable pointers for secondary vtables inside VTTs to point to
the right base vtable. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87039 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
28f7ce14ddbc1ba835615df8e4d42648a524b4c1 12-Nov-2009 Mike Stump <mrs@apple.com> Refine vtable pointers for secondary vtables inside VTTs to point to
the right base vtable. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87039 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
7553a88d11d04c1c0606615dd50924ee9f5100a6 12-Nov-2009 Mike Stump <mrs@apple.com> Fix the offset calculations for non-virtual bases with overrides.

Refine the VTT entries for virtual bases to refer to the complete
object's vtable instead of constructor vtables.

Refine the AddressPoint calculations for VTT entries for virtual bases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87021 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
odeGenModule.h
9840c70c34fbe3c8c7ca8b3950447bade915139a 12-Nov-2009 Mike Stump <mrs@apple.com> Fix the offset calculations for non-virtual bases with overrides.

Refine the VTT entries for virtual bases to refer to the complete
object's vtable instead of constructor vtables.

Refine the AddressPoint calculations for VTT entries for virtual bases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87021 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
odeGenModule.h
4476cdf3ef9762aaa7993e5746b4275ab4628edd 12-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Fix a code gen bug in i386-apple-darwin (objc fragile abi), sending
message to 'super'. Fixes radar 7205866.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87017 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b0069eebb604114d5c9d37d0856fc39d1dfffd6d 12-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Fix a code gen bug in i386-apple-darwin (objc fragile abi), sending
message to 'super'. Fixes radar 7205866.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87017 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
853b573c357e3424a493a912763216bc98bdd6cf 12-Nov-2009 Devang Patel <dpatel@apple.com> "Attach debug info with llvm instructions" mode was enabled a month ago. Now make it permanent and remove old way of inserting intrinsics to encode debug info for locations and types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87007 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GStmt.cpp
odeGenModule.h
23908b8a43adefd42b3635364cfab44de1064942 12-Nov-2009 Devang Patel <dpatel@apple.com> "Attach debug info with llvm instructions" mode was enabled a month ago. Now make it permanent and remove old way of inserting intrinsics to encode debug info for locations and types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87007 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GStmt.cpp
odeGenModule.h
b6a44bd2473260613a492d0ff2ce8292bbf9db62 12-Nov-2009 Devang Patel <dpatel@apple.com> Use getNameAsCString() instead of getName().data()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87001 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
11169adf2114e9e1f40fb9c12b7d99cc91323bdb 12-Nov-2009 Devang Patel <dpatel@apple.com> Use getNameAsCString() instead of getName().data()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87001 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2fcfe27c7e9115b8246d90510cbe079af13b7a16 12-Nov-2009 Chandler Carruth <chandlerc@gmail.com> Move CompileOptions -> CodeGenOptions, and sink it into the CodeGen library.
This resolves the layering violation where CodeGen depended on Frontend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86998 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDebugInfo.cpp
GDecl.cpp
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
2811ccf48d6d898c42cc4cfad37abedb36236d20 12-Nov-2009 Chandler Carruth <chandlerc@gmail.com> Move CompileOptions -> CodeGenOptions, and sink it into the CodeGen library.
This resolves the layering violation where CodeGen depended on Frontend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86998 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDebugInfo.cpp
GDecl.cpp
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
159e3b19e114be41ee924ca8f0935a766ec20ccb 12-Nov-2009 Devang Patel <dpatel@apple.com> Do not use StringRef while using DebugInfo interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86915 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ab71ff5cbaf6a4ab1df32221afbb0186c6fbbf0e 12-Nov-2009 Devang Patel <dpatel@apple.com> Do not use StringRef while using DebugInfo interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86915 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
8f020a277341376ccfe60e2c77d03ccf3448b727 11-Nov-2009 Mike Stump <mrs@apple.com> Fix ctor vtable name. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86879 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
4f92032ebad80711ee99cfea6946a61b4b9d08be 11-Nov-2009 Mike Stump <mrs@apple.com> Fix ctor vtable name. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86879 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
12f537e346e9a4e6409b73637193df3d77803bfd 11-Nov-2009 Mike Stump <mrs@apple.com> Push ctor vtable construction down further. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86878 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
odeGenModule.h
8cfcb52059d5ff8596cc7a92d856800b9f0da1dc 11-Nov-2009 Mike Stump <mrs@apple.com> Push ctor vtable construction down further. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86878 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
odeGenModule.h
f8412dac496b84ed467dc64f117d0ade573b6a23 11-Nov-2009 Devang Patel <dpatel@apple.com> Do not eagerly set stop point for arguments. This misleads the debugger in identifying beginning of function body. Instead, create new location to attach with llvm.dbg.declare. This location is only used to find the context of the variable by the code generator, and it is not used to emit line number info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86862 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ebf16e864de3a535a14f13ed263e37c156496dbb 11-Nov-2009 Devang Patel <dpatel@apple.com> Do not eagerly set stop point for arguments. This misleads the debugger in identifying beginning of function body. Instead, create new location to attach with llvm.dbg.declare. This location is only used to find the context of the variable by the code generator, and it is not used to emit line number info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86862 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4fc92d90b1df8ce6069410e08df5e1863b0801f7 11-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Value initialize non-class array members in ctor's
initializer list. Fixes PR5463.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86849 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
e8b31cc500473f0e2558c77c8a46458deff6ce51 11-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Value initialize non-class array members in ctor's
initializer list. Fixes PR5463.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86849 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
6e53a64327d399b69fee79a9edafdbd691002f29 11-Nov-2009 Mike Stump <mrs@apple.com> More VTT work. We now track offsets and use the ctor vtable builder
interface. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86793 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
aee8de30e194e494d2be1651ed54eda38e6a16bd 11-Nov-2009 Mike Stump <mrs@apple.com> More VTT work. We now track offsets and use the ctor vtable builder
interface. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86793 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
f8d570cb7b71443a3d5661d21b3eede55d4e4338 11-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Avoid generating additional destructor(s) for initialized constructed
objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86778 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
88b11de727b3a6b81138145cd2f5f2a20592f6ee 11-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Avoid generating additional destructor(s) for initialized constructed
objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86778 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
bdc6b355471efc9211b17d634a318e1457559ba1 11-Nov-2009 Mike Stump <mrs@apple.com> Stub out most of the VTT building code. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86772 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
971977f60f00ace75708a9eb1af605e857df5d73 11-Nov-2009 Mike Stump <mrs@apple.com> Stub out most of the VTT building code. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86772 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
b9af2e875c7399a385c7534535f46030586c4a43 11-Nov-2009 Devang Patel <dpatel@apple.com> Attach location info with llvm.dbg.declare.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86750 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a0203800ea2f93b2ce00fae24d6deac57617268d 11-Nov-2009 Devang Patel <dpatel@apple.com> Attach location info with llvm.dbg.declare.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86750 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a96026dc4bfc9b41cacffdd19e5d051741011da7 10-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Revert r86741; it doesn't handle virtual bases correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86745 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXClass.cpp
4a5dc242545222aef6313cc4297708f524e10c6f 10-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Revert r86741; it doesn't handle virtual bases correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86745 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXClass.cpp
e7811f80326970687b36ff3f22e8ebccc2f17e28 10-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Minor optimization to skip null check in generated code where it isn't
necessary.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86741 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXClass.cpp
db380b4f40889f981b6f3f9f82730f91976f5fdf 10-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Minor optimization to skip null check in generated code where it isn't
necessary.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86741 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXClass.cpp
d009f03937af20ab6062efa88a2b661da9ad49cd 10-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5454: make sure to use the right block as the predecessor in the
generated PHI node for the null check of a new operator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86738 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
7f1de456fe6b6fb6d3fb8144df6173d2354f595a 10-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5454: make sure to use the right block as the predecessor in the
generated PHI node for the null check of a new operator.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86738 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
d319a51ad241e203e2f46ef26c3ea2345dd3ca80 10-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> This patch implements Code gen. for destruction of
global array of objects.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86701 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
88f4280f6b60edcbdea6a38a3da8b17d66473ad6 10-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> This patch implements Code gen. for destruction of
global array of objects.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86701 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
3ba9ef3f6574786d34543350237678c1d829b256 10-Nov-2009 Mike Stump <mrs@apple.com> Only generate a VTT for classes that need a VTT.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86699 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
f1c03338def80031dfea27a2e32624a794c0a187 10-Nov-2009 Mike Stump <mrs@apple.com> Only generate a VTT for classes that need a VTT.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86699 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
3ebbaf30aeef894a1e2436fe9adb97578f7b6e05 10-Nov-2009 Mike Stump <mrs@apple.com> Add vtable caching to prevent multiple vtables for the same class from
being generated.

Add the most derived vtable pointer to the VTT.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86671 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
GVtable.h
odeGenFunction.h
odeGenModule.h
380dd759b33fd059b1aa7dbd85f8e66ca32f7bdc 10-Nov-2009 Mike Stump <mrs@apple.com> Add vtable caching to prevent multiple vtables for the same class from
being generated.

Add the most derived vtable pointer to the VTT.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86671 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GVtable.cpp
GVtable.h
odeGenFunction.h
odeGenModule.h
342fd4dcc3c4db62398336d6a8f94c9870cc764a 10-Nov-2009 Mike Stump <mrs@apple.com> Be sure to clear out VCall when we clear out VCalls.

Start implementing VTTs. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86650 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
odeGenFunction.h
fbfb52d4cf10b4fd1ac19d1445fe2ffcb9c2bbf1 10-Nov-2009 Mike Stump <mrs@apple.com> Be sure to clear out VCall when we clear out VCalls.

Start implementing VTTs. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86650 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
odeGenFunction.h
a93100b0e206e7578068713cb5d67f8d3ecadeba 10-Nov-2009 Mike Stump <mrs@apple.com> Finish off mangling for the VTT.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86647 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
82d75b01f23b407e56836e305107c8008037ba35 10-Nov-2009 Mike Stump <mrs@apple.com> Finish off mangling for the VTT.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86647 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
c953c4a5f371827b265ea104e1c9eba599d2af93 10-Nov-2009 Mike Stump <mrs@apple.com> Add mangling for the construction vtable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86643 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
ab3f7e9f5b81832da2b3633b3c0fcffff2907d40 10-Nov-2009 Mike Stump <mrs@apple.com> Add mangling for the construction vtable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86643 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
b538285b0a49b5ddedf494f9d4e5902015c2c64e 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
odeGenTypes.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
odeGenTypes.cpp
605902abe440e10554e1c7628cfc9405906418d7 09-Nov-2009 Mike Stump <mrs@apple.com> Enable the use of the new llvm objectsize intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86607 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
3ada2df42673b41ac173c0c9a3a2cb482837a424 09-Nov-2009 Mike Stump <mrs@apple.com> Enable the use of the new llvm objectsize intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86607 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
406b56a9a0ed38e9fbcea1f51ea28ee3719517d3 09-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Make sure that Type::getAs<ArrayType>() (or Type::getAs<subclass of
ArrayType>()) does not instantiate. Update all callers that used this
unsafe feature to use the appropriate ASTContext::getAs*ArrayType method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86596 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
89c49f09b0292dc7c03885f6c765d667a9837597 09-Nov-2009 Douglas Gregor <dgregor@apple.com> Make sure that Type::getAs<ArrayType>() (or Type::getAs<subclass of
ArrayType>()) does not instantiate. Update all callers that used this
unsafe feature to use the appropriate ASTContext::getAs*ArrayType method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86596 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
3297b1e8b91090e6cf03ae96731c2234952c425f 09-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Rearrange function to avoid recursive use-after-free.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86516 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
654ad40f27d684e8f3eddbc990247a6dbea5dded 09-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Rearrange function to avoid recursive use-after-free.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86516 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
3001cf9d672cd79c63295c47cacfaf450e94d4e8 09-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Explicitly note that pre-inc/dec lvalues are not supported yet, so that it
doesn't crash. (Such expressions are valid in C++, but not in C.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86513 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
e401cd5a487feee1165d3977aa3f4b68f44a3ca7 09-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Explicitly note that pre-inc/dec lvalues are not supported yet, so that it
doesn't crash. (Such expressions are valid in C++, but not in C.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86513 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
32d359bcc1fbe35cac10ee6ab35ffc03f9ac6729 09-Nov-2009 Daniel Dunbar <daniel@zuster.org> Rename areAllFields32Or64BitBasicType to canExpandIndirectArgument to closer match what it is semantically used for.

Also, fix a major bug where fields from a C++ struct might be dropped -- the expand action doesn't handle them correctly yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86502 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
53012f447145bfd5e3a759f069a2bdf2b6705708 09-Nov-2009 Daniel Dunbar <daniel@zuster.org> Rename areAllFields32Or64BitBasicType to canExpandIndirectArgument to closer match what it is semantically used for.

Also, fix a major bug where fields from a C++ struct might be dropped -- the expand action doesn't handle them correctly yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86502 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
ff050356b5529b0745b3039453ad5016d42f515c 09-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Unify the codepaths used to verify base and member initializers for explicitly
and implicitly defined constructors. This has a number of benefits:

1. Less code.

2. Explicit and implicit constructors get the same diagnostics.

3. The AST explicitly contains constructor calls from implicit default
constructors. This allows handing some cases that previously weren't handled
correctly in IRGen without any additional code. Specifically, implicit default
constructors containing calls to constructors with default arguments are now
handled correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86500 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
49c16da71b9c95cc53b4af6de2833a022cb69b6a 09-Nov-2009 Eli Friedman <eli.friedman@gmail.com> Unify the codepaths used to verify base and member initializers for explicitly
and implicitly defined constructors. This has a number of benefits:

1. Less code.

2. Explicit and implicit constructors get the same diagnostics.

3. The AST explicitly contains constructor calls from implicit default
constructors. This allows handing some cases that previously weren't handled
correctly in IRGen without any additional code. Specifically, implicit default
constructors containing calls to constructors with default arguments are now
handled correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86500 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
477bf0d12d0853db8c819be53b1ed91fa8c7ed29 08-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clarifying parens.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86457 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
d2113f279b9e4bdc4a3d4f2226797be2322aa238 08-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clarifying parens.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86457 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4c85217bfdce0f30f4d4f64ab4bf97d8ef9c7b57 08-Nov-2009 Anders Carlsson <andersca@mac.com> Handle member expressions where the member declaration is actually a static variable. Fixes PR5392.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86414 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
589f9e3f7845c2a1bf97ae4357aec5b457a5ea19 08-Nov-2009 Anders Carlsson <andersca@mac.com> Handle member expressions where the member declaration is actually a static variable. Fixes PR5392.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86414 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
f818910d6abcfb14c6b5cc20002080cd90597955 08-Nov-2009 Anders Carlsson <andersca@mac.com> More LValue related code cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86413 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
ce53f7dbe7406a253c6b2d93ff2727079087d9cc 08-Nov-2009 Anders Carlsson <andersca@mac.com> More LValue related code cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86413 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
b27d1281a6981061d826e188456c4ed006a7cf86 07-Nov-2009 Anders Carlsson <andersca@mac.com> More cleanup, the code is much easier to follow now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86412 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
1e74c4f0333b4730f44197d5e4615ea2b06599f4 07-Nov-2009 Anders Carlsson <andersca@mac.com> More cleanup, the code is much easier to follow now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86412 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
88c7dd2b979699ae22572b03e56f890f1fc32002 07-Nov-2009 Anders Carlsson <andersca@mac.com> Reduce nesting, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86411 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
0bc7049d636f63b4b0e9ee0a2edf37541f5e3bee 07-Nov-2009 Anders Carlsson <andersca@mac.com> Reduce nesting, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86411 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
7ac0a79c6e7523bde1c38a995033bf7fa4981861 07-Nov-2009 Anders Carlsson <andersca@mac.com> We only need to call SetObjCNonGC for local variables. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86410 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
a59869b277f9fb8d6e062cab97b6bafe7c199900 07-Nov-2009 Anders Carlsson <andersca@mac.com> We only need to call SetObjCNonGC for local variables. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86410 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
c89a68b8f4478a97e0c53d1f12efe1e80669d8cc 07-Nov-2009 Anders Carlsson <andersca@mac.com> Change EmitPointerToDataMemberLValue to take a FieldDecl. No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86407 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
909fbf70223ea04a5ec8d449789f3683a89701ff 07-Nov-2009 Anders Carlsson <andersca@mac.com> Change EmitPointerToDataMemberLValue to take a FieldDecl. No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86407 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
f57c27b168b77ebb3525d272d08b14e7bb067893 07-Nov-2009 Chris Lattner <sabre@nondot.org> add missing #include


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86368 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
78f7ece00e2ddfb64d4ed72a7be770b5b9b805e3 07-Nov-2009 Chris Lattner <sabre@nondot.org> add missing #include


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86368 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
3531042d8bd9436d07d36b0337d707e5a0b60de1 07-Nov-2009 Anders Carlsson <andersca@mac.com> Always mangle functions with special names. Fixes PR5420.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86350 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
a1e1622d1549c470acc999c4399456863e58a011 07-Nov-2009 Anders Carlsson <andersca@mac.com> Always mangle functions with special names. Fixes PR5420.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86350 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
1b5b3a56853949d82f80c0da2bf9a6cf084454ff 07-Nov-2009 Anders Carlsson <andersca@mac.com> When looking up and adding substitutions to the substitution table, make sure to always use the canonical declaration. With tihs change, FileCheck compiles and links but crashes during startup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86339 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
433d1374409a8eeaa4b0975fa187a542d5e40c23 07-Nov-2009 Anders Carlsson <andersca@mac.com> When looking up and adding substitutions to the substitution table, make sure to always use the canonical declaration. With tihs change, FileCheck compiles and links but crashes during startup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86339 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
9bd81478c93f8e68244668eb0992fd833cbf05e0 07-Nov-2009 Anders Carlsson <andersca@mac.com> Revert r86315 and add Type::FixedWidthInt to the FIXME cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86320 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ba578cb7b25357c479b2b5530546a9f153a525c0 07-Nov-2009 Anders Carlsson <andersca@mac.com> Revert r86315 and add Type::FixedWidthInt to the FIXME cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86320 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
716a923976d10693009292643b5dd5d39d373f37 07-Nov-2009 Devang Patel <dpatel@apple.com> Do not assert if debug info for certain type is not generated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86315 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e468611c125854a2eff59f699700cdd916737819 07-Nov-2009 Devang Patel <dpatel@apple.com> Do not assert if debug info for certain type is not generated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86315 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
c466fdc50aad422df74d1ff823618a593e85cc81 07-Nov-2009 Devang Patel <dpatel@apple.com> Do not emit linkage name for global variables. It confuses gdb, because it picks up AT_MIPS_linkage_name and ignores AT_name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86308 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0284fdc5855c21545c58f0fe8edd5a680e0b29ea 07-Nov-2009 Devang Patel <dpatel@apple.com> Do not emit linkage name for global variables. It confuses gdb, because it picks up AT_MIPS_linkage_name and ignores AT_name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86308 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
be40f2855bb081453088b87ab9d18dea0603e78e 07-Nov-2009 Mike Stump <mrs@apple.com> Refine the non-virtual this adjustment. Optimize out virtual this
adjustments of zero.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86300 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
9e7e3c6c47f2819bce456950617a966d26839eb4 07-Nov-2009 Mike Stump <mrs@apple.com> Refine the non-virtual this adjustment. Optimize out virtual this
adjustments of zero.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86300 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
aaa1fdb12d1a78539b842bdcfaa30612d29de604 06-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Prevent a code gen. crash on empty unions - pr5408.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86287 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
e504170f688b0e2113011839b933a4ec450b5182 06-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Prevent a code gen. crash on empty unions - pr5408.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86287 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
ca4a2da00312360334c5390c9924f7ccc0c6c928 06-Nov-2009 Anders Carlsson <andersca@mac.com> Simplify the debug info code, handle lvalue references and template specializations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86277 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
a031b35ba4da13e105a349493f5351014cfb3354 06-Nov-2009 Anders Carlsson <andersca@mac.com> Simplify the debug info code, handle lvalue references and template specializations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86277 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
66d14993c18bb33708d69787142293a7f217bf2c 06-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> This patch fixes code gen. part of pr5333 (Conversion
using elipsis conversion).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86276 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
30509a30a9a6ac9ee737e5cf39744a92170d7ea4 06-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> This patch fixes code gen. part of pr5333 (Conversion
using elipsis conversion).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86276 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
723a0ce909b7e09ffbe9432c3094a599ea66860c 06-Nov-2009 Anders Carlsson <andersca@mac.com> Handle QualifiedNameType and SubstTemplateTypeParmType types in CGDebugInfo::CreateTypeNode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86274 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ba397fe24468fae6cb46f259a3f946770163bfe2 06-Nov-2009 Anders Carlsson <andersca@mac.com> Handle QualifiedNameType and SubstTemplateTypeParmType types in CGDebugInfo::CreateTypeNode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86274 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
111f23521ff0d7a525c8a53825d9e812d3df1b92 06-Nov-2009 Anders Carlsson <andersca@mac.com> Don't assert when trying to generate debug info for vector types. This needs to be fixed eventually...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86268 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
bfe69955a2efb969839b6d87d7e118044ea3cbb4 06-Nov-2009 Anders Carlsson <andersca@mac.com> Don't assert when trying to generate debug info for vector types. This needs to be fixed eventually...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86268 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e628e1ba14c287892cb8194629bfe8f0c259334f 06-Nov-2009 Chris Lattner <sabre@nondot.org> update comment, pointed out by Gabor


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86263 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
49c952f853fe2d15dd9c9ff2a29c696bd18fca13 06-Nov-2009 Chris Lattner <sabre@nondot.org> update comment, pointed out by Gabor


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86263 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
cf15aabacbd175fdc79440927189ed910623921d 06-Nov-2009 Chris Lattner <sabre@nondot.org> indirectbr seems to work! Rip out the old code.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86256 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GExprScalar.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
41a124aba77e07ab6263239bdb3df6f5feb34e13 06-Nov-2009 Chris Lattner <sabre@nondot.org> indirectbr seems to work! Rip out the old code.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86256 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GExprScalar.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
ac921eb530d57dca79ddeec2911433ec253b1a58 06-Nov-2009 Anders Carlsson <andersca@mac.com> Instead of returning a null DIType for unhandled types, assert.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86254 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b93811847d3db2759de44a4746ca257810eeb3ff 06-Nov-2009 Anders Carlsson <andersca@mac.com> Instead of returning a null DIType for unhandled types, assert.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86254 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
8b397a2728ce541569931e2317f6a67e80a6db53 06-Nov-2009 Anders Carlsson <andersca@mac.com> If a member variable of reference type is bound to a temporary in its member initializer it needs to be destroyed at the end of the constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86230 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
5e1b91875c275f0ec50d3680afbac150d684fdba 06-Nov-2009 Anders Carlsson <andersca@mac.com> If a member variable of reference type is bound to a temporary in its member initializer it needs to be destroyed at the end of the constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86230 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
64cd91cba6561774eb3ba7542f37f2de6bcd9ceb 06-Nov-2009 Anders Carlsson <andersca@mac.com> If a member initializer create temporaries we need to destroy them. Fixes PR5077.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86225 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
1faf67478c6d423880726a327c737db13b8d9f0b 06-Nov-2009 Anders Carlsson <andersca@mac.com> If a member initializer create temporaries we need to destroy them. Fixes PR5077.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86225 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
451fc268aec1ee6f41e6d85636f99de377733582 06-Nov-2009 Anders Carlsson <andersca@mac.com> More cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86224 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
b1156b93f6731942e7c9dc263e517db8e6d58afd 06-Nov-2009 Anders Carlsson <andersca@mac.com> More cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86224 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
bbd8c8141c0e16f0eb1a1fa05a228bc628202b2a 06-Nov-2009 Anders Carlsson <andersca@mac.com> Cleanup ctor/dtor emission.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86222 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
4365bba95be15342575b4f030c6583a770a5da3d 06-Nov-2009 Anders Carlsson <andersca@mac.com> Cleanup ctor/dtor emission.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86222 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
53dd1a329e8eb9ecc8daecd13606b43e95552edc 06-Nov-2009 Anders Carlsson <andersca@mac.com> Handle ParenExprs in mangleExpression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86218 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
a7694087e4abaea261918ffbb3ffe38feb1da489 06-Nov-2009 Anders Carlsson <andersca@mac.com> Handle ParenExprs in mangleExpression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86218 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
55bf2a64f8a3bbb9b073fa644284a379eb637e76 06-Nov-2009 Mike Stump <mrs@apple.com> Refine the vcall for a function that is defined in a virtual base
class that is overridden in a base that isn't morally virtual.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86217 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
33c530e33a2232e8d6089f4a3028e6b8c3e2b746 06-Nov-2009 Mike Stump <mrs@apple.com> Refine the vcall for a function that is defined in a virtual base
class that is overridden in a base that isn't morally virtual.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86217 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
1a44796c08bfa29bda0a4fa6e7fc4328668a0d7b 05-Nov-2009 Devang Patel <dpatel@apple.com> Enable debug info for global variables at -O1+


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86156 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2e09db7aa9485a28455efe9759cf1408c1385e18 05-Nov-2009 Devang Patel <dpatel@apple.com> Enable debug info for global variables at -O1+


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86156 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
90157f6d8093abd6c42c97481f5b9cd8252c6139 05-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Added support for static variables which require
initialization before main. Fixes pr5396.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86145 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
393c247fe025ccb5f914e37e948192ea86faef8c 05-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Added support for static variables which require
initialization before main. Fixes pr5396.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86145 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
d1c38d0509ebb7c2e161ce05aee85d04646cf148 05-Nov-2009 Mike Stump <mrs@apple.com> References can't be zero; omit zero check for return value adjustments
in covariant thunks that return references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86121 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
03e777ec50386f88a55f8fcf6e94bb7f9840b50d 05-Nov-2009 Mike Stump <mrs@apple.com> References can't be zero; omit zero check for return value adjustments
in covariant thunks that return references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86121 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
0121ed000cd9feeaadecbc57ce8fbd736e47c269 05-Nov-2009 Mike Stump <mrs@apple.com> Refine covariant return value adjustments for thunks when null
pointers are returned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86120 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
7c276b84d6881df18c847b036fe3c95d94d9b5b3 05-Nov-2009 Mike Stump <mrs@apple.com> Refine covariant return value adjustments for thunks when null
pointers are returned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86120 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
2a9a03c2cd993828b0fb83f1098d20d0f9db7f5a 04-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Add code gen for pointer-to-member function in
ctor's initializer. Fixes pr5178.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86040 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
105aa51c146b66f7dc4ac78faa9a7021acb98d75 04-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> Add code gen for pointer-to-member function in
ctor's initializer. Fixes pr5178.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86040 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
3663bdaeb621ce6459996fd5a8283999984d3298 04-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> This patch extends CleanupScope to support destruction
of array objects on block exit. Patch is by Anders Calrsson.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86032 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.cpp
odeGenFunction.h
7799621ad7d16f3c6a1aeda024312d63ecd77777 04-Nov-2009 Fariborz Jahanian <fjahanian@apple.com> This patch extends CleanupScope to support destruction
of array objects on block exit. Patch is by Anders Calrsson.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86032 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.cpp
odeGenFunction.h
d2c55c0e84cc1fd9a8f3e01adab452de2e63cfb9 04-Nov-2009 Douglas Gregor <doug.gregor@gmail.com> Store the unresolved class type in MemberPointerType's Class field,
from Peter Collingbourne!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86030 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
87c12c4a4667279dacb3d4a93c64b49148a0ff79 04-Nov-2009 Douglas Gregor <dgregor@apple.com> Store the unresolved class type in MemberPointerType's Class field,
from Peter Collingbourne!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86030 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
cb368453a76478fcc07a8c08b94aa2311ea3c410 04-Nov-2009 Tanya Lattner <tonic@nondot.org> Merge constant array and structures. This will create a global variables for arrays and structs that are constant and their initializer is constant. It is on by default but can be disable with the flag -fno-merge-all-constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85991 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
59876c2713683d1538ca45bb14c2f415862fb716 04-Nov-2009 Tanya Lattner <tonic@nondot.org> Merge constant array and structures. This will create a global variables for arrays and structs that are constant and their initializer is constant. It is on by default but can be disable with the flag -fno-merge-all-constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85991 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
542e8234c03a1755ed93379434ac6182fd53a736 04-Nov-2009 Mike Stump <mrs@apple.com> Fix 80-col violations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85990 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
79d5768e7bc30e847d18bb0e41244d25faff934b 04-Nov-2009 Mike Stump <mrs@apple.com> Fix 80-col violations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85990 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
c3a847d2117c3af11b49da00d90baf60f5085d98 04-Nov-2009 Mike Stump <mrs@apple.com> Split out return adjustments in thunks from this adjustment in thunks
so the optimizer can tailcall into the return value adjustment thunk.
This improves codesize for complex hierarchies.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85988 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
d0fe5366d4040545d5f72c547ae54e2c21e4cb68 04-Nov-2009 Mike Stump <mrs@apple.com> Split out return adjustments in thunks from this adjustment in thunks
so the optimizer can tailcall into the return value adjustment thunk.
This improves codesize for complex hierarchies.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85988 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
f6aba2478144db10a5a3206e293755772485401d 04-Nov-2009 Mike Stump <mrs@apple.com> Misc cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85978 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
9bef4d7d127c2f10a8c0535f371f8a06d5ba6b4a 04-Nov-2009 Mike Stump <mrs@apple.com> Misc cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85978 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
c9f5eac5c940cc542c7f26560653cfeecd264545 04-Nov-2009 Mike Stump <mrs@apple.com> Refine volatile handling, specifically, we must have the canonical
type to look at the volatile specifier. I found these all from just
hand auditing the code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85967 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDecl.cpp
GExprScalar.cpp
odeGenFunction.h
df317bf71653eeb235da8337b1e8e790f9653aa4 04-Nov-2009 Mike Stump <mrs@apple.com> Refine volatile handling, specifically, we must have the canonical
type to look at the volatile specifier. I found these all from just
hand auditing the code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85967 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDecl.cpp
GExprScalar.cpp
odeGenFunction.h
80958b844d3bbab2c8cdd883851907e9a7ef9a31 03-Nov-2009 Mike Stump <mrs@apple.com> Refine codegen for covariant thunks that return references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85916 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
9c21289a866b677d21ed3d5ecfdfd5ced5a55410 03-Nov-2009 Mike Stump <mrs@apple.com> Refine codegen for covariant thunks that return references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85916 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
bff72699b9135440bd8642ed6b4d7b80670494a1 03-Nov-2009 Mike Stump <mrs@apple.com> Refine return value adjustments for thunks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85905 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
c902d22129322731607988dafb8cd7f708eb75b1 03-Nov-2009 Mike Stump <mrs@apple.com> Refine return value adjustments for thunks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85905 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
041f1257c50a2ef165b9e2f2bea6a848d05ed6ec 03-Nov-2009 Mike Stump <mrs@apple.com> Fix documentation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85901 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
519202d315e3f74f42d8a1dea7b2f23dee1a66f0 03-Nov-2009 Mike Stump <mrs@apple.com> Fix documentation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85901 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
87989974856c237c52ca09c5ecbedaf691120c22 03-Nov-2009 Mike Stump <mrs@apple.com> Refine codegen for non-virtual this adjustments for thunks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85856 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
4387cd9697374462af10d1b5515f26f4af129432 03-Nov-2009 Mike Stump <mrs@apple.com> Refine codegen for non-virtual this adjustments for thunks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85856 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
822b839ef0def87256f778cd3d25c2ed80fa2320 03-Nov-2009 Mike Stump <mrs@apple.com> Add virtual adjustments for this for thunks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85852 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
736529e7b6fa4aa8331b88c2e89b6a81120731e5 03-Nov-2009 Mike Stump <mrs@apple.com> Add virtual adjustments for this for thunks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85852 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
6d91710fdc076d549bf64a29cc8af42d6a5273c8 03-Nov-2009 Mike Stump <mrs@apple.com> Add basic codegen for thunks that return values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85842 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
f49ed94751d366dc3fcb3d1197830a49e8b3e0de 03-Nov-2009 Mike Stump <mrs@apple.com> Add basic codegen for thunks that return values.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85842 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
5c1db565c64b90e96a738fdbddf5e63d43baa771 03-Nov-2009 Mike Stump <mrs@apple.com> Refine codegen for thunks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85839 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
c5dac4e235806cc192fe67123d551be7ae66e162 03-Nov-2009 Mike Stump <mrs@apple.com> Refine codegen for thunks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85839 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
1a33979318357b7b5f7e651d86f8205876040f03 31-Oct-2009 Mike Stump <mrs@apple.com> Refine vcall/vbase ordering with vtable construction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85677 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6a9612f384deecf078e2e9c5c02a0992a2a1283a 31-Oct-2009 Mike Stump <mrs@apple.com> Refine vcall/vbase ordering with vtable construction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85677 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
9af4b0ea95d237dbb056837ecf9b8709b27f3938 30-Oct-2009 Anders Carlsson <andersca@mac.com> Get throws limping along, still a bunch of FIXMEs. Too bad we don't support catching anything yet :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85574 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
d3379292f90e1381d3236c68891bb725b02464b6 30-Oct-2009 Anders Carlsson <andersca@mac.com> Get throws limping along, still a bunch of FIXMEs. Too bad we don't support catching anything yet :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85574 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
bfc692b6a9efb5c3cb55d68da94d3adfc78bb4ee 30-Oct-2009 Anders Carlsson <andersca@mac.com> Fix thinko, mangleCXXRtti should obviously take a QualType!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85565 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
angle.cpp
angle.h
d313e40ff8a20e49a8414880852eac3750082483 30-Oct-2009 Anders Carlsson <andersca@mac.com> Fix thinko, mangleCXXRtti should obviously take a QualType!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85565 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
angle.cpp
angle.h
bfa9c827a0a3adbe4fc43bcdc6646c1ac3afb574 30-Oct-2009 Anders Carlsson <andersca@mac.com> Add CGException.cpp, to be used for exception related code generation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85560 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GExprScalar.cpp
MakeLists.txt
odeGenFunction.h
756b5c4f9d52642d87d1948bee58f97a4f795b24 30-Oct-2009 Anders Carlsson <andersca@mac.com> Add CGException.cpp, to be used for exception related code generation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85560 91177308-0d34-0410-b5e6-96231b3b80d8
GException.cpp
GExprScalar.cpp
MakeLists.txt
odeGenFunction.h
e426a1f5412447d03ba0fd374a42654005e2390d 30-Oct-2009 Anders Carlsson <andersca@mac.com> mangleCXXRtti obviously needs to take a type, what was I thinking...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85555 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
angle.cpp
angle.h
731f7f95836f6f80a10ceae3027a7237ce443f33 30-Oct-2009 Anders Carlsson <andersca@mac.com> mangleCXXRtti obviously needs to take a type, what was I thinking...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85555 91177308-0d34-0410-b5e6-96231b3b80d8
GRtti.cpp
angle.cpp
angle.h
ab522060b1daddd497daec1f6d3a46a274440bb3 29-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for destruction of array of objects on block exit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85512 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
6fba7464867180f672b6fa55894485dd8a093804 29-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for destruction of array of objects on block exit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85512 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
829405c806d73c85cc29f381ac123f11136909bb 29-Oct-2009 Nuno Lopes <nunoplopes@sapo.pt> make clang emit undefs for padding of structs and unions instead of zeros. this enables constant compaction optimizations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85504 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
c6eb131a83eb35d0c896170652563449648a32c3 29-Oct-2009 Nuno Lopes <nunoplopes@sapo.pt> make clang emit undefs for padding of structs and unions instead of zeros. this enables constant compaction optimizations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85504 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
7d70b6fb19b0e05447bea3ae32697c541ba31b3c 29-Oct-2009 Chris Lattner <sabre@nondot.org> optimize out some ifdefs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85453 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
d8ee95fd4fb8fb00ad999dffad5fa1613c68a113 29-Oct-2009 Chris Lattner <sabre@nondot.org> optimize out some ifdefs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85453 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
684d1911e47a3ba0677a82d1dbc0c6e273ad3dd1 29-Oct-2009 Chris Lattner <sabre@nondot.org> Implement clang support for indirect branch and address of label
using the new LLVM support for this. This is temporarily hiding
behind horrible and ugly #ifdefs until the time when the optimizer
is stable (hopefully a week or so). Until then, lets make it "opt in" :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85446 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GExprScalar.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
d9becd1846e2c72bf6ad283faa1b048f33dd3afe 29-Oct-2009 Chris Lattner <sabre@nondot.org> Implement clang support for indirect branch and address of label
using the new LLVM support for this. This is temporarily hiding
behind horrible and ugly #ifdefs until the time when the optimizer
is stable (hopefully a week or so). Until then, lets make it "opt in" :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85446 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GExprScalar.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
7a1da75505eb8f25d0e40d22ea0f9ef5d2e7feb2 28-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Minor cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85434 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
d7a4a436efc11844c0d837a84f284aac7a09f31a 28-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Minor cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85434 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
b643fa91a3340a67e9cb084ca8746f68e288f456 28-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen for array construction - WIP



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85432 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
ae013b9da64b48f22ca82828aa3c7a909f99dbd7 28-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen for array construction - WIP



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85432 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
d0059d4d7449c5f7ba337507f308a8e1b8c30291 28-Oct-2009 Mike Stump <mrs@apple.com> Refactor a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85424 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
7d0f5c9ca12d1bae19c3c19500b3b0cf5aedbc29 28-Oct-2009 Mike Stump <mrs@apple.com> Refactor a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85424 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
4e7ccf5ba7c2239d45a207cccf63b875de278156 28-Oct-2009 Chris Lattner <sabre@nondot.org> factor a creation of Int32Ty.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85422 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
85e74acfcfb0c835a2e6c1adab314e997917039a 28-Oct-2009 Chris Lattner <sabre@nondot.org> factor a creation of Int32Ty.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85422 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
edbe9cf1396655d2e5fa9b97e75a38ef04078de3 28-Oct-2009 Chris Lattner <sabre@nondot.org> random tidying


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85408 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
eb99b0189710d996216df7d485f11939e9f1c842 28-Oct-2009 Chris Lattner <sabre@nondot.org> random tidying


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85408 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
2dc6522289d676177a7bd9c524a59a76c50530ac 28-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Mangle based on the declaration we're given, not the canonical
declaration, since attributes that affect mangling may have been added
to subsequent declarations. However, to determine the linkage of the
declaration, we need to look at the canonical declaration. Fixes PR4412.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85400 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
457e2815d43fa68f7ff7cd2f7e9d1bf7b6fdc653 28-Oct-2009 Douglas Gregor <dgregor@apple.com> Mangle based on the declaration we're given, not the canonical
declaration, since attributes that affect mangling may have been added
to subsequent declarations. However, to determine the linkage of the
declaration, we need to look at the canonical declaration. Fixes PR4412.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85400 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
3c83fb9d9bbe3efe90f64a319009f755d2634e2d 28-Oct-2009 Chris Lattner <sabre@nondot.org> adjust for a pending LLVM change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85373 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
67665869ccf238df4c709536bf62fca25957257b 28-Oct-2009 Chris Lattner <sabre@nondot.org> adjust for a pending LLVM change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85373 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
c4c3b3770bbe56aa9e437b205e74f61eb803e000 28-Oct-2009 Mike Stump <mrs@apple.com> Add mangling for VTTs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85363 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
88e9171fc744190de283a3ec0a5c327cfc0ba3df 28-Oct-2009 Mike Stump <mrs@apple.com> Add mangling for VTTs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85363 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
ecd4620a6e96cae1ac7bad0d6f96b9422dbf6642 28-Oct-2009 Mike Stump <mrs@apple.com> Finish off pure virtual function handling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85354 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
7809e0d165103864ce6063070e093a0b7cd30cd9 28-Oct-2009 Mike Stump <mrs@apple.com> Finish off pure virtual function handling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85354 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
4bdfd589451acf4be5d0586921e709d1125af54b 28-Oct-2009 Mike Stump <mrs@apple.com> Prep work for putting ___cxa_pure_virtual in the vtables for pure functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85345 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
94aff9341e7996f012e937385be18cd19f68a45e 28-Oct-2009 Mike Stump <mrs@apple.com> Prep work for putting ___cxa_pure_virtual in the vtables for pure functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85345 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
9e1b0189d04535bb36c5f956516d30f7f167aff6 28-Oct-2009 Mike Stump <mrs@apple.com> Refactor code a little.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85343 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
1ae3178842823dfeb5586856659d75e77b62de30 28-Oct-2009 Mike Stump <mrs@apple.com> Refactor code a little.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85343 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
328dfba354e78880d5fa7077e0554ed93b371127 28-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Implement proper linkage for explicit instantiation declarations of
inlined functions. For example, given

template<typename T>
class string {
unsigned Len;

public:
unsigned size() const { return Len; }
};

extern template class string<char>;

we now give the instantiation of string<char>::size
available_externally linkage (if it is ever instantiated!), as
permitted by the C++0x standard.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85340 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7d9c3c92c90ae36d58ec21bc53c4c08e02ac3555 28-Oct-2009 Douglas Gregor <dgregor@apple.com> Implement proper linkage for explicit instantiation declarations of
inlined functions. For example, given

template<typename T>
class string {
unsigned Len;

public:
unsigned size() const { return Len; }
};

extern template class string<char>;

we now give the instantiation of string<char>::size
available_externally linkage (if it is ever instantiated!), as
permitted by the C++0x standard.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85340 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
3d1abbaaeb4ec137205e073fb41fe52326c2e2aa 27-Oct-2009 Mike Stump <mrs@apple.com> __builtin_object_size refinements. Ensure we handle expressions with
side-effects up front, as when we switch to the llvm intrinsic call
for __builtin_object_size later, it will have two evaluations.

We also finish off the intrinsic version of the code so we can just
turn it on once llvm has the intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85324 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
c4c9045dabfc0f0d37dea1b3eb2992654d5b2db1 27-Oct-2009 Mike Stump <mrs@apple.com> __builtin_object_size refinements. Ensure we handle expressions with
side-effects up front, as when we switch to the llvm intrinsic call
for __builtin_object_size later, it will have two evaluations.

We also finish off the intrinsic version of the code so we can just
turn it on once llvm has the intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85324 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
8b43240c2af348312e8b5d5bcb53018a238879a5 27-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce FunctionDecl::isInlined() to tell whether a function should
be inlined.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85307 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7ced9c8529b734e313f62a3b81189d6f402f6713 27-Oct-2009 Douglas Gregor <dgregor@apple.com> Introduce FunctionDecl::isInlined() to tell whether a function should
be inlined.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85307 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
21c878fe794911621478ec927e03d3c44866ca9b 27-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Rename FunctionDecl::isInline/setInline to
FunctionDecl::isInlineSpecified/setInlineSpecified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85305 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
0130f3cc4ccd5f46361c48d5fe94133d74619424 27-Oct-2009 Douglas Gregor <dgregor@apple.com> Rename FunctionDecl::isInline/setInline to
FunctionDecl::isInlineSpecified/setInlineSpecified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85305 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f89137e30490727523c2c64e1aeddb263872e17b 27-Oct-2009 Daniel Dunbar <daniel@zuster.org> Set OptimizeForSize LLVM function attribute with -Os.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85278 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
7ab1c3ebd02c31bfa1333cc51de1261c1499d6f7 27-Oct-2009 Daniel Dunbar <daniel@zuster.org> Set OptimizeForSize LLVM function attribute with -Os.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85278 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
9561b8c6dda5937c5291ecb36f60487276e753aa 27-Oct-2009 Daniel Dunbar <daniel@zuster.org> Fix crash when synthesizing property setters when the property type and ivar
type have mismatched Objective-C types.
- <rdar://problem/7336352> [irgen] crash in synthesized property construction

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85275 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
45e8423d7dcea657c14c55347e8a30ac904d7501 27-Oct-2009 Daniel Dunbar <daniel@zuster.org> Fix crash when synthesizing property setters when the property type and ivar
type have mismatched Objective-C types.
- <rdar://problem/7336352> [irgen] crash in synthesized property construction

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85275 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
8a92bfe9d8f723427826ff6fa3f03a72b541c680 27-Oct-2009 Anders Carlsson <andersca@mac.com> Add a PrettyStackTraceDecl in CodeGenModule::EmitGlobalDefinition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85237 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8e2efcc267ed12dc435782288b7f9a4a1bc56c72 27-Oct-2009 Anders Carlsson <andersca@mac.com> Add a PrettyStackTraceDecl in CodeGenModule::EmitGlobalDefinition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85237 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b67d8b990d8c294c7b34f1892c7020b3b27969b1 27-Oct-2009 Mike Stump <mrs@apple.com> Prep for future __builtin_object_size refinements. The theory is that
someone will add an llvm intrinsic for us to use, so the optimizer can
figure out the hard cases. WIP.

For those that want to help, double check with Eric before starting.
He has a bit of code this will plug into.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85175 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
b16d32f74ffc467a5604934a1f844906be20cf7d 27-Oct-2009 Mike Stump <mrs@apple.com> Prep for future __builtin_object_size refinements. The theory is that
someone will add an llvm intrinsic for us to use, so the optimizer can
figure out the hard cases. WIP.

For those that want to help, double check with Eric before starting.
He has a bit of code this will plug into.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85175 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
65eb7436405adda6e3c103c6583ef61b20e13e4b 26-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Add Code gen support for '->*' operator which fell
through the crack.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85160 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
52f08bcbb81c750ed62b53ed0b34aff16143b877 26-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Add Code gen support for '->*' operator which fell
through the crack.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85160 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
b204847180ff551ed8f13496568c591869abeb80 26-Oct-2009 Chandler Carruth <chandlerc@gmail.com> Switch vtable to linkeonce_odr. Patch by nlewycky.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85131 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6ade621a6e96e0e740fb0bbb2d5ec5c19a2c8891 26-Oct-2009 Chandler Carruth <chandlerc@gmail.com> Switch vtable to linkeonce_odr. Patch by nlewycky.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85131 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
137a8561e6eef4866b08c8bef5f176b559de8a93 26-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> assert -> llvm_unreachable

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85125 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
9f0306d969700c9d79a31d559f95a1eb4c0bfcb4 26-Oct-2009 Douglas Gregor <dgregor@apple.com> assert -> llvm_unreachable

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85125 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
e670df714312e47c62ab4ef4d44db682a55fb604 26-Oct-2009 Chandler Carruth <chandlerc@gmail.com> Update location of DataTypes.h to reflect move in LLVM with r85086.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85087 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.h
9f8eb2032030482b1d3de86e9bee725d93564302 26-Oct-2009 Chandler Carruth <chandlerc@gmail.com> Update location of DataTypes.h to reflect move in LLVM with r85086.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85087 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.h
fd8c0580684d9fe9a0418ce6a9a66ca595d6da22 25-Oct-2009 Nate Begeman <natebegeman@mac.com> Fix a bug in calculating shufflevector indices when constructing vectors from other vectors.
If I can find it again, I will check in a testcase.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85032 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
a99f08351b6df3bb0f2947e038747717a60fd93a 25-Oct-2009 Nate Begeman <natebegeman@mac.com> Fix a bug in calculating shufflevector indices when constructing vectors from other vectors.
If I can find it again, I will check in a testcase.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85032 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
b57ab7949f6b2ec0dd49f750843fab093592cacd 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
odeGenTypes.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
odeGenTypes.cpp
1d5d81452d1e5f93f0fd6537a5909b1fcf94bb73 23-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate QualifiedDeclRefExpr, which captured the notion of a
qualified reference to a declaration that is not a non-static data
member or non-static member function, e.g.,

namespace N { int i; }
int j = N::i;

Instead, extend DeclRefExpr to optionally store the qualifier. Most
clients won't see or care about the difference (since
QualifierDeclRefExpr inherited DeclRefExpr). However, this reduces the
number of top-level expression types that clients need to cope with,
brings the implementation of DeclRefExpr into line with MemberExpr,
and simplifies and unifies our handling of declaration references.

Extended DeclRefExpr to (optionally) store explicitly-specified
template arguments. This occurs when naming a declaration via a
template-id (which will be stored in a TemplateIdRefExpr) that,
following template argument deduction and (possibly) overload
resolution, is replaced with a DeclRefExpr that refers to a template
specialization but maintains the template arguments as written.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84962 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
odeGenFunction.h
a2813cec2605ce7878d1b13471d685f689b251af 23-Oct-2009 Douglas Gregor <dgregor@apple.com> Eliminate QualifiedDeclRefExpr, which captured the notion of a
qualified reference to a declaration that is not a non-static data
member or non-static member function, e.g.,

namespace N { int i; }
int j = N::i;

Instead, extend DeclRefExpr to optionally store the qualifier. Most
clients won't see or care about the difference (since
QualifierDeclRefExpr inherited DeclRefExpr). However, this reduces the
number of top-level expression types that clients need to cope with,
brings the implementation of DeclRefExpr into line with MemberExpr,
and simplifies and unifies our handling of declaration references.

Extended DeclRefExpr to (optionally) store explicitly-specified
template arguments. This occurs when naming a declaration via a
template-id (which will be stored in a TemplateIdRefExpr) that,
following template argument deduction and (possibly) overload
resolution, is replaced with a DeclRefExpr that refers to a template
specialization but maintains the template arguments as written.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84962 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
odeGenFunction.h
f186e9b1eceb52d546fba5d1314854bc92b78ddc 23-Oct-2009 John McCall <rjmccall@apple.com> Emit calls using the canonical prototype of the called function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84947 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
00a1ad9a34f1006d8729aa3fab4fb5f233ab5a55 23-Oct-2009 John McCall <rjmccall@apple.com> Emit calls using the canonical prototype of the called function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84947 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
1ef3a22a2ff0ded72244381bdcb9a925f23e3428 23-Oct-2009 Mike Stump <mrs@apple.com> Fixup the return type of functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84922 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
odeGenFunction.cpp
91cc815ffd13d4a78ae1b5bd617e19dd555de4f4 23-Oct-2009 Mike Stump <mrs@apple.com> Fixup the return type of functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84922 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
odeGenFunction.cpp
ae32a8e8a672261d209b4553a60581c7cfd874eb 23-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Complete code gen for '.*' binary expression for
both scalar and aggregates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84910 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
odeGenFunction.h
8bfd31f9dad09cd52225d868bbd92a9bebe87775 23-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Complete code gen for '.*' binary expression for
both scalar and aggregates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84910 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
odeGenFunction.h
4ea8425c9601895fa137f877bc784f75f20adac6 23-Oct-2009 John McCall <rjmccall@apple.com> When building types from declarators, instead of building two types (one for
the DeclaratorInfo, one for semantic analysis), just build a single type whose
canonical type will reflect the semantic analysis (assuming the type is
well-formed, of course).

To make that work, make a few changes to the type system:
* allow the nominal pointee type of a reference type to be a (possibly sugared)
reference type. Also, preserve the original spelling of the reference type.
Both of these can be ignored on canonical reference types.
* Remove ObjCProtocolListType and preserve the associated source information on
the various ObjC TypeLocs. Preserve the spelling of protocol lists except in
the canonical form.
* Preserve some level of source type structure on parameter types, but
canonicalize on the canonical function type. This is still a WIP.

Drops code size, makes strides towards accurate source location representation,
slight (~1.7%) progression on Cocoa.h because of complexity drop.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84907 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
54e14c4db764c0636160d26c5bbf491637c83a76 23-Oct-2009 John McCall <rjmccall@apple.com> When building types from declarators, instead of building two types (one for
the DeclaratorInfo, one for semantic analysis), just build a single type whose
canonical type will reflect the semantic analysis (assuming the type is
well-formed, of course).

To make that work, make a few changes to the type system:
* allow the nominal pointee type of a reference type to be a (possibly sugared)
reference type. Also, preserve the original spelling of the reference type.
Both of these can be ignored on canonical reference types.
* Remove ObjCProtocolListType and preserve the associated source information on
the various ObjC TypeLocs. Preserve the spelling of protocol lists except in
the canonical form.
* Preserve some level of source type structure on parameter types, but
canonicalize on the canonical function type. This is still a WIP.

Drops code size, makes strides towards accurate source location representation,
slight (~1.7%) progression on Cocoa.h because of complexity drop.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84907 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
7480534aa1979f5c8a6c1d59ede223ba21f280e5 22-Oct-2009 John McCall <rjmccall@apple.com> Canonicality is a property of qualified types, not unqualified types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84891 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
467b27b9a24bdc823218ad1ad0e37673b6cc1e83 22-Oct-2009 John McCall <rjmccall@apple.com> Canonicality is a property of qualified types, not unqualified types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84891 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
df7e585387279b534186a15cf3db8a75c7d16449 22-Oct-2009 Mike Stump <mrs@apple.com> Remove some misguided code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84823 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
d3dd0aeb14fc9b12af1e2a36aa040234eddc6582 22-Oct-2009 Mike Stump <mrs@apple.com> Remove some misguided code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84823 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
1722951a44aeac688e05d9f9310097ef6fa233d5 22-Oct-2009 Mike Stump <mrs@apple.com> Extend out the block descriptor structure for debug information with
the copy/dispose helpers as appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84817 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
083c25eea14bb4cc4ecc3ec763c60e2e609e22bd 22-Oct-2009 Mike Stump <mrs@apple.com> Extend out the block descriptor structure for debug information with
the copy/dispose helpers as appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84817 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
ae117195d0ceef797b46d656f59de60f4966ae05 22-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen for '.*' binary expressions - WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84800 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
f51dc64f90851f636302dbaaf3f52c0524cdac36 22-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen for '.*' binary expressions - WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84800 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1211dcbe754519ffd35553bcc46189e1b1c4f0d6 22-Oct-2009 Mike Stump <mrs@apple.com> Turn on the preallocation of all BlockDeclRefExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84789 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
0298d3888bcc666e7bd902de9b8497f53ccd1b3d 22-Oct-2009 Mike Stump <mrs@apple.com> Turn on the preallocation of all BlockDeclRefExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84789 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
8bfdb67857d364c61550ba22301a9a8b935e32fb 22-Oct-2009 Mike Stump <mrs@apple.com> Refine collection of BlockDeclRefExprs. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84787 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
38e1627e895cd276186ebf177f75ba5d229c3fd7 22-Oct-2009 Mike Stump <mrs@apple.com> Refine collection of BlockDeclRefExprs. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84787 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
06d37e5ece36c1eb3f5ac90499df433189e9feb5 21-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Expand on code gen. for pointer to data members so it works
for base classe members as well. Test case enhanced for this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84780 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
39762951ad2abfed7b743c01c672fac85034b856 21-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Expand on code gen. for pointer to data members so it works
for base classe members as well. Test case enhanced for this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84780 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
fb98db247ade4e1b2dcae0d34948cd0b1e77b600 21-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen for pointer-to-datamember - WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84771 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
a63629930177da7a0eb99c3fdfb35d8618808ca1 21-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen for pointer-to-datamember - WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84771 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
f0b2472482ba96896543f8bac99d6281856e7b5c 21-Oct-2009 Mike Stump <mrs@apple.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84770 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
bfbd5df38ba91234821c48dcf14adb0e1be512f2 21-Oct-2009 Mike Stump <mrs@apple.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84770 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
147986258f8c8aed815ffa7e2e6606daea8970cd 21-Oct-2009 Mike Stump <mrs@apple.com> Refactor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84769 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
bf5fd788b0069e6da159ad95e9d0c4315eb266b6 21-Oct-2009 Mike Stump <mrs@apple.com> Refactor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84769 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
b9b47b928ed8888840b8fc3534e7b182cd57b39f 21-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Add AuroraUX ABI Triple in correct place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84758 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
727e268bd2974a7b16af65a5cfdfe47da9ebeb6c 21-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Add AuroraUX ABI Triple in correct place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84758 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
f9c1e2a127f577045d22ccdcb4a6a3d8bf4fc800 21-Oct-2009 Mike Stump <mrs@apple.com> Prep work to always preallocate BlockDeclRefExprs so that we can
generate the debug information for the first parameter to the block
invoke functions. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84737 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
odeGenFunction.h
ea26cb522e88fc86b0d1cae61dcefcfe4cc20231 21-Oct-2009 Mike Stump <mrs@apple.com> Prep work to always preallocate BlockDeclRefExprs so that we can
generate the debug information for the first parameter to the block
invoke functions. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84737 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
odeGenFunction.h
152b5434596d43b4336b12e3296c18c6c0319622 21-Oct-2009 Mike Stump <mrs@apple.com> Fix 80-col violation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84719 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
04c688a3b7f075d836f3b0f4c7d9a10200b8c968 21-Oct-2009 Mike Stump <mrs@apple.com> Fix 80-col violation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84719 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
e849e4506f13f42b4de026956e8bb222588ca007 21-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Code-gen for CXXZeroInitValueExpr AST passed
as argument to a function call. Removes a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84694 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
odeGenFunction.h
48620bafe4ba879f96c2d17caefeb79f3fae2eea 21-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Code-gen for CXXZeroInitValueExpr AST passed
as argument to a function call. Removes a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84694 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
odeGenFunction.h
1bf508c201e3c76a30c41b8b653d033a8aa6d640 21-Oct-2009 Anders Carlsson <andersca@mac.com> Fix the 32-bit ABI to return structures with non-trivial copy ctors or dtors indirectly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84686 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
40092972b591646b47037d2b46b695a4014df413 21-Oct-2009 Anders Carlsson <andersca@mac.com> Fix the 32-bit ABI to return structures with non-trivial copy ctors or dtors indirectly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84686 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
8a74348ed5f6c90468ad16e44e6e6c5b9bc0084e 20-Oct-2009 Mike Stump <mrs@apple.com> For now, we need to have the llvm type of the block pointer remain as
it was. Fixes codegen bug introduced yesterday.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84668 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
bf1914ba8b3ed6c8492ac5857d790384b019cd0a 20-Oct-2009 Mike Stump <mrs@apple.com> For now, we need to have the llvm type of the block pointer remain as
it was. Fixes codegen bug introduced yesterday.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84668 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
c76ae17f5d3bece8233fa2ae702af2bcb4765a7e 20-Oct-2009 Devang Patel <dpatel@apple.com> Do not eagerly cache DITypes because it allows real struct type to be shadowed by forward declared struct type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84659 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ca80a5fc5bbc377c2c70901839a3fb37d5716879 20-Oct-2009 Devang Patel <dpatel@apple.com> Do not eagerly cache DITypes because it allows real struct type to be shadowed by forward declared struct type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84659 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d77ab425fde69e18048358bc2e2019802df52528 20-Oct-2009 Devang Patel <dpatel@apple.com> Encode global variable name in debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84653 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f6a39b71a4d57ef339073277ca0cfe9376268274 20-Oct-2009 Devang Patel <dpatel@apple.com> Encode global variable name in debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84653 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7b0d46c34fd7740d371d31708f6498c4863d4826 20-Oct-2009 Daniel Dunbar <daniel@zuster.org> Add missing semi-colon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84650 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
2b6c7314b3072cce12679487b4b6bd684bc8b24e 20-Oct-2009 Daniel Dunbar <daniel@zuster.org> Add missing semi-colon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84650 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
fccf3a14b051a2b20ffacfcc2175f0ba4fdbc11e 20-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Bring Darwin into the switch-case statement instead of its own if for readability.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84646 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
7ee68bd706c0ade45d3d1e85c77e25678f5ab1e8 20-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Bring Darwin into the switch-case statement instead of its own if for readability.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84646 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
7ec499ecbdabd1c77acc30026ca9e576be629b75 20-Oct-2009 Mike Stump <mrs@apple.com> Refine the type of the first parameter to block invoke functions.
WIP. I have yet to find the magic incantation to get the structure
type to be defined. If someone has a pointer, love to hear it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84590 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
adaaad3715c9c26cdcfdfe3401a13d7b4423ddcf 20-Oct-2009 Mike Stump <mrs@apple.com> Refine the type of the first parameter to block invoke functions.
WIP. I have yet to find the magic incantation to get the structure
type to be defined. If someone has a pointer, love to hear it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84590 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
dc24a867483c804d42b342b733282bb8701beb0e 19-Oct-2009 Anders Carlsson <andersca@mac.com> Handle emitting the assignment operator when the lhs is a reference. Fixes PR5227.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84518 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
86aa0cdfd5aa7b099efbcd612a014d1b5f0ff799 19-Oct-2009 Anders Carlsson <andersca@mac.com> Handle emitting the assignment operator when the lhs is a reference. Fixes PR5227.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84518 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
eaaad62409356b3be58a687bdf2c7797138ba33d 19-Oct-2009 Daniel Dunbar <daniel@zuster.org> Avoid std::string concatenation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84458 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c575ce7287ed9b5a2657aa0079595ebb59490afb 19-Oct-2009 Daniel Dunbar <daniel@zuster.org> Avoid std::string concatenation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84458 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7b4c8168db5fdd46714fd87f521e5d8dea1886da 19-Oct-2009 Daniel Dunbar <daniel@zuster.org> Twinify CodeGenFunction::CreateTempAlloca

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84456 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
odeGenFunction.h
259e9ccf882d11491ad149aec5e6d7a061c9f938 19-Oct-2009 Daniel Dunbar <daniel@zuster.org> Twinify CodeGenFunction::CreateTempAlloca

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84456 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
odeGenFunction.h
7d3040b91a194eecee817a5f22292820f1f4b262 19-Oct-2009 Anders Carlsson <andersca@mac.com> When binding a reference to a temporary, it's important that other temporaries created as on the RHS are destroyed before emitting the dtor for the temporary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84451 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
e1b7ea1b025c54b082f838ede2f483e657481fdc 19-Oct-2009 Anders Carlsson <andersca@mac.com> When binding a reference to a temporary, it's important that other temporaries created as on the RHS are destroyed before emitting the dtor for the temporary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84451 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
1ed2bb804102b54d62426d8aa4f60bcd6f2a6cb0 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients
are updated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84447 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
angle.cpp
01eb9b9683535d8a65c704ad2c545903409e2d36 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients
are updated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84447 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
angle.cpp
76329b535a0666c66199b71b3b3cee7b2ba12597 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> Twinify CGObjCMac, this simplifies the code and should reduce std::string
trashing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84439 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9c29bf597ee1d085ecce1e1fcbd3c6beed18127a 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> Twinify CGObjCMac, this simplifies the code and should reduce std::string
trashing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84439 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b209eea3eeb63a566754271ac42d11bd5aa47663 18-Oct-2009 Anders Carlsson <andersca@mac.com> Use CK_BitCast for member function pointer casts. Fixes PR5138.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84438 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
bb378cbf04e343fb15ae3611a153dde60671b514 18-Oct-2009 Anders Carlsson <andersca@mac.com> Use CK_BitCast for member function pointer casts. Fixes PR5138.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84438 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
b816548812c8dcfe9080b86b900ec94396fdcdc8 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> Move misc clients to IdentifierInfo StringRef API.
- strcmp -> ==
- OS.write(II->getName() ...) -> OS << II->getNameStr()
- Avoid std::string concatenation
- Use getNameStr().str() when an std::string is really needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84437 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
5ffe14ca96bd662de7820f6875d3f04789a640c1 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> Move misc clients to IdentifierInfo StringRef API.
- strcmp -> ==
- OS.write(II->getName() ...) -> OS << II->getNameStr()
- Avoid std::string concatenation
- Use getNameStr().str() when an std::string is really needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84437 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
03b6887fba9685a66992650252b2af29759de4cf 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> Move clients to use IdentifierInfo::getNameStart() instead of getName()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84436 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
e013d685c6689ac7ae103ee88acf573422d1ed6a 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> Move clients to use IdentifierInfo::getNameStart() instead of getName()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84436 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4c79f9f82327afe82fe675273255410431c5bfd7 18-Oct-2009 Nate Begeman <natebegeman@mac.com> Support IRgen of OpenCL vector initializers, ensuring the resulting IR is in a
form that LLVM code generators can turn into efficient code. For example,
int4 a, b, c;
a = (int4)(b.yzw, a.x)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84434 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
0533b3020ca39898751d4200feed776861dcd1ce 18-Oct-2009 Nate Begeman <natebegeman@mac.com> Support IRgen of OpenCL vector initializers, ensuring the resulting IR is in a
form that LLVM code generators can turn into efficient code. For example,
int4 a, b, c;
a = (int4)(b.yzw, a.x)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84434 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
ac892b549fb25b82a60a28309837b823b45083f5 18-Oct-2009 Anders Carlsson <andersca@mac.com> Add some more cast kinds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84423 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
82debc7d282e723e58d183bfa89ddc2500a8daaf 18-Oct-2009 Anders Carlsson <andersca@mac.com> Add some more cast kinds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84423 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
4bc6e754945f69f945a39875d03d53c51f0fe1b2 18-Oct-2009 Nuno Lopes <nunoplopes@sapo.pt> add support for codegening CXXZeroInitValueExprs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84418 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
329763b1e9ec8c216025e3a8379ed446d7372cbc 18-Oct-2009 Nuno Lopes <nunoplopes@sapo.pt> add support for codegening CXXZeroInitValueExprs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84418 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
77efd722168a22120a11e8b2b6e9a678cc967ff0 17-Oct-2009 Daniel Dunbar <daniel@zuster.org> Suppress -Asserts warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84329 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
babac13bb332974c8bb800b1a9714bcdf5afefcc 17-Oct-2009 Daniel Dunbar <daniel@zuster.org> Suppress -Asserts warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84329 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
9b6912ceefbf15964758b835b62f75a60fa5b4ce 17-Oct-2009 Chris Lattner <sabre@nondot.org> Fix PR5211: codegen shouldn't assume that the result of ||/&& is int
anymore. In C++ it is bool.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84308 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
7804bcba90bf5ea8ec6cd0f6cc9a64577f1a9259 17-Oct-2009 Chris Lattner <sabre@nondot.org> Fix PR5211: codegen shouldn't assume that the result of ||/&& is int
anymore. In C++ it is bool.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84308 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
e835ef0ef9e8a33039f9fbd12b5374585fa80e0e 16-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Implement derived-to-base AST/code gen. There is a
FIXME in CGCXX.cpp that I would like Anders to
take a look at.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84265 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
93034ca3d025e948ddfcdd78868957efc70741a7 16-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Implement derived-to-base AST/code gen. There is a
FIXME in CGCXX.cpp that I would like Anders to
take a look at.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84265 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
fbadafdc428539b2eb148a54ebfcd7857255a732 16-Oct-2009 Nuno Lopes <nunoplopes@sapo.pt> ignore 'using' directive in CodeGenFunction::EmitDecl(). this fixes PR5085

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84255 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
77378b25cd11d6464eb74a6b436231589b750270 16-Oct-2009 Nuno Lopes <nunoplopes@sapo.pt> ignore 'using' directive in CodeGenFunction::EmitDecl(). this fixes PR5085

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84255 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
3cb081baeb6f03d25ee6b48ac5ef60652b35d083 16-Oct-2009 Anders Carlsson <andersca@mac.com> Builtin types are subsitutable if they are qualified. Fixes PR5196.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84237 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
410f7640cfa7483132b1524138b1333b9fb9ab33 16-Oct-2009 Anders Carlsson <andersca@mac.com> Builtin types are subsitutable if they are qualified. Fixes PR5196.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84237 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
32b25ab7d4b3355b804e367c90f5cd55f4c9187e 16-Oct-2009 John McCall <rjmccall@apple.com> Remove the ConstantArrayType subtypes. This information is preserved in the
TypeLoc records for declarations; it should not be necessary to represent it
directly in the type system.

Please complain if you were using these classes and feel you can't replicate
previous functionality using the TypeLoc API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84222 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
46a617a792bfab0d9b1e057371ea3b9540802226 16-Oct-2009 John McCall <rjmccall@apple.com> Remove the ConstantArrayType subtypes. This information is preserved in the
TypeLoc records for declarations; it should not be necessary to represent it
directly in the type system.

Please complain if you were using these classes and feel you can't replicate
previous functionality using the TypeLoc API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84222 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1832f57fb7fb32c88c8f86cec549ef0de62db987 15-Oct-2009 Mike Stump <mrs@apple.com> Refine non-virtual part of the this adjustment for thunks. Refine
non-virtual part of the return result adjustments for covariant
thunks. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84178 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
3425b97cc630717098f719d2d861b7e2be960bd0 15-Oct-2009 Mike Stump <mrs@apple.com> Refine non-virtual part of the this adjustment for thunks. Refine
non-virtual part of the return result adjustments for covariant
thunks. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84178 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
01583436261da9e55feb323790dcd9ce1b626e6f 15-Oct-2009 Mike Stump <mrs@apple.com> Track the offset to the current virtual base in CurrentVBaseOffset.
Track path information completely to ensure we get all the overrides. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84166 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
11dea9492993498865361aea9dbf819812375bf1 15-Oct-2009 Mike Stump <mrs@apple.com> Track the offset to the current virtual base in CurrentVBaseOffset.
Track path information completely to ensure we get all the overrides. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84166 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
73d771205fa157a2bf3a0fe5ed0b21a943a3e404 15-Oct-2009 Anders Carlsson <andersca@mac.com> Handle

struct A { };
struct B : A { };

void f() {
const A& a = B();
}

correctly. (This now does the offset conversion if necessary and calls the destructor when a goes out of scope).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84162 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
b3f744252a460c45e2e77053491285978286c384 15-Oct-2009 Anders Carlsson <andersca@mac.com> Handle

struct A { };
struct B : A { };

void f() {
const A& a = B();
}

correctly. (This now does the offset conversion if necessary and calls the destructor when a goes out of scope).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84162 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
b043b926d4d36c5db79c9114b33b695335449cc7 14-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Fix a thinko that John pointed out

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84142 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a0f00a71fcb0f98298709d5e5318339acf7958ac 14-Oct-2009 Douglas Gregor <dgregor@apple.com> Fix a thinko that John pointed out

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84142 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
89f408a6b2d78c18b79163415ba155c1029fab63 14-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Give explicit and implicit instantiations of static data members of
class templates the proper linkage.

Daniel, please look over the CodeGenModule bits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84140 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
1028c9f0afc1cc5f4951b39b7067fa57c1fea07b 14-Oct-2009 Douglas Gregor <dgregor@apple.com> Give explicit and implicit instantiations of static data members of
class templates the proper linkage.

Daniel, please look over the CodeGenModule bits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84140 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
669691587cc2307fa65c8ec70ce6988ae68f7313 14-Oct-2009 Mike Stump <mrs@apple.com> Shift the vcall slots for non-virtual bases of a virtual base, up into
the virtual base so they can be reused properly. Don't reuse vcall
slots across a virtual boundary. WIP. I have a testcase, but there
are still things that need to be fixed before the testcase can go in.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84120 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
0ca4279d84635e1e54951761bd6fe89a45a23ff1 14-Oct-2009 Mike Stump <mrs@apple.com> Shift the vcall slots for non-virtual bases of a virtual base, up into
the virtual base so they can be reused properly. Don't reuse vcall
slots across a virtual boundary. WIP. I have a testcase, but there
are still things that need to be fixed before the testcase can go in.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84120 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
6fe68e891635ec238ac1924175ebe7abf43f7786 14-Oct-2009 Devang Patel <dpatel@apple.com> Copy metadata associated with CI


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84114 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
aa40454a14837c573f323e29269cc0b53f495a13 14-Oct-2009 Devang Patel <dpatel@apple.com> Copy metadata associated with CI


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84114 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
58c9d8cd7ccf5a6bb3e48b8f76b001726b225ba8 14-Oct-2009 Duncan Sands <baldrick@free.fr> There is now only one version of eh.selector and eh.typeid.for.
Fix the clang build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84107 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
790b20ed2cec72b4a79d1829ffc2c0339acbdec3 14-Oct-2009 Duncan Sands <baldrick@free.fr> There is now only one version of eh.selector and eh.typeid.for.
Fix the clang build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84107 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
e0a13b443b1b3120a45536b0373ee27a56e742a6 14-Oct-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Few targets like PIC16 mangle the names of global variables, so retrieve the name
from Var itself rather than the decl for DebugInfo metadata.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84102 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2d7bc3e59517bf42ae855669c55844d868f4b21a 14-Oct-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Few targets like PIC16 mangle the names of global variables, so retrieve the name
from Var itself rather than the decl for DebugInfo metadata.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84102 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
bba981c237207bf87b57575837748a53c64f10d9 14-Oct-2009 Chris Lattner <sabre@nondot.org> fix some cfstring related issues:
1) -fwritable-string does affect the non-utf16 version of cfstrings
just not the utf16 ones.
2) utf16 strings should always be marked constant, as the __TEXT segment
is readonly.
3) The name of the global doesn't matter, remove it from TargetInfo.
4) Trust the asmprinter to drop cstrings into the right section, like llvmgcc does now.

This fixes rdar://7115750



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84077 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
278b9f06933c385ffbccc15f8491787470cb4a1b 14-Oct-2009 Chris Lattner <sabre@nondot.org> fix some cfstring related issues:
1) -fwritable-string does affect the non-utf16 version of cfstrings
just not the utf16 ones.
2) utf16 strings should always be marked constant, as the __TEXT segment
is readonly.
3) The name of the global doesn't matter, remove it from TargetInfo.
4) Trust the asmprinter to drop cstrings into the right section, like llvmgcc does now.

This fixes rdar://7115750



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84077 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2261928eb480b1d5bff0532bb9a37e7fd20b9827 14-Oct-2009 Chris Lattner <sabre@nondot.org> unbreak test/CodeGen/builtins.c, reverting Devang's change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84075 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
00549fcec0490b2daf27543e532f94adbb186063 14-Oct-2009 Chris Lattner <sabre@nondot.org> unbreak test/CodeGen/builtins.c, reverting Devang's change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84075 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b7a0febe3b16139362b22124d40d2c5bc4411d44 14-Oct-2009 Devang Patel <dpatel@apple.com> Check void type before using replaceAllUsesWith().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84050 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
9c0957069f3a92c5ee1e3da630ef360eca5b2061 14-Oct-2009 Devang Patel <dpatel@apple.com> Check void type before using replaceAllUsesWith().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84050 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
0bffe3642945dd841113dabc2394acaf86c54705 14-Oct-2009 Mike Stump <mrs@apple.com> Refine handling for non-virtual bases in return value adjustments for
covariant thunks. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84046 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
ab28c130934eeb22f6d30661e72c39430b96b3e2 14-Oct-2009 Mike Stump <mrs@apple.com> Refine handling for non-virtual bases in return value adjustments for
covariant thunks. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84046 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
GVtable.h
9d731dbc401f2cd8cf729e60b98fb036c2f8a593 14-Oct-2009 Chris Lattner <sabre@nondot.org> fix test/CodeGen/statements.c on 32-bit hosts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84039 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
430656e1c392dcd9f17fe91a495421d69fca1bc8 14-Oct-2009 Chris Lattner <sabre@nondot.org> fix test/CodeGen/statements.c on 32-bit hosts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84039 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
357e2f6969dbcb784c012c89783e110fffee7c00 13-Oct-2009 Mike Stump <mrs@apple.com> Ensure we sign extend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84031 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
cd542a1d8f231f9c162df66598af13ae1c6f4f07 13-Oct-2009 Mike Stump <mrs@apple.com> Ensure we sign extend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84031 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
9025143956b689735858594a48cad0339ad3064f 13-Oct-2009 Anders Carlsson <andersca@mac.com> Don't assume that the LHS and RHS of a member pointer expression is a DeclRefExpr. Fixes PR5177.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83986 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
3eea6350412eb7db13f0e2791c118920b36130a4 13-Oct-2009 Anders Carlsson <andersca@mac.com> Don't assume that the LHS and RHS of a member pointer expression is a DeclRefExpr. Fixes PR5177.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83986 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
03a67bee9ad8199c43e422ca6c7628a4a82f6337 13-Oct-2009 Mike Stump <mrs@apple.com> Remove FIXME. We construct VBIndex very early, before any calls to OverrideMethod.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83981 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
e647d93be5a70e737d4fcf3913a0e07d5a57cade 13-Oct-2009 Mike Stump <mrs@apple.com> Remove FIXME. We construct VBIndex very early, before any calls to OverrideMethod.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83981 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
9ba25ac74cb5aa08fd39a43c469b641d109c49cd 13-Oct-2009 Devang Patel <dpatel@apple.com> Remove extra white space line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83979 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
70cf5306f0ae9a36642858fdaa4ce7ff8194a20d 13-Oct-2009 Devang Patel <dpatel@apple.com> Remove extra white space line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83979 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
fe047d5841641a43874a05a4623ecba1a2774761 13-Oct-2009 Devang Patel <dpatel@apple.com> Do not check use_empty() before invoking replaceAllUsesWith().
Let replaceAllUsesWith() adjust VHs even though there are no uses.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83978 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
3b122bc5f1203615e2128e0c1a63da438865b1cc 13-Oct-2009 Devang Patel <dpatel@apple.com> Do not check use_empty() before invoking replaceAllUsesWith().
Let replaceAllUsesWith() adjust VHs even though there are no uses.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83978 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
0bf9ce6c6fe1272b0d2a49d79d03e457c7acd9f8 13-Oct-2009 Mike Stump <mrs@apple.com> Refine handling for return value conversions with respect to virtual
offsets for covariant thunks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83965 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
d9878a181f09ffc76b61d430aa3a001102fda5af 13-Oct-2009 Mike Stump <mrs@apple.com> Refine handling for return value conversions with respect to virtual
offsets for covariant thunks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83965 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
b9272f90e415a2c804177d1ca1be509d7fb66992 13-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> Simplify pointer creation with the new Type::getInt*Ptr methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83964 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GBuiltin.cpp
GCXXClass.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
argetABIInfo.cpp
3c0ef8cc0dc246bd3083e8cdd63005e8873d36d2 13-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> Simplify pointer creation with the new Type::getInt*Ptr methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83964 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GBuiltin.cpp
GCXXClass.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
argetABIInfo.cpp
62177111c9fddf48eab22cca11110bd47977cbba 13-Oct-2009 Chris Lattner <sabre@nondot.org> Teach sema and codegen about the difference between address of labels,
which is a common idiom to improve PIC'ness of code using the addr of
label extension. This implementation is a gross hack, but the only other
alternative would be to teach evalutate about this horrid combination.
While GCC allows things like "&&foo - &&bar + 1", people don't use this
in practice. This implements PR5131.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83957 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
3ae9f48ae0d07a5aa352bf03c944f557a5ac4c95 13-Oct-2009 Chris Lattner <sabre@nondot.org> Teach sema and codegen about the difference between address of labels,
which is a common idiom to improve PIC'ness of code using the addr of
label extension. This implementation is a gross hack, but the only other
alternative would be to teach evalutate about this horrid combination.
While GCC allows things like "&&foo - &&bar + 1", people don't use this
in practice. This implements PR5131.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83957 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
9c870469d458c5adb0530fa54ead33a9b9216252 13-Oct-2009 Chris Lattner <sabre@nondot.org> reimplement codegen for indirect goto with the following advantages:

1. CGF now has fewer bytes of state (one pointer instead of a vector).
2. The generated code is determinstic, instead of getting labels in
'map order' based on pointer addresses.
3. Clang now emits one 'indirect goto switch' for each function, instead
of one for each indirect goto. This fixes an M*N = N^2 IR size issue
when there are lots of address-taken labels and lots of indirect gotos.
4. This also makes the default cause do something useful, reducing the
size of the jump table needed (by one).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83952 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
3d00fdc82fd550ae4bfbb2e700a1fc85bbd6d6fd 13-Oct-2009 Chris Lattner <sabre@nondot.org> reimplement codegen for indirect goto with the following advantages:

1. CGF now has fewer bytes of state (one pointer instead of a vector).
2. The generated code is determinstic, instead of getting labels in
'map order' based on pointer addresses.
3. Clang now emits one 'indirect goto switch' for each function, instead
of one for each indirect goto. This fixes an M*N = N^2 IR size issue
when there are lots of address-taken labels and lots of indirect gotos.
4. This also makes the default cause do something useful, reducing the
size of the jump table needed (by one).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83952 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
1a7320130d9ba400188011d87768682a743d14b1 13-Oct-2009 Chris Lattner <sabre@nondot.org> number address-taken labels from 1. This allows 0 to be used as a sentinel
for a null pointer. In other words, "&&foo != NULL" will always work out to
true.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83948 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
9329a5c2924bc2c6379d7c202a4b312321edd719 13-Oct-2009 Chris Lattner <sabre@nondot.org> number address-taken labels from 1. This allows 0 to be used as a sentinel
for a null pointer. In other words, "&&foo != NULL" will always work out to
true.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83948 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
8bf4e81093dcb498d032c90806efffcc67c1f55c 13-Oct-2009 Chris Lattner <sabre@nondot.org> Use the new Type::getInt8PtrTy method. This should probably be used in a lot
more places in clang codegen now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83947 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
36afd38fb749ab34c8341a1dc70366bca904eaa3 13-Oct-2009 Chris Lattner <sabre@nondot.org> Use the new Type::getInt8PtrTy method. This should probably be used in a lot
more places in clang codegen now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83947 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
c74519fe1b39732390f6b957bb3a6651a075ce85 13-Oct-2009 Devang Patel <dpatel@apple.com> Enable "debug info attached to an instruction" mode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83928 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
55df71abf0c48a73ae7b7c3abaf611337a2cf12d 13-Oct-2009 Devang Patel <dpatel@apple.com> Enable "debug info attached to an instruction" mode.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83928 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
835c8ca6d27a536a9d178ffc9b2e09cd9caff34e 13-Oct-2009 Devang Patel <dpatel@apple.com> There is no need to attach debug location info with alloca instruction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83913 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
d35e2e0c35432bd3a8c195fe62d53a1c3bbf37c0 13-Oct-2009 Devang Patel <dpatel@apple.com> There is no need to attach debug location info with alloca instruction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83913 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
1ee3741dc63fc99ae4a1e5a8a1f5facbb579a8d6 13-Oct-2009 Devang Patel <dpatel@apple.com> Encode long double.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83912 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7c173cbcd7830546b4d5ba58559716c096875b0e 13-Oct-2009 Devang Patel <dpatel@apple.com> Encode long double.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83912 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b6f3c3b43c80c6d69c89f6a92d6dddcedf64735f 12-Oct-2009 Anders Carlsson <andersca@mac.com> Store the key function of a record decl inside CGRecordLayout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83900 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
odeGenTypes.h
5017a157c6c5462ea1d4154d7d758ee3d277b735 12-Oct-2009 Anders Carlsson <andersca@mac.com> Store the key function of a record decl inside CGRecordLayout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83900 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
odeGenTypes.h
582b622a16133e98e28c066a16e9ac5238fc298b 12-Oct-2009 Anders Carlsson <andersca@mac.com> Even more devirtualization cleverness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83886 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
4a0d832ecdc15b0667616d3ec570cade4761ceaf 12-Oct-2009 Anders Carlsson <andersca@mac.com> Even more devirtualization cleverness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83886 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
1669c7d96577abc547e32ba48a30801b61ca5b8f 12-Oct-2009 Anders Carlsson <andersca@mac.com> More devirtualization improvements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83883 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
cf5deecd7885b544f1197846897513858863e3af 12-Oct-2009 Anders Carlsson <andersca@mac.com> More devirtualization improvements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83883 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
42e1589fc22492e462eda271e1040e06041bc18f 12-Oct-2009 Anders Carlsson <andersca@mac.com> Devirtualize calls on temporaries. A().f() for example.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83882 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
76366487694e92509f938164f384bbdfad002f2b 12-Oct-2009 Anders Carlsson <andersca@mac.com> Devirtualize calls on temporaries. A().f() for example.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83882 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
ae0b3a7fee27794284e5e668bf2cbc7b33cf465c 12-Oct-2009 Anders Carlsson <andersca@mac.com> Factor out devirtualization checking into a separate function and make it handle references correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83880 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
8e7670de19334eccfe9ac5fc70fa57015b1654c8 12-Oct-2009 Anders Carlsson <andersca@mac.com> Factor out devirtualization checking into a separate function and make it handle references correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83880 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
2997cb7fdfb9903c3ba9280fc38af08c0ab6245b 12-Oct-2009 Anders Carlsson <andersca@mac.com> If the base type of a member call is a record type we don't need to emit a virtual call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83816 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
3b89f3fa61b65b73f58808c037826c8333830313 12-Oct-2009 Anders Carlsson <andersca@mac.com> If the base type of a member call is a record type we don't need to emit a virtual call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83816 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
3c2dad0c27408085939c71eb5d852192ed06fecb 12-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove dead variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83808 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
7a9474e0251127e0e7d706cfca252632eb68786d 12-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove dead variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83808 91177308-0d34-0410-b5e6-96231b3b80d8
GVtable.cpp
836418d757d76e4e453e374d0c470777a8cfa603 12-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> Add CGVtable.cpp to CMakeLists.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83800 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
091c1c275703b3faf1434181cb322ff2f2b62f8e 12-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> Add CGVtable.cpp to CMakeLists.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83800 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
6717a3b86de7e7592a812fcc63f544361732a5b8 12-Oct-2009 Anders Carlsson <andersca@mac.com> Move the vtable builder to CGVtable.cpp, general cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83798 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprAgg.cpp
GExprConstant.cpp
GVtable.cpp
GVtable.h
odeGenModule.cpp
odeGenModule.h
dbd920c7758e6dfb678a8f503fb14ba97c26f23a 12-Oct-2009 Anders Carlsson <andersca@mac.com> Move the vtable builder to CGVtable.cpp, general cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83798 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprAgg.cpp
GExprConstant.cpp
GVtable.cpp
GVtable.h
odeGenModule.cpp
odeGenModule.h
d5eefb1e13edfca1f65a3be194852decce7dd046 11-Oct-2009 Anders Carlsson <andersca@mac.com> Change mangleCXXVtable and mangleCXXRtti to take CXXRecordDecls instead of QualTypes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83793 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GRtti.cpp
angle.cpp
angle.h
fc3bf4d4d2aea8353541a5710bed2ad00c451b68 11-Oct-2009 Anders Carlsson <andersca@mac.com> Change mangleCXXVtable and mangleCXXRtti to take CXXRecordDecls instead of QualTypes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83793 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GRtti.cpp
angle.cpp
angle.h
0a6767693493f8b8aaeddedc76ea49167fee13f2 10-Oct-2009 Anders Carlsson <andersca@mac.com> Move our (non-existing) RTTI emission code into CGRtti.cpp. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83732 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GRtti.cpp
MakeLists.txt
656e4c10dcbef73198423b9e2b5d7690269a61b7 10-Oct-2009 Anders Carlsson <andersca@mac.com> Move our (non-existing) RTTI emission code into CGRtti.cpp. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83732 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GRtti.cpp
MakeLists.txt
944195921d13208ef1528f3e1d107fbcd16ea57e 10-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Generate weak read barriers when reading a weak __block
variable inside the block.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83729 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
f7bcc7e6c803a2b2f7b7f7fdfb2506dd25ec6de8 10-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Generate weak read barriers when reading a weak __block
variable inside the block.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83729 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
0649fba43ed202196fd93a8c50b4aad888493222 10-Oct-2009 Devang Patel <dpatel@apple.com> Revert 83567.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83676 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
fee53aa127b3d6af507af7e3c9f8fd3a975333fb 10-Oct-2009 Devang Patel <dpatel@apple.com> Revert 83567.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83676 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
884004f24e19f745df534cc47f3117f00a90dcfa 09-Oct-2009 Mike Stump <mrs@apple.com> Allow customization for the producer information in the debug output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83659 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
akefile
d8945d6ae0b4a40fd73b45dcc729215c5cfe1f5e 09-Oct-2009 Mike Stump <mrs@apple.com> Allow customization for the producer information in the debug output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83659 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
akefile
c7839f65e2565914343f6ad18723d08d5932e75c 09-Oct-2009 Mike Stump <mrs@apple.com> Avoid warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83609 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
25bc275c3f2188b2a08cc051f7af6611c8726750 09-Oct-2009 Mike Stump <mrs@apple.com> Avoid warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83609 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
ec0240c63cbf1e94db49fc2dd03c33988925ba53 09-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Installation of Clang libraries and headers, from Axel Naumann!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83582 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
14ea5696417a8e8d244a07091284cdeba57c6d4d 09-Oct-2009 Douglas Gregor <dgregor@apple.com> Installation of Clang libraries and headers, from Axel Naumann!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83582 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
93f9f49c47d7942c18e2c1abea66d91b4f584b55 08-Oct-2009 Devang Patel <dpatel@apple.com> Record location info before emiting alloca for arguments. This allows arguments to have proper location info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83567 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
e23429269f9cd86d6fed25432763fad520eb7f82 08-Oct-2009 Devang Patel <dpatel@apple.com> Record location info before emiting alloca for arguments. This allows arguments to have proper location info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83567 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
6d35c4d1e7d355983bd72f5fdeb190e01c1bf699 08-Oct-2009 Anders Carlsson <andersca@mac.com> If a global initializer has a non-trivial constructor or destructor, we never want to defer generation of it, even if it is declared static.

With this change we're finally able to compile and run the (infamous)

#include <string>
#include <iostream>

int main(int argc, char **argv) {
std::cout << "Hello, World" << std::endl;
}

$ clang hello.cpp -lstdc++ -o hello
$ ./hello
Hello, World



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83559 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
74d644abe56809d9bcea7311f37aa9063ab9e064 08-Oct-2009 Anders Carlsson <andersca@mac.com> If a global initializer has a non-trivial constructor or destructor, we never want to defer generation of it, even if it is declared static.

With this change we're finally able to compile and run the (infamous)

#include <string>
#include <iostream>

int main(int argc, char **argv) {
std::cout << "Hello, World" << std::endl;
}

$ clang hello.cpp -lstdc++ -o hello
$ ./hello
Hello, World



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83559 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b6a502775b1604b289b0119f634c6c245faaec48 08-Oct-2009 Anders Carlsson <andersca@mac.com> Mangle std::basic_ostream<char, std::char_traits<char>> as So.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83557 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
8f8fd8ea7e5c5d04f95a3cf4af95aa93225bc2b4 08-Oct-2009 Anders Carlsson <andersca@mac.com> Mangle std::basic_ostream<char, std::char_traits<char>> as So.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83557 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
4eebfb8aebf4f4719d437e1ef457aefc5dfd78d9 07-Oct-2009 Anders Carlsson <andersca@mac.com> Mangle anonymous structs/unions correctly. Fixes PR5139.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83448 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
c4355b6883382b85cda3b7337587784dabf3450b 07-Oct-2009 Anders Carlsson <andersca@mac.com> Mangle anonymous structs/unions correctly. Fixes PR5139.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83448 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
a0b309c24b1676859c808734417b1347364cb94a 07-Oct-2009 Anders Carlsson <andersca@mac.com> Add a MangleContext and pass it to all mangle functions. It will be used for keeping state, such as identifiers assigned to anonymous structs as well as scope encoding.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83442 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
angle.cpp
angle.h
b540491851910c2efa68196a8bdc2eed1071c17d 07-Oct-2009 Anders Carlsson <andersca@mac.com> Add a MangleContext and pass it to all mangle functions. It will be used for keeping state, such as identifiers assigned to anonymous structs as well as scope encoding.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83442 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
angle.cpp
angle.h
cb3b46dd6a2c7d1aebeb1000d84b28d70653f08e 07-Oct-2009 Anders Carlsson <andersca@mac.com> Uncomment some commented out code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83428 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
edee783ed3edcd7fd988b9fb1dc58361a7e8f8a0 07-Oct-2009 Anders Carlsson <andersca@mac.com> Uncomment some commented out code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83428 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
b3feb66472fc6f845547007e87684f7d71c5a570 07-Oct-2009 Anders Carlsson <andersca@mac.com> Change GetAddressCXXOfBaseClass to use CXXBasePaths for calculating base class offsets. Fix the code to handle virtual bases as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83426 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXClass.cpp
odeGenFunction.h
2f1986b557fa671c4f8c9dd0d071398edfc073d5 07-Oct-2009 Anders Carlsson <andersca@mac.com> Change GetAddressCXXOfBaseClass to use CXXBasePaths for calculating base class offsets. Fix the code to handle virtual bases as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83426 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXClass.cpp
odeGenFunction.h
bb02a8d23f635ec40a0eb13fc7bc67f48a073542 06-Oct-2009 Anders Carlsson <andersca@mac.com> When mangling names, always use the canonical decl. Fixes PR5144.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83420 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
b217c1b9d2225521f4021984ad5a424784fa22bb 06-Oct-2009 Anders Carlsson <andersca@mac.com> When mangling names, always use the canonical decl. Fixes PR5144.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83420 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
68bbd0b25fb083bcd31b000c274e7e2f2b29c30e 06-Oct-2009 Devang Patel <dpatel@apple.com> InsertSubprogramStart if ATTACH_DEBUG_INFO_TO_AN_INSN is not defined.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83419 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
6e461bf75359b4eb2ae59058741c3c8ba898d60f 06-Oct-2009 Devang Patel <dpatel@apple.com> InsertSubprogramStart if ATTACH_DEBUG_INFO_TO_AN_INSN is not defined.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83419 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
45c8eda58f64ec2f3a074afc28c1f0699f5ebacf 06-Oct-2009 Devang Patel <dpatel@apple.com> Add support to attach debug info to an instruction.
This is not yet enabled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83399 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GExpr.cpp
GStmt.cpp
bbd9fa4b4a0fea47f94ac3eb4eaf5cc8079defe1 06-Oct-2009 Devang Patel <dpatel@apple.com> Add support to attach debug info to an instruction.
This is not yet enabled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83399 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GExpr.cpp
GStmt.cpp
7a96d2f960e24456335d82228fa3d1593535cfb8 06-Oct-2009 Anders Carlsson <andersca@mac.com> Emit the destructor epilogue in a cleanup block so a return from a destructor body still calls the epilogue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83397 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
c33e4ba20304e222692e77f2c6ad26a5d8d32f83 06-Oct-2009 Anders Carlsson <andersca@mac.com> Emit the destructor epilogue in a cleanup block so a return from a destructor body still calls the epilogue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83397 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
27aebb573b465f2955adae6620ab91020a80ff95 06-Oct-2009 Anders Carlsson <andersca@mac.com> Pass the right type to GetAddrOfFunction when getting functions for the VTable. Fixes PR5021.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83395 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
b299d3516d4722ef527b1070bb87133427e621a3 06-Oct-2009 Anders Carlsson <andersca@mac.com> Pass the right type to GetAddrOfFunction when getting functions for the VTable. Fixes PR5021.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83395 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
104aa6f2688f3740ea151c629db7ddd7a93a552d 06-Oct-2009 Devang Patel <dpatel@apple.com> Set appropriate context for a global variable while emitting debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83352 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
979ec2e5ee9e1a648e13c35510bb1cd437f90d24 06-Oct-2009 Devang Patel <dpatel@apple.com> Set appropriate context for a global variable while emitting debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83352 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
0ca5779bfbdf3b2c81af179d4351b2848dd39920 06-Oct-2009 Mike Stump <mrs@apple.com> Fix thinko and simplify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83342 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
bd6dbd19781cefd5b5ff9750c8bf86e6c341a68c 06-Oct-2009 Mike Stump <mrs@apple.com> Fix thinko and simplify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83342 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
eae4390e6bb71c39d94086e0788c42b9500438e5 06-Oct-2009 Mike Stump <mrs@apple.com> Ensure we have atleast 2-byte alignment for member functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83337 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
fb51ddfafcd5f8536d0312b3daa3c0b74b90ab5b 06-Oct-2009 Mike Stump <mrs@apple.com> Ensure we have atleast 2-byte alignment for member functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83337 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
1bebbfb722d135e44c414d8184387e9ff125aa9a 05-Oct-2009 Mike Stump <mrs@apple.com> Respect alignments better.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83328 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f55314dce992fd60816ba337ad151a2fb7c42239 05-Oct-2009 Mike Stump <mrs@apple.com> Respect alignments better.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83328 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8df720cfab5f146d58727ca70fe6e934f11c2a0b 05-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> Use new predicates for some type equality tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83303 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExprScalar.cpp
odeGenModule.cpp
ffbb15e54a6dc120087003d1e42448b8705bd58a 05-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> Use new predicates for some type equality tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83303 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExprScalar.cpp
odeGenModule.cpp
5a70ca1f8a86237586aa89f479b2e41de421669b 03-Oct-2009 Anders Carlsson <andersca@mac.com> Pass the canonical method decl to GetVtableIndex. Fixes PR5120.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83272 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
719aa44de4067c3910d02ab6a0fd0977d9f03261 03-Oct-2009 Anders Carlsson <andersca@mac.com> Pass the canonical method decl to GetVtableIndex. Fixes PR5120.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83272 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
c395f601fc2e20d9be9d34f37028308155a7d099 03-Oct-2009 Anders Carlsson <andersca@mac.com> Implement code generation of member function pointer calls. Fixes PR5121.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83271 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCall.cpp
odeGenFunction.h
odeGenTypes.h
375c31c4673f83f925de221752cf801c2fbbb246 03-Oct-2009 Anders Carlsson <andersca@mac.com> Implement code generation of member function pointer calls. Fixes PR5121.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83271 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCall.cpp
odeGenFunction.h
odeGenTypes.h
9f551330fc32c1c76177fc4d27f98fe9bd637242 03-Oct-2009 Anders Carlsson <andersca@mac.com> Teach AggExprEmitter about pointers to member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83266 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
a024d17048cd7fb71bfaee3876993ef2c27057be 03-Oct-2009 Anders Carlsson <andersca@mac.com> Teach AggExprEmitter about pointers to member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83266 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
bd10c756a3c6a552d3468c82a96a5c8f3593bc70 03-Oct-2009 Anders Carlsson <andersca@mac.com> Handle base-to-derived casts of member function pointers in CGExprConstant.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83265 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
2c51f092e4d75550f51b4dd6f831aa5e5e6ae928 03-Oct-2009 Anders Carlsson <andersca@mac.com> Handle base-to-derived casts of member function pointers in CGExprConstant.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83265 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
4f0c6db6ce63387e8b4d82f668e07f0b27d4171f 03-Oct-2009 Anders Carlsson <andersca@mac.com> Handle members to function pointers in CGExprConstant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83264 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
f57b4e44d03266f2ec1b427645555ed8952bc830 03-Oct-2009 Anders Carlsson <andersca@mac.com> Handle members to function pointers in CGExprConstant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83264 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
2043f628e16a03e6c87656795ba47fd7a2bc9060 03-Oct-2009 Anders Carlsson <andersca@mac.com> Move some functions from CodeGenFunctions to CodeGenModule so they can be used by CGExprConstant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83263 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXClass.cpp
GExprAgg.cpp
odeGenFunction.h
odeGenModule.h
2b3583573ba6b26b605aacaad9a50492fb3d6fe6 03-Oct-2009 Anders Carlsson <andersca@mac.com> Move some functions from CodeGenFunctions to CodeGenModule so they can be used by CGExprConstant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83263 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXClass.cpp
GExprAgg.cpp
odeGenFunction.h
odeGenModule.h
bbc77ab78fb4bcbab640ae827e87ac718f956d7a 02-Oct-2009 Anders Carlsson <andersca@mac.com> Don't update the struct alignment when adding fields to a packed struct. Fixes PR5118.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83235 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
2df96e7019853d80ea599453925bd324cd110a8f 02-Oct-2009 Anders Carlsson <andersca@mac.com> Don't update the struct alignment when adding fields to a packed struct. Fixes PR5118.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83235 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
cb939a8b2d34d17d27d75989efbdb5b42444ecb1 02-Oct-2009 Mike Stump <mrs@apple.com> More magic pixie dust.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83232 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3d363c596d295b38cae765eae510fbc2e7c80e1a 02-Oct-2009 Mike Stump <mrs@apple.com> More magic pixie dust.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83232 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0cc363367b2a7d9671e80718bd15ff2c13bf0331 02-Oct-2009 Mike Stump <mrs@apple.com> Fix up debug information for block pointers a bit more.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83231 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
944e705766490162a5c56b2d4452a8b23f5e632e 02-Oct-2009 Mike Stump <mrs@apple.com> Fix up debug information for block pointers a bit more.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83231 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5e9c772344516d85aaed6f36dc5290dcc81ba304 02-Oct-2009 Anders Carlsson <andersca@mac.com> When building constant structs, check if the resulting LLVM struct will be bigger than the record layout size and use a packed struct if that's the case. Fixes PR5108.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83230 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
31f2f9ced8ed2dd17ac43b6addc84eb08a05442e 02-Oct-2009 Anders Carlsson <andersca@mac.com> When building constant structs, check if the resulting LLVM struct will be bigger than the record layout size and use a packed struct if that's the case. Fixes PR5108.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83230 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
5bd3f6d7aa1da99dd55cb435c50cb223bc656d5d 02-Oct-2009 Mike Stump <mrs@apple.com> Implement a FIXME. This improves codegen just a tad.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83221 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDebugInfo.cpp
b289b3f324eb10d416b87080e39b315f6c17a695 02-Oct-2009 Mike Stump <mrs@apple.com> Implement a FIXME. This improves codegen just a tad.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83221 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDebugInfo.cpp
efe59688f34c13b33d9faf691112bcc360a2aee4 01-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> CodeGen may see out-of-line declarations of the various special member
functions when they are explicitly declared, e.g., via a function
template specialization or explicit template instantiation
declaration. Don't try to synthesize bodies for the special member
functions in this case; rather, check whether we have an implicit
declaration and, if so, synthesize the appropriate function
body. Fixes PR5084.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83212 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
4513272f444c59705123ccb6207414ce62c9a568 01-Oct-2009 Douglas Gregor <dgregor@apple.com> CodeGen may see out-of-line declarations of the various special member
functions when they are explicitly declared, e.g., via a function
template specialization or explicit template instantiation
declaration. Don't try to synthesize bodies for the special member
functions in this case; rather, check whether we have an implicit
declaration and, if so, synthesize the appropriate function
body. Fixes PR5084.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83212 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
5d7dd7c72100cd6b3697068f7cfea24e16471093 01-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Fix a lame regression in IR gen for C++ delete expressions. PR5102

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83195 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
d69dd780866d8478516153870e8c3491c6eaa156 01-Oct-2009 Douglas Gregor <dgregor@apple.com> Fix a lame regression in IR gen for C++ delete expressions. PR5102

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83195 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
dd434f930d82cbf2fca32a73bddafe949c214578 01-Oct-2009 Mike Stump <mrs@apple.com> A couple of refinements for laying out debug information for
BlockDeclRefDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83185 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
de8c5c77e27b6b0064c45d964ea8bcc2c853114d 01-Oct-2009 Mike Stump <mrs@apple.com> A couple of refinements for laying out debug information for
BlockDeclRefDecls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83185 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
df41c4d4174d9d12829544508c9786d9e2290915 01-Oct-2009 John McCall <rjmccall@apple.com> Anonymous namespaces, sema + codegen. A lot of semantics are still broken,
apparently because using directives aren't quite working correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83184 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
angle.cpp
9aeed32282fe8a775c24c01c923717ca86695685 01-Oct-2009 John McCall <rjmccall@apple.com> Anonymous namespaces, sema + codegen. A lot of semantics are still broken,
apparently because using directives aren't quite working correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83184 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
angle.cpp
400e198340ba44a750aa43aa697abaa4b40aac4e 30-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> <rdar://problem/7263113> Make clang produce gcc's objc_assign_StrongCast as a result of type-cast of an ivar in assignment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83150 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
75b08f169fa47285ce5381091367793ed611195c 30-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> <rdar://problem/7263113> Make clang produce gcc's objc_assign_StrongCast as a result of type-cast of an ivar in assignment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83150 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4fa044d41e1467b05fb8d8f37f21d3081cb5f1a9 30-Sep-2009 Mike Stump <mrs@apple.com> Improve debugging information for BlockDeclRefExpr. WIP. Given this
scheme, we can switch the previous scheme over to using this code
path. There's a bit of simplifications yet to do as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83138 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDebugInfo.cpp
GDebugInfo.h
b1a6e687967105bf1e18dfba196d0248e6700a4e 30-Sep-2009 Mike Stump <mrs@apple.com> Improve debugging information for BlockDeclRefExpr. WIP. Given this
scheme, we can switch the previous scheme over to using this code
path. There's a bit of simplifications yet to do as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83138 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDebugInfo.cpp
GDebugInfo.h
b532d84f56b8cce3c92b8a0e4fe1d929c1d067cf 29-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Handle C++ delete expressions when the overloaded delete operator is a
"usual deallocation function" with two arguments. CodeGen will have to
handle this case specifically, since the value for the second argument
(the size of the allocated object) may have to be computed at run
time.

Fixes the Sema part of PR4782.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83080 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
9091656e423f2354e53b2b3baa95b3eb5510badc 29-Sep-2009 Douglas Gregor <dgregor@apple.com> Handle C++ delete expressions when the overloaded delete operator is a
"usual deallocation function" with two arguments. CodeGen will have to
handle this case specifically, since the value for the second argument
(the size of the allocated object) may have to be computed at run
time.

Fixes the Sema part of PR4782.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83080 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
5285fe7d2a1a0d9ad8d6b3ee854fced47b9c430c 29-Sep-2009 Anders Carlsson <andersca@mac.com> Handle CXXMemberCallExprs that point to a static method. Fixes PR5093.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83045 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
2472bf0a1735fa9c60a01946d5ed53b64c9c2422 29-Sep-2009 Anders Carlsson <andersca@mac.com> Handle CXXMemberCallExprs that point to a static method. Fixes PR5093.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83045 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
da77858dcc2248712a937c21c65779ee6cc142f0 29-Sep-2009 Anders Carlsson <andersca@mac.com> Handle CK_BaseToDerivedMemberPointer for member function pointers. Fixes PR5091.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83041 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXClass.cpp
GExprAgg.cpp
odeGenFunction.h
84080ec16ede6a6fe85a1d991690c6bda82a59ee 29-Sep-2009 Anders Carlsson <andersca@mac.com> Handle CK_BaseToDerivedMemberPointer for member function pointers. Fixes PR5091.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83041 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXClass.cpp
GExprAgg.cpp
odeGenFunction.h
0bed0047da8f06cab6a13f4dbfe28f747d7b6ec5 29-Sep-2009 Anders Carlsson <andersca@mac.com> Improve support for member function pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83039 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
odeGenFunction.cpp
e9d34dc7afe06c9adaacad7a678a0cbbf749ea75 29-Sep-2009 Anders Carlsson <andersca@mac.com> Improve support for member function pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83039 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
odeGenFunction.cpp
0d6725e9759838c6955b25c3daabf69d1c4546a7 29-Sep-2009 Anders Carlsson <andersca@mac.com> Use a switch statement in VisitCastExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83038 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
3016842613674ab80796567239c15d529aff1458 29-Sep-2009 Anders Carlsson <andersca@mac.com> Use a switch statement in VisitCastExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83038 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
7f14714003f671b21a00b9bcd93fbf257c186a45 29-Sep-2009 Anders Carlsson <andersca@mac.com> Make hasAggregateLLVMType use positive checks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83037 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
e322f30486249659c61dce9554be71cdbd71430a 29-Sep-2009 Anders Carlsson <andersca@mac.com> Make hasAggregateLLVMType use positive checks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83037 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
cff17421f6486c8baf51cea99a95d486f2ee735f 29-Sep-2009 Mike Stump <mrs@apple.com> Fix http://llvm.org/PR5090.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83035 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
740256bafbba6c5b5cb95a5c5bd7db161f3b2833 29-Sep-2009 Mike Stump <mrs@apple.com> Fix http://llvm.org/PR5090.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83035 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
e9bfc17c7be6f27411e24da134a8fb0b20542d2e 27-Sep-2009 Anders Carlsson <andersca@mac.com> Mangle dependent name expressions. Fixes PR5063.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82915 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
50755b0dcc81eed9dcf27abe9162527013f26bd4 27-Sep-2009 Anders Carlsson <andersca@mac.com> Mangle dependent name expressions. Fixes PR5063.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82915 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
426ba00ba26049984e97ebf869a72fe7fc5ce33d 27-Sep-2009 Anders Carlsson <andersca@mac.com> Use mangleTemplatePrefix when we know that we're mangling a nested template name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82912 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
e45117b945a0d8c1fdcc4cd8ee4500f5ee8742be 27-Sep-2009 Anders Carlsson <andersca@mac.com> Use mangleTemplatePrefix when we know that we're mangling a nested template name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82912 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
07fdc803491d98b61051d388d145026a662ac6ca 27-Sep-2009 Anders Carlsson <andersca@mac.com> CodeGen for try statements. (We just emit the body for now).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82910 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GStmt.cpp
odeGenFunction.h
6815e941998659a55c20c147861b0f437928c3d8 27-Sep-2009 Anders Carlsson <andersca@mac.com> CodeGen for try statements. (We just emit the body for now).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82910 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GStmt.cpp
odeGenFunction.h
160ec75718071946acaa8825493e54a1b7284611 27-Sep-2009 Anders Carlsson <andersca@mac.com> Look for substitutions when mangling TypenameTypes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82885 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
88599176d106453935a8fa984f690362cc48b470 27-Sep-2009 Anders Carlsson <andersca@mac.com> Look for substitutions when mangling TypenameTypes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82885 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
fe52d5ed0df55a9ad37337e4178f45353da3bb2d 27-Sep-2009 Anders Carlsson <andersca@mac.com> Better template parameter type mangling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82883 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
0ccdf8d62cba2ad730001f133b6cc4836c42da83 27-Sep-2009 Anders Carlsson <andersca@mac.com> Better template parameter type mangling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82883 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
acfd14252c583e7c8eab7fcc37495fa80592a8c4 27-Sep-2009 Anders Carlsson <andersca@mac.com> Mangle std::basic_string<char, std::char_traits<char>, std::allocator<char> > as Ss.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82882 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
f514b544b24926834adbfe8265a72ed8b9b09d81 27-Sep-2009 Anders Carlsson <andersca@mac.com> Mangle std::basic_string<char, std::char_traits<char>, std::allocator<char> > as Ss.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82882 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
c9ae8ebea4eb33152cdd97c0753955ad2ac3ae78 27-Sep-2009 Anders Carlsson <andersca@mac.com> Mangle ::std::basic_string as Sb.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82881 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
189d59cfc762d0f683b9253ddec2cf519ec85b65 27-Sep-2009 Anders Carlsson <andersca@mac.com> Mangle ::std::basic_string as Sb.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82881 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
867434c4e3cbb761e028926fd05f19ae1ed852dd 27-Sep-2009 Anders Carlsson <andersca@mac.com> Mangle ::std::allocator as Sa.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82880 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
8c0315563f05a9face7209221325019e272075fb 27-Sep-2009 Anders Carlsson <andersca@mac.com> Mangle ::std::allocator as Sa.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82880 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
036b567b3c70a64064066dd783fdc941a5bc4bf8 27-Sep-2009 Anders Carlsson <andersca@mac.com> Handle substitutions in mangleTemplatePrefix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82879 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
aeb85374e92619b8e4ce92ac6e30756b5053a137 27-Sep-2009 Anders Carlsson <andersca@mac.com> Handle substitutions in mangleTemplatePrefix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82879 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
485e0dde6c052f6df4826cb098e1b1b9794f7a53 26-Sep-2009 Anders Carlsson <andersca@mac.com> Substitute "::std::" as "St".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82874 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
e7c8cb6b2728aa98258288d221b09bc66cc05543 26-Sep-2009 Anders Carlsson <andersca@mac.com> Substitute "::std::" as "St".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82874 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
07af511f83b8e1c6e45f5c52f3e26e160a3059ee 26-Sep-2009 Anders Carlsson <andersca@mac.com> Don't crash when trying to mangle function templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82872 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
1668f2062b237ddb137f5d16388b3dea49651f85 26-Sep-2009 Anders Carlsson <andersca@mac.com> Don't crash when trying to mangle function templates.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82872 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
1b8b963c86ebf74fa5b0f2433f82c046b2529ebb 26-Sep-2009 Anders Carlsson <andersca@mac.com> mangleTemplatePrefix and mangleUnscopedTemplateName should take a TemplateDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82871 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
0fa6df440023a95d8b47c79111e8613fc29f723b 26-Sep-2009 Anders Carlsson <andersca@mac.com> mangleTemplatePrefix and mangleUnscopedTemplateName should take a TemplateDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82871 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
956ede93a522dfc0dc085159cff15b93f391876e 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
odeGenTypes.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
odeGenTypes.cpp
5ce2a7a102951fef8aada04e90626c1f1db2e97b 26-Sep-2009 Anders Carlsson <andersca@mac.com> Set alignment on static function level decls and VLAs. Fixes PR5060.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82868 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
41f8a13ac7fa734faef2d8a36feebc3c9a1eed77 26-Sep-2009 Anders Carlsson <andersca@mac.com> Set alignment on static function level decls and VLAs. Fixes PR5060.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82868 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
1d4f1f36132c5e91ce2089a2747785f03faccc44 26-Sep-2009 Anders Carlsson <andersca@mac.com> Use ABIArgInfo::getDirect() for all types that have a pointer representation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82845 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
5b3a2fcd8038f27e2278f64be2c6a3beb6fae8b6 26-Sep-2009 Anders Carlsson <andersca@mac.com> Use ABIArgInfo::getDirect() for all types that have a pointer representation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82845 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
d0f5392e54a59e1fc35033c28e7503ac1e0b691e 26-Sep-2009 Anders Carlsson <andersca@mac.com> Mangle record types as decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82843 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
d99edc44300b36732a14c294c93899ba28d479ea 26-Sep-2009 Anders Carlsson <andersca@mac.com> Mangle record types as decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82843 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
a351e0013e1db6836df6d37f28dd69c071f30ec5 26-Sep-2009 Anders Carlsson <andersca@mac.com> Change isTemplate to return the actual template declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82839 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
bb36ba488b7c6185546f8696447530ebfd296df7 26-Sep-2009 Anders Carlsson <andersca@mac.com> Change isTemplate to return the actual template declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82839 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
cc44e484553d54d0242a64f76d342bf4e830ac84 26-Sep-2009 Anders Carlsson <andersca@mac.com> Improve mangling of typename types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82833 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
ae3524866124021f3bc695886668254093c0793f 26-Sep-2009 Anders Carlsson <andersca@mac.com> Improve mangling of typename types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82833 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
988616a8bbaa304a4fced0ec5171bf35db1c63ba 25-Sep-2009 Mike Stump <mrs@apple.com> Fix 80-col violation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82782 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
bcdc0f0aff015b6507560f50c71d1b7b6c6a9932 25-Sep-2009 Mike Stump <mrs@apple.com> Fix 80-col violation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82782 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
a19fa699e75cfd03a747567d77f6e071d79b7434 25-Sep-2009 John McCall <rjmccall@apple.com> Fix an infinite loop arising when trying to generate debug information
for a ObjC class with an ivar of weak self type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82745 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
a180529e3d5d08dff2e2154d6a33a6c09f6af959 25-Sep-2009 John McCall <rjmccall@apple.com> Fix an infinite loop arising when trying to generate debug information
for a ObjC class with an ivar of weak self type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82745 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
b108a3ef14b5cb34e8c74cad49ca670f594932a4 25-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed another code gen bug in objc's new write-barrier API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82735 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
76368e843cdf7db9c0d534384bf7a114fa260ffc 25-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed another code gen bug in objc's new write-barrier API.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82735 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
544bf0e83e668ed682cc9a081e6240e376322d7f 25-Sep-2009 Mike Stump <mrs@apple.com> Fix 80-col violation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82725 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
bb30419d81ec5d87d547a74a8273a4bd7ddbbf76 25-Sep-2009 Mike Stump <mrs@apple.com> Fix 80-col violation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82725 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
ef0a6621087aa356e749caa9a8caa60374239c82 25-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Patch fixes a code gen. bug in generation of objc_assign_ivar
(objc GC's API).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82724 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GValue.h
6c7a1f364796ce1acb988714e9e42076d1ce332e 25-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Patch fixes a code gen. bug in generation of objc_assign_ivar
(objc GC's API).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82724 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GValue.h
3ddc81456e4ee7e1017f17860053f3eec505a50e 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
GCXX.cpp
GCall.cpp
GDebugInfo.cpp
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
GObjCMac.cpp
GValue.h
odeGenFunction.h
odeGenTypes.cpp
angle.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
GCXX.cpp
GCall.cpp
GDebugInfo.cpp
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
GObjCMac.cpp
GValue.h
odeGenFunction.h
odeGenTypes.cpp
angle.cpp
01e2deb7d02236efd5dbaee2af84395604d353f8 24-Sep-2009 Daniel Dunbar <daniel@zuster.org> Darwin/x86-32: Enumerated types and block pointer types in structures were not
handled correctly.
- <rdar://problem/7247671> Function arguments incorrect when function returns a
struct on i386 w/ llvm-g++ and clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82681 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
55e59e139d9ebcaae16d710472e28edbcafac98a 24-Sep-2009 Daniel Dunbar <daniel@zuster.org> Darwin/x86-32: Enumerated types and block pointer types in structures were not
handled correctly.
- <rdar://problem/7247671> Function arguments incorrect when function returns a
struct on i386 w/ llvm-g++ and clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82681 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
c7c3217aef3f2195fe3dcc1897327200f9df4728 23-Sep-2009 Anders Carlsson <andersca@mac.com> Handle namespace aliases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82644 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
018837b081bd1a725bae1c020eb1649975b04d67 23-Sep-2009 Anders Carlsson <andersca@mac.com> Handle namespace aliases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82644 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d9ea4561f25903b8f16406bf57d5bd364dde37a6 23-Sep-2009 Anders Carlsson <andersca@mac.com> Emit new[] cookie when needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82642 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
6ac5fc49ee70b4e3ce3e242c02c66586f652d7ac 23-Sep-2009 Anders Carlsson <andersca@mac.com> Emit new[] cookie when needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82642 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
4b053749cedf95bef417da8b9c3d96b3eb848523 23-Sep-2009 Anders Carlsson <andersca@mac.com> Basic support for new[].

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82628 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
a4d4c019bf477ce6ff7b01517e690f6c5fd6ad71 23-Sep-2009 Anders Carlsson <andersca@mac.com> Basic support for new[].

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82628 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXExpr.cpp
6bde03ba06dd54c16ab61ccadb61a434f6b5e150 23-Sep-2009 Anders Carlsson <andersca@mac.com> Add a new variant of EmitCXXAggrConstructorCall that takes a Value that holds the number of elements to construct, to be used when implementing new[].

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82602 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
569c1f4a6c703eaa8b963bed7d5c2fd5d4569e93 23-Sep-2009 Anders Carlsson <andersca@mac.com> Add a new variant of EmitCXXAggrConstructorCall that takes a Value that holds the number of elements to construct, to be used when implementing new[].

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82602 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
a12889221f12756a1cf843b2027c775f713ea988 23-Sep-2009 Anders Carlsson <andersca@mac.com> Move codegen of new and delete to CGCXXExpr.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82585 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXExpr.cpp
MakeLists.txt
16d81b8db39593b5f1a38b077757272a09c12da8 23-Sep-2009 Anders Carlsson <andersca@mac.com> Move codegen of new and delete to CGCXXExpr.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82585 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXExpr.cpp
MakeLists.txt
33a7a5bb102d686cbaffb7119d371e123b3d66b8 23-Sep-2009 Mike Stump <mrs@apple.com> Remove now fixed FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82584 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
45504e568c6f8fedc4457ed563eab65d8ab7f87d 23-Sep-2009 Mike Stump <mrs@apple.com> Remove now fixed FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82584 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
6edaa58596363cbf70ae1cac32f98ebc5205416b 23-Sep-2009 Anders Carlsson <andersca@mac.com> No need to null check implicit lvalue cast exprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82580 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
592a2bbc1945358ab8ebf0d74c57f0b23c4434c0 23-Sep-2009 Anders Carlsson <andersca@mac.com> No need to null check implicit lvalue cast exprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82580 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
bf8cb2e9e98539ea5b259512d142720db0b07181 22-Sep-2009 Anders Carlsson <andersca@mac.com> When doing a derived-to-base class and the class offset is 0 we can just do a simple bitcast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82579 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXClass.cpp
dfd0330267742862342976eb7f2d5ef305790df4 22-Sep-2009 Anders Carlsson <andersca@mac.com> When doing a derived-to-base class and the class offset is 0 we can just do a simple bitcast.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82579 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXClass.cpp
77ce8815b8a98d30ce6fb05c4cf4b14d0806011a 22-Sep-2009 Anders Carlsson <andersca@mac.com> CXXMethodDecls should always be mangled, even if they are inside an extern "C" block. Fixes PR5017.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82567 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
add28829c7a8d3c5da9ae140f18d3c9ad2d8b599 22-Sep-2009 Anders Carlsson <andersca@mac.com> CXXMethodDecls should always be mangled, even if they are inside an extern "C" block. Fixes PR5017.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82567 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
1269ed4e381aa3e71712fde6eced2c45687f6871 22-Sep-2009 Anders Carlsson <andersca@mac.com> Don't assert that linkage decls are always C++, it's not true. Fixes PR5019.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82557 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
5cc58c6cfe4a6378287dbf92f9b1a23e133a6118 22-Sep-2009 Anders Carlsson <andersca@mac.com> Don't assert that linkage decls are always C++, it's not true. Fixes PR5019.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82557 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
e9cf475532e5ec11c23413a2ab4829064d56fd5b 22-Sep-2009 Daniel Dunbar <daniel@zuster.org> Revert "Switch a few clients over to StringLiteral::getString.", this is breaking some projects, but I don't have a test case yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82539 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f015b034159d40e7033309e50036804eb1971787 22-Sep-2009 Daniel Dunbar <daniel@zuster.org> Revert "Switch a few clients over to StringLiteral::getString.", this is breaking some projects, but I don't have a test case yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82539 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
286e7fdc93f1e40abe133dfee24eedf3c730fb80 22-Sep-2009 Daniel Dunbar <daniel@zuster.org> Switch a few clients over to StringLiteral::getString.
- Switching all of them out-of-my-current-scope-of-interest, sorry.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82515 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
df4eee9b035cc4b95b1ea72635e7429d06b0ecc8 22-Sep-2009 Daniel Dunbar <daniel@zuster.org> Switch a few clients over to StringLiteral::getString.
- Switching all of them out-of-my-current-scope-of-interest, sorry.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82515 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
9f27acbd2fd48439fa74d57aac24650d914be8ca 22-Sep-2009 Mike Stump <mrs@apple.com> Fix some typos. WIP. Large alignments don't work yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82512 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
fd47b31be0f835ea15dc1f9407940980bb50ddcf 22-Sep-2009 Mike Stump <mrs@apple.com> Fix some typos. WIP. Large alignments don't work yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82512 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3d5c22583b741dbe8e0f5d558a4394468687b5c6 22-Sep-2009 Mike Stump <mrs@apple.com> Improve debug info generation for __block variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82508 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDebugInfo.cpp
GDecl.cpp
39605b4eab472a37cec287f9d4663805e60346f3 22-Sep-2009 Mike Stump <mrs@apple.com> Improve debug info generation for __block variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82508 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDebugInfo.cpp
GDecl.cpp
cac0eaf6caa1035b6a971b32adeea895ba14715c 22-Sep-2009 John McCall <rjmccall@apple.com> Change all the Type::getAsFoo() methods to specializations of Type::getAs().
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely. Several more 'leaf'
optimizations were introduced.

The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GCall.cpp
GExpr.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
angle.cpp
argetABIInfo.cpp
183700f494ec9b6701b6efe82bcb25f4c79ba561 22-Sep-2009 John McCall <rjmccall@apple.com> Change all the Type::getAsFoo() methods to specializations of Type::getAs().
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely. Several more 'leaf'
optimizations were introduced.

The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GCall.cpp
GExpr.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
angle.cpp
argetABIInfo.cpp
f2833355dec1227932d8255542b28e2019b3a7c0 22-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Removed -fobjc-newgc-api option. clang now conforms to
gcc-style write-barrier api only.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82493 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
b924259cc53e4d38e493616715e7b3e95bdee1ef 22-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Removed -fobjc-newgc-api option. clang now conforms to
gcc-style write-barrier api only.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82493 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
fa87e304750fc043bcd7af49e7622ae381c14fc2 21-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Miscellanous fixes in generatation of objc gc's write-barriers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82472 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
fd02ed702e754f8dd0b4c979325ba99c2234f270 21-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Miscellanous fixes in generatation of objc gc's write-barriers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82472 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
97304c0cb855e6ec9a1f5a68853327086a4ae4fe 21-Sep-2009 Chris Lattner <sabre@nondot.org> Implement __builtin_unreachable(), a GCC 4.5 extension.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82433 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
21190d54634d6e244e85d28ad915ce2fe86ecbff 21-Sep-2009 Chris Lattner <sabre@nondot.org> Implement __builtin_unreachable(), a GCC 4.5 extension.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82433 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
7152707f6d102dd4c68c95a0c4db6af571fa8ba3 21-Sep-2009 Anders Carlsson <andersca@mac.com> Start mangling expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82423 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
d553f8c57fc77a46f6a1a1c90d7fd8f2d0e96073 21-Sep-2009 Anders Carlsson <andersca@mac.com> Start mangling expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82423 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
b870540115fe3cc084a188481097e633f285cea9 19-Sep-2009 Daniel Dunbar <daniel@zuster.org> Ok, an AssertingVH definitely doesn't work for now because we free our cache after the optimizer may have hacked on the module. Use a WeakVH instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82324 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
65f13c3381a31eae8a7219477c37c247ac9838fc 19-Sep-2009 Daniel Dunbar <daniel@zuster.org> Ok, an AssertingVH definitely doesn't work for now because we free our cache after the optimizer may have hacked on the module. Use a WeakVH instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82324 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
f078bd542878c625681a65f5bb169cfd42d687dc 19-Sep-2009 Nick Lewycky <nicholas@mxc.ca> Make clang stop relying on ConstantStruct::get's default value for isPacked
which will be going away (ie. it's becoming a required parameter) later today.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82323 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
0d36dd28bb40b08a93d7f64196794882eee08ee8 19-Sep-2009 Nick Lewycky <nicholas@mxc.ca> Make clang stop relying on ConstantStruct::get's default value for isPacked
which will be going away (ie. it's becoming a required parameter) later today.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82323 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
cee49a184f0a3ce800aeeaface4085d9653d9d0b 19-Sep-2009 Daniel Dunbar <daniel@zuster.org> Switch CGDebugInfo type cache to using an AssertingVH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82321 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
23e81bae8c91ccd408e31ca472dca25faed85028 19-Sep-2009 Daniel Dunbar <daniel@zuster.org> Switch CGDebugInfo type cache to using an AssertingVH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82321 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
a0d2ce048758ba74a94f5e120e5ba4549fd115ea 19-Sep-2009 Daniel Dunbar <daniel@zuster.org> Factor out CGDebugInfo::CreateTypeNode method.
- No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82320 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
03faac3b8c85263804ffe501a01eb3da7c5198e9 19-Sep-2009 Daniel Dunbar <daniel@zuster.org> Factor out CGDebugInfo::CreateTypeNode method.
- No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82320 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
dad6dea25d8223d63525950ae919a5144bb15fcc 18-Sep-2009 Anders Carlsson <andersca@mac.com> More mangling work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82265 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
2ee3fca27ab8e6254586c5b42efb086df4bf76ac 18-Sep-2009 Anders Carlsson <andersca@mac.com> More mangling work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82265 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
5cb6fe0aeab9ee3859b9cb506cce72088e3f309b 18-Sep-2009 Anders Carlsson <andersca@mac.com> Make the mangler conform even better to the grammar.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82262 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
eafc6dcf670070812a99fcc6db21945a786d9829 18-Sep-2009 Anders Carlsson <andersca@mac.com> Make the mangler conform even better to the grammar.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82262 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
0a8abe708fd6cd70e9666c9a18de2a3d81045ff8 18-Sep-2009 Mike Stump <mrs@apple.com> Generate more of the vbase virtual offset for covariant thunks. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82253 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
97f4d46e2fffa1e8a84f2052c314a3bf87b967f8 18-Sep-2009 Mike Stump <mrs@apple.com> Generate more of the vbase virtual offset for covariant thunks. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82253 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
ad71ae36e057c73812f26d6718d4d4c19cf9520e 18-Sep-2009 Anders Carlsson <andersca@mac.com> More mangler mangling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82250 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
2744a063f1d9c475d76c2276f0b4f0998dfc5d09 18-Sep-2009 Anders Carlsson <andersca@mac.com> More mangler mangling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82250 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
ab2b7bd3c0a506cb5141625bdde6992b166b6315 18-Sep-2009 Anders Carlsson <andersca@mac.com> Call mangleTemplatePrefix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82247 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
aa73ab1bd037419852eb4d4fb3ddf8fe2a2a4e5b 18-Sep-2009 Anders Carlsson <andersca@mac.com> Call mangleTemplatePrefix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82247 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
27b63b9d968e44de48a07df4f89c66437a998f12 18-Sep-2009 Anders Carlsson <andersca@mac.com> Change manglePrefix to return early if the DC is the translation unit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82246 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
9263e91e2e91aaf0eb72488f2a52648c086bef35 18-Sep-2009 Anders Carlsson <andersca@mac.com> Change manglePrefix to return early if the DC is the translation unit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82246 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
000c6d1f80496370ad6a80b1fa8d5eb88e19edee 18-Sep-2009 Anders Carlsson <andersca@mac.com> More mangling goodness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82193 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
7482e247163978792654ca1a99913e19dd507e0a 18-Sep-2009 Anders Carlsson <andersca@mac.com> More mangling goodness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82193 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
bf5206d1bc515169154ae2cec29fcbff6991edfb 18-Sep-2009 Anders Carlsson <andersca@mac.com> Handle mangling of TemplateSpecializationType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82189 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
7624f219388f2434a4988ba2508a6ca7b57ba1c3 18-Sep-2009 Anders Carlsson <andersca@mac.com> Handle mangling of TemplateSpecializationType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82189 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
8ead748b20aa6784867cdbee28ced623586febfb 18-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a bug in generation of the new write-barriers when
array syntax is used to derefernce and assign to ivar pointee.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82183 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
1c1afc4ed3ec30fc99e172220c8bb74a13b117b0 18-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a bug in generation of the new write-barriers when
array syntax is used to derefernce and assign to ivar pointee.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82183 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
640387355b4ffd2fae3bd777b286da4f2d05b5ad 17-Sep-2009 Anders Carlsson <andersca@mac.com> Ignore extern "C++" { } when mangling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82146 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
d58d6f778de936516d8815783f2e88348c41dce4 17-Sep-2009 Anders Carlsson <andersca@mac.com> Ignore extern "C++" { } when mangling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82146 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
5007e5a95e6d0f7584ea198d841188c14b8fd090 17-Sep-2009 Anders Carlsson <andersca@mac.com> Revert r82123 for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82125 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
068f347772fee0cdf66614230d7dba69cd3fa2e6 17-Sep-2009 Anders Carlsson <andersca@mac.com> Revert r82123 for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82125 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
afbc34057a88185c98387a22f3ee301fcc3beda6 17-Sep-2009 Anders Carlsson <andersca@mac.com> Treat an unqualified RecordType as a RecordDecl when substituting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82123 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
657094b1ad9c0806d64e96e3faf15e7fcb0e8d65 17-Sep-2009 Anders Carlsson <andersca@mac.com> Treat an unqualified RecordType as a RecordDecl when substituting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82123 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
b154fd99dca99e13762d9e06af697c36856cb75b 17-Sep-2009 Anders Carlsson <andersca@mac.com> Substitution for prefixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82122 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
6862fc720b8e35ee4408822b2390020f263646b2 17-Sep-2009 Anders Carlsson <andersca@mac.com> Substitution for prefixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82122 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
2439e2e2517f4b3a63e0de380f963965caecaaf0 17-Sep-2009 Anders Carlsson <andersca@mac.com> Substitute unscoped template names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82119 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
03c9d530dbdcbb00b0b1ac0abced5dcce2e21408 17-Sep-2009 Anders Carlsson <andersca@mac.com> Substitute unscoped template names.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82119 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
78e5d48428e41ff98de6298ceaff38bd9d253684 17-Sep-2009 Daniel Dunbar <daniel@zuster.org> IRgen/ObjC: Correctly construct the function info for variadic message sends.

This fixes some bad -O0 codegen and the unnecessary clearing of al on entry to objc_msgSend for most message sends.

<rdar://problem/7102824> [irgen] unnecessary xorb on calls to objc_msgSend on x86_64

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82118 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
6793966aa221764f579cc8436bd641e1ec339c6d 17-Sep-2009 Daniel Dunbar <daniel@zuster.org> IRgen/ObjC: Correctly construct the function info for variadic message sends.

This fixes some bad -O0 codegen and the unnecessary clearing of al on entry to objc_msgSend for most message sends.

<rdar://problem/7102824> [irgen] unnecessary xorb on calls to objc_msgSend on x86_64

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82118 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
780f43d9507de91855fe44367754ef2e1f5808fe 17-Sep-2009 Daniel Dunbar <daniel@zuster.org> IRgen/ObjC: Make the target method decl available to GenerateMessageSendSuper.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82117 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
d6c93d703541c992e06eb9a59a2d826a30da65b2 17-Sep-2009 Daniel Dunbar <daniel@zuster.org> IRgen/ObjC: Make the target method decl available to GenerateMessageSendSuper.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82117 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
d1c369252a9252f93692e7c532cb6d7b8322479f 17-Sep-2009 Anders Carlsson <andersca@mac.com> Add mangleSubstitution/addSubstitution variants that take a NamedDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82116 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
d3a932a2980eef3c3ea2cd28f7946a185215d4e1 17-Sep-2009 Anders Carlsson <andersca@mac.com> Add mangleSubstitution/addSubstitution variants that take a NamedDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82116 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
5c4d09485f719d7af027dd9f2183fb4a15ad9d82 17-Sep-2009 Anders Carlsson <andersca@mac.com> When mangling function template specialization, mangle the type encoding of the original function template. Also, port mangle.cpp and function-template-specialization.cpp over to using FileCheck.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82114 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
9234b7ff2bb99479fb97d5faa181a55aacf28b78 17-Sep-2009 Anders Carlsson <andersca@mac.com> When mangling function template specialization, mangle the type encoding of the original function template. Also, port mangle.cpp and function-template-specialization.cpp over to using FileCheck.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82114 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
5fb7577ff5c0940b3dc373264b10c6576ab3ff75 17-Sep-2009 Anders Carlsson <andersca@mac.com> Add new functions to the mangler for the <unscoped-name> and <unscoped-template-name> productions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82113 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
201ce7485c3401adad861fd0979f1bfefc064ff7 17-Sep-2009 Anders Carlsson <andersca@mac.com> Add new functions to the mangler for the <unscoped-name> and <unscoped-template-name> productions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82113 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
244d2da27313451407a485b88bffaba142580813 17-Sep-2009 Anders Carlsson <andersca@mac.com> Add basic substitution to the C++ mangler. It currently only looks at types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82102 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
7696737d41321cf20aef1aab1454872f2ff7a1c8 17-Sep-2009 Anders Carlsson <andersca@mac.com> Add basic substitution to the C++ mangler. It currently only looks at types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82102 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
7f3e57cce58dd7e06e502d1de6c13a3388d31697 17-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> patch for generating objc'2 objc_assign_ivar. WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82090 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
dbf3cfd39dd5234f90235e263ba2ff4cc61258bd 17-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> patch for generating objc'2 objc_assign_ivar. WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82090 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
3c861932313947f863a233ec3273f6b237c29ead 16-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Starting patch to generate more specific API for objc's
GC. Currently, new API will be generated under
clang-cc's -fobjc-newgc-api flag which will eventually
become the default. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82082 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
b123ea395ee607de85161f84c6e78595946304a5 16-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Starting patch to generate more specific API for objc's
GC. Currently, new API will be generated under
clang-cc's -fobjc-newgc-api flag which will eventually
become the default. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82082 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
0a03cd0d524d1c2bc82bcd85d3da442cb2624319 16-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Removed a superfluous check before setting
a flag (objc GC).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82052 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
8e674aea310ab0f79e02973857f63c2dd695202c 16-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Removed a superfluous check before setting
a flag (objc GC).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82052 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
16c14c2dc7eb5e43f10e14ef6d65e3511bc3c3aa 16-Sep-2009 Anders Carlsson <andersca@mac.com> x86-64 ABI: If a type is a C++ record with either a non-trivial destructor or a non-trivial copy constructor, it should be passed in a pointer. Daniel, plz review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82050 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetABIInfo.cpp
0a8f847e97f40cce51dc69051b964732333dc028 16-Sep-2009 Anders Carlsson <andersca@mac.com> x86-64 ABI: If a type is a C++ record with either a non-trivial destructor or a non-trivial copy constructor, it should be passed in a pointer. Daniel, plz review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82050 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetABIInfo.cpp
eba094dbd6a3ddf3a7ee8cd89a22a639fa03a5fe 15-Sep-2009 Mike Stump <mrs@apple.com> Be sure to use the correct version instead of inventing the wrong one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81924 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5a8621732d9464ad18b39391b1efbcbdb226f7ef 15-Sep-2009 Mike Stump <mrs@apple.com> Be sure to use the correct version instead of inventing the wrong one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81924 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e7670a1bbc826c57f3766ccabc01405e7881e668 15-Sep-2009 Anders Carlsson <andersca@mac.com> Code generation of Conditional operators that are lvalues (but that aren't bitfields).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81867 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
6fcec8b58d0571866fcb162db947b029cc539ec4 15-Sep-2009 Anders Carlsson <andersca@mac.com> Code generation of Conditional operators that are lvalues (but that aren't bitfields).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81867 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
e3ffcdc86649d032d1d928653a3e0807653d0931 15-Sep-2009 Anders Carlsson <andersca@mac.com> Handle reinterpret_cast between integral types and pointer types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81837 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
7f9e646b7ed47bc8e9a60031ad0c2b55031e2077 15-Sep-2009 Anders Carlsson <andersca@mac.com> Handle reinterpret_cast between integral types and pointer types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81837 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
c2fc7ee832bf89ac0f42a6b1f7ec4ecc71a9fa9f 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
GExprScalar.cpp
odeGenTypes.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
GExprScalar.cpp
odeGenTypes.cpp
eeb3ddbb704f7ea0d9bde9c2b9c13dd567da2776 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> ARM/[A]APCS: Ignore empty records passed as arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81798 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
420255710694e958fa04bed1d80d96508949879e 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> ARM/[A]APCS: Ignore empty records passed as arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81798 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
a545851055e927b369b05404c0f4f2620a1e8d3e 14-Sep-2009 David Chisnall <csdavec@swan.ac.uk> Small fix to stop CGObjCGNU emitting symbols that break some versions of gas.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81778 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
a7c5b0832cc78efa899463b8faa573a1473d53d2 14-Sep-2009 David Chisnall <csdavec@swan.ac.uk> Small fix to stop CGObjCGNU emitting symbols that break some versions of gas.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81778 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
2d6ad2701217dcd01bb88c1fe2f0eec637f6f448 14-Sep-2009 Anders Carlsson <andersca@mac.com> Remove an unnecessary FunctionDecl parameter to the synthesizing functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81759 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
de1d26b9c1d8823b173e4d77015ad88b4da70559 14-Sep-2009 Anders Carlsson <andersca@mac.com> Remove an unnecessary FunctionDecl parameter to the synthesizing functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81759 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
45d9fbb182b5316fbb4fdfd46d32e952fe631e3d 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> Fix subtle bug in generating LLVM function declarations for builtin functions.

The decl wasn't being passed down, which meant that function attributes were not
being set correctly. This is particularly important for ARM, since it wants to
override the calling convention. Instead we would emit the builtin with the
wrong calling convention, and instcombine would come along and merrily shred all
the calls to it. :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81756 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenModule.cpp
odeGenModule.h
34771b594ca8cdf8cd2e40b27170efa4ed2833c5 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> Fix subtle bug in generating LLVM function declarations for builtin functions.

The decl wasn't being passed down, which meant that function attributes were not
being set correctly. This is particularly important for ARM, since it wants to
override the calling convention. Instead we would emit the builtin with the
wrong calling convention, and instcombine would come along and merrily shred all
the calls to it. :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81756 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenModule.cpp
odeGenModule.h
500f5293161628cf88d7e10a9cda59d3ae84812a 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> ARM/APCS: Don't treat structs w/ floating point types as "integer like".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81748 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
b0d58196808aba4b3d1a7488bd5566f3c0a83e89 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> ARM/APCS: Don't treat structs w/ floating point types as "integer like".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81748 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
1d48a1b95fad002b701ba1fced7288564e49359d 14-Sep-2009 Anders Carlsson <andersca@mac.com> If a function call returns a reference, don't bind it to a temporary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81743 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
283e4d59b8fe63e93f20b6ffb3a623a4f60a85ea 14-Sep-2009 Anders Carlsson <andersca@mac.com> If a function call returns a reference, don't bind it to a temporary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81743 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
289f5aabd638389202774d1ced5b6f552e8cf05e 14-Sep-2009 Anders Carlsson <andersca@mac.com> Implement CodeGenFunction::EmitCXXExprWithTemporariesLValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81738 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
GExpr.cpp
odeGenFunction.h
b9ea0b53d323cdca2b8284ff986a878e195cb97f 14-Sep-2009 Anders Carlsson <andersca@mac.com> Implement CodeGenFunction::EmitCXXExprWithTemporariesLValue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81738 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
GExpr.cpp
odeGenFunction.h
4c414fd72ac61f1af862d8d4ae93298d73a433ae 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> Some minor clang/ARM/AAPCS tweaks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81737 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
16a0808b7992db2c2ba78b387e1732bbb0fb371b 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> Some minor clang/ARM/AAPCS tweaks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81737 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
0d83d5116ec471aa80c4aaa4aab3e5d91b9265f2 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add TargetInfo::getABI(), and base ARM APCS vs AAPCS choice on that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81735 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
018ba5ab0671d9b6eefecaffc118c869bea151a1 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add TargetInfo::getABI(), and base ARM APCS vs AAPCS choice on that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81735 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
f3990437216aa59977bf4044160dd2591cc69da8 14-Sep-2009 Anders Carlsson <andersca@mac.com> Handle delete where the class has a virtual destructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81733 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
db2910427287a5c5e2e7e20d61982d8747b605ca 14-Sep-2009 Anders Carlsson <andersca@mac.com> Handle delete where the class has a virtual destructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81733 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
4c6bb8b8c0b6e411d1dcd36b441e458b822a4d94 13-Sep-2009 Anders Carlsson <andersca@mac.com> Fix another byref bug. This should hopefully get QuickLookPlugins building successfully.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81681 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
e0c8822eec9d3b2afa62c5e6168a8a8f52aeb2c4 13-Sep-2009 Anders Carlsson <andersca@mac.com> Fix another byref bug. This should hopefully get QuickLookPlugins building successfully.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81681 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
d1af3585bca0837f2f0cb4ae0e0d843a0883f16e 13-Sep-2009 Daniel Dunbar <daniel@zuster.org> ARM/APCS: Only "integer like" aggregates should be returned in r0 (following
gcc's interpretation of APCS' somewhat loose specification).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81671 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
98303b93ae335bbb4731f6f1f8164d3c70648346 13-Sep-2009 Daniel Dunbar <daniel@zuster.org> ARM/APCS: Only "integer like" aggregates should be returned in r0 (following
gcc's interpretation of APCS' somewhat loose specification).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81671 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
d7e072a022193d8fab49a31e5875025661e8c4fa 13-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Rework the way we determine whether an externally visible symbol is
generated for an inline function definition, taking into account C99
and GNU inline/extern inline semantics. This solution is simpler,
cleaner, and fixes PR4536.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81670 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
1fc09a92d0bffda20e06fa882388c01e192e2069 13-Sep-2009 Douglas Gregor <dgregor@apple.com> Rework the way we determine whether an externally visible symbol is
generated for an inline function definition, taking into account C99
and GNU inline/extern inline semantics. This solution is simpler,
cleaner, and fixes PR4536.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81670 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b69f21e79f7295f22502cbe6940eedd9bca55a6b 13-Sep-2009 Daniel Dunbar <daniel@zuster.org> Don't use the PredefinedExpr string as the global variable name, these don't
make very nice symbols, just use the function name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81653 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
0a23d76999f838257f70bd43dc7f1e2242147609 13-Sep-2009 Daniel Dunbar <daniel@zuster.org> Don't use the PredefinedExpr string as the global variable name, these don't
make very nice symbols, just use the function name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81653 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
12ca8c9b29f1eaa46c3e0a3f75047942683dddda 13-Sep-2009 Chris Lattner <sabre@nondot.org> whitespace fix


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81644 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
ca0017a394e0a93a2412c3fe5c47a63b4b2b2ab0 13-Sep-2009 Chris Lattner <sabre@nondot.org> whitespace fix


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81644 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
1888bfc69cfeb9f5d367d8255d80c67207550b55 12-Sep-2009 Benjamin Kramer <benny.kra@googlemail.com> Update CMake files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81631 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
eef9df224865578b8a95860076843674f185db57 12-Sep-2009 Benjamin Kramer <benny.kra@googlemail.com> Update CMake files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81631 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
f583b37ea805405afb13093276a0587265e0b294 12-Sep-2009 Mike Stump <mrs@apple.com> Add FIXME for alignments that won't be honored.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81620 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
9e8725a434cd70ab74fa914554d7933a4bb1e501 12-Sep-2009 Mike Stump <mrs@apple.com> Add FIXME for alignments that won't be honored.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81620 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
a5d3f88e8a34ce4bd808cce30fd2c4165824ceff 12-Sep-2009 Mike Stump <mrs@apple.com> We can't have ctors in the vtable (right Doug?) :-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81619 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
7445d55cf2fc16dac67bcd2ae6344ff2b7de27ce 12-Sep-2009 Mike Stump <mrs@apple.com> We can't have ctors in the vtable (right Doug?) :-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81619 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
23599b9249708763c39f898b19fd32c1cdc883fc 12-Sep-2009 Anders Carlsson <andersca@mac.com> Handle CK_DerivedToBase when emitting lvalue casts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81614 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
0ee33cf81eb7e7e53a897efb772edf4d53af5bf1 12-Sep-2009 Anders Carlsson <andersca@mac.com> Handle CK_DerivedToBase when emitting lvalue casts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81614 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
8fe00ef118ffe6ace0956721dd1755e8c456340c 12-Sep-2009 Anders Carlsson <andersca@mac.com> When necessary, null check the base value in GetAddressCXXOfBaseClass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81611 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXClass.cpp
GExprScalar.cpp
32baf62b9a3aea3b63be6925b64aa182b0a2278e 12-Sep-2009 Anders Carlsson <andersca@mac.com> When necessary, null check the base value in GetAddressCXXOfBaseClass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81611 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXClass.cpp
GExprScalar.cpp
992c0d19e638052ecb38993a60a7e371e889b811 12-Sep-2009 Anders Carlsson <andersca@mac.com> Handle derived-to-base conversion in CGExprScalar::EmitCast, if the cast kind is CK_DerivedToBase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81610 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
191dfe909d6cc18e9134ac23ac4daaedeceb862f 12-Sep-2009 Anders Carlsson <andersca@mac.com> Handle derived-to-base conversion in CGExprScalar::EmitCast, if the cast kind is CK_DerivedToBase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81610 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
79f754da5e1cc0484cf84a16557ab1dc17d01dc9 12-Sep-2009 Anders Carlsson <andersca@mac.com> Whoops, add CGCXXClass.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81607 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXClass.cpp
5d58a1d50e2644668122b8efb6b603a706ecfd6b 12-Sep-2009 Anders Carlsson <andersca@mac.com> Whoops, add CGCXXClass.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81607 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXClass.cpp
083a7d8ba74dfb2385323a7407f092bb827c0002 12-Sep-2009 Anders Carlsson <andersca@mac.com> Rename AddressCXXOfBaseClass to GetAddressCXXOfBaseClass. Add a NullCheckValue argument (currently unused).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81606 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprScalar.cpp
odeGenFunction.h
5a0f49ebc83e7fe0da07b9964c44b0a7fae270cb 12-Sep-2009 Anders Carlsson <andersca@mac.com> Rename AddressCXXOfBaseClass to GetAddressCXXOfBaseClass. Add a NullCheckValue argument (currently unused).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81606 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprScalar.cpp
odeGenFunction.h
b89538d1b6680c1e0f1c637669411eeb5a71491e 12-Sep-2009 Anders Carlsson <andersca@mac.com> Add CGCXXClass.cpp. and move CodeGenFunction::AddressCXXOfBaseClass there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81604 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
29f898a36b1d2023ba0fd6cdaf2d955332f3b137 12-Sep-2009 Anders Carlsson <andersca@mac.com> Add CGCXXClass.cpp. and move CodeGenFunction::AddressCXXOfBaseClass there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81604 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
d3021bf568ddfdc62027a044ce98097cdc7d22c4 12-Sep-2009 Anders Carlsson <andersca@mac.com> Add support for __block variables with alignment greater than __alignof(void *).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81602 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GExpr.cpp
18be84c37b2b796fddfb36447c2b29141d7fdd18 12-Sep-2009 Anders Carlsson <andersca@mac.com> Add support for __block variables with alignment greater than __alignof(void *).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81602 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GExpr.cpp
765b9477b5d425200405a60ae714dd18e2a4707f 12-Sep-2009 Anders Carlsson <andersca@mac.com> For __block variables, cache the LLVM types as well as which LLVM field where the variable is stored.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81599 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
odeGenFunction.h
7dfa4079f4b37507048b19bfc693d3b015d9dd11 12-Sep-2009 Anders Carlsson <andersca@mac.com> For __block variables, cache the LLVM types as well as which LLVM field where the variable is stored.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81599 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
odeGenFunction.h
359b7a99133d8962136be2f6f1e65c05e8432581 12-Sep-2009 Daniel Dunbar <daniel@zuster.org> Stub out room for ARM APCS ABI implementation (and AAPCS_VFP, although you can't
hit this via command line options yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81595 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
5e7bacef79f7725f4abc45e2a5eccedae40dfcd3 12-Sep-2009 Daniel Dunbar <daniel@zuster.org> Stub out room for ARM APCS ABI implementation (and AAPCS_VFP, although you can't
hit this via command line options yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81595 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
c75cd45cc0eb53452de0dcb2e6054592832d52e2 12-Sep-2009 Daniel Dunbar <daniel@zuster.org> Formatting fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81594 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
34d91fddd0252d64456cdcea0bd22073f006f4e2 12-Sep-2009 Daniel Dunbar <daniel@zuster.org> Formatting fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81594 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
1e13e7a06dbeabd137cc98e3b41d947d5d1009fd 12-Sep-2009 Daniel Dunbar <daniel@zuster.org> Change CodeGenModule::ConstructTypeAttributes to return the calling convention
to use, and allow the ABI implementation to override the calling convention.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81593 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
odeGenModule.cpp
odeGenModule.h
ca6408c3176783f0b29da4679a08512aa05f0c73 12-Sep-2009 Daniel Dunbar <daniel@zuster.org> Change CodeGenModule::ConstructTypeAttributes to return the calling convention
to use, and allow the ABI implementation to override the calling convention.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81593 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
odeGenModule.cpp
odeGenModule.h
a51c20938769d33ad75db6dfe7f7e9082999d8c7 12-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Remove unnecessary ASTContext parameter from FunctionDecl::isBuiltinID

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81590 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
7814e6d6645d587891293d59ecf6576defcfac92 12-Sep-2009 Douglas Gregor <dgregor@apple.com> Remove unnecessary ASTContext parameter from FunctionDecl::isBuiltinID

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81590 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4c7050d630d296460793c5dddccd09b823e0ca27 12-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Remove unnecessary ASTContext parameters from isMain and isExternC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81589 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
angle.cpp
48a83b5e7ae4051c7c11680ac00c1fa02d610a62 12-Sep-2009 Douglas Gregor <dgregor@apple.com> Remove unnecessary ASTContext parameters from isMain and isExternC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81589 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
angle.cpp
5ea5ebd1c14d9965c2e8737b8741edc8b27fab0a 12-Sep-2009 Anders Carlsson <andersca@mac.com> Fix a crash when generating vtables that contain destructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81587 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
c7cba15f5fd86b96c03c57a1d307dde468f7399b 12-Sep-2009 Anders Carlsson <andersca@mac.com> Fix a crash when generating vtables that contain destructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81587 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
f57a558ca747a9be05fada0f63568de75426077c 12-Sep-2009 Mike Stump <mrs@apple.com> Add basic covariant thunk generation support. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81585 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
odeGenModule.h
angle.h
6e319f6adc2a06c31cf99265854eef1321bcecf2 12-Sep-2009 Mike Stump <mrs@apple.com> Add basic covariant thunk generation support. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81585 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
odeGenModule.h
angle.h
ee632fc35c1d773644fc861ff08f83992fc5d9e5 12-Sep-2009 Daniel Dunbar <daniel@zuster.org> Set the calling convention based on the CGFunctionInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81582 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
odeGenModule.cpp
8a9f3fd8bb14a64a31a29bf5cf5376b643218b71 12-Sep-2009 Daniel Dunbar <daniel@zuster.org> Set the calling convention based on the CGFunctionInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81582 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
odeGenModule.cpp
09a8e8997d85da2fb913346de5d0642ef614cb30 12-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add CallingConvention argument to CGFunctionInfo.
- Currently unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81581 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
odeGenTypes.h
bac7c250c9b098ee3d637c8ed77da62e860d9244 12-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add CallingConvention argument to CGFunctionInfo.
- Currently unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81581 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
odeGenTypes.h
ece2f6907060fc53ebce644519c2333f97d71bfa 11-Sep-2009 Daniel Dunbar <daniel@zuster.org> Fix use of uninitialized, David please check.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81570 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
389a0e8b6568932780dfd500790494e5fb598058 11-Sep-2009 Daniel Dunbar <daniel@zuster.org> Fix use of uninitialized, David please check.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81570 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
da2d3ceb088f8c6fa432b1255ab00902d7e3e024 11-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a regression in objc GC layout bitmap involving
block pointer ivars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81535 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
039e6a1b085b025c054cb66a5665ad3a77d96abd 11-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a regression in objc GC layout bitmap involving
block pointer ivars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81535 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3f361b5c731e14d7fa08efd76a93f2f912e66e73 11-Sep-2009 Daniel Dunbar <daniel@zuster.org> Swizzle the target triple based on -mthumb, and update clang-cc to recognize
thumb-foo-bar as an ARM target.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81497 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
f4aa4f61de7d364364dc94bbf83ff71448a11327 11-Sep-2009 Daniel Dunbar <daniel@zuster.org> Swizzle the target triple based on -mthumb, and update clang-cc to recognize
thumb-foo-bar as an ARM target.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81497 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
fd43de82605c2c82c2a7c68ae6b6d00a41a6ae04 11-Sep-2009 Anders Carlsson <andersca@mac.com> Pass the GlobalDecl to getMangledName, fixes PR4890.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81486 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
1860a31edf826bc4001e153f1a8c10e17d97af87 11-Sep-2009 Anders Carlsson <andersca@mac.com> Pass the GlobalDecl to getMangledName, fixes PR4890.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81486 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
53fcc95d65617c8818ef6d3f7bcd3f223f59224d 11-Sep-2009 Anders Carlsson <andersca@mac.com> Pass GlobalDecls to GenerateCode and StartFunction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81485 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.h
0ff8bafde95f6fa51ccea70738c1b99db870bddc 11-Sep-2009 Anders Carlsson <andersca@mac.com> Pass GlobalDecls to GenerateCode and StartFunction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81485 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.h
9ae59569ddab8488e68afad9ad3ab995b5126800 11-Sep-2009 Anders Carlsson <andersca@mac.com> GlobalDecl doesn't have an explicit constructor anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81481 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDecl.cpp
GExpr.cpp
GExprConstant.cpp
odeGenModule.cpp
555b4bb2749aea2ec8e2adc351a71ec1cb9bdc33 11-Sep-2009 Anders Carlsson <andersca@mac.com> GlobalDecl doesn't have an explicit constructor anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81481 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDecl.cpp
GExpr.cpp
GExprConstant.cpp
odeGenModule.cpp
ed5f0d9971eb064cbd25c8df377b6283957b33b2 11-Sep-2009 Anders Carlsson <andersca@mac.com> Add stricter GlobalDecl constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81480 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
4a6835e650ff24e19ce08a3bd347c0ad186777fd 11-Sep-2009 Anders Carlsson <andersca@mac.com> Add stricter GlobalDecl constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81480 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
9c73aa02c1e3dc693ae66b223ab2e3105f50007c 10-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Non fragile ABI for GNU runtime. Patch bu David Chisnall.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81462 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
d9a1db3a4ded1c8f0daa43c0d6167576e2766453 10-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Non fragile ABI for GNU runtime. Patch bu David Chisnall.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81462 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
bf93f144acc2506c92d08e148866aeea9c2618bb 10-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Get the size of object to pass to objc_memmove_collectable()
from correct field of TypeInfo.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81446 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
736d8a66062eeb25a4b63dcac36d1d4c261a02c4 10-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Get the size of object to pass to objc_memmove_collectable()
from correct field of TypeInfo.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81446 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1037889c6e000aea9a0d469011cbddcfd44c3a32 10-Sep-2009 Anders Carlsson <andersca@mac.com> Make the forwarding member of block byref structs be a pointer to the block byref struct itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81423 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
3604386e1eacbe9da4ab13a2648a44ca581057d3 10-Sep-2009 Anders Carlsson <andersca@mac.com> Make the forwarding member of block byref structs be a pointer to the block byref struct itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81423 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
909f7d9005158aff625c25735143196810122ae6 10-Sep-2009 Anders Carlsson <andersca@mac.com> Use the right GlobalDecl type for destructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81398 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
3fec4c605e0dd074422bca21626c036f52dab31d 10-Sep-2009 Anders Carlsson <andersca@mac.com> Use the right GlobalDecl type for destructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81398 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
f81c1a1e6873af672f49858746b3289e615e8329 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Suppress build warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81384 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
a2b6b76f4bd86ca1b7784ee7a8d790fb804df248 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Suppress build warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81384 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
0c6215978605dfde5ba2c4fdea8fb3c11ec67f81 09-Sep-2009 Anders Carlsson <andersca@mac.com> If a cast expression needs either a conversion function or a constructor to be called, generate implicit child expressions that call them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81383 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
0aebc81e02397a5987aaa8e8c7acbdb01a31d7c3 09-Sep-2009 Anders Carlsson <andersca@mac.com> If a cast expression needs either a conversion function or a constructor to be called, generate implicit child expressions that call them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81383 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
25cf760b54d3b88633827501013bc51a29b28aba 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
GBlocks.cpp
GBlocks.h
GBuiltin.cpp
GCXX.cpp
GCXX.h
GCXXTemp.cpp
GCall.cpp
GCall.h
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
GStmt.cpp
GValue.h
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
angle.cpp
angle.h
oduleBuilder.cpp
argetABIInfo.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
GBlocks.cpp
GBlocks.h
GBuiltin.cpp
GCXX.cpp
GCXX.h
GCXXTemp.cpp
GCall.cpp
GCall.h
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
GStmt.cpp
GValue.h
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
angle.cpp
angle.h
oduleBuilder.cpp
argetABIInfo.cpp
9b0bd80f834e3268316c2bae6fd329a19fd902f3 09-Sep-2009 Mike Stump <mrs@apple.com> Reflow comments and some minor whitespace fixups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81337 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
GExprComplex.cpp
GExprScalar.cpp
db52dcdae7d2e25565096d07ee74fa307061cc32 09-Sep-2009 Mike Stump <mrs@apple.com> Reflow comments and some minor whitespace fixups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81337 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
GExprComplex.cpp
GExprScalar.cpp
2032a34f18bc4335eaaae2ba187794ef7b91e4af 09-Sep-2009 Anders Carlsson <andersca@mac.com> Make BuildByRefType take a ValueDecl instead of a QualType and an alignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81315 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
odeGenFunction.h
9ad5513b0f9d3999705659fb1aeb0e6c53455f43 09-Sep-2009 Anders Carlsson <andersca@mac.com> Make BuildByRefType take a ValueDecl instead of a QualType and an alignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81315 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
odeGenFunction.h
2c087d5956b1921cdb4015a493453526aa06c487 08-Sep-2009 Anders Carlsson <andersca@mac.com> Vastly improve PredefinedExpr output, both in Sema and CodeGen. Patch by Sam Weinig!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81237 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
3a082d81006e7a2e01a6e431a22e21c78490ff8f 08-Sep-2009 Anders Carlsson <andersca@mac.com> Vastly improve PredefinedExpr output, both in Sema and CodeGen. Patch by Sam Weinig!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81237 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
e53f400c8646aa6283ceb7a7b0a58f12b2e4f38c 07-Sep-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove unnecessary #include <sstream>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81147 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
5fcc88225b92179ff433c53b16f75062db949fd7 07-Sep-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove unnecessary #include <sstream>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81147 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
bb3126c4520a43a5d51f645a510b034b2408871b 07-Sep-2009 Mike Stump <mrs@apple.com> Refine vcall offsets. Cleanups. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81143 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
angle.cpp
angle.h
dec025b15c63e0353768e402ad1fd566d97d2be7 07-Sep-2009 Mike Stump <mrs@apple.com> Refine vcall offsets. Cleanups. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81143 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
angle.cpp
angle.h
91a7dd376ca9bbfb838e4f2fec94b248ebb069be 07-Sep-2009 Daniel Dunbar <daniel@zuster.org> Use a SetVector for tracking some Obj-C metadata, to ensure deterministic
output.
- Also, cleanup code to output inline asm references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81139 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
330634933b67f917e993e7de020cf671ac614acb 07-Sep-2009 Daniel Dunbar <daniel@zuster.org> Use a SetVector for tracking some Obj-C metadata, to ensure deterministic
output.
- Also, cleanup code to output inline asm references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81139 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f0415ae626c79f11be04791224532f0bf30479e1 05-Sep-2009 Mike Stump <mrs@apple.com> Refine overrides and thunks for virtual bases. Cleanups. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81080 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
98cc71003d385561224e3711cd34c5b03f27ccdc 05-Sep-2009 Mike Stump <mrs@apple.com> Refine overrides and thunks for virtual bases. Cleanups. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81080 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
3cd18e4107cd41dc735e81c825aecbdb6423fb70 05-Sep-2009 Mike Stump <mrs@apple.com> Cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81078 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
a18df0ec71c5c95fb6809d4a80050f7b218f38b5 05-Sep-2009 Mike Stump <mrs@apple.com> Cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81078 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
634ef538861065b0d08be098afd69c4dfc89389f 05-Sep-2009 Mike Stump <mrs@apple.com> Cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81077 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
e45c90f53e3fcb59a48e88862aa5cf5f5538556c 05-Sep-2009 Mike Stump <mrs@apple.com> Cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81077 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
0eb238005e90ae8bcb6e7bd03892fac7c12f93db 05-Sep-2009 Mike Stump <mrs@apple.com> Cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81075 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
8f90f58cc084e1dbdc2e717a4878d2a1ee7ef087 05-Sep-2009 Mike Stump <mrs@apple.com> Cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81075 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
8e8e0f431c635acd1cd674523803418b7f0af7eb 05-Sep-2009 Mike Stump <mrs@apple.com> Cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81074 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
b4d2861371d84a5cc98462676da4e6bb8c2d7c03 05-Sep-2009 Mike Stump <mrs@apple.com> Cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81074 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
8e0f10f8d460410798682509c5cfe33628b667af 05-Sep-2009 Mike Stump <mrs@apple.com> Cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81073 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
078d778d8ea4a3975a985da4e8aaef2d269c82fa 05-Sep-2009 Mike Stump <mrs@apple.com> Cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81073 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
fd9b3d02dc729b90b6fa590550950951b9121e91 05-Sep-2009 Mike Stump <mrs@apple.com> Cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81072 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
9bbe962611ebdcfdd1e5e312113ad4efd13472b2 05-Sep-2009 Mike Stump <mrs@apple.com> Cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81072 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
900acd3cc2f2e3c8c74b2aa5d279fea2361ea480 05-Sep-2009 Mike Stump <mrs@apple.com> Cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81071 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
bf595a3b1f1737eb60203856ea34b759c4c09c46 05-Sep-2009 Mike Stump <mrs@apple.com> Cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81071 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
b16b5471e8fcd441d727f6c7146c4f2f1ca292c3 05-Sep-2009 John McCall <rjmccall@apple.com> Overhaul the mangler to use a visitor pattern, at least for types. We can safely
ignore non-canonical type classes, but apparently we need to know how to mangle
dependent names.

The missing cases are much more obvious now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81070 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
efe6aee53b8585d2be158daa6d74315ff37d0db9 05-Sep-2009 John McCall <rjmccall@apple.com> Overhaul the mangler to use a visitor pattern, at least for types. We can safely
ignore non-canonical type classes, but apparently we need to know how to mangle
dependent names.

The missing cases are much more obvious now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81070 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
53f3298dfb8f3cb31e98656680bbcb9f177e0c71 05-Sep-2009 Mike Stump <mrs@apple.com> Cleanups. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81069 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
6d10eb828b32b7a1058809c59ce6c3e2c46b18d7 05-Sep-2009 Mike Stump <mrs@apple.com> Cleanups. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81069 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
58256413f4230cb0c2b357d2a14de41de8a44f71 05-Sep-2009 Mike Stump <mrs@apple.com> Install thunks later to fixup overrides. Track space taken by vbase
offsets better for thunk refinements. Cleanups. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81067 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
odeGenModule.h
angle.cpp
angle.h
77ca8f6c5e666ef873066b580bf1b7fabd41d4f5 05-Sep-2009 Mike Stump <mrs@apple.com> Install thunks later to fixup overrides. Track space taken by vbase
offsets better for thunk refinements. Cleanups. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81067 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
odeGenModule.h
angle.cpp
angle.h
fbec6a92f5bf5cbae1ea922f8ec04d6a6d18682f 05-Sep-2009 John McCall <rjmccall@apple.com> Start emitting ElaboratedTypes in C++ mode. Support the effort in various
ways: remove elab types during desugaring, enhance pretty-printing to allow
tags to be suppressed without suppressing scopes, look through elab types
when associating a typedef name with an anonymous record type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81065 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
2191b20bfb31fc0e22a158f6b4204cd0b7dbd0fd 05-Sep-2009 John McCall <rjmccall@apple.com> Start emitting ElaboratedTypes in C++ mode. Support the effort in various
ways: remove elab types during desugaring, enhance pretty-printing to allow
tags to be suppressed without suppressing scopes, look through elab types
when associating a typedef name with an anonymous record type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81065 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
379448fc7bc91bba33e3d2df073f6cf011960b96 05-Sep-2009 John McCall <rjmccall@apple.com> Basic support for representing elaborated type specifiers
directly in the AST. The current thinking is to create these
only in C++ mode for efficiency. But for now, they're not being
created at all; patch to follow.

This will let us do things like verify that tags match during
template instantation, as well as signal that an elaborated type
specifier was used for clients that actually care.

Optimally, the TypeLoc hierarchy should be adjusted to carry tag
location information as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81057 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7da2431c23ef1ee8acb114e39692246e1801afc2 05-Sep-2009 John McCall <rjmccall@apple.com> Basic support for representing elaborated type specifiers
directly in the AST. The current thinking is to create these
only in C++ mode for efficiency. But for now, they're not being
created at all; patch to follow.

This will let us do things like verify that tags match during
template instantation, as well as signal that an elaborated type
specifier was used for clients that actually care.

Optimally, the TypeLoc hierarchy should be adjusted to carry tag
location information as well.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81057 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
8e7e4609012900d1a0eafafb49b5089acddf5b7a 05-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Improve the AST representation and semantic analysis for extern
templates. We now distinguish between an explicit instantiation
declaration and an explicit instantiation definition, and know not to
instantiate explicit instantiation declarations. Unfortunately, there
is some remaining confusion w.r.t. instantiation of out-of-line member
function definitions that causes trouble here.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81053 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d0e3daf2b980b505e535d35b432c938c6d0208ef 05-Sep-2009 Douglas Gregor <dgregor@apple.com> Improve the AST representation and semantic analysis for extern
templates. We now distinguish between an explicit instantiation
declaration and an explicit instantiation definition, and know not to
instantiate explicit instantiation declarations. Unfortunately, there
is some remaining confusion w.r.t. instantiation of out-of-line member
function definitions that causes trouble here.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81053 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6ccc6f3f2044286d82ad46e726d4696c6673cfa8 04-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Don't generate any code for an explicit call to a trivial destructor.

Now that parsing, semantic analysis, and (I think) code generation of
pseudo-destructor expressions and explicit destructor calls works,
update the example-dynarray.cpp test to destroy the objects it
allocates and update the test to actually compile + link.
The code seems correct, but the Clang-compiled version dies with a
malloc error. Time to debug!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81025 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
4fe95f99a2693f1145785ea5835ba6937e49c730 04-Sep-2009 Douglas Gregor <dgregor@apple.com> Don't generate any code for an explicit call to a trivial destructor.

Now that parsing, semantic analysis, and (I think) code generation of
pseudo-destructor expressions and explicit destructor calls works,
update the example-dynarray.cpp test to destroy the objects it
allocates and update the test to actually compile + link.
The code seems correct, but the Clang-compiled version dies with a
malloc error. Time to debug!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81025 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
d5b155698ec67da21f135b139272f9869be2044c 04-Sep-2009 Mike Stump <mrs@apple.com> Add overidding for methods for vtable building for the secondary
vtables. Add thunk generation. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81014 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
odeGenModule.h
ed032eb5c18b99528cbd76415337b6056a72b911 04-Sep-2009 Mike Stump <mrs@apple.com> Add overidding for methods for vtable building for the secondary
vtables. Add thunk generation. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81014 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
odeGenModule.h
3e36851cc872a3e8461234e69642852d46b545ce 04-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Implement AST, semantics, and CodeGen for C++ pseudo-destructor
expressions, e.g.,

p->~T()

when p is a pointer to a scalar type.

We don't currently diagnose errors when pseudo-destructor expressions
are used in any way other than by forming a call.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81009 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
a71d819bb8f50c28938db0f2867d3fb6e2ce5910 04-Sep-2009 Douglas Gregor <dgregor@apple.com> Implement AST, semantics, and CodeGen for C++ pseudo-destructor
expressions, e.g.,

p->~T()

when p is a pointer to a scalar type.

We don't currently diagnose errors when pseudo-destructor expressions
are used in any way other than by forming a call.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81009 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
3bf47eb5bb4947b6866080e7c1882f4a06e08ec1 04-Sep-2009 Anders Carlsson <andersca@mac.com> If the alignment of the chosen field in a union is greater than the alignment of the union, we need to use a packed LLVM struct. Fixes <rdar://problem/7184250>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80964 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
366200045fc30290795e037ab2cb417ddd3c9933 04-Sep-2009 Anders Carlsson <andersca@mac.com> If the alignment of the chosen field in a union is greater than the alignment of the union, we need to use a packed LLVM struct. Fixes <rdar://problem/7184250>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80964 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
851b48294a48b0ee6e7999d2abd399f06d0b2eb9 03-Sep-2009 David Chisnall <csdavec@swan.ac.uk> Fixed bug introduced in r79900 where FreeBSD was turned into NetBSD, transposing the ABIs and breaking both platforms.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80870 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
75c135a511c855d94bbfa7f00dd27a165f61e953 03-Sep-2009 David Chisnall <csdavec@swan.ac.uk> Fixed bug introduced in r79900 where FreeBSD was turned into NetBSD, transposing the ABIs and breaking both platforms.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80870 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
e733488d54f108fa2d4ef9fd3837ec697b1ef562 03-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Don't try to CodeGen using directives, from Anders Johnsen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80853 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
dd9967a6374c9a44be4af02aaeee340ffb82848f 03-Sep-2009 Douglas Gregor <dgregor@apple.com> Don't try to CodeGen using directives, from Anders Johnsen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80853 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
9e00ce7fe78f5dbd50df2068cc0719ea7abe2eba 02-Sep-2009 Anders Carlsson <andersca@mac.com> Fix an assertion when initializing a union using a member initializer. (We weren't casting from the union type to the initializer type correctly).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80837 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
c186b8fe4a308b53569fe839a3224de70d92ab0e 02-Sep-2009 Anders Carlsson <andersca@mac.com> Fix an assertion when initializing a union using a member initializer. (We weren't casting from the union type to the initializer type correctly).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80837 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
8f2743ea4450c4975ebc935281cb221f5551df88 02-Sep-2009 Anders Carlsson <andersca@mac.com> Packed unions should be packed. Fixes an assert Daniel reported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80808 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
d0eb3b93e89f0ab83a2305eb0ec42076f8d46142 02-Sep-2009 Anders Carlsson <andersca@mac.com> Packed unions should be packed. Fixes an assert Daniel reported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80808 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
28db39b6e4b1008b02da6c9c8911386351e541b9 02-Sep-2009 Mike Stump <mrs@apple.com> Add mangling for covariant thunks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80747 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
9124bccde8e4b3531474b108d74720feac898d75 02-Sep-2009 Mike Stump <mrs@apple.com> Add mangling for covariant thunks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80747 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
eeba4adf9c4ab69a7b2fbaf3a066e945112d0749 02-Sep-2009 Mike Stump <mrs@apple.com> Shorten name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80744 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
883f127b28fe6ecffcdf5f86b087fd2c20dbecb8 02-Sep-2009 Mike Stump <mrs@apple.com> Shorten name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80744 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
b29542faf5acb1920c58ac1c0c2af01f3fe6cd66 02-Sep-2009 Mike Stump <mrs@apple.com> Add mangling for thunks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80743 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
141c5afc2bbb550b83f18e0284585b5ae477ad2a 02-Sep-2009 Mike Stump <mrs@apple.com> Add mangling for thunks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80743 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
35240ecb29f3cbfddc805e0311eff6b5c2525346 02-Sep-2009 Mike Stump <mrs@apple.com> More overriding base work and some cleanups. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80737 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
f9a883c27e3b5724a5a59499691fa109eb5032f8 02-Sep-2009 Mike Stump <mrs@apple.com> More overriding base work and some cleanups. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80737 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
35af2b18026d6e7b51ea9056fb532ba346a9a48a 02-Sep-2009 Mike Stump <mrs@apple.com> Split out overriding. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80732 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
35191b61db617aefba43b8add88a2ec88af67592 02-Sep-2009 Mike Stump <mrs@apple.com> Split out overriding. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80732 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
78c237c8971bd400c7ed9b4db2b1115da71b2d40 01-Sep-2009 Anders Carlsson <andersca@mac.com> Handle member expressions that return references correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80723 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
faf86648bfab7e0fa975e2b32c10fe1d8b461e8c 01-Sep-2009 Anders Carlsson <andersca@mac.com> Handle member expressions that return references correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80723 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
a82465d4beda8d321594ba82e158ce123963e808 01-Sep-2009 Anders Carlsson <andersca@mac.com> Assert that we don't have any virtual bases. We can emit dtors for polymorphics classes just fune.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80722 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
de738fe899b5c1d387dbc66a1122032e694d3d6f 01-Sep-2009 Anders Carlsson <andersca@mac.com> Assert that we don't have any virtual bases. We can emit dtors for polymorphics classes just fune.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80722 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
f1957c8e4159dc84772ad919b552429e3c552816 01-Sep-2009 Anders Carlsson <andersca@mac.com> Use the correct cast kinds for bit casts and function to pointer decay. Fixes PR4827.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80720 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
cb3c308ef0e63b2902911b985517309c26f975dc 01-Sep-2009 Anders Carlsson <andersca@mac.com> Use the correct cast kinds for bit casts and function to pointer decay. Fixes PR4827.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80720 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
4bdc033b80d0898b8934e2ed413a1d399f3b5850 01-Sep-2009 Anders Carlsson <andersca@mac.com> We can generate constructors/destructors with base classes and non-trivial fields just fine now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80701 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
174754cda4596f3bb2539df61ab2ab7a17aad6bf 01-Sep-2009 Anders Carlsson <andersca@mac.com> We can generate constructors/destructors with base classes and non-trivial fields just fine now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80701 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
293280c33ee0be4c9356f0a2a9dde726036d758a 01-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a property getter ir-gen crash.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80681 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjC.cpp
d2e1eb064cfb8d361ea1dd4f6253a4e20f24d88d 01-Sep-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a property getter ir-gen crash.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80681 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjC.cpp
eca5749185e4cfa2ab6f37a96ec03ac753b467b8 01-Sep-2009 Eli Friedman <eli.friedman@gmail.com> PR4836, part 2: CodeGen for __builtin_isnan.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80655 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
d6139895f43d161a972d134ffda4229d2f548eb6 01-Sep-2009 Eli Friedman <eli.friedman@gmail.com> PR4836, part 2: CodeGen for __builtin_isnan.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80655 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
c1991bf37685134f7a139f22883a6c7448aa0f62 01-Sep-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate CXXAdornedMemberExpr entirely. Instead, optionally allocate
space within the MemberExpr for the nested-name-specifier and its
source range. We'll do the same thing with explicitly-specified
template arguments, assuming I don't flip-flop again.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80642 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
83f6faf37d9bf58986bedc9bc0ea897a56b4dbad 01-Sep-2009 Douglas Gregor <dgregor@apple.com> Eliminate CXXAdornedMemberExpr entirely. Instead, optionally allocate
space within the MemberExpr for the nested-name-specifier and its
source range. We'll do the same thing with explicitly-specified
template arguments, assuming I don't flip-flop again.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80642 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
2f0ceceade1d3dafd930b3238f573e2860c6e0fa 01-Sep-2009 Devang Patel <dpatel@apple.com> Rename DIBlock as DILexicalBlock.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80634 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
49a8b984474f7f36c53cbd11bb7db6043e9ef1de 01-Sep-2009 Devang Patel <dpatel@apple.com> Rename DIBlock as DILexicalBlock.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80634 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
efccbec93fa2bc73800857b0208b583cb3d68d78 31-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Rename CXXQualifiedMemberExpr -> CXXAdornedMemberExpr, since we will
also be adding explicit template arguments as an additional
"adornment". No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80628 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
0979c805475d1ba49b5d6ef93c4d2ce6d2eab6ed 31-Aug-2009 Douglas Gregor <dgregor@apple.com> Rename CXXQualifiedMemberExpr -> CXXAdornedMemberExpr, since we will
also be adding explicit template arguments as an additional
"adornment". No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80628 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
7290e17d0159f78e9143c074769fb6a574b5c62c 31-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Re-implemented generation of objc_memmove_collectable
API for copying GC'able aggregates (Next runtime only).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80607 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
08c321380fff07d476a19daab6d29522c046cd49 31-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Re-implemented generation of objc_memmove_collectable
API for copying GC'able aggregates (Next runtime only).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80607 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
cd118e609b2bd1abedf9a99b543770a425597e20 31-Aug-2009 David Chisnall <csdavec@swan.ac.uk> Updated GNU runtime non-fragile ABI.
Added -fconstant-string-class= option.
Added __has_feature() test for non-fragile ABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80591 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
8a5a9aaddb627c0884c2ed8db55cc29fdb601195 31-Aug-2009 David Chisnall <csdavec@swan.ac.uk> Updated GNU runtime non-fragile ABI.
Added -fconstant-string-class= option.
Added __has_feature() test for non-fragile ABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80591 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
13bce3d58b64fb2b732f87d9f4727db86feaa7ea 29-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Make IRGen for initializing a member reference work correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80439 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
e3a97db45ac46adf963115d0266cfd3e6bc2dce8 29-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Make IRGen for initializing a member reference work correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80439 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
6695b8fd96f5b8e6e0c446a2319d2dadc526157a 29-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to ir-gen user-defined conversions used in expressions
[12.3.2-p3]



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80436 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
383d29853331e4f6c0c720a1df9cab31f6ab3dba 29-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to ir-gen user-defined conversions used in expressions
[12.3.2-p3]



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80436 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
ec172132c867db117dc0d0584587151e848e3998 29-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for code gen. for c-style cast which ends in
using class's conversion functions [12.3.2-p2]


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80433 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
31976591dee494994f2546c72c23e1e35a9c1555 29-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for code gen. for c-style cast which ends in
using class's conversion functions [12.3.2-p2]


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80433 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
f324564d8ae5e5dc187b9465b191002db9428534 29-Aug-2009 Mike Stump <mrs@apple.com> iGenerate vcalls as we build up the methods. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80405 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
15a24e0e0737c3aa6f85fd18af64c3b6195454c3 29-Aug-2009 Mike Stump <mrs@apple.com> iGenerate vcalls as we build up the methods. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80405 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
795a3fd05ce06bf185a7fbaa7fe521abf25e99e9 28-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen related patch for type conversion
with class type conversion methods. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80365 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
4fc7ab364110d6ad1c10dd38dbeb0597fed7e2f5 28-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen related patch for type conversion
with class type conversion methods. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80365 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
89530d5375cf5c657da53f7392402593f63e38c9 27-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Clean up CodeGenFunction::EmitCastLValue to use the cast kind. Error
out for user-defined conversions instead of crashing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80282 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
a77a07e49366628b3eaf27cf72c4e94762cfddc9 27-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Clean up CodeGenFunction::EmitCastLValue to use the cast kind. Error
out for user-defined conversions instead of crashing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80282 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
46033a1b081bfbe3f37066df069fa9c8469858b2 27-Aug-2009 Mike Stump <mrs@apple.com> Fixup codegen for static dispatch to a virtual function that was
almost correct. :-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80181 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
63bb7c2b281c62a30233b1638ecd8fb4048a38c4 27-Aug-2009 Mike Stump <mrs@apple.com> Fixup codegen for static dispatch to a virtual function that was
almost correct. :-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80181 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
c8a336f3596523fed0178cf1c8fa999dc1152c83 27-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for type convesion of class objects. WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80178 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprAgg.cpp
GExprScalar.cpp
odeGenFunction.h
64e690ecf7ba7ad560b0af631bb6f323c38f6da4 27-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for type convesion of class objects. WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80178 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprAgg.cpp
GExprScalar.cpp
odeGenFunction.h
e399ad4e75a7cb3e0abd0b8210f66393711d1360 27-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> When a member reference expression includes a qualifier on the member
name, e.g.,

x->Base::f()

retain the qualifier (and its source range information) in a new
subclass of MemberExpr called CXXQualifiedMemberExpr. Provide
construction, transformation, profiling, printing, etc., for this new
expression type.

When a virtual function is called via a qualified name, don't emit a
virtual call. Instead, call that function directly. Mike, could you
add a CodeGen test for this, too?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80167 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
bd4c4aebe6035e7a7125470cc9f0f92511230ee3 27-Aug-2009 Douglas Gregor <dgregor@apple.com> When a member reference expression includes a qualifier on the member
name, e.g.,

x->Base::f()

retain the qualifier (and its source range information) in a new
subclass of MemberExpr called CXXQualifiedMemberExpr. Provide
construction, transformation, profiling, printing, etc., for this new
expression type.

When a virtual function is called via a qualified name, don't emit a
virtual call. Instead, call that function directly. Mike, could you
add a CodeGen test for this, too?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80167 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
9c71db1d83b6c08e92f0dd69fd0e23bc0aeaf6d2 27-Aug-2009 Mike Stump <mrs@apple.com> Regularize the case and sort.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80163 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.cpp
odeGenModule.cpp
1feade8e520be483293dbf55eb57a51720899589 27-Aug-2009 Mike Stump <mrs@apple.com> Regularize the case and sort.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80163 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.cpp
odeGenModule.cpp
f7d47a54044445b5b7375804cf78df48c3a19149 26-Aug-2009 Mike Stump <mrs@apple.com> Implement virtual dispatch. :-) This is self-consistent with clang,
but not yet necessarily perfectly consistent with gcc. Also addressed
Doug and John's comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80137 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
f0070dbae9535836ad41711081465dec2259786b 26-Aug-2009 Mike Stump <mrs@apple.com> Implement virtual dispatch. :-) This is self-consistent with clang,
but not yet necessarily perfectly consistent with gcc. Also addressed
Doug and John's comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80137 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
9bb429cf94d26e32f7a55d6832f4035c162df8de 26-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Make address-space qualification work correctly for compound literals.
Issue reported on cfe-dev.

Also fixed the code to use isConstant to determine whether to generate a
constant global, to be consistent with CodeGenModule. This probably
needs to be refactored to deal with C++, though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80131 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
d15d8c6395bbdc9b344ba6c6edf152502c2abfde 26-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Make address-space qualification work correctly for compound literals.
Issue reported on cfe-dev.

Also fixed the code to use isConstant to determine whether to generate a
constant global, to be consistent with CodeGenModule. This probably
needs to be refactored to deal with C++, though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80131 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
f35b5eadefd5eb450d2d591380974b1fab34c73e 26-Aug-2009 Anders Carlsson <andersca@mac.com> Revert r80064 since it broke the build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80066 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
eb1a1b6df0ba8d6d42e16f056cf54a2c87780ffe 26-Aug-2009 Anders Carlsson <andersca@mac.com> Revert r80064 since it broke the build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80066 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
48cf03971ed1aafce286fd1ae2645715320b0913 26-Aug-2009 Mike Stump <mrs@apple.com> Implement virtual dispatch. :-) This is self-consistent with clang, but not yet
necessarily perfectly consistent with gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80064 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
78e7d3af10c861678127dc9befe5dcdef5d1baea 26-Aug-2009 Mike Stump <mrs@apple.com> Implement virtual dispatch. :-) This is self-consistent with clang, but not yet
necessarily perfectly consistent with gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80064 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
58a7eca1bf2d5b57b4ab83844f59fece4711b506 26-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Simplified default construction of array data members
in the constructor prologue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80060 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
4f68d537c3f072366b25f3137f052eee36fddfcd 26-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Simplified default construction of array data members
in the constructor prologue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80060 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
337531f203e9bc1810f6d00d0541a5aaf41ac16b 25-Aug-2009 Anders Carlsson <andersca@mac.com> Emit conversion functions correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79985 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
293361afd4199c92aabff9267fddea890943c586 25-Aug-2009 Anders Carlsson <andersca@mac.com> Emit conversion functions correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79985 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
44cb259b215f7e61cb2f1bbaeffe381bcb9a7a1e 25-Aug-2009 Anders Carlsson <andersca@mac.com> Fix ivar layout map generation (hopefully).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79968 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ef46d1817d5b00966f21a927a6a3b5d949aaf988 25-Aug-2009 Anders Carlsson <andersca@mac.com> Fix ivar layout map generation (hopefully).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79968 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
26287a68d0fa097882972a691c62c61d030b530d 25-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Remove #ifdef'out code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79956 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
e666b1b1fbe17ce6cc8d417690c61cd05f5b0002 25-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Remove #ifdef'out code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79956 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
db0a94d484415cf0ef7df341fab94d012fb70201 24-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Remove ivarlayout bitmap optimization, instead if all zeros,
put out the bitmap when all objects are scanned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79947 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6d9eae69a07d6ea55bad53eff217ea2f0737e5a0 24-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Remove ivarlayout bitmap optimization, instead if all zeros,
put out the bitmap when all objects are scanned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79947 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
bade079b5eb0d385ff042cebff16b3e1105a3b20 24-Aug-2009 Anders Carlsson <andersca@mac.com> Handle array to pointer decay in EmitCastExpr and get rid of VisitImplicitCastExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79930 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
504bf55195ccbf84e016a0c7759669dee2975ba3 24-Aug-2009 Anders Carlsson <andersca@mac.com> Handle array to pointer decay in EmitCastExpr and get rid of VisitImplicitCastExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79930 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
497794f208f3848c231b1631641b922f719b5d9a 24-Aug-2009 Anders Carlsson <andersca@mac.com> Handle CK_NullToMemberPointer in ScalarExprEmitter::EmitCast

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79929 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
e9776247577715ad3a19461769a3488a445a8cbd 24-Aug-2009 Anders Carlsson <andersca@mac.com> Handle CK_NullToMemberPointer in ScalarExprEmitter::EmitCast

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79929 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
2c61dbee7280dab9ccb66b1f808d7beb07ab8a1f 24-Aug-2009 Anders Carlsson <andersca@mac.com> Pass the cast kind to ScalarExprEmitter::EmitCastExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79928 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
4e382f3130834ac9862047a1f40402f261424774 24-Aug-2009 Anders Carlsson <andersca@mac.com> Pass the cast kind to ScalarExprEmitter::EmitCastExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79928 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
678d11876d7f2fb10849f0f134f5adcc27f2b9b2 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
GExprConstant.cpp
odeGenTypes.cpp
odeGenTypes.h
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
GExprConstant.cpp
odeGenTypes.cpp
odeGenTypes.h
89c3cfdb35c26396596da92369273c9dcf4047b4 24-Aug-2009 Anders Carlsson <andersca@mac.com> Remove dead code

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79921 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
2d82719c580f878e0810d868b366a3ac2d00746f 24-Aug-2009 Anders Carlsson <andersca@mac.com> Remove dead code

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79921 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
0fbc71c858f622540711ca91a6cc58bc96b2935f 24-Aug-2009 Edwin Török <edwintorok@gmail.com> Fix build of clang with gcc-4.4: #include <cstdio> was missing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79916 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GObjCMac.cpp
argetABIInfo.cpp
f42e4a6e089e8413247400fe58ad299193371f9c 24-Aug-2009 Torok Edwin <edwintorok@gmail.com> Fix build of clang with gcc-4.4: #include <cstdio> was missing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79916 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GObjCMac.cpp
argetABIInfo.cpp
2e967de5e6f7a9ab2e382bc3b3bed638d12bdd4b 24-Aug-2009 Daniel Dunbar <daniel@zuster.org> Remove TargetInfo::getTargetPrefix().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79907 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
55cc2ed722e041228670d26d548e5590e355aced 24-Aug-2009 Daniel Dunbar <daniel@zuster.org> Remove TargetInfo::getTargetPrefix().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79907 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
608b388b563b5ccf7eeac5da78b539ea8f7ae4cd 24-Aug-2009 Daniel Dunbar <daniel@zuster.org> Switch TargetInfo to store an llvm::Triple.
- Primarily to discourage clients form making decisions based on the string.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79901 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
argetABIInfo.cpp
1752ee4849f4c37f5e03193e658be92650b0e65a 24-Aug-2009 Daniel Dunbar <daniel@zuster.org> Switch TargetInfo to store an llvm::Triple.
- Primarily to discourage clients form making decisions based on the string.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79901 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
argetABIInfo.cpp
ea183f96124ccf500e3c151ceb7dacdd5e271b86 24-Aug-2009 Daniel Dunbar <daniel@zuster.org> Switch ABI selection to use llvm::Triple instead of string munging.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79900 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
2c0843f166a82f251b20370fadab57878969e7aa 24-Aug-2009 Daniel Dunbar <daniel@zuster.org> Switch ABI selection to use llvm::Triple instead of string munging.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79900 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
50353f11e6421455826f76023b745df8284938c9 23-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Don't install Clang libraries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79824 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
7ebe97166a4d720a187ab08ba927027e0d32274c 23-Aug-2009 Douglas Gregor <dgregor@apple.com> Don't install Clang libraries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79824 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
4c2e1fa07de777e57e7b1914624c88bdec207da5 23-Aug-2009 Anders Carlsson <andersca@mac.com> Whoops, comment this out for now. I'll fix it shortly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79806 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
70d488e6d0d3127aa53bee57ab9e746943ed47c3 23-Aug-2009 Anders Carlsson <andersca@mac.com> Whoops, comment this out for now. I'll fix it shortly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79806 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
9ab6d81b194c1ba85c3bf755595fa58d76fa5c05 23-Aug-2009 Anders Carlsson <andersca@mac.com> More work towards zero-initializing structs that contain member pointers in constant expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79805 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
odeGenTypes.h
fc3eaa47fa2ef70ab21131005c328adda3020737 23-Aug-2009 Anders Carlsson <andersca@mac.com> More work towards zero-initializing structs that contain member pointers in constant expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79805 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
odeGenTypes.h
481a1328a4dcd7a99b6261cf3e6f7120b16590b7 23-Aug-2009 Anders Carlsson <andersca@mac.com> Remove the PaddingFields member from CGRecordLayout, it wasn't used anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79799 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
odeGenTypes.h
341bdf8d565f5282779a0ffd2d2b77f3a38b735e 23-Aug-2009 Anders Carlsson <andersca@mac.com> Remove the PaddingFields member from CGRecordLayout, it wasn't used anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79799 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
odeGenTypes.h
5330e36436e5427e9f87560d43a8affea46bc87d 23-Aug-2009 Anders Carlsson <andersca@mac.com> Handle CK_NullToMemberPointer casts in the constant expr emitter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79790 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
d1a9bac24466831e089c8f330ec9264fb3ace367 23-Aug-2009 Anders Carlsson <andersca@mac.com> Handle CK_NullToMemberPointer casts in the constant expr emitter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79790 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
280e608cc6bfc7ba39b30f622b14adb734d104da 23-Aug-2009 Anders Carlsson <andersca@mac.com> Change the constant expression emitter to look at the cast kind for to-union casts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79789 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
0086ccb1985f392ac688a19b35b300610db102e8 23-Aug-2009 Anders Carlsson <andersca@mac.com> Change the constant expression emitter to look at the cast kind for to-union casts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79789 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
9a0c2a528cab3391cc1c8635155a12fc1d4240b1 23-Aug-2009 Anders Carlsson <andersca@mac.com> Add a -fno-elide-constructors option to clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79782 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
92f5822df6a0d7571df44b5d279ed4f017fbb0e6 23-Aug-2009 Anders Carlsson <andersca@mac.com> Add a -fno-elide-constructors option to clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79782 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
0096232412dc5e4e2f9448513e19d78f92124914 22-Aug-2009 Mike Stump <mrs@apple.com> Calculate the address point for a vtable better, and start fleshing out the vcall
calculations better.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79687 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
263b3522add846130ff5f0a85568234e612a81ca 22-Aug-2009 Mike Stump <mrs@apple.com> Calculate the address point for a vtable better, and start fleshing out the vcall
calculations better.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79687 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
ccd932854347bd92dfad4c0abb416a4da1a178ca 22-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to ir-gen copy assigning array members when synthesizing
a copy assignment operator function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79681 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
c28bbc2d2271aab6c5d79ef2758604221cd92a4b 22-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to ir-gen copy assigning array members when synthesizing
a copy assignment operator function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79681 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
86328d204447926e71875bb7180b3e1002393378 21-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to provide ir-gen support in copying array members
when synthesizing a copy constructor. Arrays's base element
may have a trivial or non-trivial copy constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79653 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
eb0b6d556ff2b4a5053e89fd084eb34e44cea14c 21-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to provide ir-gen support in copying array members
when synthesizing a copy constructor. Arrays's base element
may have a trivial or non-trivial copy constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79653 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
c7b8d9a54b245f32f63c1247e97d69847576dd38 21-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Array member construction in prologue of user-declared
constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79640 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
64a54ad29929443006d4c8502173c163bedaa223 21-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Array member construction in prologue of user-declared
constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79640 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
dae3e75fa046ddb930251c67b65e2f6cf97db7d0 21-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Introduce getConstantArrayElementCount API and use it in
construction/destruction of array members.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79637 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
0de78998e7bda473b408437053e48661b510d453 21-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Introduce getConstantArrayElementCount API and use it in
construction/destruction of array members.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79637 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
f07ede5977e41a441d60fefcbed3a97ee434634f 21-Aug-2009 Mike Stump <mrs@apple.com> We now support overriding base functions in vtables. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79587 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
b9871a253d351e8776cfa5483d6330d5dffe4562 21-Aug-2009 Mike Stump <mrs@apple.com> We now support overriding base functions in vtables. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79587 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
42556e426eaf5b19971c2dd15c0564657fcdd235 21-Aug-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use DeclaratorInfo to get this information.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79584 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
a5d82000f7b173a0a5ce34dc8c09a03f98d9e439 21-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use DeclaratorInfo to get this information.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79584 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
25879cec6c4236f0dbb3c7f06c8354019b44655f 21-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to ir-gen destruction of array member elements in revers order
of their construction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79571 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
1c536bf6bbb0cdc039cff754825b36f9abfe0629 21-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to ir-gen destruction of array member elements in revers order
of their construction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79571 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
a0903aa32cd5a6cc5bcd69c349ebd5668664a11e 20-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen patch to destruct array members. WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79565 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
f800f6c09ed4a71bcb593d6962e0fda2c2845a70 20-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen patch to destruct array members. WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79565 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
128cdc592c93af458ae89032d83dc75242eac52d 20-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Using "ObjCImplicitSetterGetterRefExpr" instead of "ObjCImplctSetterGetterRefExpr".
A field rename and more comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79537 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GValue.h
odeGenFunction.h
09105f52b1f28cbb1374c27c3c70f5517e2c465d 20-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Using "ObjCImplicitSetterGetterRefExpr" instead of "ObjCImplctSetterGetterRefExpr".
A field rename and more comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79537 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GValue.h
odeGenFunction.h
af0d0452bff081828f1204ca42c6639128f17119 20-Aug-2009 Mike Stump <mrs@apple.com> Refine vbase offsets for the inductive case. Things are now starting
to come together nicely. Still a WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79521 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
b983744cccb7e2e5c2bc96de3dcc090ed17fa392 20-Aug-2009 Mike Stump <mrs@apple.com> Refine vbase offsets for the inductive case. Things are now starting
to come together nicely. Still a WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79521 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
2b9ba61da1b9fa60233501a5ca886022d0aa9dbf 20-Aug-2009 Mike Stump <mrs@apple.com> Ensure we don't output repeated vbase offsets. I have a testcase for
this, but need to fixup the actual offset value before I can check it
in. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79506 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
7fa0d93a3bbe290244f4f157078d9a0d6e87b44f 20-Aug-2009 Mike Stump <mrs@apple.com> Ensure we don't output repeated vbase offsets. I have a testcase for
this, but need to fixup the actual offset value before I can check it
in. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79506 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
a0ab73543e497150296938daa404ce59e2146b68 20-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Test case for my last patch plus a minor clean up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79500 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
995d2818a11395b15995694a30f842a0e4fdee4f 20-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Test case for my last patch plus a minor clean up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79500 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
f36f8d24a8082100581cf40f1e855eaaee07efff 20-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for multi-dimensional array construction. WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79497 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
6147a908f6d2a67dde46328c83332b92265ab3ae 20-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for multi-dimensional array construction. WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79497 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
30e6f5645866f0f22751b7399f6597d020ac24f0 19-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Removed unneeded code for break/continue statements in
manufactured for-loop per Anders feedback (thanks).

- Fariborz


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79466 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
1dea87a0760070190db3e35f3c47f611662b5f28 19-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Removed unneeded code for break/continue statements in
manufactured for-loop per Anders feedback (thanks).

- Fariborz


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79466 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
2f4b91b9abcb44ca62f07f5196cb63428d515fdc 19-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for constructing arrays as non-static data members. WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79464 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
288dcaf329c49b01dacd5c1dd9f35609555feecd 19-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for constructing arrays as non-static data members. WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79464 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
0433a02f13f468188837dfe7e084acabb8c9d562 19-Aug-2009 Daniel Dunbar <daniel@zuster.org> Switch to SmallString::str from SmallString::c_str.
- Several FIXMEs due to non-Twinification of IRBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79455 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprComplex.cpp
7765934ad7e157b5fcf925792a38e01b1edbcf8a 19-Aug-2009 Daniel Dunbar <daniel@zuster.org> Switch to SmallString::str from SmallString::c_str.
- Several FIXMEs due to non-Twinification of IRBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79455 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprComplex.cpp
86a859ec9db17b71883953003579d7bef3b1b531 19-Aug-2009 Mike Stump <mrs@apple.com> One second thought, I think I want to limit this class to just vtable
building activities.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79438 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
eb7e9c39f3b8ac815a78003992f2c2c662c0ab52 19-Aug-2009 Mike Stump <mrs@apple.com> One second thought, I think I want to limit this class to just vtable
building activities.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79438 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
a7ec675d7593fcfbbdcff5ef06755430149eab63 19-Aug-2009 Mike Stump <mrs@apple.com> Cleanup: fold IndirectPrimary into builder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79423 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
ee560f3b1fda7d5ec68b85b497c3e326ac5c3fdb 19-Aug-2009 Mike Stump <mrs@apple.com> Cleanup: fold IndirectPrimary into builder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79423 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
69d41a273a5c326160adaf35abdfa29ff9273382 19-Aug-2009 Mike Stump <mrs@apple.com> We don't want to confuse this layout with the BLayout from the builder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79422 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
cc2a01206bda7ec109f612546e4821393cb2855a 19-Aug-2009 Mike Stump <mrs@apple.com> We don't want to confuse this layout with the BLayout from the builder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79422 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
4c1c89142e63afb4ca9c9a5f8354ad1273aff053 19-Aug-2009 Mike Stump <mrs@apple.com> Restore vbase offsets for classes without a primary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79402 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
09765ece710f29dcdbd66eec361d60e53bd5a4fd 19-Aug-2009 Mike Stump <mrs@apple.com> Restore vbase offsets for classes without a primary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79402 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
b6ff81ef7e815a0cbf1dd742cc99be95bf1f7b7d 19-Aug-2009 Mike Stump <mrs@apple.com> Refine vcalls a little.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79400 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
b46c92dfedf02239e7c73b9a18dcf09071731793 19-Aug-2009 Mike Stump <mrs@apple.com> Refine vcalls a little.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79400 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
fd3d5fdac0d25464e1b9c36bc646965494d44f66 19-Aug-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce LocInfoType which is a Sema-specific implementation detail.

This is a Type subclass that can hold a DeclaratorInfo* when we have type source info coming
out of a declarator that we want to preserve. This is used only at the "border" of Parser/Sema for
passing/getting QualTypes, it does not participate in the type system semantics in any way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79394 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1bb8a45f7386a23871598d05141a07af03067925 19-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce LocInfoType which is a Sema-specific implementation detail.

This is a Type subclass that can hold a DeclaratorInfo* when we have type source info coming
out of a declarator that we want to preserve. This is used only at the "border" of Parser/Sema for
passing/getting QualTypes, it does not participate in the type system semantics in any way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79394 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b17120c5d87b1b078891071188b89ec4fe6857bf 19-Aug-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema interfaces.

DeclaratorDecl contains a DeclaratorInfo* to keep type source info.
Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl.
EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo.

Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79392 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GObjCMac.cpp
a1d5662d96465f0fddf8819d245da4d19b892eff 19-Aug-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema interfaces.

DeclaratorDecl contains a DeclaratorInfo* to keep type source info.
Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl.
EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo.

Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79392 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GObjCMac.cpp
d75d3233db3155b8dc098e074f72d0bd69bacc93 19-Aug-2009 Mike Stump <mrs@apple.com> Cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79374 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
552b275708a25aa1d939b2b77e5419a0b4b8e6d4 19-Aug-2009 Mike Stump <mrs@apple.com> Cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79374 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
e0a55a7afc6d86f39e7ddf51d5fe6ddbb2d1cf35 18-Aug-2009 Mike Stump <mrs@apple.com> Add some documentation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79373 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
b3d8837214e7346f11e70fecb323f552a259840b 18-Aug-2009 Mike Stump <mrs@apple.com> Add some documentation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79373 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
dca5e513368a23a02a344d64836dc5a208cae9ff 18-Aug-2009 Mike Stump <mrs@apple.com> Cleanups. Move GenerateRtti to CodeGenModule.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79372 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
odeGenModule.h
32f3701853a8237704065c77abc17369dd02c39b 18-Aug-2009 Mike Stump <mrs@apple.com> Cleanups. Move GenerateRtti to CodeGenModule.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79372 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
odeGenModule.h
5bb99723ed13ea4fe0d6b9bbb837b3c04daacd29 18-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Renamed ClassProp data member of ObjCImplctSetterGetterRefExpr
to InterfaceDecl, as it is unrelated to any property and
holds the InterfaceDecl needed for accessing class getter/setter
methods using the dot-syntax.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79371 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
d2ae5aa732e8587816fd7a7be911460e337c178e 18-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Renamed ClassProp data member of ObjCImplctSetterGetterRefExpr
to InterfaceDecl, as it is unrelated to any property and
holds the InterfaceDecl needed for accessing class getter/setter
methods using the dot-syntax.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79371 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
7bae12835d9d02fee7e33af9aef7446ff26fe644 18-Aug-2009 Mike Stump <mrs@apple.com> Move the rest of the vtable building code into the new builder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79370 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
109b13db3391face0b393c730f0326ca51d25b52 18-Aug-2009 Mike Stump <mrs@apple.com> Move the rest of the vtable building code into the new builder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79370 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
1e10cf3adf40e61912fdd663e5672f2228383215 18-Aug-2009 Mike Stump <mrs@apple.com> Suck up method generation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79367 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
65defe3ee7be121aef50b498e51f1d831b4a15f3 18-Aug-2009 Mike Stump <mrs@apple.com> Suck up method generation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79367 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
ad734d1a1c3d60c66b70cd1e0762cefa4858e16a 18-Aug-2009 Mike Stump <mrs@apple.com> Split out vtable bulding code into a builder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79366 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
7c435fa7f7666b22abbe8494c537ebc25209223d 18-Aug-2009 Mike Stump <mrs@apple.com> Split out vtable bulding code into a builder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79366 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
1c4da457d434b07b67f4d7dbb0b31351142de64d 18-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.
Removed an unnecessary loop to get to setters incoming
argument. Added DoxyGen comments. Still more work
to do in this area (WIP).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79365 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GValue.h
odeGenFunction.h
154440e6a8fa6ac5bca395876d79b530b39a2c1c 18-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.
Removed an unnecessary loop to get to setters incoming
argument. Added DoxyGen comments. Still more work
to do in this area (WIP).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79365 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GValue.h
odeGenFunction.h
2172c29466a14bb8560c8cd0f4a7ed0eb7f50d95 18-Aug-2009 David Chisnall <csdavec@swan.ac.uk> Fixed typo in last commit pointed out by Anton.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79290 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
91f21c0c8319306121308241795e9c7ba61b0514 18-Aug-2009 David Chisnall <csdavec@swan.ac.uk> Fixed typo in last commit pointed out by Anton.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79290 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
09987c5075124d687845a60366ac344e26d41704 18-Aug-2009 David Chisnall <csdavec@swan.ac.uk> Changes to TargetABIInfo to (hopefully) select the correct calling convention. This has been tested on FreeBSD, and now correctly generates GCC-compatible code for functions returning small structures. Please test it on other platforms!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79288 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
1e4249c10606f706aac181e6f5e8435ea99d9603 18-Aug-2009 David Chisnall <csdavec@swan.ac.uk> Changes to TargetABIInfo to (hopefully) select the correct calling convention. This has been tested on FreeBSD, and now correctly generates GCC-compatible code for functions returning small structures. Please test it on other platforms!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79288 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
4252dbcc15c25b53f650c946e899d134379b5b3c 17-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to 1) synthesizing non-trivial default destructor when
one is not provided by user. 2) More complete
emission of ctor prologue when it has no initializer
list or when it is synthesized.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79269 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
0880bacf8fdb7de9d9c5b53b81ea0e53afccafb5 17-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to 1) synthesizing non-trivial default destructor when
one is not provided by user. 2) More complete
emission of ctor prologue when it has no initializer
list or when it is synthesized.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79269 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
f49ffa91a5bc2110650951bd795f74df425bc298 17-Aug-2009 Anders Carlsson <andersca@mac.com> Remove an ErrorUnsupported call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79261 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDecl.cpp
622f9dc76bdc4f4d6920907f4fb64a3222aa6566 17-Aug-2009 Anders Carlsson <andersca@mac.com> Remove an ErrorUnsupported call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79261 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDecl.cpp
44663db1b5b82107ccb94fe1cc08de2b1adf3fac 17-Aug-2009 David Chisnall <csdavec@swan.ac.uk> Initial patch to support definitions of id and Class from headers in Objective-C code.

This currently breaks test/SemaObjC/id-isa-ref.m and issues some spurious warnings when you attempt to assign a struct objc_class* value to a Class variable. The test case probably should fail as it's written, because without the definition of Class the compiler should not assume struct objc_class* is a valid receiver type, but it's left broken because it would be nice if we could get that passing too for the special case of isa.

Approved by snaroff.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79248 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
0f436560640a1cff5b6d96f80f540770f139453f 17-Aug-2009 David Chisnall <csdavec@swan.ac.uk> Initial patch to support definitions of id and Class from headers in Objective-C code.

This currently breaks test/SemaObjC/id-isa-ref.m and issues some spurious warnings when you attempt to assign a struct objc_class* value to a Class variable. The test case probably should fail as it's written, because without the definition of Class the compiler should not assume struct objc_class* is a valid receiver type, but it's left broken because it would be nice if we could get that passing too for the special case of isa.

Approved by snaroff.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79248 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
133fdafd3ec0a03c7f04d6963d8edc4c994321ba 16-Aug-2009 Anders Carlsson <andersca@mac.com> Improve handling of delete expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79205 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprScalar.cpp
odeGenFunction.h
60e282cc1e508be327b0481cecedc206873cb86a 16-Aug-2009 Anders Carlsson <andersca@mac.com> Improve handling of delete expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79205 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprScalar.cpp
odeGenFunction.h
418c52e4524fd45a19f325f66fd6ecd3b9be04b6 16-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch toward synthesizing non-trivial destructors. WIP


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79199 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
b193a414f13d7cfa2524a8149eff8d4871f8cbf6 16-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch toward synthesizing non-trivial destructors. WIP


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79199 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
7756683786ab8105ca30aa57a396c1bd87aa5e0a 16-Aug-2009 Anders Carlsson <andersca@mac.com> Only do this for initializers of course.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79197 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
2da76936a7d17c3e2274412117ab44a95a093ccb 16-Aug-2009 Anders Carlsson <andersca@mac.com> Only do this for initializers of course.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79197 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
010bd7dc60facc8769d91521d9a6a6b932eb58bb 16-Aug-2009 Anders Carlsson <andersca@mac.com> Destroy bound temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79196 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
8478ce6d3f2416a694e39f791655a473c3907d62 16-Aug-2009 Anders Carlsson <andersca@mac.com> Destroy bound temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79196 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
c118de57a6842bbc445f0a20ddf7c33788308ebd 16-Aug-2009 Anders Carlsson <andersca@mac.com> Add an IsInitializer flag to EmitAnyExpr. This is used to prevent temporaries from being destroyed when they're bound to a reference variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79179 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
14c5cbf59cffee52275230922283a247de407712 16-Aug-2009 Anders Carlsson <andersca@mac.com> Add an IsInitializer flag to EmitAnyExpr. This is used to prevent temporaries from being destroyed when they're bound to a reference variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79179 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
b306487c0a99439b8be0ac70f6eb03f9b042984b 16-Aug-2009 Anders Carlsson <andersca@mac.com> No need to append extra padding now that we don't create packed structs for simple cases like the constant string.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79178 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5add6835b0c6b0f67e19fd5366825d3e41eb0dcf 16-Aug-2009 Anders Carlsson <andersca@mac.com> No need to append extra padding now that we don't create packed structs for simple cases like the constant string.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79178 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
c57b8274f551699e29ad32707b04a1dcb0925210 16-Aug-2009 Mike Stump <mrs@apple.com> Cleanups and fixups for calculating the virtual base offsets. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79156 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
276b9f1d814f4f6551cc3000590759a34185d6da 16-Aug-2009 Mike Stump <mrs@apple.com> Cleanups and fixups for calculating the virtual base offsets. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79156 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
63d6c23e3efa1c694ce4536ec3903ea6501c21d6 15-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Improved on ir-gen for synthesis of non-trivial default
constructor body whose class has non-static data-members which
required non-trivial construction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79125 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
1d9b5efffaec2349f33510dee2cf2e90c3d2d6aa 15-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Improved on ir-gen for synthesis of non-trivial default
constructor body whose class has non-static data-members which
required non-trivial construction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79125 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
4712db06c75945e8d50cbb2243a79e8bbde4e207 15-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR4721: adjust CodeGen and ASTContext so that we have a
consistent model for handling size expressions for VLAs.

The model is essentially as follows: VLA types own their associated
expression. In some cases, we need to create multiple VLA types to
represent a given VLA (for canonical types, or qualifiers on array types,
or type merging). If we need to create multiple types based off of
the same VLA declaration, we use the new refcounting functionality so they can
all own the expression. The VLASizeMap in CodeGenFunction then uses the size
expression to identify the group of VLA types based off of the same original
declaration.

I'm not particularly attached to the VLA types owning the expression,
but we're stuck with at least until someone comes up with a way
to walk the VLA expressions for a declaration.

I did the parallel fix in ASTContext for DependentSizedArrayType, but I
haven't really looked closely at it, so there might still be issues
there.

I'll clean up the code duplication in ASTContext in a followup commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79071 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
bbed6b964414145b29e7b60b3e538093734ea3f8 15-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR4721: adjust CodeGen and ASTContext so that we have a
consistent model for handling size expressions for VLAs.

The model is essentially as follows: VLA types own their associated
expression. In some cases, we need to create multiple VLA types to
represent a given VLA (for canonical types, or qualifiers on array types,
or type merging). If we need to create multiple types based off of
the same VLA declaration, we use the new refcounting functionality so they can
all own the expression. The VLASizeMap in CodeGenFunction then uses the size
expression to identify the group of VLA types based off of the same original
declaration.

I'm not particularly attached to the VLA types owning the expression,
but we're stuck with at least until someone comes up with a way
to walk the VLA expressions for a declaration.

I did the parallel fix in ASTContext for DependentSizedArrayType, but I
haven't really looked closely at it, so there might still be issues
there.

I'll clean up the code duplication in ASTContext in a followup commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79071 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
cb6dd8a2171c0e8e996078a91377b8e9b31c40a3 15-Aug-2009 John McCall <rjmccall@apple.com> Disable all recognition of main() in -ffreestanding. Addresses bug #4720.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79070 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
07a5c22bb6fb0674c95205ae189365bf8e1b695e 15-Aug-2009 John McCall <rjmccall@apple.com> Disable all recognition of main() in -ffreestanding. Addresses bug #4720.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79070 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
2b8eec12638c32a2862bc852bc2363ab4faad0a1 15-Aug-2009 Chris Lattner <sabre@nondot.org> minor cleanups for VLA stuff.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79059 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
ec18ddd33d5dc2cba5f64fa903bac7a83dc1e01e 15-Aug-2009 Chris Lattner <sabre@nondot.org> minor cleanups for VLA stuff.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79059 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
f22b83eed413a987ec6d6b5bb6ede137355b4e53 15-Aug-2009 Chris Lattner <sabre@nondot.org> use GetVLASize instead of accessing VLASizeMap directly, this gets an assert if
VLASize isn't populated for the type yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79057 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
881eb9ce336c1fe29cab92c06a1900fccd0951d1 15-Aug-2009 Chris Lattner <sabre@nondot.org> use GetVLASize instead of accessing VLASizeMap directly, this gets an assert if
VLASize isn't populated for the type yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79057 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
f69ea120bb2ce7441afe37edaee5b7ea59163a6d 14-Aug-2009 Devang Patel <dpatel@apple.com> Do now overflow while calulating upper bound for zero sized array.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79043 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5a6bfe35051c1c14b63e1fa103c2cc512dab66b8 14-Aug-2009 Devang Patel <dpatel@apple.com> Do now overflow while calulating upper bound for zero sized array.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79043 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0fc5f25b7c31c3fdbb157298351108183d0e9ca7 14-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for generation of trvial copy constructor
call.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79034 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
343a3cf57ee950b024bade8b6b0a2b51663f43cd 14-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for generation of trvial copy constructor
call.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79034 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
42368bbdc9866806962ce35f27ba7372410bd639 14-Aug-2009 Mike Stump <mrs@apple.com> Deconflate virtual base offsets from non-virtual base offsets.
Deconflate a virtual base primary from a non-virtual base.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78971 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
215389180617e4edb8aa95a5526509948ed1416f 14-Aug-2009 Mike Stump <mrs@apple.com> Deconflate virtual base offsets from non-virtual base offsets.
Deconflate a virtual base primary from a non-virtual base.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78971 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
c47460d98ff838189b86d29a663d7be0314b2633 14-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a bug in ir-gen for copy assignment synthesis.
Fixed a bug when evaluating those copy-assignments
which need by lazily syntheized. A test case
for these.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78965 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
183d7181fd59842ac969cbc6fe0376f85dc63ae4 14-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a bug in ir-gen for copy assignment synthesis.
Fixed a bug when evaluating those copy-assignments
which need by lazily syntheized. A test case
for these.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78965 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
c5d8be3b5bcfb74160fb74e51dca5f0477acd932 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
GObjCGNU.cpp
GObjCMac.cpp
odeGenTypes.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
GObjCGNU.cpp
GObjCMac.cpp
odeGenTypes.cpp
2eade572224815acd9b98796b5ac3fdcb2975ead 14-Aug-2009 Mike Stump <mrs@apple.com> Refine vtable layout for virtual bases and keep better track of
primaries. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78950 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
4ef980984fd0e131fca3f9e6ba15e8a79cabf88c 14-Aug-2009 Mike Stump <mrs@apple.com> Refine vtable layout for virtual bases and keep better track of
primaries. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78950 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
3f5cc0a94fa53b0b57ae57d111a2671392700135 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
GBlocks.cpp
GBlocks.h
GBuiltin.cpp
GCXX.cpp
GCXXTemp.cpp
GCall.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
GRecordLayoutBuilder.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenTypes.cpp
argetABIInfo.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
GBlocks.cpp
GBlocks.h
GBuiltin.cpp
GCXX.cpp
GCXXTemp.cpp
GCall.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
GRecordLayoutBuilder.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenTypes.cpp
argetABIInfo.cpp
9da58e486fcb6c5d226f5857d13fbb5cdb82fb51 13-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to force synthesis of copy assignment operator
function in the order according to c++03. ir-gen
for copy assignment in the trivial case and the first
test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78938 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
ad25883a644dd6b52c7923dd128a7d05fb26213c 13-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to force synthesis of copy assignment operator
function in the order according to c++03. ir-gen
for copy assignment in the trivial case and the first
test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78938 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
1a529acdfa55690a62b0eb9dde0e733dcd517fa5 13-Aug-2009 Mike Stump <mrs@apple.com> Minor cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78927 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
65010da986b2b13fa04c736855ac68183596420e 13-Aug-2009 Mike Stump <mrs@apple.com> Minor cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78927 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
a3b5a7a303c414f15652d0f6fea06470fcc5709f 13-Aug-2009 Mike Stump <mrs@apple.com> Prep for vbase layout refinements. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78882 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
d53cef178ddf90386d343dccfe28c531b93cfe8f 13-Aug-2009 Mike Stump <mrs@apple.com> Prep for vbase layout refinements. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78882 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
84bd6536bd9dcaaf65e8ab579180906306b9fcd2 13-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Minor refactoring of copy assign operator ir-gen. SWIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78875 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
e82c3e269f0edd6d531b93114e97573792e808e0 13-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Minor refactoring of copy assign operator ir-gen. SWIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78875 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
04500242a5c45dd1165547dcaafd88956e197edd 13-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> More toward synthesizing copy assignments. SWIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78861 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
0270b8aa3f9b50ec3acd1abfd2b97377a3e1bb05 13-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> More toward synthesizing copy assignments. SWIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78861 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
23b238e81eb9893862966fe5a5028475e804d1e7 13-Aug-2009 Mike Stump <mrs@apple.com> Cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78858 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
80a0e32d60e4ff7d78f411e73f3e8dea769ed313 13-Aug-2009 Mike Stump <mrs@apple.com> Cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78858 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
f640de5e79c399a091e2e792ca672b3e4228d86f 13-Aug-2009 Mike Stump <mrs@apple.com> Refactor. WIP. Eventually, this will all go into a vtable builder class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78857 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
4c3aedd3f1fff57d1906b0cdfa7a9ec81a361b2d 13-Aug-2009 Mike Stump <mrs@apple.com> Refactor. WIP. Eventually, this will all go into a vtable builder class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78857 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
276a370ddbb16b70bca0f99e21d8fd7963756eaf 13-Aug-2009 Mike Stump <mrs@apple.com> Cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78855 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
09d8b814321cf62915a2f43a20fd4822e1c2a879 13-Aug-2009 Mike Stump <mrs@apple.com> Cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78855 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
decd781ab0a9e7a7c5aa9343b00d5e75bd162812 13-Aug-2009 Mike Stump <mrs@apple.com> Refactor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78854 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
bc16aeab78748cca01a9d84fff71dd1109633ecd 13-Aug-2009 Mike Stump <mrs@apple.com> Refactor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78854 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
dd8764a79fe31608b719a13e91c885e703330553 13-Aug-2009 Mike Stump <mrs@apple.com> Refactor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78851 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
a9e1d1cd1f7fded49016609d8cbc4d5579d7e60a 13-Aug-2009 Mike Stump <mrs@apple.com> Refactor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78851 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
651efb73490efb9715fb4ca21cac71b9ae86d2a2 12-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for synthesizing copy assignment operator.
WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78841 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
2198ba12b73a8e6801d13f25de38031da6df46b6 12-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for synthesizing copy assignment operator.
WIP.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78841 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
6abe508dcbfcf6b9200b98f9425d760277dc488c 12-Aug-2009 Mike Stump <mrs@apple.com> Improve the secondary vtables to not include vbase offsets. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78831 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
34fae9cf27b19664f1f4526e195aff2299de2c40 12-Aug-2009 Mike Stump <mrs@apple.com> Improve the secondary vtables to not include vbase offsets. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78831 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
a8b5829dba12b5a2c972022cd1159b49461ba228 12-Aug-2009 Mike Stump <mrs@apple.com> Refine vtable building for the secondary vtables to exclude yet more
cases where a virtual base was already used as a primary base class.
WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78820 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
4ffe91eae351d6ef68256ce77fc549557702d3e3 12-Aug-2009 Mike Stump <mrs@apple.com> Refine vtable building for the secondary vtables to exclude yet more
cases where a virtual base was already used as a primary base class.
WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78820 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
c87cf1da85be61ae3e6998f5d86b92808d47d76f 12-Aug-2009 Dan Gohman <gohman@apple.com> Use the new nsw form of add for signed integer addition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78765 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
bf933a0cb628670490c15367b3f5ccb3193354a7 12-Aug-2009 Dan Gohman <gohman@apple.com> Use the new nsw form of add for signed integer addition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78765 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
5a74824e720f19606b6ff49f7af1b1ab746c154f 12-Aug-2009 Dan Gohman <gohman@apple.com> Use the inbounds variant of getelementptr for common pointer arithmetic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78756 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
664f8934e06cf10de98083b4526aef7bce191a3f 12-Aug-2009 Dan Gohman <gohman@apple.com> Use the inbounds variant of getelementptr for common pointer arithmetic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78756 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
8f61ba4ef45bb6ff3137b9df9ddffc03b889abc9 12-Aug-2009 Dan Gohman <gohman@apple.com> Remove the hack that turns sdiv by a power of 2 to ashr, and
use the new "exact" sdiv to allow LLVM optimization to perform
this transformation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78739 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
df1109434abd465a4db2e6f69ec2688866660367 12-Aug-2009 Dan Gohman <gohman@apple.com> Remove the hack that turns sdiv by a power of 2 to ashr, and
use the new "exact" sdiv to allow LLVM optimization to perform
this transformation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78739 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
fef75cbb293a4684ae4799d0f4211c4b78fcaf3b 11-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen support for anonymous union data member
copying in copy constructors and used in
default constructor's initializer list.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78700 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
e64941280877d065a27e8cefd2a9038256d0e3ac 11-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen support for anonymous union data member
copying in copy constructors and used in
default constructor's initializer list.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78700 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
a2ca746d9b6f6e763c0ce2c39ad2d4dc44236d9a 11-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> LLVMContext is a class now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78691 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GBlocks.h
odeGenFunction.h
odeGenModule.h
odeGenTypes.h
f21efe9088a0b3eda1209d1706529f6cb2073092 11-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> LLVMContext is a class now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78691 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GBlocks.h
odeGenFunction.h
odeGenModule.h
odeGenTypes.h
7df1ff1411c12140732198a696a3a47d232c7252 11-Aug-2009 Mike Stump <mrs@apple.com> Implement more of the inductive case for vtable layout involving
virtual base primaries and improve the layout of classes with virtual
bases. WIP.

Hey, I've decided I want a change to FileCheck, I need to ensure that
the group is together, nothing in between. Can we change it to check
the match line is from the line immediately following the last matched
line, if the source for the matched line is immediately after the
source for the previously matched line?

// CHECK: 1
// CHECK: 2
// CHECK: 3

// CHECK: 4
// CHECK: 5
// CHECK: 6

would require 1 2 and 3 to be continuous in the output, and 4 5 and 6
to be continuous.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78638 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
49520944c688a9d5fc78d0c2af544b825873477b 11-Aug-2009 Mike Stump <mrs@apple.com> Implement more of the inductive case for vtable layout involving
virtual base primaries and improve the layout of classes with virtual
bases. WIP.

Hey, I've decided I want a change to FileCheck, I need to ensure that
the group is together, nothing in between. Can we change it to check
the match line is from the line immediately following the last matched
line, if the source for the matched line is immediately after the
source for the previously matched line?

// CHECK: 1
// CHECK: 2
// CHECK: 3

// CHECK: 4
// CHECK: 5
// CHECK: 6

would require 1 2 and 3 to be continuous in the output, and 4 5 and 6
to be continuous.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78638 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
32cea8bfffba6eab679bdd9ef4c1c70630d36b5b 11-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Support for anonymous union in ctor's initializer and
bunch of FIXMEs for their is-gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78623 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
8c64e007d9b2f719613f7d79b0b32d2f50da9332 11-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Support for anonymous union in ctor's initializer and
bunch of FIXMEs for their is-gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78623 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
e85f43d31101a875a6621e43bde21dcc13d860ff 11-Aug-2009 Nate Begeman <natebegeman@mac.com> Take 2 on AltiVec-style vector initializers.

Fixes PR4704 problems

Addresses Eli's patch feedback re: ugly cast code

Updates all postfix operators to remove ParenListExprs. While this is awful,
no better solution (say, in the parser) is obvious to me. Better solutions
welcome.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78621 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
2ef13e5abef0570a9f567b4671367275c05d4d34 11-Aug-2009 Nate Begeman <natebegeman@mac.com> Take 2 on AltiVec-style vector initializers.

Fixes PR4704 problems

Addresses Eli's patch feedback re: ugly cast code

Updates all postfix operators to remove ParenListExprs. While this is awful,
no better solution (say, in the parser) is obvious to me. Better solutions
welcome.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78621 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
e39fab641e3eb2d835460fe58791505cfa4658cf 10-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> minor refactoring. No change otherwise.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78582 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
06f598aa45b651f9f3be0b916d43876eae747af0 10-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> minor refactoring. No change otherwise.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78582 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
08d99e948974833edca307f5c15ca319b6d86425 10-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for generating copying of scalar data members in
a synthesized copy constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78580 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
f05fe65e64a5de93ba6d30e1b830fd0fc36358e9 10-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for generating copying of scalar data members in
a synthesized copy constructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78580 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
0dfaec41dab49b28aa78fcdc0aa1bfd2dcbb7e41 10-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a ir-gen bug in synthesizing copy constructors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78570 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
370c884d172329384973e452647fba0b2f5146d5 10-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a ir-gen bug in synthesizing copy constructors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78570 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
48cf40f8f2e06e54a63ff13f06a567f5cf489404 10-Aug-2009 Daniel Dunbar <daniel@zuster.org> Revert r78535, it is causing a number of failures to build projects.

--- Reverse-merging r78535 into '.':
D test/Sema/altivec-init.c
U include/clang/Basic/DiagnosticSemaKinds.td
U include/clang/AST/Expr.h
U include/clang/AST/StmtNodes.def
U include/clang/Parse/Parser.h
U include/clang/Parse/Action.h
U tools/clang-cc/clang-cc.cpp
U lib/Frontend/PrintParserCallbacks.cpp
U lib/CodeGen/CGExprScalar.cpp
U lib/Sema/SemaInit.cpp
U lib/Sema/Sema.h
U lib/Sema/SemaExpr.cpp
U lib/Sema/SemaTemplateInstantiateExpr.cpp
U lib/AST/StmtProfile.cpp
U lib/AST/Expr.cpp
U lib/AST/StmtPrinter.cpp
U lib/Parse/ParseExpr.cpp
U lib/Parse/ParseExprCXX.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78551 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1df5109f475bcbc528eb1fb9fdb179dcadbb33a6 10-Aug-2009 Daniel Dunbar <daniel@zuster.org> Revert r78535, it is causing a number of failures to build projects.

--- Reverse-merging r78535 into '.':
D test/Sema/altivec-init.c
U include/clang/Basic/DiagnosticSemaKinds.td
U include/clang/AST/Expr.h
U include/clang/AST/StmtNodes.def
U include/clang/Parse/Parser.h
U include/clang/Parse/Action.h
U tools/clang-cc/clang-cc.cpp
U lib/Frontend/PrintParserCallbacks.cpp
U lib/CodeGen/CGExprScalar.cpp
U lib/Sema/SemaInit.cpp
U lib/Sema/Sema.h
U lib/Sema/SemaExpr.cpp
U lib/Sema/SemaTemplateInstantiateExpr.cpp
U lib/AST/StmtProfile.cpp
U lib/AST/Expr.cpp
U lib/AST/StmtPrinter.cpp
U lib/Parse/ParseExpr.cpp
U lib/Parse/ParseExprCXX.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78551 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
31af091f101c08ecb39a00c2b4741bec5cc00150 09-Aug-2009 Ryan Flynn <pizza@parseerror.com> map previously ignored __attribute((malloc)) to noalias attribute of llvm function's return

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78541 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
76168e289ca4b307259e3bc9b3353f03b05bb6b9 09-Aug-2009 Ryan Flynn <pizza@parseerror.com> map previously ignored __attribute((malloc)) to noalias attribute of llvm function's return

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78541 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
e3ee66c7a133e4f2df8411893b530aabe3344f8c 09-Aug-2009 Anders Carlsson <andersca@mac.com> Improve handling of member pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78536 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GExprScalar.cpp
odeGenFunction.cpp
237957c45774713f81fbd5394b3db4317fef0938 09-Aug-2009 Anders Carlsson <andersca@mac.com> Improve handling of member pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78536 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GExprScalar.cpp
odeGenFunction.cpp
bc8e297c7d620cd63eeb31c641dc7f51a1076785 09-Aug-2009 Nate Begeman <natebegeman@mac.com> AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);

In addition to being defined by the AltiVec PIM, this is also the vector
initializer syntax used by OpenCL, so that vector literals are compatible
with macro arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78535 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
25b4fdb9d63095448e6cbc97b8865b36b0c8cbb6 09-Aug-2009 Nate Begeman <natebegeman@mac.com> AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);

In addition to being defined by the AltiVec PIM, this is also the vector
initializer syntax used by OpenCL, so that vector literals are compatible
with macro arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78535 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
3c1fe26b561c55cfa6d32effcc307d9ed1b4863f 09-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> Older GCCs don't have vector::data().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78519 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
10c40eee98c600d24437474463b056f323d0cfd2 09-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> Older GCCs don't have vector::data().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78519 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
cefe59215a01f80a057f101e1043dbae48777225 09-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for initialization, in synthesize copy constructor,
of base/field which have trivial copy constructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78516 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
942f4f33d02dba823594bd2d7b3d317cb01c74f8 09-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for initialization, in synthesize copy constructor,
of base/field which have trivial copy constructor.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78516 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
cde4a861d0786f3969675399c962ba531c7ba21e 09-Aug-2009 Anders Carlsson <andersca@mac.com> Add support for global initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78515 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCall.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
89ed31d3f9eeb8ec77c284a5cf404a74bf5e7acf 09-Aug-2009 Anders Carlsson <andersca@mac.com> Add support for global initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78515 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCall.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
f2a022ac2d73958151ae3b700f0665ff5252e575 08-Aug-2009 Anders Carlsson <andersca@mac.com> Refactor some code and implement support for global destructors for static variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78507 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDecl.cpp
odeGenFunction.h
3b2e16b3d25f6b311dba2871e2a566c96238c3d2 08-Aug-2009 Anders Carlsson <andersca@mac.com> Refactor some code and implement support for global destructors for static variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78507 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDecl.cpp
odeGenFunction.h
6008eacb196e700b83b242499c04f893ec07266b 08-Aug-2009 Anders Carlsson <andersca@mac.com> Take #pragma pack into account when laying out structs. Fixes rdar://problem/7095436.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78490 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
a5dd722bdf2f74a1a249fe6661d96a7236aee0f0 08-Aug-2009 Anders Carlsson <andersca@mac.com> Take #pragma pack into account when laying out structs. Fixes rdar://problem/7095436.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78490 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
ab840aa62afd244cc6729bb17118f2a08a745528 08-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Refactoring of copy ctor ir-gen. No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78489 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
8c241a2844428eb1589c7b77fc6c1888295a2045 08-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Refactoring of copy ctor ir-gen. No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78489 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
c915fa76c5429bbc235d8993dc218ad20bc26e3b 08-Aug-2009 Anders Carlsson <andersca@mac.com> Introduce a new PragmaPack attribute, and use it for #pragma pack. The PackedAttr now only represents __attribute__((packed)).

This is necessary because #pragma pack and __attribute__((packed)) have different semantics. No functionality change yet, but this lays the groundwork for fixing a record layout bug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78483 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
a860e755f1f9f071b6a6a2f96128a6a258f5c331 08-Aug-2009 Anders Carlsson <andersca@mac.com> Introduce a new PragmaPack attribute, and use it for #pragma pack. The PackedAttr now only represents __attribute__((packed)).

This is necessary because #pragma pack and __attribute__((packed)) have different semantics. No functionality change yet, but this lays the groundwork for fixing a record layout bug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78483 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
c3bed7323db2176ce86f75116ae079c66f87f661 08-Aug-2009 Anders Carlsson <andersca@mac.com> Assert that the LLVM type has the same size as the RecordDecl size.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78481 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
df31e091126da6a5c08303a78b562d00e7fd4e20 08-Aug-2009 Anders Carlsson <andersca@mac.com> Assert that the LLVM type has the same size as the RecordDecl size.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78481 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
fbe08772af9f0789452a95791812b6300d78af79 08-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Remove use of uninitized variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78448 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
80e4b9e0e87064a824d72b6ff89074206ecced58 08-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Remove use of uninitized variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78448 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
5e778e3e116dfb77929ebf988a92f2dcf7769a2f 08-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Synthesize copying of non-static data members with
non-trivial copy constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78445 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
1e4edd5474f8cb966356afa6175d658002ff819c 08-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Synthesize copying of non-static data members with
non-trivial copy constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78445 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
fc27d29b333fe15d336af3e6b2309c30a3b97616 08-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Synthesized copy constructor now generates code for
copying non-virtual base classes which have non-trivial
constructor. Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78436 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
ca28361fb0a72c50e0a400fae2fad9520e61c0a5 08-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Synthesized copy constructor now generates code for
copying non-virtual base classes which have non-trivial
constructor. Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78436 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
5c09af0f78493759fee5948784d270d9126a2d51 08-Aug-2009 Anders Carlsson <andersca@mac.com> Add a CK_ArrayToPointerDecay cast kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78434 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
112a0a8ddf23f6d25e0920002d5d4c1df0515f86 08-Aug-2009 Anders Carlsson <andersca@mac.com> Add a CK_ArrayToPointerDecay cast kind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78434 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
b4671fa23fe684b71594cf2010d0286d0bd2718d 08-Aug-2009 Anders Carlsson <andersca@mac.com> Add CK_ToUnion and use it for aggregate expression codegen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78429 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
4d8673b645ad86e496b886a0f80b60763f67071d 08-Aug-2009 Anders Carlsson <andersca@mac.com> Add CK_ToUnion and use it for aggregate expression codegen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78429 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
23658f337f09133f056c6b6466666a708b62a0b1 07-Aug-2009 Mike Stump <mrs@apple.com> Add vbase offsets to the vtable. Wow, having an rbegin was so
fortuitous. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78413 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
57cf2f3abad1c3541cd388d9b7882d65cf6daa7c 07-Aug-2009 Mike Stump <mrs@apple.com> Add vbase offsets to the vtable. Wow, having an rbegin was so
fortuitous. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78413 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
5e050b837726adfdaf94628461dfd5728659200d 07-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> More synthesis of copy constructors. Work in progress.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78402 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
97a937532c24a8ea44317d4fdee26d9701a1e83c 07-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> More synthesis of copy constructors. Work in progress.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78402 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
030dbfbbfa64b4f6c56faa44c02617a900702b24 07-Aug-2009 Mike Stump <mrs@apple.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78401 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
e6e1d609f6a14882be5336005f5d0222ef18b814 07-Aug-2009 Mike Stump <mrs@apple.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78401 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
bea9cc83e485cc548edde19a25add74ded7cdbb1 07-Aug-2009 Mike Stump <mrs@apple.com> Add ability to generate vcall offsets for primary virtual base.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78396 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
928f1506eb38bb26a1284b876213a8f5244f6933 07-Aug-2009 Mike Stump <mrs@apple.com> Add ability to generate vcall offsets for primary virtual base.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78396 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
e7545629eb1bf23badcf749ee1ac1d944ce82e2b 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
GCXX.cpp
odeGenTypes.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
GCXX.cpp
odeGenTypes.cpp
96599e238d3389ec0aec96af659e6f29473d943b 07-Aug-2009 Mike Stump <mrs@apple.com> Add support for vcall generation for vtables for virtual bases. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78357 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
02cf1e264719b4dada4377cc8a43888cb66f8815 07-Aug-2009 Mike Stump <mrs@apple.com> Add support for vcall generation for vtables for virtual bases. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78357 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
fb658a25198136a3843b8036b5f773b8f39bae57 07-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch toward synthesizing copy constructors.
Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78355 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenModule.cpp
9889652dbc10060cd604861ed2e5bc6719f845b0 07-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch toward synthesizing copy constructors.
Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78355 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenModule.cpp
71e21300576b828d0f1e58609d006fed134c77a5 06-Aug-2009 Mike Stump <mrs@apple.com> Also generate the rtti field for virtual bases for vtables. Turn on
rtti so we can properly test it. Refactor code a little. Still a
work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78343 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
e1be2b16a3a24acda0b63c3dcb4ae3384fcdaf75 06-Aug-2009 Mike Stump <mrs@apple.com> Also generate the rtti field for virtual bases for vtables. Turn on
rtti so we can properly test it. Refactor code a little. Still a
work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78343 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
325cdd8be9b037f6a86d0e33a7c4c077094b1500 06-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Set and use Elidable in elimination of copy ctors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78331 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
1cf9ff87ee235ad252332a96699abdb32bd6facb 06-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Set and use Elidable in elimination of copy ctors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78331 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
25cbad0c4e3984a2d54e7b0a5d7beb10cc1dd91c 06-Aug-2009 Mike Stump <mrs@apple.com> Layout the primary base first in the vtable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78327 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
70101ce87ff1d73ac90e4d99a3af0ae509e5934f 06-Aug-2009 Mike Stump <mrs@apple.com> Layout the primary base first in the vtable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78327 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
d6f22d8e9687e1b4592df63ce7a390fa02b16778 06-Aug-2009 Mike Stump <mrs@apple.com> More layout for virtual tables for virtual bases. Still in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78314 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
8a12b564923a72224730a467007e61b5701e4aa7 06-Aug-2009 Mike Stump <mrs@apple.com> More layout for virtual tables for virtual bases. Still in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78314 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
05207215eaf409b415caa9c87d2d1db686c4c779 06-Aug-2009 Mike Stump <mrs@apple.com> Layout virtual bases. Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78308 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
eb19fa948173502f47c26357c2ec41aa4be197b4 06-Aug-2009 Mike Stump <mrs@apple.com> Layout virtual bases. Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78308 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
c3bcdf1b02fc56bc7e9360c592ec4842083c2192 06-Aug-2009 Daniel Dunbar <daniel@zuster.org> Fix clang breakage, CGF can be null in this context.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78269 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
a10f7eabea651c5ba71569e69143dd77008f2a56 06-Aug-2009 Daniel Dunbar <daniel@zuster.org> Fix clang breakage, CGF can be null in this context.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78269 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
884036a7d180f66ef3b64e820b18ab6e6afeef13 06-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to optimize away copy constructor call when
appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78267 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
6904cbb1f21002317387e8fc7b14b7f8c09d198f 06-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to optimize away copy constructor call when
appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78267 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
bdc004c037cabf798e8fc4192b795de5615a2861 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
BIInfo.h
GBlocks.cpp
GBlocks.h
GDecl.cpp
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
GRecordLayoutBuilder.cpp
GStmt.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
argetABIInfo.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
BIInfo.h
GBlocks.cpp
GBlocks.h
GDecl.cpp
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
GRecordLayoutBuilder.cpp
GStmt.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
argetABIInfo.cpp
eec46a7990880a9a3a5108e28b66ef443826d7f0 06-Aug-2009 Mike Stump <mrs@apple.com> Refactor some bits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78254 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
b502d839994cc3828573bd9ea472418e3536f415 06-Aug-2009 Mike Stump <mrs@apple.com> Refactor some bits.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78254 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
8b82eeb5416860903addcb2244445b909573421f 06-Aug-2009 Mike Stump <mrs@apple.com> Calculate the primary base class better and use that when laying down
the vtable. Still a work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78252 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
6f376336138ea719e3c4757ae046a5768043b276 06-Aug-2009 Mike Stump <mrs@apple.com> Calculate the primary base class better and use that when laying down
the vtable. Still a work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78252 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
3193f929949468a8e102d459cf677122fd5fd5ec 05-Aug-2009 Chris Lattner <sabre@nondot.org> cgobjcgnu was making invalid common globals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78161 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
f35271b8677a5f31498b89587b1da42a06dd46fd 05-Aug-2009 Chris Lattner <sabre@nondot.org> cgobjcgnu was making invalid common globals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78161 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
41aba2309150f2a39cda8deba91c79cc6985a71b 05-Aug-2009 Chris Lattner <sabre@nondot.org> weak globals that are const should get weak_odr linkage.

add a fixme about C++ const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78159 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
e78b86f3201ae5f09e2cf85bd6558f1d9b34de26 05-Aug-2009 Chris Lattner <sabre@nondot.org> weak globals that are const should get weak_odr linkage.

add a fixme about C++ const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78159 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
962b790e1ba18bd99d084ae5470c4d6e88a80063 05-Aug-2009 Chris Lattner <sabre@nondot.org> rdar://7119244 - globals with an explicit section specified don't get
common linkage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78158 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
309457d0f1b416c1b379c9f3e172848adffedb23 05-Aug-2009 Chris Lattner <sabre@nondot.org> rdar://7119244 - globals with an explicit section specified don't get
common linkage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78158 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f337178657bc15aef401f590148be8eb586711f2 04-Aug-2009 Mike Stump <mrs@apple.com> vtable building for simple inheritance. Still in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78110 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
104ffaaa05d31d0a3dc886b7b18ebb2496bc2af4 04-Aug-2009 Mike Stump <mrs@apple.com> vtable building for simple inheritance. Still in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78110 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
69a12326c8fa5d37ca16d11455a982f0a1939cc5 04-Aug-2009 Mike Stump <mrs@apple.com> Will I ever get used to CamelCase? Will I ever like capitols for
random variables?
--This line, and those below, will be ignored--

M lib/CodeGen/CGCXX.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78094 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
cb1b5d32fd227cd791fbd0614f75b32f291a5cca 04-Aug-2009 Mike Stump <mrs@apple.com> Will I ever get used to CamelCase? Will I ever like capitols for
random variables?
--This line, and those below, will be ignored--

M lib/CodeGen/CGCXX.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78094 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
11efd621da6e6520ff7a308562ab64b0b3a0e2b3 04-Aug-2009 Anders Carlsson <andersca@mac.com> Revert the fix for PR3800, it broke things.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78084 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
fca9361839ecc53224c764517e62fc0e15166004 04-Aug-2009 Anders Carlsson <andersca@mac.com> Revert the fix for PR3800, it broke things.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78084 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
d47ed179c2eda141434cb3fe506c8021963e3777 04-Aug-2009 Anders Carlsson <andersca@mac.com> Simplify alignment handling in the record builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78069 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
de9f2c937a4892d155cfe695657ce4cc3556836f 04-Aug-2009 Anders Carlsson <andersca@mac.com> Simplify alignment handling in the record builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78069 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
5723ba3b2ea9892c32edbc2c8b16c998e785a00a 03-Aug-2009 Daniel Dunbar <daniel@zuster.org> Make sure UTF-16 strings end with a 16-bit null (as opposed to 8-bit).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78001 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
434da48d0e35764f18b3fc96c75504746050b046 03-Aug-2009 Daniel Dunbar <daniel@zuster.org> Make sure UTF-16 strings end with a 16-bit null (as opposed to 8-bit).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78001 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
0f254866df5c97a2bddbca48ccdc9ec193518683 03-Aug-2009 Daniel Dunbar <daniel@zuster.org> When generating cleanup blocks for Obj-C @finally, mark them as catch all blocks
from the perspective of LLVM exception handling. Otherwise the C++ personality
function may decide not to run them, if it only detects cleanup handlers.
- Test case for this is exceptions.m in llvm-test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77999 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
e3d25abca3f0e0c92417734d6f548c5085ee1241 03-Aug-2009 Daniel Dunbar <daniel@zuster.org> When generating cleanup blocks for Obj-C @finally, mark them as catch all blocks
from the perspective of LLVM exception handling. Otherwise the C++ personality
function may decide not to run them, if it only detects cleanup handlers.
- Test case for this is exceptions.m in llvm-test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77999 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
35df3d2f62c87acf218df38a8315305af4370988 03-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> assert(nyi) on attempt to destruct an array of objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77993 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
667f36accdacde57f101f8b6b61abb912f7a8e73 03-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> assert(nyi) on attempt to destruct an array of objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77993 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
3d1be0593f0eb7410792e815c36481f527155272 03-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for destructor calls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77991 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
6ca0b32227c21ba4bc66e8f1bdbf767b563567a8 03-Aug-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for destructor calls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77991 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
8b392b3d3c31e4fb275a4797bbe1b8cd333beaf4 03-Aug-2009 Daniel Dunbar <daniel@zuster.org> Formatting fixes (trailing whitespace, 80-cols, indentation).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77972 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6bff2513b041eb84d4902b106d1b9023e5bb7c8e 03-Aug-2009 Daniel Dunbar <daniel@zuster.org> Formatting fixes (trailing whitespace, 80-cols, indentation).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77972 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
91dda7c5476b4ec6083a0ef2b8d250c4cd7e05a5 02-Aug-2009 Anders Carlsson <andersca@mac.com> Whoops, meant to delete this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77916 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
c43f2f4340cd8b6bbf0cbc955d613c5a96388b85 02-Aug-2009 Anders Carlsson <andersca@mac.com> Whoops, meant to delete this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77916 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
25b53ea10fa6ef1a32a5999b3f732562fb7887d0 02-Aug-2009 Anders Carlsson <andersca@mac.com> use CodeGenModule::EmitNullConstant in a couple of places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77915 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprConstant.cpp
odeGenModule.cpp
b0d0ea042116c1f451d3db8ceff9f1dd92bc36d2 02-Aug-2009 Anders Carlsson <andersca@mac.com> use CodeGenModule::EmitNullConstant in a couple of places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77915 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprConstant.cpp
odeGenModule.cpp
b552b75c7213336c42b284257997b15ddd5ac5ec 02-Aug-2009 Anders Carlsson <andersca@mac.com> Remove old code that was causing the new test to fail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77862 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
26fb937145f32221bb8b4e1119b122396c2ac1ce 02-Aug-2009 Anders Carlsson <andersca@mac.com> Remove old code that was causing the new test to fail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77862 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
5df7cf4df8d0e1e9ea1000c24bc1c2f6585cee23 02-Aug-2009 Anders Carlsson <andersca@mac.com> Don't evaluate inout constraints twice. Fixes PR3800.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77854 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
5a23264452fbf8ad3c65e0869fa902f7a0e918a1 02-Aug-2009 Anders Carlsson <andersca@mac.com> Don't evaluate inout constraints twice. Fixes PR3800.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77854 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
4f935f71b42853bb613e0fd5686b103e1c07d2c7 02-Aug-2009 Daniel Dunbar <daniel@zuster.org> Use Twine instead of utostr


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77848 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
0ab9a25101efeb56620a99118bee116ae052a7ca 02-Aug-2009 Daniel Dunbar <daniel@zuster.org> Use Twine instead of utostr


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77848 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
2669278b4747bd64a5e7dc7f3ad08b8c5915742a 02-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Fix a minor issue with unions in the new struct building code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77829 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
c0879bbbe06f1983f1291669dcc1d451767c601c 02-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Fix a minor issue with unions in the new struct building code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77829 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
0ae8e1b91e19d86f51528fa0bef6cee48af38b5e 01-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Don't error on C++ linkage; if we don't support that, there are
serious issues :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77800 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f976be8a63f9e0d3bd50e33dadef02c3c9921747 01-Aug-2009 Eli Friedman <eli.friedman@gmail.com> Don't error on C++ linkage; if we don't support that, there are
serious issues :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77800 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
00df7d348c16573732c70302816164952173d239 01-Aug-2009 Mike Stump <mrs@apple.com> Add beginnigs of rtti generation, wire up more of -fno-exceptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77751 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
angle.cpp
angle.h
738f8c278da5950d0d4607de2debe0bdfad64185 01-Aug-2009 Mike Stump <mrs@apple.com> Add beginnigs of rtti generation, wire up more of -fno-exceptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77751 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
angle.cpp
angle.h
6989604f7111eec60ce2c767770d54025a3a553d 31-Jul-2009 Anders Carlsson <andersca@mac.com> Remove the old struct builder code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77738 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
12905987c4ab9fb705f88f56b35298f730c8dbd5 31-Jul-2009 Anders Carlsson <andersca@mac.com> Remove the old struct builder code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77738 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
d067278002fa1cf2e4999da5df9e9e0d23d08ae6 31-Jul-2009 Mike Stump <mrs@apple.com> And now we can generate a simple vtable. Still a work in progress...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77737 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
82b56961dcb813674dbda3c5f5aaee703d55741c 31-Jul-2009 Mike Stump <mrs@apple.com> And now we can generate a simple vtable. Still a work in progress...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77737 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
9c919ef24216b2fb2a2a1796919f7ff29a5a2408 31-Jul-2009 Anders Carlsson <andersca@mac.com> Move code from EmitUnion directly into the function that handles cast-to-union.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77735 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
aaed50dfb52d358a407dbbdd1ca323f9328e957a 31-Jul-2009 Anders Carlsson <andersca@mac.com> Move code from EmitUnion directly into the function that handles cast-to-union.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77735 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
aacac6054aabd702edc2d2bfb80e27b26a6b2fae 31-Jul-2009 Anders Carlsson <andersca@mac.com> Use the struct builder for unions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77732 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
f6c43965c41e042f0541bdd47b1511d585b2dcfd 31-Jul-2009 Anders Carlsson <andersca@mac.com> Use the struct builder for unions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77732 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
a02537ec6c6ba3d294ff0de18b8f4320d8c804d7 31-Jul-2009 Mike Stump <mrs@apple.com> Fixup spacing and 80-col violations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77731 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
bb1c8600218b3244340331165fc7cba7bf227655 31-Jul-2009 Mike Stump <mrs@apple.com> Fixup spacing and 80-col violations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77731 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
f37b84beca34a0d964a3cf9d17f13efe341e2e37 31-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77722 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBuiltin.cpp
GCXX.cpp
GCall.cpp
GDecl.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
c9c88b4159791c48e486ca94e3743b5979e2b7a6 31-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77722 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBuiltin.cpp
GCXX.cpp
GCall.cpp
GDecl.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
7e8c9931ee0159731141425ab43afcd61ef3cc5f 31-Jul-2009 Mike Stump <mrs@apple.com> Add code to setup the vtable pointer in the constructor. Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77699 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
odeGenModule.h
angle.cpp
angle.h
f121677b6bbbf4e4a51ee7a1120b77adf187bad4 31-Jul-2009 Mike Stump <mrs@apple.com> Add code to setup the vtable pointer in the constructor. Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77699 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
odeGenModule.h
angle.cpp
angle.h
77f6cadd22110f1d4cc86ff67676ebc4cc69703f 31-Jul-2009 Mike Stump <mrs@apple.com> Fix spacing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77688 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
286d36832c597772d8796f74a08c1e56185b3de5 31-Jul-2009 Mike Stump <mrs@apple.com> Fix spacing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77688 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
d3fd60e645c17f18af2026b4029fb85c190f853e 31-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77686 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
GExprScalar.cpp
GObjCMac.cpp
3b144ba615c32f3cfa5309060ed5e09c89ac2871 31-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77686 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
GExprScalar.cpp
GObjCMac.cpp
35d13647b866f6d841afb19259baf672f238d510 31-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Synthesize the default constructor which has not
been declared as needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77641 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenModule.cpp
c7ff8e19081c2e974f05f66c4fa9b40750fc655f 31-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Synthesize the default constructor which has not
been declared as needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77641 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenModule.cpp
e0b5effb6f395c269391f8b8eeddc087f4c82b6a 31-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77638 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCXX.cpp
GExpr.cpp
GExprScalar.cpp
GObjCGNU.cpp
odeGenFunction.cpp
odeGenModule.cpp
03e205031b08669f05c41eed5b896fc94c4a12bb 31-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77638 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCXX.cpp
GExpr.cpp
GExprScalar.cpp
GObjCGNU.cpp
odeGenFunction.cpp
odeGenModule.cpp
487ce3833e15111fbd922e7ff1d472ab353adb22 31-Jul-2009 Mike Stump <mrs@apple.com> Canonicalize else spacing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77629 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GObjCMac.cpp
GStmt.cpp
b3589f44c5d295cd41de2c83f3475116835eeebd 31-Jul-2009 Mike Stump <mrs@apple.com> Canonicalize else spacing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77629 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GObjCMac.cpp
GStmt.cpp
c37c881001fdca88e53a9e2f53f3885d69907dcc 30-Jul-2009 Mike Stump <mrs@apple.com> Note some other limitations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77626 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
7116da1efe23f90eb22524ac9aa036153b74f482 30-Jul-2009 Mike Stump <mrs@apple.com> Note some other limitations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77626 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
36a0ec0ea2597d051d6048c623b3885f37ab89a3 30-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for future ir-gen for destructor calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77608 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
426cc3828ce07a2cff15c9837f5958e6fc4b7739 30-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for future ir-gen for destructor calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77608 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
odeGenFunction.h
ffcd8d2366aead38b8ee58f8557f5bf57071c71e 30-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Remove bogus "unsupported" case for vectors (which shouldn't
ever trigger). Add an "unsupported" case that triggers for C++ code.

It would be nice if someone would implement this properly... it
shouldn't be too hard, but I haven't looked closely at the relevant
code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77562 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
d254a25bc1793a2387e37b96568285883fb12eff 30-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Remove bogus "unsupported" case for vectors (which shouldn't
ever trigger). Add an "unsupported" case that triggers for C++ code.

It would be nice if someone would implement this properly... it
shouldn't be too hard, but I haven't looked closely at the relevant
code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77562 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
79b2bed4cf386ebdcaa114d7a774e4e4365389b3 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
odeGenTypes.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
odeGenTypes.cpp
5fe7f479700d27141220fd8405bc70bada45155a 30-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for nested non-virtual base member access
in current class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77554 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
c238a79a97ad35227a28acf16028ab63127c2fb7 30-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for nested non-virtual base member access
in current class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77554 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
e0d9ea74adac1662c4242b0ca20695da17822865 30-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate an unused-variable warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77518 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
5266d2ed446e9588eb00579ddfc5a2d327a5b3ab 30-Jul-2009 Douglas Gregor <dgregor@apple.com> Eliminate an unused-variable warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77518 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7ec2d8f68fd1b390e18b399cf9603a195de3a1da 30-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77514 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBuiltin.cpp
GCXX.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
argetABIInfo.cpp
96e0fc726c6fe7538522c60743705d5e696b40af 30-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77514 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBuiltin.cpp
GCXX.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
argetABIInfo.cpp
d00cd9ec368acf3e615d55f659eca4639044ba7d 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
GBlocks.cpp
GCXX.cpp
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenTypes.cpp
argetABIInfo.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
GBlocks.cpp
GCXX.cpp
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenTypes.cpp
argetABIInfo.cpp
557515b2fa1e521b64a9aff4eb8ed50af87ca262 29-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77492 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GExprConstant.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
3c4972def972f8ca44dcd0561779a12aaa6fec97 29-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77492 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GExprConstant.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
7f169884d194ae050930bf50485fc2f3ef584509 29-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> No longer need to keep base class offsets in the offset
table as it has its own place now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77491 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
argetABIInfo.cpp
8a8a629844d26c24dc0147d55a32a937b14b9381 29-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> No longer need to keep base class offsets in the offset
table as it has its own place now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77491 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
argetABIInfo.cpp
80b859e5ee1a3ad9576403ca1324a6b63fb74281 29-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to provide cast of objects in member access
excpression, if needed, and remove some ir-gen code
now unnencessary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77490 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
98a541e80848d3b7d1131237ac04e698faffd151 29-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to provide cast of objects in member access
excpression, if needed, and remove some ir-gen code
now unnencessary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77490 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
83a46edca3873cf30dd89999b748899879a112a4 29-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Use the existing API for base offset. Use suitable llvm type
for offset ir-gen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77458 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
5a8503b333f50acd6012859853612229f38cb420 29-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Use the existing API for base offset. Use suitable llvm type
for offset ir-gen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77458 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
90e18745436d0889e8bb7fba650263b38f05694e 29-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Code refactoring to define getCXXRecordDeclForPointerType
and use it in several places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77411 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
a91d6a6619a91d0ca7102d8ab5678d855f04d850 29-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Code refactoring to define getCXXRecordDeclForPointerType
and use it in several places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77411 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
f7f6cf823a9b32b5f05540846be86b79849df56e 29-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen derived-to-base conversion in implicit casts.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77374 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
fa9f8b4cf962d865c4b430a25aca2fb5faa84337 29-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen derived-to-base conversion in implicit casts.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77374 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
17971fab4c03fc0ca2797f95f6e368f249ad4c8d 28-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77368 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
4a28932dba03132dabbe70abdadcaae468dd7933 28-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77368 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
0b3b2b136743f39e2b2496732daac0fe9e426a00 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
odeGenTypes.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
odeGenTypes.cpp
76defc5b4e45e76484339f33197c3cd9ad60543c 28-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> More cleanup of data member access and then some.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77351 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
1c698e0d4f9bf3d141c019d33d9040085a8a67dd 28-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> More cleanup of data member access and then some.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77351 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
8472b498a0a49076eeb95aeda287c8052547e65f 28-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77349 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
7db6d838aad4083fe86d7bf703a75fe6e8a17856 28-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77349 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
37dea42adfca25dc93aaa48f645723d5864e9c18 28-Jul-2009 Chris Lattner <sabre@nondot.org> add some fixme's


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77343 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
41f55d3d89d53ac242db8244f823555904200744 28-Jul-2009 Chris Lattner <sabre@nondot.org> add some fixme's


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77343 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
70277013b47ce8376e876c7512e11725a813d320 28-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Some code cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77339 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
6d0bdaa68989bee60c85274e82a8f9c982587f26 28-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Some code cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77339 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
ea14671a931f4af78bbfb8472f6224c6b7074b44 28-Jul-2009 Anders Carlsson <andersca@mac.com> More CGRecordLayoutBuilder cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77335 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
c2cc1d5e29596f2ee2f32ca9c06f9119904dd161 28-Jul-2009 Anders Carlsson <andersca@mac.com> More CGRecordLayoutBuilder cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77335 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
d3f67287b3b814b0a0a45dbe180268bd4226a856 28-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> More work toward data member access ir-gen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77332 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
odeGenFunction.h
9e809e7da2448c08aa11f15be4680226754678ce 28-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> More work toward data member access ir-gen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77332 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
odeGenFunction.h
065e8c860559b117e8a32181d1f2e15d8c249722 28-Jul-2009 John McCall <rjmccall@apple.com> Allow functions to be marked "implicit return zero" and so mark main().
Codegen by initializing the return value with its LLVM type's null value.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77288 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
0cfeb63f532973777f6fe75d3468c3acad4adfe3 28-Jul-2009 John McCall <rjmccall@apple.com> Allow functions to be marked "implicit return zero" and so mark main().
Codegen by initializing the return value with its LLVM type's null value.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77288 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
245fb247ff33caceb2f571db46837b1e611b6b1a 28-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for objc's zero-const exception to not assume
that @catch(...) cathces all exceptions (c++ objects
are not cought by that).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77270 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
99438a726ed16bf1847a18a6abc114304be9a6ce 28-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Patch for objc's zero-const exception to not assume
that @catch(...) cathces all exceptions (c++ objects
are not cought by that).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77270 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
5ccd63cdc6a991c0e67929068c46f926cddff60c 28-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77267 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
08e252425ca2cbdc44ba65d9a657ed5398014e36 28-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77267 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
b56fd0b9080fae81e36cfd73dd740f0e06a4815d 27-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77249 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
bc0a2226c7fcd18b29b6846049e2cfcb872d3593 27-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77249 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
41fd040155f28462f38bf24c2d6a93d03c358907 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
GRecordLayoutBuilder.cpp
odeGenTypes.cpp
argetABIInfo.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
GRecordLayoutBuilder.cpp
odeGenTypes.cpp
argetABIInfo.cpp
ba89a6cd2d1f759aa5ce185ac529d07dfdb39460 27-Jul-2009 Devang Patel <dpatel@apple.com> Use DICompositeType->replaceAllUsesWith()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77228 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
6c1fddf9f2186166daf524682681c6510b069774 27-Jul-2009 Devang Patel <dpatel@apple.com> Use DICompositeType->replaceAllUsesWith()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77228 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d85f9b5c37c8cafc0dc75784d77ea4165067ae40 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
odeGenTypes.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
odeGenTypes.cpp
e1e0330e13b9772d5e69bd3f93180f44eec25dd4 27-Jul-2009 Anders Carlsson <andersca@mac.com> Enable the new struct type builder now that the constant struct builder works. (The old code will still be there until we know that everything works well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77190 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
abdad358b53d0efd1d89ea434b7078600a656d1f 27-Jul-2009 Anders Carlsson <andersca@mac.com> Enable the new struct type builder now that the constant struct builder works. (The old code will still be there until we know that everything works well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77190 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
2c5549c856beb2fcd01a5a584e301b78783698fa 27-Jul-2009 Anders Carlsson <andersca@mac.com> Fix a tail padding bug in the record layout builder code. The bug was found by an existing test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77189 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
c1efe36ca75b4f4f82cdec464bab5693ed0d6058 27-Jul-2009 Anders Carlsson <andersca@mac.com> Fix a tail padding bug in the record layout builder code. The bug was found by an existing test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77189 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
faab0307699cc92408ed566e7053ad7bf8d294cf 27-Jul-2009 Anders Carlsson <andersca@mac.com> Enable the new constant struct builder by default. The old code is still in place but will be removed shortly. The new struct builder works on big endian systems.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77185 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
8dca3b3d09ff48b3ec528cd603f835f120c4d9ee 27-Jul-2009 Anders Carlsson <andersca@mac.com> Enable the new constant struct builder by default. The old code is still in place but will be removed shortly. The new struct builder works on big endian systems.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77185 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
a9715d1d654151cfd2d853fb97bc937fe8c0c66e 27-Jul-2009 Anders Carlsson <andersca@mac.com> More work on the constant struct builder, fix a couple of thinkos and add support for inserting part of a bitfield in the previous byte.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77180 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
7a86d4b8a4fe34bb8a9e3bc94f839a4a657856b8 27-Jul-2009 Anders Carlsson <andersca@mac.com> More work on the constant struct builder, fix a couple of thinkos and add support for inserting part of a bitfield in the previous byte.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77180 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
a02da3f48f4b21bbc3ddb4e9805825dc4f569740 27-Jul-2009 Anders Carlsson <andersca@mac.com> More work on bitfield support in the new constant struct builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77177 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
d24393bbc18fe8d30273e832fb9617604cb20493 27-Jul-2009 Anders Carlsson <andersca@mac.com> More work on bitfield support in the new constant struct builder.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77177 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
3abd4312513bf0c32f1368e934d913c82934129e 26-Jul-2009 Daniel Dunbar <daniel@zuster.org> Switch to getName()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77151 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
b27ffbef8e8aa1e87b63cbc0d9cd630aba30dae5 26-Jul-2009 Daniel Dunbar <daniel@zuster.org> Switch to getName()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77151 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
697e8b452a1c1a4169e2db93ad6dd3a83e6d7236 26-Jul-2009 Daniel Dunbar <daniel@zuster.org> Switch to using llvm::Value::getName()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77147 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprComplex.cpp
0d9c54cc6255696937905d7f3a7a6c5eca7d4fde 26-Jul-2009 Daniel Dunbar <daniel@zuster.org> Switch to using llvm::Value::getName()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77147 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprComplex.cpp
a0107def0d562eeda9ea7d45039e7a054d9ac320 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
GCXX.cpp
odeGenTypes.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
GCXX.cpp
odeGenTypes.cpp
af3b9373938b7dbe3b3c9e680a35d30b21182e61 25-Jul-2009 Anders Carlsson <andersca@mac.com> More work on the constant struct builder. We can now convert the struct to a packed struct when necessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77038 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
bea9c52992d98d7d837dfbdd226d02cbd8bab601 25-Jul-2009 Anders Carlsson <andersca@mac.com> More work on the constant struct builder. We can now convert the struct to a packed struct when necessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77038 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
c48f023a1aec76a31a95fafcb73190ff93f4e60e 25-Jul-2009 Anders Carlsson <andersca@mac.com> More work on the constant struct builder. We now try to layout all constant structs but throw away the result.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77021 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
4257bc6d5bd6ec0789287bc5ee7c2fea1f44c59e 25-Jul-2009 Anders Carlsson <andersca@mac.com> More work on the constant struct builder. We now try to layout all constant structs but throw away the result.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77021 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
b17ec713b4a58440a7f1f50e1e397f2cd743fcdd 25-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77012 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBuiltin.cpp
GCXX.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenModule.cpp
argetABIInfo.cpp
4a28d5deeba33722aa009eab488591fb9055cc7e 25-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77012 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBuiltin.cpp
GCXX.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenModule.cpp
argetABIInfo.cpp
78b5430553b4bccf109bf27b055dbf0994e5221c 24-Jul-2009 Anders Carlsson <andersca@mac.com> Fix a release build warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76985 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
5602719fd5394c1e00c8aac237eb006b6aa32e52 24-Jul-2009 Anders Carlsson <andersca@mac.com> Fix a release build warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76985 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
56bacebf94f7cce59d0719a4678416204df295ba 24-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> More work toward initialization of objects
in constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76980 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
50b8eea3f36881a988a5757e0f6e15d45900324b 24-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> More work toward initialization of objects
in constructors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76980 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
278a4d4738ec2c5fb27f0cb81b2a7e3b6a8a17ea 24-Jul-2009 Anders Carlsson <andersca@mac.com> Don't use getLLVMFieldNo for bitfields when constructing the ivar layout maps for GC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76978 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
fc514abac21dbd801e2b665a1a24075c5ff62f44 24-Jul-2009 Anders Carlsson <andersca@mac.com> Don't use getLLVMFieldNo for bitfields when constructing the ivar layout maps for GC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76978 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
dbce63af43c9bbe44e4bb28df2d9ba6f2227ce05 24-Jul-2009 Anders Carlsson <andersca@mac.com> Check in a half finished new constant struct builder (Obviously not used yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76969 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GRecordLayoutBuilder.cpp
4c98efdf06f94da20a640aa36f6a4f3284c26bff 24-Jul-2009 Anders Carlsson <andersca@mac.com> Check in a half finished new constant struct builder (Obviously not used yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76969 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GRecordLayoutBuilder.cpp
16ecb1500d9293033b72afe0c04b4008c0c5864f 24-Jul-2009 Daniel Dunbar <daniel@zuster.org> Fix declaration of obc_enumerationMutation function, for GNU runtime.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76959 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
309a4368cd299cff30ab22709e2b772cf8059e45 24-Jul-2009 Daniel Dunbar <daniel@zuster.org> Fix declaration of obc_enumerationMutation function, for GNU runtime.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76959 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
912b5e744e7cb780b8fb66ca3856b58c3cfcc8c8 24-Jul-2009 Anders Carlsson <andersca@mac.com> Get rid of the size parameter to AppendField. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76931 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
728d7cd2e25a0a1e5ff272163fc7ed17980f029a 24-Jul-2009 Anders Carlsson <andersca@mac.com> Get rid of the size parameter to AppendField. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76931 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
a43f945abfdae95f3c69f1000eec87f6af710121 24-Jul-2009 Daniel Dunbar <daniel@zuster.org> Output UTF-16 string literals independent of host byte order.
- Steve, can you take a look at this? It seems like this code should live
elsewhere, and there is a FIXME about having Sema validates the UTF-8 to
UTF-16 conversion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76915 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
70ee975fad4653fa09f8e77f9a46a7b1f592ef59 24-Jul-2009 Daniel Dunbar <daniel@zuster.org> Output UTF-16 string literals independent of host byte order.
- Steve, can you take a look at this? It seems like this code should live
elsewhere, and there is a FIXME about having Sema validates the UTF-8 to
UTF-16 conversion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76915 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f60d2f0461f6bf9e3eb7751264ad4cb752edeefe 24-Jul-2009 Daniel Dunbar <daniel@zuster.org> Factor out map lookup for CFString constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76908 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
1d5529132e4620562cab931c1f84c24e42f02741 24-Jul-2009 Daniel Dunbar <daniel@zuster.org> Factor out map lookup for CFString constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76908 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
04767fcc69c0e1b18d93d3cfafdf66af1da42e26 24-Jul-2009 Anders Carlsson <andersca@mac.com> Don't just store the field/bit field info one field, do it for all fields in the union.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76907 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
94ae95f17ed4155ca4718575f00eafa1bfb8c5a0 24-Jul-2009 Anders Carlsson <andersca@mac.com> Don't just store the field/bit field info one field, do it for all fields in the union.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76907 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
f467c94bc13d2f42fef42c8f57482859252a32fc 23-Jul-2009 Anders Carlsson <andersca@mac.com> Fix another thinko.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76903 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
177d4d8700d66e80a874c3f609eede297118633d 23-Jul-2009 Anders Carlsson <andersca@mac.com> Fix another thinko.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76903 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
022739d715f89f4a30e8f07d89c232d1ae7edc69 23-Jul-2009 Anders Carlsson <andersca@mac.com> Correct a thinko in bitfield layout code. Fixes PR4611.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76898 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
faaec2234f21bf175dd05c723072202cdf39cb2f 23-Jul-2009 Anders Carlsson <andersca@mac.com> Correct a thinko in bitfield layout code. Fixes PR4611.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76898 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
65b15c2b3d23fe2d0dc41e5979e40b67d507fb14 23-Jul-2009 Daniel Dunbar <daniel@zuster.org> Simplify, NFC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76897 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ec586e7b10394aeed25c8e5ee02d230951826136 23-Jul-2009 Daniel Dunbar <daniel@zuster.org> Simplify, NFC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76897 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ba7b47bc0f6413bf73c85fbde297115c844fe221 23-Jul-2009 Daniel Dunbar <daniel@zuster.org> Simplify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76885 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2a3856ac8a52ed84349e830253c5dac616858f5c 23-Jul-2009 Daniel Dunbar <daniel@zuster.org> Simplify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76885 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7a7f44dd50c9fad887aef4b346803aaf7d48cd08 23-Jul-2009 Anders Carlsson <andersca@mac.com> We don't need to keep track of the packed alignment, just whether the struct is packed or not. Fixes PR4610.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76884 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
4b5584b38b860e8ecb20420e2fe16d5ed97a68a0 23-Jul-2009 Anders Carlsson <andersca@mac.com> We don't need to keep track of the packed alignment, just whether the struct is packed or not. Fixes PR4610.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76884 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
f46eb0e0e69274ce0bcd21e13ec3b6633b38743e 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
GExpr.cpp
GExprConstant.cpp
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
odeGenTypes.cpp
odeGenTypes.h
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
GExpr.cpp
GExprConstant.cpp
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
odeGenTypes.cpp
odeGenTypes.h
78c5be317500a90cdd370ceb8446e63e12826c4c 23-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Unbreak the CMake build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76878 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
f6c4bc0bd23776acb6f2c34414cf389f8d5042d4 23-Jul-2009 Douglas Gregor <dgregor@apple.com> Unbreak the CMake build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76878 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
6bf47dc954140c91cfb6d6e293e9f5e828eb4085 23-Jul-2009 Daniel Dunbar <daniel@zuster.org> Shield clang from LLVM API changes, until the dust settles.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76862 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
42719fc8145cb0da244b1826551e6b441db89209 23-Jul-2009 Daniel Dunbar <daniel@zuster.org> Shield clang from LLVM API changes, until the dust settles.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76862 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
b32d4c9fda229c63e73bef22d35408bcaee2851a 23-Jul-2009 Anders Carlsson <andersca@mac.com> Set field info for unions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76856 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
cfc6758b5f62514445eead673a46a69d70162526 23-Jul-2009 Anders Carlsson <andersca@mac.com> Set field info for unions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76856 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
6554286975af5bc38d8dace0a4ede6680d606616 23-Jul-2009 Anders Carlsson <andersca@mac.com> Use arrays as union padding. Also, since the resulting struct will always contain a single element and either a single i8 element or an array of i8s, there's no reason to use a packed struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76854 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
20d6d0474efc662924c4ca00a3511aac3782c4b0 23-Jul-2009 Anders Carlsson <andersca@mac.com> Use arrays as union padding. Also, since the resulting struct will always contain a single element and either a single i8 element or an array of i8s, there's no reason to use a packed struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76854 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
be732435de376e7cf9869ac31dea0bb955e1c90a 23-Jul-2009 Anders Carlsson <andersca@mac.com> Handle zero width bit fields in unions correctly (by ignoring them).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76847 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
2cc8f1740d88362292822e397db6085084399599 23-Jul-2009 Anders Carlsson <andersca@mac.com> Handle zero width bit fields in unions correctly (by ignoring them).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76847 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
207ed1c26ed19b87747db4a44c2142070d0797ac 23-Jul-2009 Anders Carlsson <andersca@mac.com> Implement union layout support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76846 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
5a6e398eafa48c56e8741ad2cd36630badd98f30 23-Jul-2009 Anders Carlsson <andersca@mac.com> Implement union layout support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76846 91177308-0d34-0410-b5e6-96231b3b80d8
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
53d17be9a0edbc24868e09004a834da15de7ccc5 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
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
odeGenTypes.cpp
odeGenTypes.h
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
GRecordLayoutBuilder.cpp
GRecordLayoutBuilder.h
odeGenTypes.cpp
odeGenTypes.h
2ded97e222faea9c6addaddb70237ca1a85df648 23-Jul-2009 Daniel Dunbar <daniel@zuster.org> These IRgen improvements have been done.

Technically we could still do a bit more to avoid deferred generation of statics
which we know are used, but I seriously doubt this is important.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76844 91177308-0d34-0410-b5e6-96231b3b80d8
EADME.txt
f1c8380d26cc392ad8f26e788af176a6e0bf8fd1 23-Jul-2009 Daniel Dunbar <daniel@zuster.org> These IRgen improvements have been done.

Technically we could still do a bit more to avoid deferred generation of statics
which we know are used, but I seriously doubt this is important.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76844 91177308-0d34-0410-b5e6-96231b3b80d8
EADME.txt
43e10b61e12cf0d0b0cb58ab0f1af7661784dda5 22-Jul-2009 Devang Patel <dpatel@apple.com> Use DICompositeType->replaceAllUsesWith().

This requires llvm rev. 76769 or higher.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76770 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0ce73f64ca98469856327480f0f3925d59ac409f 22-Jul-2009 Devang Patel <dpatel@apple.com> Use DICompositeType->replaceAllUsesWith().

This requires llvm rev. 76769 or higher.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76770 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0b60cf8c244e6bf36ff3f9262b917cccf488b8a8 22-Jul-2009 Steve Naroff <snaroff@apple.com> Fix a couple recent ABI regressions noticed during code review (fallout from the ObjC type system rewrite).

It's unfortunate that the mangling includes the low-level structs. Nevertheless, we need this for binary compatibility with GCC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76755 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
9533a7fdb8397421f3be52e879442460a87389f6 22-Jul-2009 Steve Naroff <snaroff@apple.com> Fix a couple recent ABI regressions noticed during code review (fallout from the ObjC type system rewrite).

It's unfortunate that the mangling includes the low-level structs. Nevertheless, we need this for binary compatibility with GCC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76755 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
04865bc6a40ff74a02482579b2d3f428be50b600 22-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Make vectorized floating-point comparisons work without crashing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76726 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1360d4ad9045056d646c118344c7c5148aea4a52 22-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Make vectorized floating-point comparisons work without crashing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76726 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
04d89cb922577a4f4363674b8999920d46eb69f1 22-Jul-2009 Mon P Wang <wangmp@apple.com> Preserve address space information through member accesses, e.g.,
__attribute__((address_space(1))) struct {int arr[ 3 ]; } *p1;
... = p1->arr[2]; // load from address space 1


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76717 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GValue.h
c6a38a47bf3908ab2183d7946498138d8b07c886 22-Jul-2009 Mon P Wang <wangmp@apple.com> Preserve address space information through member accesses, e.g.,
__attribute__((address_space(1))) struct {int arr[ 3 ]; } *p1;
... = p1->arr[2]; // load from address space 1


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76717 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GValue.h
0ce92b4ec7baaa67f7811e242491cb8314bb8b2b 21-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76599 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
GExprScalar.cpp
GObjCMac.cpp
4cd1608ba49c456504a3a25522c54a534b6880f3 21-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76599 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
GExprScalar.cpp
GObjCMac.cpp
7395d00022516568c6117051fd04cdfdcd9acad4 21-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76534 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
f48880ad8944eaa8e154ec4e93241164501fc366 21-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76534 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
5400e0222d05f8d0fd978bad7cf46b8f9591cf4a 21-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Move EmitCtorPrologue to CGCXX. Add an assert and FIXMEs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76498 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
e7d346b6d5cee14b75e34928b3fd423f21d8d80d 21-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Move EmitCtorPrologue to CGCXX. Add an assert and FIXMEs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76498 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.cpp
77cf9fa1d42f67502db87cacc2ac05862f391c90 21-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Early ir-gen for constructor prologue. This is on going.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76493 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
ab3c0a2c879569bb00fa664ebaccf9442c0a9c5f 21-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Early ir-gen for constructor prologue. This is on going.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76493 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
2f253a1b95e6c9b2ae4ebb3dab7746df49273116 20-Jul-2009 Mike Stump <mrs@apple.com> Remove an apparently unused header.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76473 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
5ac2323decadeccf22659b828771155f0c70bed9 20-Jul-2009 Mike Stump <mrs@apple.com> Remove an apparently unused header.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76473 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
ac8dae25856a59bbf77daeb2c62b639dd6a9ef9a 19-Jul-2009 Daniel Dunbar <daniel@zuster.org> Catch another trivial case where we can avoid emitting a separate return blcok.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76365 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
96e18b05ea6b55aa92a1a576f29e9cee73a7e20b 19-Jul-2009 Daniel Dunbar <daniel@zuster.org> Catch another trivial case where we can avoid emitting a separate return blcok.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76365 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
29eab28a3545290a8ca0a3743654ffa4232d040a 19-Jul-2009 Daniel Dunbar <daniel@zuster.org> Detect when the current generation point is unreachable after emitting
expressions.
- This generally catches the important case of noreturn functions.

- With the last two changes, we are down to 152 unreachable blocks emitted on
403.gcc, vs the 1805 we started with.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76364 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
cd5e60e1d4093b9a757cc85e35fccc093f8f8527 19-Jul-2009 Daniel Dunbar <daniel@zuster.org> Detect when the current generation point is unreachable after emitting
expressions.
- This generally catches the important case of noreturn functions.

- With the last two changes, we are down to 152 unreachable blocks emitted on
403.gcc, vs the 1805 we started with.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76364 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
ab7d9a35b3e49912bc355bd03abe159296218fe7 19-Jul-2009 Daniel Dunbar <daniel@zuster.org> Fix thinko.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76362 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GStmt.cpp
25b6ebf0f8c07514250ec76c987f84b6810d4d17 19-Jul-2009 Daniel Dunbar <daniel@zuster.org> Fix thinko.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76362 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GStmt.cpp
e94e486676517fd08fd22e9050022d12ad25500d 19-Jul-2009 Daniel Dunbar <daniel@zuster.org> Avoid generation of dead code in a few more situations.
- Emit variable declarations as "simple", we want to avoid forcing the creation
of a dummy basic block, but still need to make the variable available for
later use.

- With that, we can now skip IRgen for other unreachable statements (which
don't define a label).

- Anders, I added two fixmes on calls to EmitVLASize, can you check them?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76361 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
d286f05f1234bac289173f0eed88d7ecbaea0099 19-Jul-2009 Daniel Dunbar <daniel@zuster.org> Avoid generation of dead code in a few more situations.
- Emit variable declarations as "simple", we want to avoid forcing the creation
of a dummy basic block, but still need to make the variable available for
later use.

- With that, we can now skip IRgen for other unreachable statements (which
don't define a label).

- Anders, I added two fixmes on calls to EmitVLASize, can you check them?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76361 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
a035994089b81de429a362590714c89d6097c331 18-Jul-2009 Anders Carlsson <andersca@mac.com> Rename NextOffset to DataSize, which better matches the Itanium C++ ABI

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76339 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
243a68551ac9ec71bf341e062418e33eb4f286ff 18-Jul-2009 Anders Carlsson <andersca@mac.com> Rename NextOffset to DataSize, which better matches the Itanium C++ ABI

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76339 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
63f1ad9bb3a6330182b1d2e6477e316ce499ccd5 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
GDebugInfo.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenTypes.cpp
argetABIInfo.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
GDebugInfo.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenTypes.cpp
argetABIInfo.cpp
77763c58e3b7783c8e54671c2b696ecd81ed524f 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
GDebugInfo.cpp
odeGenTypes.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
GDebugInfo.cpp
odeGenTypes.cpp
5f38e5db830f005aed8e2236a37e7d972aed63fc 18-Jul-2009 Chris Lattner <sabre@nondot.org> fix objc codegen to not have its own list of things that eventually get into llvm.used, just
populate CGM's list directly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76266 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
ad64e024bd18cf25dcfa44e049004371838decd8 18-Jul-2009 Chris Lattner <sabre@nondot.org> fix objc codegen to not have its own list of things that eventually get into llvm.used, just
populate CGM's list directly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76266 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
d9b39bfecbc4faec367c3b2b53b8a3c7f71bdc3b 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
GBlocks.cpp
GCXX.cpp
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenTypes.cpp
argetABIInfo.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
GBlocks.cpp
GCXX.cpp
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenTypes.cpp
argetABIInfo.cpp
60d5671481f35143349d08261af20f08facbde17 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
GCXX.cpp
GExprAgg.cpp
GExprConstant.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenTypes.cpp
argetABIInfo.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
GCXX.cpp
GExprAgg.cpp
GExprConstant.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenTypes.cpp
argetABIInfo.cpp
69b91cae8e61dc1ddaf3f19f0ac5dbd77be23a63 17-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for --/++ operators of objc object pointers
in 32bit abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76109 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
62a11a78c2616ce1fa3ef7b1a4bc3f42365cafb9 17-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for --/++ operators of objc object pointers
in 32bit abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76109 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
57f236f1fb6b7f2c2330d6a39dcc98f57836f7c2 16-Jul-2009 Anton Korobeynikov <asl@math.spbu.ru> Hook in s390x stuff into clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76099 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
89e887fd73dd87c1118e13ebddf11aed9e25b763 16-Jul-2009 Anton Korobeynikov <asl@math.spbu.ru> Hook in s390x stuff into clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76099 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
f5de0a3cbaa216daf2ea7e42611bbd1ebad42fa7 16-Jul-2009 Ted Kremenek <kremenek@apple.com> Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.
This method is intended to eventually replace the individual
Type::getAsXXXType<> methods.

The motivation behind this change is twofold:

1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of
them are basically copy-and-paste.

2) By centralizing the implementation of the getAs<Type> logic we can more
smoothly move over to Doug Gregor's proposed canonical type smart pointer
scheme.

Along with this patch:

a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>.
b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76098 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
GExprScalar.cpp
GObjCMac.cpp
odeGenFunction.cpp
1a1a6e2bd4c5aefd7fd643cf25915f9623a02e59 16-Jul-2009 Ted Kremenek <kremenek@apple.com> Add member template 'Type::getAs<T>', which converts a Type* to a respective T*.
This method is intended to eventually replace the individual
Type::getAsXXXType<> methods.

The motivation behind this change is twofold:

1) Reduce redundant implementations of Type::getAsXXXType() methods. Most of
them are basically copy-and-paste.

2) By centralizing the implementation of the getAs<Type> logic we can more
smoothly move over to Doug Gregor's proposed canonical type smart pointer
scheme.

Along with this patch:

a) Removed 'Type::getAsPointerType()'; now clients use getAs<PointerType>.
b) Removed 'Type::getAsBlockPointerTypE()'; now clients use getAs<BlockPointerType>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76098 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
GExprScalar.cpp
GObjCMac.cpp
odeGenFunction.cpp
3f5115d192542d3a9087dc3ea9f36edff0b8e2bd 16-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76090 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
9cdd637312a5572287de0fb8637b252ee09cef10 16-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76090 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
e1acaa7917758c7f67f93af9c17a61124fbdc9bc 16-Jul-2009 Chris Lattner <sabre@nondot.org> use CreateRuntimeVariable to get __CFConstantStringClassReference
instead of doing it manually (which might end up getting auto-renamed),
fixing a FIXME. rdar://7065446


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76079 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
9d4a15fd3b85434c43ea27562793de63a793321a 16-Jul-2009 Chris Lattner <sabre@nondot.org> use CreateRuntimeVariable to get __CFConstantStringClassReference
instead of doing it manually (which might end up getting auto-renamed),
fixing a FIXME. rdar://7065446


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76079 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ad75bd277827709b7597fb94de498548bff4ee23 16-Jul-2009 Steve Naroff <snaroff@apple.com> Remove ASTContext::isObjCObjectPointerType().
Convert all clients to use the new predicate on Type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76076 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.h
GExpr.cpp
GObjCMac.cpp
f49545602089be5b1f744e04326b8a566f6d8773 16-Jul-2009 Steve Naroff <snaroff@apple.com> Remove ASTContext::isObjCObjectPointerType().
Convert all clients to use the new predicate on Type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76076 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.h
GExpr.cpp
GObjCMac.cpp
fa011bdce0fb4da854bbaee2e9038cad8470598b 16-Jul-2009 Chris Lattner <sabre@nondot.org> codegen string literals using private linkage now like llvm-gcc, eliminating
some target hooks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75895 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
95b851e55c328af4b69da7bfc1124bf258c0ffe5 16-Jul-2009 Chris Lattner <sabre@nondot.org> codegen string literals using private linkage now like llvm-gcc, eliminating
some target hooks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75895 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ed57113016ec4a4f667bec3ec91257eb49a513c3 16-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75869 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
d720046f18878f933b51fa21612f95114d602962 16-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75869 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
6093e74141497b81adf3910d3fe17c0411ab2fac 15-Jul-2009 Ted Kremenek <kremenek@apple.com> Lexically order files in CMakeLists.txt files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75832 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
b3b73642bfb4417d6312725ad6cc8d73ae143aca 15-Jul-2009 Ted Kremenek <kremenek@apple.com> Lexically order files in CMakeLists.txt files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75832 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
7bffd37bd2642e9d1bf0d093e9c1a7b3467f3014 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
odeGenTypes.cpp
angle.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
odeGenTypes.cpp
angle.cpp
73e7f80d12d58a1decb9e0089f8f6e9844c9d175 15-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change, and contextify a bunch of related stuff.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75705 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GBlocks.cpp
GBlocks.h
GBuiltin.cpp
GCXX.cpp
GCall.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
argetABIInfo.cpp
a1cf15f4680e5cf39e72e28c5ea854fcba792e84 15-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change, and contextify a bunch of related stuff.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75705 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GBlocks.cpp
GBlocks.h
GBuiltin.cpp
GCXX.cpp
GCall.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
argetABIInfo.cpp
6e2a89edad3392c6f9a8c2e548548d1c7f6b566f 14-Jul-2009 Devang Patel <dpatel@apple.com> Revert 75648 for now. It is causing test failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75684 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
odeGenModule.cpp
6dba432c7b862c2219e5d6e52b0cd188fbf84b01 14-Jul-2009 Devang Patel <dpatel@apple.com> Revert 75648 for now. It is causing test failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75684 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
odeGenModule.cpp
79ae19a7c9421e17ba26ea9cbf5a7f4dcc015cde 14-Jul-2009 Steve Naroff <snaroff@apple.com> Introduce Type::isAnyPointerType() and convert all clients (suggested by Chris).

I don't love the name, however it simplifies the code and is a worthwhile change. If/when we come up with a better name, we can do a search/replace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75650 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
58f9f2c884af6b72d036b746a016d8031d31cb7a 14-Jul-2009 Steve Naroff <snaroff@apple.com> Introduce Type::isAnyPointerType() and convert all clients (suggested by Chris).

I don't love the name, however it simplifies the code and is a worthwhile change. If/when we come up with a better name, we can do a search/replace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75650 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
deedcb6f412fc575a5c7ad96c3df79b7b2a75750 14-Jul-2009 Chris Lattner <sabre@nondot.org> [llvm up] adjust to match mainline.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75647 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
991b515cf1b2dc38eeca67192e3829f955f000c0 14-Jul-2009 Chris Lattner <sabre@nondot.org> [llvm up] adjust to match mainline.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75647 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7558ec6134e0291f6aa01a31d737848423fe642a 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
GDebugInfo.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenTypes.cpp
argetABIInfo.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
GDebugInfo.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenTypes.cpp
argetABIInfo.cpp
a5e68ff3ee16c23316a013a5573e88a919d3851f 14-Jul-2009 Daniel Dunbar <daniel@zuster.org> Revert r75614 which depend on r75610 (for LLVM), which was reverted.

--- Reverse-merging r75614 into '.':
U lib/CodeGen/CGDebugInfo.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75639 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a1a5e8a1604c89d0c9f7ae9d06b8a9ae81e6bb10 14-Jul-2009 Daniel Dunbar <daniel@zuster.org> Revert r75614 which depend on r75610 (for LLVM), which was reverted.

--- Reverse-merging r75614 into '.':
U lib/CodeGen/CGDebugInfo.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75639 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2bcacb61cf94b71e5c87f29d517f8dc29fe3993e 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
odeGenTypes.cpp
angle.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
odeGenTypes.cpp
angle.cpp
38183f201239afc9c1a90a8e525a644413370a39 14-Jul-2009 Chris Lattner <sabre@nondot.org> use new name for method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75614 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
127bf318068659471bce3b08c462d2eab6a5e6a5 14-Jul-2009 Chris Lattner <sabre@nondot.org> use new name for method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75614 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
fa1e96c109b3d7c071ecb50fb7c2ff6862c2086c 14-Jul-2009 Devang Patel <dpatel@apple.com> Use LLVM mangler to get mangled name for debug info entry.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75589 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
odeGenModule.cpp
61b5f3e12c0ab5dd2e8b98bb827855420bb9869b 14-Jul-2009 Devang Patel <dpatel@apple.com> Use LLVM mangler to get mangled name for debug info entry.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75589 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
odeGenModule.cpp
aba1cf0426f1f7bb2fa3ceb0dc4505db0e5ca7a5 14-Jul-2009 Daniel Dunbar <daniel@zuster.org> Update debug info generation for ObjCObjectPointer changes.
- Previously this would crash on recursive types, and it was also incorrectly
stripping off a level of indirection.
- I'm not 100% convinced this is all correct, but it should be a monotonic
improvment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75582 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
9df4bb32dfafd963396155df8472904dde6a6827 14-Jul-2009 Daniel Dunbar <daniel@zuster.org> Update debug info generation for ObjCObjectPointer changes.
- Previously this would crash on recursive types, and it was also incorrectly
stripping off a level of indirection.
- I'm not 100% convinced this is all correct, but it should be a monotonic
improvment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75582 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
c285847e6b632fd1a82af45f0417d44836cc8620 14-Jul-2009 Owen Anderson <resistor@mac.com> Update for API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75569 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
fc494ff95e011400e0d76a3cb52be453c9d2c15b 14-Jul-2009 Owen Anderson <resistor@mac.com> Update for API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75569 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
7982a648d05fabf2d5aa08341e8f9b348d0296b6 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
odeGenTypes.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
odeGenTypes.cpp
6d8dffa14a103a9e6e1f5d664a6b234426143cff 13-Jul-2009 Devang Patel <dpatel@apple.com> Update debug info type cache after fwd decl is replaced by real decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75473 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
fe09eab8095da4d3a3c68441e1566671dc9568d3 13-Jul-2009 Devang Patel <dpatel@apple.com> Update debug info type cache after fwd decl is replaced by real decl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75473 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2b789c0735cc2b06b9d8f34e95c0ce89cfd3451d 13-Jul-2009 Devang Patel <dpatel@apple.com> Fix comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75471 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0ae3d60731abb4c75eb9e993f8492527f4e51c70 13-Jul-2009 Devang Patel <dpatel@apple.com> Fix comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75471 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5f1adc2066bf982f721ee9b557febda9bf2ad4a9 13-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75446 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBuiltin.cpp
GCXX.cpp
GDecl.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
69243825cb5c91ec7207256aa57ae327cfaf8cb2 13-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75446 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBuiltin.cpp
GCXX.cpp
GDecl.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
e2e94bde6bfe9af2d0225bb459638b614504c458 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
odeGenTypes.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
odeGenTypes.cpp
9dc58d2b785ab705074a2656786b9d23aa8f9db2 11-Jul-2009 Daniel Dunbar <daniel@zuster.org> Generate correct prototype for objc_enumerationMutation.
- This was a latent bug exposed by the recent objc type changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75383 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c1ab900fa5e9b8a09b042992eeca29f413b1d595 11-Jul-2009 Daniel Dunbar <daniel@zuster.org> Generate correct prototype for objc_enumerationMutation.
- This was a latent bug exposed by the recent objc type changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75383 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
fb6831a524dc7eca866924991d73cafb43c03be6 11-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Fix typo (found by gcc warning).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75325 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
818e96f5a42b2a9adea4ac0050340469b49d70ef 11-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Fix typo (found by gcc warning).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75325 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
329ec22704eee011640ebf37c29343e82fb984c6 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
GDebugInfo.cpp
GExpr.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenTypes.cpp
angle.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
GDebugInfo.cpp
GExpr.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenTypes.cpp
angle.cpp
42f394e67047624dcc15d22239f615885ad712ac 10-Jul-2009 Anders Carlsson <andersca@mac.com> Fix a problem that Eli noticed, and that Doug helped me fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75265 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
563a03b1338d31c2462def43253a722bc885d384 10-Jul-2009 Anders Carlsson <andersca@mac.com> Fix a problem that Eli noticed, and that Doug helped me fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75265 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
215780ab673662392832694d0e51fe5d413a86d7 08-Jul-2009 Owen Anderson <resistor@mac.com> Update for IRBuilder API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75041 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
odeGenFunction.cpp
aac8705c046f01a264a4f82832895a5d9e695633 08-Jul-2009 Owen Anderson <resistor@mac.com> Update for IRBuilder API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75041 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
odeGenFunction.cpp
94148484a231c6554002b7567595622ebff6dcf0 08-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75028 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GDecl.cpp
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
1c431b323d776362490bbf7cc796b74fedaf19f2 08-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75028 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GDecl.cpp
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
4de4690ca7041cfe1e7bb24349502964b1504d38 08-Jul-2009 Anders Carlsson <andersca@mac.com> Implement code generation of ChooseExpr for aggregate types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75021 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
a294ca8c64fbb345f32e4af9d8fabdf2f64e4883 08-Jul-2009 Anders Carlsson <andersca@mac.com> Implement code generation of ChooseExpr for aggregate types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75021 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
96bcdd4951e5f3111c81385e3a8c8b3fc2eb3585 08-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74986 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GDecl.cpp
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
c14f0d230257a8db58aee6329116a7e245e6bbd6 08-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74986 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GDecl.cpp
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
614e8f099b8334e2307d26d45cb066f01c4fd71b 08-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Implemented memmove_collectable API for Next runtime
when struct variables with GC'able members are copied into.
Will provide a test case later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74984 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
082b02e8403d3ee9d2ded969fbe0e5d472f04cd8 08-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> Implemented memmove_collectable API for Next runtime
when struct variables with GC'able members are copied into.
Will provide a test case later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74984 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
08ac85229da1bee4d43445bdb8ffd655995da52b 08-Jul-2009 Chris Lattner <sabre@nondot.org> reimplement vector comparisons as [fi]cmp+sext instead of using v[if]cmp.
Also, enable them in sema so that they are tested, and now that the x86 backend
has stablized.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74983 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
9c10fcfc3b9d2076efe701b60644a9987a93c503 08-Jul-2009 Chris Lattner <sabre@nondot.org> reimplement vector comparisons as [fi]cmp+sext instead of using v[if]cmp.
Also, enable them in sema so that they are tested, and now that the x86 backend
has stablized.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74983 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1d381135f0c9dcbac521112b3f6936caf871b91a 06-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Keep track of the Expr used to describe the size of an array type,
from Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74831 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7e7eb3da052a6d80ddf2377cab0384c798f73f75 06-Jul-2009 Douglas Gregor <dgregor@apple.com> Keep track of the Expr used to describe the size of an array type,
from Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74831 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
11890bd82db863068e65a6a5b26585a6ad7d3d40 03-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> This fixes the case where the wrong symbol is emitted leading to linking errors when you reference a class before defining it (GNU runtime).
Patch by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74772 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
c51db23f58bd887b16cf91554aa86c430a2496e7 03-Jul-2009 Fariborz Jahanian <fjahanian@apple.com> This fixes the case where the wrong symbol is emitted leading to linking errors when you reference a class before defining it (GNU runtime).
Patch by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74772 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
6602e71406e3dee6998a2687024bf63aaa641717 02-Jul-2009 Owen Anderson <resistor@mac.com> Update for changes in LLVM. Hopefully this is the last one for a while.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74657 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
8f1ca78009ca1bdb66903c51b9bbaa81f58ea72a 02-Jul-2009 Owen Anderson <resistor@mac.com> Update for changes in LLVM. Hopefully this is the last one for a while.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74657 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
900fe062fcfd74f60ae171a0eb247aaec1c00929 01-Jul-2009 Owen Anderson <resistor@mac.com> Hold the LLVMContext by reference instead of by pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74642 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
c93f49832d2dae19a24d644c8021388fc5b099ee 01-Jul-2009 Owen Anderson <resistor@mac.com> Hold the LLVMContext by reference instead of by pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74642 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
ab960bac45b692b11867953f222e92bc9380ea4b 01-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVMContext+Module change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74615 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
42253cc3bc006661da1287aafef93d52d00dfed1 01-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVMContext+Module change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74615 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
89a7b0a534bde93f1101307edc2df4e2f5b8ebd5 01-Jul-2009 Chris Lattner <sabre@nondot.org> use new and simplified LLVM APIs. Patch by Jay Foad!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74585 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
b59761b2530bf54926bf67de11956f3820ac38d9 01-Jul-2009 Chris Lattner <sabre@nondot.org> use new and simplified LLVM APIs. Patch by Jay Foad!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74585 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
ab6e38adbcdbdb4e7d211b4ff7a52d871ea0e994 30-Jun-2009 Argiris Kirtzidis <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
GCXX.cpp
GCall.cpp
GDebugInfo.cpp
GExprAgg.cpp
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
odeGenTypes.cpp
argetABIInfo.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
GCXX.cpp
GCall.cpp
GDebugInfo.cpp
GExprAgg.cpp
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
odeGenTypes.cpp
argetABIInfo.cpp
ccb9efea4c1a88ccf62ac49d60f98b754897695a 30-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Remove the ASTContext parameter from the getBody() methods of Decl and subclasses.

Timings showed no significant difference before and after the commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74504 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.cpp
odeGenModule.cpp
6fb0aee4f9dc261bbec72e1283ad8dc0557a6d96 30-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove the ASTContext parameter from the getBody() methods of Decl and subclasses.

Timings showed no significant difference before and after the commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74504 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.cpp
odeGenModule.cpp
fe5f9736723cbaae5423f98ebbd0f0f537b51de4 30-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Remove the ASTContext parameter from the attribute-related methods of Decl.
The implementations of these methods can Use Decl::getASTContext() to get the ASTContext.

This commit touches a lot of files since call sites for these methods are everywhere.
I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74501 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCall.cpp
GDecl.cpp
GExpr.cpp
GObjC.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
angle.cpp
40b598eea1310ec9ed554d56ce3e25b34c585458 30-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove the ASTContext parameter from the attribute-related methods of Decl.
The implementations of these methods can Use Decl::getASTContext() to get the ASTContext.

This commit touches a lot of files since call sites for these methods are everywhere.
I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74501 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCall.cpp
GDecl.cpp
GExpr.cpp
GObjC.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
angle.cpp
7099c789f054f1e7480f498d60aa94b0326c285f 30-Jun-2009 Chris Lattner <sabre@nondot.org> Key decisions about 'bool' vs '_Bool' to be based on a new flag in langoptions.

This is simple enough, but then I thought it would be nice to make PrintingPolicy
get a LangOptions so that various things can key off "bool" and "C++" independently.
This spiraled out of control. There are many fixme's, but I think things are slightly
better than they were before.

One thing that can be improved: CFG should probably have an ASTContext pointer in it,
which would simplify its clients.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74493 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e4f2142d00fa5fdb580c4e2413da91882d955381 30-Jun-2009 Chris Lattner <sabre@nondot.org> Key decisions about 'bool' vs '_Bool' to be based on a new flag in langoptions.

This is simple enough, but then I thought it would be nice to make PrintingPolicy
get a LangOptions so that various things can key off "bool" and "C++" independently.
This spiraled out of control. There are many fixme's, but I think things are slightly
better than they were before.

One thing that can be improved: CFG should probably have an ASTContext pointer in it,
which would simplify its clients.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74493 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
696780627b917bb683cfcc196e370fc6ed620b12 30-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Improve code generation for function template specializations:
- Track implicit instantiations vs. the not-yet-supported explicit
specializations
- Give implicit instantiations of function templates (and member
functions of class templates) linkonce_odr linkage.
- Improve name mangling for function template specializations,
including the template arguments of the instantiation and the return
type of the function.

Note that our name-mangling is improved, but not correct: we still
don't mangle substitutions, although the manglings we produce can be
demangled.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74466 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
angle.cpp
1fd2dd145d9bcdf0b8d60a88e1795b6ae83656f5 30-Jun-2009 Douglas Gregor <dgregor@apple.com> Improve code generation for function template specializations:
- Track implicit instantiations vs. the not-yet-supported explicit
specializations
- Give implicit instantiations of function templates (and member
functions of class templates) linkonce_odr linkage.
- Improve name mangling for function template specializations,
including the template arguments of the instantiation and the return
type of the function.

Note that our name-mangling is improved, but not correct: we still
don't mangle substitutions, although the manglings we produce can be
demangled.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74466 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
angle.cpp
27b6d2b2671814fd94f2f70f58feb68cefe609d1 29-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Keep track of function template specializations, to eliminate
redundant, implicit instantiations of function templates and provide a
place where we can hang function template specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74454 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
127102b5196ffe04bdb70fd553fe62c265ab10a9 29-Jun-2009 Douglas Gregor <dgregor@apple.com> Keep track of function template specializations, to eliminate
redundant, implicit instantiations of function templates and provide a
place where we can hang function template specializations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74454 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2ed1a54888348f8056fd20fec3dd3bbd050c6a36 29-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Move FunctionDecl::TemplateSpecializationInfo out into its own class,
FunctionTemplateSpecializationInfo, in DeclTemplate.h. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74431 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
16e8be2ac532358d4e413fdfa2643b1876edda78 29-Jun-2009 Douglas Gregor <dgregor@apple.com> Move FunctionDecl::TemplateSpecializationInfo out into its own class,
FunctionTemplateSpecializationInfo, in DeclTemplate.h. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74431 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
39e99a4bd7d690178f494899078d0723522d5247 29-Jun-2009 Bill Wendling <isanbard@gmail.com> Make the StackProtector bitfield use enums instead of obscure numbers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74414 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
4ebe3e4c811a376c423a544f5e76ee2e96533324 29-Jun-2009 Bill Wendling <isanbard@gmail.com> Make the StackProtector bitfield use enums instead of obscure numbers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74414 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
e1d4f5d6840e99b8345dd755ec4a335ff4539fcf 28-Jun-2009 Bill Wendling <isanbard@gmail.com> Add stack protector support to clang. This generates the 'ssp' and 'sspreq'
function attributes. There are predefined macros that are defined when stack
protectors are used: __SSP__=1 with -fstack-protector and __SSP_ALL__=2 with
-fstack-protector-all.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74405 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
45483f7a1b3e57b4603b141bee80596b2d4dd443 28-Jun-2009 Bill Wendling <isanbard@gmail.com> Add stack protector support to clang. This generates the 'ssp' and 'sspreq'
function attributes. There are predefined macros that are defined when stack
protectors are used: __SSP__=1 with -fstack-protector and __SSP_ALL__=2 with
-fstack-protector-all.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74405 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
06cadb401cc1ad59bac221b4b6f761cf5466c843 26-Jun-2009 Nate Begeman <natebegeman@mac.com> OpenCL 1.0 Support: fix a bug with lvalue swizzles


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74324 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
6e5dd866469d577811f3080f43407c12a21db83f 26-Jun-2009 Nate Begeman <natebegeman@mac.com> OpenCL 1.0 Support: fix a bug with lvalue swizzles


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74324 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4a8498cc0f251e839912285112a014a5d1248648 26-Jun-2009 Anders Carlsson <andersca@mac.com> Implement enough of the 'auto' keyword so we can claim to support N2546.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74307 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
e89d15944dd3be750a09805ad21222d2fa9321fa 26-Jun-2009 Anders Carlsson <andersca@mac.com> Implement enough of the 'auto' keyword so we can claim to support N2546.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74307 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
e556544c8176b5e9cda5e4f4baad8ab8891968af 26-Jun-2009 Devang Patel <dpatel@apple.com> typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74305 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
bd0fec9250a783ad67d023e53ab0877a74f0be11 26-Jun-2009 Devang Patel <dpatel@apple.com> typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74305 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
3f37617b52ac1bc1d26a10b46735ecba0c199572 26-Jun-2009 Devang Patel <dpatel@apple.com> Revrt PR4228 fix for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74304 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
72240d78e2510d981e7d986b9a1e50b1e09e10f0 26-Jun-2009 Devang Patel <dpatel@apple.com> Revrt PR4228 fix for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74304 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
9e6277f29fa04c9bb988fdb2ba3a6ce88b3776be 26-Jun-2009 Daniel Dunbar <daniel@zuster.org> Simplify, and fix a possible crash (never happens however, because we don't ever
take this path with non-builtin floating point types).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74303 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c0183e8281b2ddacdca87cd2f749255d06a4bfe6 26-Jun-2009 Daniel Dunbar <daniel@zuster.org> Simplify, and fix a possible crash (never happens however, because we don't ever
take this path with non-builtin floating point types).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74303 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
93ab533a2e9522a2e9a7695cb7446812fc9e70a6 24-Jun-2009 Anders Carlsson <andersca@mac.com> Add a DecltypeType type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74099 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
395b475a4474f1c7574d927ad142ca0c7997cbca 24-Jun-2009 Anders Carlsson <andersca@mac.com> Add a DecltypeType type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74099 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3580ee1d465d31702c038777317898944eacd8c9 23-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Patch fixes an obscure bug when 'used' attribute is applied to
variables in ObjC's Next runtime mode. Next runtime also implicitly applies
'used' attribute on some of its meta-data. This results in two
'llvm.used' arrays to be generated, and one of them is renamed to
'llvm.used1'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74008 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
c38e9affd4519ea199af22419c8c794973cc4b23 23-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Patch fixes an obscure bug when 'used' attribute is applied to
variables in ObjC's Next runtime mode. Next runtime also implicitly applies
'used' attribute on some of its meta-data. This results in two
'llvm.used' arrays to be generated, and one of them is renamed to
'llvm.used1'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74008 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
fff3fe24303ee38f52f85f03ac89c444ca022e2c 23-Jun-2009 Chris Lattner <sabre@nondot.org> fix PR4423.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73938 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
d6bebbfd510f3b495795b88aafd10ead3cb211e9 23-Jun-2009 Chris Lattner <sabre@nondot.org> fix PR4423.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73938 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
683a1144296b0d866dea5b8bee2c2948ad0b6312 20-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Parsing and AST support for using declarations, from John Thompson!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73812 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
9cfbe48a7a20a217fdb2920b29b67ae7941cb116 20-Jun-2009 Douglas Gregor <dgregor@apple.com> Parsing and AST support for using declarations, from John Thompson!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73812 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
98da6aed9fbc7fc82dd581c7bb647412f7864299 18-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73702 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCall.cpp
GDecl.cpp
GExpr.cpp
GObjC.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
angle.cpp
68584ed35ad819a1668e3f527ba7f5dd4ae6a333 18-Jun-2009 Douglas Gregor <dgregor@apple.com> Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73702 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCall.cpp
GDecl.cpp
GExpr.cpp
GObjC.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
angle.cpp
38bc2b568f9a179119f196f7bcebd87b37c6355e 18-Jun-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Move CXXMethodDecl::OutOfLineDefinition into Decl::OutOfLine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73651 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f5cecfbdcd20be224861f9e67c5973a9a2b61512 18-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move CXXMethodDecl::OutOfLineDefinition into Decl::OutOfLine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73651 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
c75c1a882cad91f2edc6a926eb8cd725abad2262 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
GDebugInfo.cpp
odeGenTypes.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
GDebugInfo.cpp
odeGenTypes.cpp
291a2b33e8f1f5fd0dc31582b88d1a59bc9330af 17-Jun-2009 Chris Lattner <sabre@nondot.org> Update clang for the add ->add/fadd split. Likewise for sub and mul.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73604 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
GExprScalar.cpp
87415d2d45224596a96ef02310701797d56b2c19 17-Jun-2009 Chris Lattner <sabre@nondot.org> Update clang for the add ->add/fadd split. Likewise for sub and mul.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73604 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
GExprScalar.cpp
ec382b50b93d1ad47233aa9595680acfac13c828 16-Jun-2009 Devang Patel <dpatel@apple.com> It is possible that main input file does not have any symbol with debug info. To handle this edge case, always create main compile unit first.
This fixes PR 4228.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73520 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
998316908cf1f0d50257dcaf60dc8154a1e294c9 16-Jun-2009 Devang Patel <dpatel@apple.com> It is possible that main input file does not have any symbol with debug info. To handle this edge case, always create main compile unit first.
This fixes PR 4228.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73520 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
37bb2bd63d6a2dfeb4b8f2e07205e501e96e49e1 16-Jun-2009 Anders Carlsson <andersca@mac.com> Handle temporaries in default arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73462 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
f54741e6465692d3bdbae974ac3beeeab92e4a95 16-Jun-2009 Anders Carlsson <andersca@mac.com> Handle temporaries in default arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73462 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
9c445ae4179cb25d1846482cdf76d7eaef8436ed 15-Jun-2009 Chris Lattner <sabre@nondot.org> "GCC emits an __objc_class_name_{classname} symbol for every class, and a corresponding reference to this symbol for every compilation unit that references the class. This causes linker errors when you try linking a program which references some classes but doesn't define them. The attached patch implements this support in clang, so you can compile a class with clang, reference it in a file compiled with GCC, and have it all work correctly."

Patch by David Chisnall!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73364 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
2a8e4e1d8548dc3e30d7c9ba92127c7884a11448 15-Jun-2009 Chris Lattner <sabre@nondot.org> "GCC emits an __objc_class_name_{classname} symbol for every class, and a corresponding reference to this symbol for every compilation unit that references the class. This causes linker errors when you try linking a program which references some classes but doesn't define them. The attached patch implements this support in clang, so you can compile a class with clang, reference it in a file compiled with GCC, and have it all work correctly."

Patch by David Chisnall!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73364 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
64d52c0a5ba0bb3e91726c3a909378cafef55716 14-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4390: Make sure to handle anonymous unions correctly while building
static intializers for structs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73349 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
4c4c527dc1877999dd2bdae74ae9ffbddedaf819 14-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4390: Make sure to handle anonymous unions correctly while building
static intializers for structs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73349 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
c46fcddc0bb2256110a710801f34a560453e3549 14-Jun-2009 Chris Lattner <sabre@nondot.org> Sink the BuiltinInfo object from ASTContext into the
preprocessor and initialize it early in clang-cc. This
ensures that __has_builtin works in all modes, not just
when ASTContext is around.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73319 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
odeGenModule.cpp
1b63e4f732dbc73d90abf886b4d21f8e3a165f6d 14-Jun-2009 Chris Lattner <sabre@nondot.org> Sink the BuiltinInfo object from ASTContext into the
preprocessor and initialize it early in clang-cc. This
ensures that __has_builtin works in all modes, not just
when ASTContext is around.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73319 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
odeGenModule.cpp
99ca9d64d362891c197bfda097e4994c41a67690 14-Jun-2009 Chris Lattner <sabre@nondot.org> move the various builtins stuff from libast to libbasic. This
fixes a layering violation in lib/Basic/Targets.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73318 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
6b15cdc1312f8fc45c86ee75e2a85106700e97f6 14-Jun-2009 Chris Lattner <sabre@nondot.org> move the various builtins stuff from libast to libbasic. This
fixes a layering violation in lib/Basic/Targets.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73318 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
260ad501d479ae610259272ad5ce13910b0cc0ac 14-Jun-2009 Chris Lattner <sabre@nondot.org> move GetBuiltinType from Builtin::Context to ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73316 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
86df27bbdbb98c39ec2184695c0561209f91bedd 14-Jun-2009 Chris Lattner <sabre@nondot.org> move GetBuiltinType from Builtin::Context to ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73316 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
0c032a4c78edceddc31e3e9c17ae6b2deeb50eca 14-Jun-2009 Chris Lattner <sabre@nondot.org> Simplify mangleFunctionDecl by unnesting a crazy condition. This fixes
the check for extern "c" system headers, which should prevent functiondecls
from being mangled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73311 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
783601d8c58deb97037f0f91161c5a1b89d5c4c9 14-Jun-2009 Chris Lattner <sabre@nondot.org> Simplify mangleFunctionDecl by unnesting a crazy condition. This fixes
the check for extern "c" system headers, which should prevent functiondecls
from being mangled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73311 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
621de774f355b4d0b2112f35ab9bdc880d4645fe 13-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Fix the calling convention for structs/unions containing SSE vectors on
x86-32. This is slightly messy, but I think it's consistent with gcc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73306 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
a1e6de9171d10c3a3dde7fc2e8cf72cc98bf6362 13-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Fix the calling convention for structs/unions containing SSE vectors on
x86-32. This is slightly messy, but I think it's consistent with gcc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73306 91177308-0d34-0410-b5e6-96231b3b80d8
argetABIInfo.cpp
38fab299112a3a4ab5fa91a8f7228a9e2060e1fe 13-Jun-2009 Chris Lattner <sabre@nondot.org> Fix PR4372, another case where non-prototyped functions can prevent
always_inline from working.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73273 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
5db7ae59bb0115ccc420ff1d688abc8706559b57 13-Jun-2009 Chris Lattner <sabre@nondot.org> Fix PR4372, another case where non-prototyped functions can prevent
always_inline from working.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73273 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
ecd7861d828646c5704d1ef8576aca1b337cbed0 11-Jun-2009 Anders Carlsson <andersca@mac.com> Don't assert when generating code with static_asserts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73208 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
36674d2978eb53962218ac67bb4d352cc287ea05 11-Jun-2009 Anders Carlsson <andersca@mac.com> Don't assert when generating code with static_asserts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73208 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
41459b7588cfe06cb31bbef1d330c68699c281e6 10-Jun-2009 Daniel Dunbar <daniel@zuster.org> Support complex properties, ivars and message expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73158 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
GObjCMac.cpp
42f963dec21ed86f33ba34dc01140f77c7174768 10-Jun-2009 Daniel Dunbar <daniel@zuster.org> Support complex properties, ivars and message expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73158 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
GObjCMac.cpp
79488fc6abfbe7dba27b9bd924048904840d3cc0 07-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Remove a few more vector builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73022 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
8fff25719eb9363ac197ac4b375699a9afe9d36d 07-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Remove a few more vector builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73022 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
8faaf944d56cb82000a7378eae1fc4d466f35207 07-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Now that LLVM CodeGen can handle the generic variations a bit better,
get rid of a few more clang vector builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73015 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
e0ae8bdadc4fef56db7f0e3336d0379a89eb462f 07-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Now that LLVM CodeGen can handle the generic variations a bit better,
get rid of a few more clang vector builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73015 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
92f47c929a6ec5bbf1435967f65cd312f0e26f9b 06-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4339: make sure to properly extend/trunc the index of a vector element
insert/extract; the relevant instructions are defined to take only an
i32.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73005 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
61d004a12eba93df9d393c80a6836d20bc0b1be5 06-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4339: make sure to properly extend/trunc the index of a vector element
insert/extract; the relevant instructions are defined to take only an
i32.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73005 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
2ce305d3fd01ddf14a3dc774eb7d85a29119ddf0 06-Jun-2009 Anton Korobeynikov <asl@math.spbu.ru> Add new ABIArgInfo kind: Extend. This allows target to implement its own argument
zero/sign extension logic (consider, e.g. target has only 64 bit registers and thus
i32's should be extended as well).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72998 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetABIInfo.cpp
cc6fa88666ca2f287df4a600eb31a4087bab9c13 06-Jun-2009 Anton Korobeynikov <asl@math.spbu.ru> Add new ABIArgInfo kind: Extend. This allows target to implement its own argument
zero/sign extension logic (consider, e.g. target has only 64 bit registers and thus
i32's should be extended as well).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72998 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetABIInfo.cpp
cac5494abf318f05bbf2355df0f7eff0ff999341 06-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Get rid of a bunch of dead builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72996 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
a311be7ddb3f6d732fce2ea09c8ffbeabaa94984 06-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Get rid of a bunch of dead builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72996 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
c32f9c113dd87950a2cee149f17b9e26f46ae20c 06-Jun-2009 Mike Stump <mrs@apple.com> As an optimization, we maintain a cache of generated
___Block_byref_id_object_dispose and ___Block_byref_id_object_copy
functions so that we can simply reuse instead of creating a new one.
Additionally, add an assert to ensure no one yet tries to align a
__block variable beyond the alignment of a pointer as the codegen is
incomplete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72974 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
3899a7fb9c7eeed19cc38d082921dd8b3d0d6624 06-Jun-2009 Mike Stump <mrs@apple.com> As an optimization, we maintain a cache of generated
___Block_byref_id_object_dispose and ___Block_byref_id_object_copy
functions so that we can simply reuse instead of creating a new one.
Additionally, add an assert to ensure no one yet tries to align a
__block variable beyond the alignment of a pointer as the codegen is
incomplete.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72974 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
c531ad9117527564edebf6836b999952489406e8 06-Jun-2009 Daniel Dunbar <daniel@zuster.org> weak_import should not make definitions have weak linkage.
- <rdar://problem/6948703> clang treats weak_import like weak


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72967 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2968b7741da535810250b919c95d12105882d19f 06-Jun-2009 Daniel Dunbar <daniel@zuster.org> weak_import should not make definitions have weak linkage.
- <rdar://problem/6948703> clang treats weak_import like weak


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72967 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6f7a9f9509fdb4e9d8fc1db65916a124a166e3cb 06-Jun-2009 Anton Korobeynikov <asl@math.spbu.ru> Update cmake script

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72963 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
71248835a65a4346e6ae8bcc9f6c332942244035 06-Jun-2009 Anton Korobeynikov <asl@math.spbu.ru> Update cmake script

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72963 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
73628198226f98567ce1b6d19ad2aa240be8c53f 06-Jun-2009 Anton Korobeynikov <asl@math.spbu.ru> Factor out TargetABIInfo stuff into separate file. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72962 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetABIInfo.cpp
c4a59eb306efeb4bffa3cefecd1e6392fc5c4144 06-Jun-2009 Anton Korobeynikov <asl@math.spbu.ru> Factor out TargetABIInfo stuff into separate file. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72962 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
argetABIInfo.cpp
62c2cca67194cb05e2c66a6637cb21e433726f1c 06-Jun-2009 Devang Patel <dpatel@apple.com> Set function Attribute::NoImplicitFloat appropriately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72961 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
acebb397fa5d63835a0de9cee144987057ec1333 06-Jun-2009 Devang Patel <dpatel@apple.com> Set function Attribute::NoImplicitFloat appropriately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72961 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
e563bae892daabe32233ac68e958e4120cfeda66 05-Jun-2009 Daniel Dunbar <daniel@zuster.org> ABI handling: Fix nasty thinko where IRgen could generate an out-of-bounds read
when generating a coercion for ABI handling purposes.
- This may only manifest itself when building at -O0, but the practical effect
is that other arguments may get clobbered.

- <rdar://problem/6930451> [irgen] ABI coercion clobbers other arguments


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72932 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
fdf4986c4c75514df428ed71d5942252f18e129b 05-Jun-2009 Daniel Dunbar <daniel@zuster.org> ABI handling: Fix nasty thinko where IRgen could generate an out-of-bounds read
when generating a coercion for ABI handling purposes.
- This may only manifest itself when building at -O0, but the practical effect
is that other arguments may get clobbered.

- <rdar://problem/6930451> [irgen] ABI coercion clobbers other arguments


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72932 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
0466dacd2ed42a5cca853ae37403a6459476c7c3 05-Jun-2009 Daniel Dunbar <daniel@zuster.org> Fix -Asserts build warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72910 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
b4d4c4b8d93d84d0a20ba425ee04310f1001e342 05-Jun-2009 Daniel Dunbar <daniel@zuster.org> Fix -Asserts build warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72910 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
a3707f1acc6077cd574ff75fed8bfb772f72dd52 05-Jun-2009 Devang Patel <dpatel@apple.com> Set function attribute llvm::Attribute::NoRedZone appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72902 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
24095dad88dd9d48aa16afa6416417073af251b5 05-Jun-2009 Devang Patel <dpatel@apple.com> Set function attribute llvm::Attribute::NoRedZone appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72902 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
d95a8ab536033e9176e935911cf4cc05ce10f058 04-Jun-2009 Chris Lattner <sabre@nondot.org> Make ReplaceUsesOfNonProtoTypeWithRealFunction verify that a call is *to* the
function of interest, not an operand of it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72869 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
08c93a7f2210b464e5abe298a5474b99414615f6 04-Jun-2009 Chris Lattner <sabre@nondot.org> Make ReplaceUsesOfNonProtoTypeWithRealFunction verify that a call is *to* the
function of interest, not an operand of it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72869 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
bf3b93a4573343849b6535a67c2262efebacfa10 04-Jun-2009 Anders Carlsson <andersca@mac.com> Use PushConditionalTempDestruction/PopConditionalTempDestruction for the ternary operator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72842 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprScalar.cpp
fb6fa30a9b06670deb14f862dddbc49a12552939 04-Jun-2009 Anders Carlsson <andersca@mac.com> Use PushConditionalTempDestruction/PopConditionalTempDestruction for the ternary operator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72842 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprScalar.cpp
ac36c0eff1821dad82c97afc43d40ba985c49e7b 04-Jun-2009 Anders Carlsson <andersca@mac.com> Use conditional temp destruction for || and &&.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72838 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
33da07db112f4877f6ab13e20db08b9bb86a0c2e 04-Jun-2009 Anders Carlsson <andersca@mac.com> Use conditional temp destruction for || and &&.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72838 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
608b69ee6204ddbe824b1abaf6cb423b2af427fb 04-Jun-2009 Anders Carlsson <andersca@mac.com> Make PushCXXTemporary and PopCXXTemporary handle conditional temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72837 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
8c0b203879f5e2064731700980c41199c692ca2c 04-Jun-2009 Anders Carlsson <andersca@mac.com> Make PushCXXTemporary and PopCXXTemporary handle conditional temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72837 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
ffbcf17d32ad5aa20adeccb7ae3d67a9727e416a 04-Jun-2009 Anders Carlsson <andersca@mac.com> Add PushConditionalTempDestruction/PopConditionalTempDestruction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72835 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
odeGenFunction.h
1d8475067d5b62ed5a57ba93862e23f3096a8bdd 04-Jun-2009 Anders Carlsson <andersca@mac.com> Add PushConditionalTempDestruction/PopConditionalTempDestruction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72835 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
odeGenFunction.h
d15f26f496c8796b174ffccd901cdb42fd049a3f 04-Jun-2009 Anders Carlsson <andersca@mac.com> Make sure to push a cleanup block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72831 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
d8bc5a94b257b77548433df110fdfb6efd130558 04-Jun-2009 Anders Carlsson <andersca@mac.com> Make sure to push a cleanup block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72831 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
b290be02fc9148b81c17b27df39d34b7cb8ab674 04-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Cleanup/Refactoring of ivar collection. No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72827 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
8e6ac1d80055fa37b9b84029c7e751624ba7f84c 04-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> Cleanup/Refactoring of ivar collection. No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72827 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
d6c4538729cfac3a7553c463dd1c31d88c35dabd 04-Jun-2009 Mike Stump <mrs@apple.com> Fix cmake builds.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72814 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
58921741c957c6e8f8e4342afa29972a9b23a2bd 04-Jun-2009 Mike Stump <mrs@apple.com> Fix cmake builds.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72814 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
cbffe3eae4ebdaad816e904574a1c4aa7977748c 03-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4316: Fix IRGen for cast-to-union extension.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72803 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
34ebf4d1767e6748a1a59a5d1935c495cd8877e8 03-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4316: Fix IRGen for cast-to-union extension.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72803 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
7c6223dfcc7e1324579d2fbd27ba6ae05671ae94 03-Jun-2009 Anders Carlsson <andersca@mac.com> More temporary work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72796 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
odeGenFunction.h
f4b8fea84a6b1ef74cf8fe572918439e34935e51 03-Jun-2009 Anders Carlsson <andersca@mac.com> More temporary work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72796 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
odeGenFunction.h
5277416a68f0ad5b2052a395f62002214328278b 03-Jun-2009 Anders Carlsson <andersca@mac.com> Store more information about live temporaries. No functionality change for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72793 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
odeGenFunction.h
e8b5578fcc2a3ffb90986f95f2c9127a9a08e34b 03-Jun-2009 Anders Carlsson <andersca@mac.com> Store more information about live temporaries. No functionality change for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72793 91177308-0d34-0410-b5e6-96231b3b80d8
GCXXTemp.cpp
odeGenFunction.h
fbafd4242883570a83b85e611084f575374775a7 03-Jun-2009 Anders Carlsson <andersca@mac.com> Move code generation of C++ temporaries into a new file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72792 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXTemp.cpp
2ce66125025536e6a06dc5cbc809d621a7c71a74 03-Jun-2009 Anders Carlsson <andersca@mac.com> Move code generation of C++ temporaries into a new file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72792 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCXXTemp.cpp
e32223638579d23c0f287c256efb2477379a170b 02-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add support for __builtin_unwind_init.

Also, committing an #if 0'ed __builtin_setjmp and __builtin_longjmp
implementation I've had sitting in my tree for a while. I haven't
enabled it because the LLVM backend support isn't complete yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72727 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
a6d75c0324ac690107bbaa7193b526ef21466212 02-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add support for __builtin_unwind_init.

Also, committing an #if 0'ed __builtin_setjmp and __builtin_longjmp
implementation I've had sitting in my tree for a while. I haven't
enabled it because the LLVM backend support isn't complete yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72727 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
5dbe17e17e36ee4bf9fda2f22d4ebdc8be303bbd 02-Jun-2009 Eli Friedman <eli.friedman@gmail.com> If we recognize alloca, treat it as a builtin. This fixes uses of
alloca without declaring it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72719 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
b52fe9ce99970955a5f581f5c66fcd89be9a268b 02-Jun-2009 Eli Friedman <eli.friedman@gmail.com> If we recognize alloca, treat it as a builtin. This fixes uses of
alloca without declaring it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72719 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
0ceca87a412419986679c121168150d1956fd9bd 01-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> A corner case of objc2 gc's write-barrier generation
for the Next runtime.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72703 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
102e390bcb5a1fb1a8fdbc8505e6dfd905374bbd 01-Jun-2009 Fariborz Jahanian <fjahanian@apple.com> A corner case of objc2 gc's write-barrier generation
for the Next runtime.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72703 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
1a0347444c55df05fc5dba302cdfdbf941b625b7 01-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4289: Make sure "&func" has the right LLVM type when "func" is a
K&R-style definition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72690 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
3fbc473e1e76ead199c7333bdbf02dfa1c7dc420 01-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4289: Make sure "&func" has the right LLVM type when "func" is a
K&R-style definition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72690 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
26910f614fdae0874d0fe0d24f701bd7adac5ff3 01-Jun-2009 Anders Carlsson <andersca@mac.com> Fix a thinko.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72679 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
215bd208d6eeff397bc4316d046ea8b4633efedf 01-Jun-2009 Anders Carlsson <andersca@mac.com> Fix a thinko.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72679 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
dbee9a59d42afee7bd7dac23495d6011fc7964f5 01-Jun-2009 Anders Carlsson <andersca@mac.com> Check for null correctly for new expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72678 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
f11085398dc27c0010663c711d4a10113e41d70f 01-Jun-2009 Anders Carlsson <andersca@mac.com> Check for null correctly for new expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72678 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
11269048f03d91e991150c429dc874ae3999acb0 31-May-2009 Anders Carlsson <andersca@mac.com> Improve irgen of 'new' further.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72677 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
d3fd6bad1249d3f34d71b73e2333fab0db51cce4 31-May-2009 Anders Carlsson <andersca@mac.com> Improve irgen of 'new' further.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72677 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
eb39b43e5ed8a92e3c3a7c3ac29b802b41a300e6 31-May-2009 Anders Carlsson <andersca@mac.com> ...and aggregate POD types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72676 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
627a3e573f1d9f0429d62c7ceb742a21cdabfce0 31-May-2009 Anders Carlsson <andersca@mac.com> ...and aggregate POD types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72676 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
5f93ccfe8b59545305e6fab34cccac4086c8e105 31-May-2009 Anders Carlsson <andersca@mac.com> Support for complex types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72675 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
3923e95280210ef877153f0c3dbab12d6ed2ad43 31-May-2009 Anders Carlsson <andersca@mac.com> Support for complex types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72675 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
7c29478ad5901c6c62031c5212021305f31ac6d5 31-May-2009 Anders Carlsson <andersca@mac.com> Better support for scalar POD types in 'new' expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72674 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
6d0ffad181215fc4ec0fca37c55eae82df6e0531 31-May-2009 Anders Carlsson <andersca@mac.com> Better support for scalar POD types in 'new' expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72674 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
d553697c4ec53bdafccea146b33257e5fbc50d5c 31-May-2009 Anders Carlsson <andersca@mac.com> Very basic irgen support for new expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72672 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
ed4e367f8e27d2c700efdaff9412f2bf83ddba00 31-May-2009 Anders Carlsson <andersca@mac.com> Very basic irgen support for new expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72672 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
4bf5bbe50532446643d04a716c8a0ea1f7e9d09f 31-May-2009 Anders Carlsson <andersca@mac.com> Don't try to call getFileCharacteristic if the function declaration has an invalid source location (as is the case for the global allocation functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72671 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
8c49911e6e52f490dcef7eb181f29cc95be8ba36 31-May-2009 Anders Carlsson <andersca@mac.com> Don't try to call getFileCharacteristic if the function declaration has an invalid source location (as is the case for the global allocation functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72671 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
18e88bc9b804003d6e3c7276e07a7094bca88aa1 31-May-2009 Anders Carlsson <andersca@mac.com> Add a new function for emitting new functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72656 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprScalar.cpp
odeGenFunction.h
a00703dccbdc6cc4a293db38477dea7db5538c7e 31-May-2009 Anders Carlsson <andersca@mac.com> Add a new function for emitting new functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72656 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprScalar.cpp
odeGenFunction.h
7fa1db82d096c515690d768b640a02f5c4c93830 31-May-2009 Anders Carlsson <andersca@mac.com> Emit destructors correctly for temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72655 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
543ac0c4d24a81fb2b7b6e83370aa8e4cbc93054 31-May-2009 Anders Carlsson <andersca@mac.com> Emit destructors correctly for temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72655 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
93690d6bbd22b36993b75d356b46cb278473d9b2 31-May-2009 Anders Carlsson <andersca@mac.com> When possible, don't emit the cleanup block. Instead, just move the instructions to the current block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72654 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
eb6437a9b23b3d98a4590ba5557111e14eba2edf 31-May-2009 Anders Carlsson <andersca@mac.com> When possible, don't emit the cleanup block. Instead, just move the instructions to the current block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72654 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
80efe422c3022ca54eed8150b8d34adc72eeeb87 31-May-2009 Anders Carlsson <andersca@mac.com> Implement VisitCXXExprWithTemporaries for complex expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72653 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
4b76b4fa1a0225bb4113eb67c5dcdbe74a87ec6b 31-May-2009 Anders Carlsson <andersca@mac.com> Implement VisitCXXExprWithTemporaries for complex expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72653 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
d677560242c4278797f42af01755bd64e1daf318 31-May-2009 Anders Carlsson <andersca@mac.com> Call EmitCXXExprWithTemporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72652 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
3082463f4f387b725f4e4bf7d7b46269d445e4f5 31-May-2009 Anders Carlsson <andersca@mac.com> Call EmitCXXExprWithTemporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72652 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1e21d2ea26c9bf97f33ee3a90e0cfec7524416f4 31-May-2009 Anders Carlsson <andersca@mac.com> Add lvalue irgen support for CXXBindTemporaryExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72649 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
e61c9e80a108b5db7e5f0e702f0e455d737c6390 31-May-2009 Anders Carlsson <andersca@mac.com> Add lvalue irgen support for CXXBindTemporaryExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72649 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
2af296a2176809bd05835e215f5eac1b57896ee9 31-May-2009 Anders Carlsson <andersca@mac.com> More temporary support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72648 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
b58d017f2b9eeed33f2ab3ede968b89cf5296bf2 31-May-2009 Anders Carlsson <andersca@mac.com> More temporary support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72648 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
d8c8251c3d023650a9ebbdfe341328ada28e899e 30-May-2009 Eli Friedman <eli.friedman@gmail.com> Some small fixes for fields of reference type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72636 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
2be586108bb401019647791feca19ea03fd477ce 30-May-2009 Eli Friedman <eli.friedman@gmail.com> Some small fixes for fields of reference type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72636 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
7b7b25588fbcda3306d9725d863daed4f54699c2 30-May-2009 Anders Carlsson <andersca@mac.com> Remove VarDecl from CXXConstructExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72633 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
8e587a15da6d3457a418239d5eb4146fcbd209f3 30-May-2009 Anders Carlsson <andersca@mac.com> Remove VarDecl from CXXConstructExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72633 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
d3f6b1658df4f89167a2a6848c3a80c198d67844 29-May-2009 Anders Carlsson <andersca@mac.com> Add code for emitting C++ destructors. Not used yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72591 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
odeGenModule.cpp
7267c1693abe7875b0c57268be05005ae013c6c9 29-May-2009 Anders Carlsson <andersca@mac.com> Add code for emitting C++ destructors. Not used yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72591 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
odeGenModule.cpp
3bf3bbcb3cf79cc5bc065a011f5ae195667d3a29 29-May-2009 Douglas Gregor <doug.gregor@gmail.com> Create a new PrintingPolicy class, which we pass down through the AST
printing logic to help customize the output. For now, we use this
rather than a special flag to suppress the "struct" when printing
"struct X" and to print the Boolean type as "bool" in C++ but "_Bool"
in C.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72590 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d249e1d1f1498b81314459ceda19d6ff25c278ad 29-May-2009 Douglas Gregor <dgregor@apple.com> Create a new PrintingPolicy class, which we pass down through the AST
printing logic to help customize the output. For now, we use this
rather than a special flag to suppress the "struct" when printing
"struct X" and to print the Boolean type as "bool" in C++ but "_Bool"
in C.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72590 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
16444cf66ffe4da578ca7245eccd943d2e0b2ee8 29-May-2009 Eli Friedman <eli.friedman@gmail.com> Re-add a slightly more general version of the check from r72578; it is
actually necessary in some obscure cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72585 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
bdad6b69f1214fb20116795f8e8cbf881e3017c6 29-May-2009 Eli Friedman <eli.friedman@gmail.com> Re-add a slightly more general version of the check from r72578; it is
actually necessary in some obscure cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72585 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
dfc0f1439df04317c5d202ca03895266bb795f70 29-May-2009 Mike Stump <mrs@apple.com> Oops, the testcase I was thinking of is supposed to error out. I
tried other things that might trip, but they all worked.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72584 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
c9bb1b8e4e6d46ce6c9691dc72757f2a8f71b57b 29-May-2009 Mike Stump <mrs@apple.com> Oops, the testcase I was thinking of is supposed to error out. I
tried other things that might trip, but they all worked.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72584 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
ad59de718b64fe4f7a8eb367e2492b40b1d42665 29-May-2009 Mike Stump <mrs@apple.com> Fixup codegen for composition of vla types using a normal array type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72578 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
8ebefded18aa3c83b6b4ce3713060c94432f9859 29-May-2009 Mike Stump <mrs@apple.com> Fixup codegen for composition of vla types using a normal array type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72578 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
b8fc73ed5b8bb45e36acdd4d31167650da8db889 29-May-2009 Mike Stump <mrs@apple.com> Fixup the rest of the trivial cases of the codegen of volatile. If
any body can spot codegen bugs with volatile, or knows of any in the
bug database, let me know.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72572 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
7f79f9be5916c51c35da4f126b7c12596a101607 29-May-2009 Mike Stump <mrs@apple.com> Fixup the rest of the trivial cases of the codegen of volatile. If
any body can spot codegen bugs with volatile, or knows of any in the
bug database, let me know.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72572 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
26dd2d30bfe6a2d2b7b8a616971e927ab6f1bf42 29-May-2009 Eli Friedman <eli.friedman@gmail.com> PR4281: Fix bogus CodeGen assertion. The issue is that
getUnqualifiedType() doesn't strip off all qualifiers for non-canonical
types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72552 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
2dce5f8a99b5c48f1287ff3941288ca6f7fde2de 29-May-2009 Eli Friedman <eli.friedman@gmail.com> PR4281: Fix bogus CodeGen assertion. The issue is that
getUnqualifiedType() doesn't strip off all qualifiers for non-canonical
types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72552 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
5512ba7015ad987b88f882bf493a411f5326be16 28-May-2009 Mike Stump <mrs@apple.com> Not setting all the fields is confusing...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72506 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
6b73568bc3d44ac6e6d62437cba0e307cf8900d6 28-May-2009 Mike Stump <mrs@apple.com> Not setting all the fields is confusing...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72506 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
79c2286487c0faa5da9dbea0f67e591f1bd0928b 28-May-2009 Daniel Dunbar <daniel@zuster.org> Fix a use-of-undefined, IRgen expects the RValue for "void" to be a scalar RValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72504 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
eb4f81e174b11633f7b85f555ea5d2834d6dae8a 28-May-2009 Daniel Dunbar <daniel@zuster.org> Fix a use-of-undefined, IRgen expects the RValue for "void" to be a scalar RValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72504 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
7f85b4868e3cd45fbb033d60f9a6fd5687dcc88a 27-May-2009 Fariborz Jahanian <fjahanian@apple.com> No write-barrier for initializations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72492 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
14674ffb81dccbc4e1bf78ab5b7987685819b445 27-May-2009 Fariborz Jahanian <fjahanian@apple.com> No write-barrier for initializations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72492 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
2de7d7be72f8ce51475dbe91ff7f9368b751eda7 27-May-2009 Fariborz Jahanian <fjahanian@apple.com> Change a confusing variable name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72491 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
529677703214454e85c9089440c1c77200c53772 27-May-2009 Fariborz Jahanian <fjahanian@apple.com> Change a confusing variable name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72491 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
eb3bd049a5890ca3117f0818213e2470f62635e1 27-May-2009 Anders Carlsson <andersca@mac.com> IRgen support for calls to functions that return references to aggregate exressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72479 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
e70e8f7fef3efb3d526ee25b3a0e2a4bf67a04b6 27-May-2009 Anders Carlsson <andersca@mac.com> IRgen support for calls to functions that return references to aggregate exressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72479 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
c0a35bfe68a646414c3556a2b19b8d2a5b00ffaf 27-May-2009 Eli Friedman <eli.friedman@gmail.com> Fix up constant expression handling to deal with the address
of a reference correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72463 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
50c39ea4858265f3f5f42a0c624557ce2281936b 27-May-2009 Eli Friedman <eli.friedman@gmail.com> Fix up constant expression handling to deal with the address
of a reference correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72463 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
6dcfe82393856753822a744d8c1578efcd14b772 27-May-2009 Eli Friedman <eli.friedman@gmail.com> Add IRGen support for local variables of reference type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72462 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
4a18784dea763be146df68546e6dbf4233c33077 27-May-2009 Eli Friedman <eli.friedman@gmail.com> Add IRGen support for local variables of reference type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72462 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
63802a04ca47c71ff76662ab3fed247508f5293f 27-May-2009 Eli Friedman <eli.friedman@gmail.com> Add IRGen support for return statements in functions with reference
type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72459 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
d54b6ac2f4f6f0bd0076cbfa885b57277066f06c 27-May-2009 Eli Friedman <eli.friedman@gmail.com> Add IRGen support for return statements in functions with reference
type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72459 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
85eca6fe07ae3f965847fc38f94cadf05db552a7 27-May-2009 Anders Carlsson <andersca@mac.com> Handle operator call expressions where the callee is a member function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72458 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
odeGenFunction.h
0f294632f36459174199b77699e339715244b5ab 27-May-2009 Anders Carlsson <andersca@mac.com> Handle operator call expressions where the callee is a member function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72458 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
odeGenFunction.h
cd2952883e1f80fe6d722ea0f0612221c9b37847 27-May-2009 Anders Carlsson <andersca@mac.com> Functions that return references can be rvalues as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72457 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
GExprScalar.cpp
e9f2f45fe9bf79bd4aea47fa1ad9204b68510fd9 27-May-2009 Anders Carlsson <andersca@mac.com> Functions that return references can be rvalues as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72457 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
GExprScalar.cpp
e4553d3d5cf48959e6d23779900638fc4982a07a 27-May-2009 Anders Carlsson <andersca@mac.com> Add support for emitting calls to functions that return references (as lvalues only for now)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72449 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
482656833a71b63f67f3e93ee8c2d45b3d351ca8 27-May-2009 Anders Carlsson <andersca@mac.com> Add support for emitting calls to functions that return references (as lvalues only for now)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72449 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
c58c15a059989cf2724e73f3ee17495ccb05db8a 27-May-2009 Mike Stump <mrs@apple.com> Fix typo. I also fixed the hard to read case differences, so that no
one else is tempted to copy the style, incorrectly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72448 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
ff4bf3bd6174f6a02da4ee2efc6064c005295d44 27-May-2009 Mike Stump <mrs@apple.com> Fix typo. I also fixed the hard to read case differences, so that no
one else is tempted to copy the style, incorrectly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72448 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
c86484384793c5ef3d66990884c5cf3e7b137a64 27-May-2009 Anders Carlsson <andersca@mac.com> Rename an EmitCallExpr function to EmitCall to make it clear that it doesn't emit an expr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72446 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
odeGenFunction.h
986477149db76e6d9f8d3c9859c9880c11b680ae 27-May-2009 Anders Carlsson <andersca@mac.com> Rename an EmitCallExpr function to EmitCall to make it clear that it doesn't emit an expr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72446 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
odeGenFunction.h
b27442c54b4b48d8b519709c7d683349bd2c71dd 27-May-2009 Mike Stump <mrs@apple.com> Fixup codegen for volatile structs in the trivial cases (a a=a and a=a=a).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72439 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GStmt.cpp
odeGenFunction.h
49d1cd5a09ed3df353371fd7f206674a85e0fb45 27-May-2009 Mike Stump <mrs@apple.com> Fixup codegen for volatile structs in the trivial cases (a a=a and a=a=a).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72439 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GStmt.cpp
odeGenFunction.h
373486d9c9a27dca9a339732f4781d53dbd39f40 26-May-2009 Daniel Dunbar <daniel@zuster.org> Use .data() instead of &...[0].
- Just SmallVectors this time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72432 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ca308dfd9b2ded10458b95a980b0674896867ebb 26-May-2009 Daniel Dunbar <daniel@zuster.org> Use .data() instead of &...[0].
- Just SmallVectors this time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72432 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3541e8413baa74a7e245bdce21b0bfbe0a978adf 26-May-2009 Mike Stump <mrs@apple.com> Esnure that if we have a volatile structure as the destination, that
we actually have a destination.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72429 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
e1129a92b25f9b05f1b97fdd81d38ea451875414 26-May-2009 Mike Stump <mrs@apple.com> Esnure that if we have a volatile structure as the destination, that
we actually have a destination.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72429 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
1caef75724d068376ebc1b00669071829517b94b 26-May-2009 Daniel Dunbar <daniel@zuster.org> When trying to pass an argument on the stack, assume LLVM will do the right
thing for non-aggregate types.
- Otherwise we unnecessarily pin values to the stack and currently end up
triggering a backend bug in one case.

- This loose cooperation with LLVM to implement the ABI is pretty ugly.

- <rdar://problem/6918722> [irgen] clang miscompile of many pointer varargs on
x86-64


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72419 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
86e13eeb65397f7b64173523a40c742b2702364b 26-May-2009 Daniel Dunbar <daniel@zuster.org> When trying to pass an argument on the stack, assume LLVM will do the right
thing for non-aggregate types.
- Otherwise we unnecessarily pin values to the stack and currently end up
triggering a backend bug in one case.

- This loose cooperation with LLVM to implement the ABI is pretty ugly.

- <rdar://problem/6918722> [irgen] clang miscompile of many pointer varargs on
x86-64


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72419 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ce8807a8fc118fc993fb3b2f7419131b04a34ae1 26-May-2009 Eli Friedman <eli.friedman@gmail.com> Handle the edge case of a weak function with incomplete type correctly.
Found by code inspection; I haven't seen this in real-world code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72408 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
c6c14d1cd68afcd90d097715296377f15be45210 26-May-2009 Eli Friedman <eli.friedman@gmail.com> Handle the edge case of a weak function with incomplete type correctly.
Found by code inspection; I haven't seen this in real-world code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72408 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
2a936c7282eb36a9c77eaa14eee61ccccb556427 24-May-2009 Mike Stump <mrs@apple.com> Propagate volatile for implicit property refernces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72353 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
a49af1a4283bfeda1f418a03fd6af04bab79551d 24-May-2009 Mike Stump <mrs@apple.com> Propagate volatile for implicit property refernces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72353 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
5f507fb41af19524e0e913ec3fdadb7c254b9f99 24-May-2009 Mike Stump <mrs@apple.com> Propagate volatile around for property references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72352 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
240993d17d2b51c78d52df8743bdee4177960341 24-May-2009 Mike Stump <mrs@apple.com> Propagate volatile around for property references.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72352 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
577d031cf1d923f6b3b7f43e44505a8642d32e4a 24-May-2009 Mike Stump <mrs@apple.com> Track volatile aggregate copies better. I'm hoping someone else will decide
how to get the backend to know that the operation is volatile.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72348 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenFunction.h
27fe2e6c97a3782a0639d87b460741e8ba5d076d 24-May-2009 Mike Stump <mrs@apple.com> Track volatile aggregate copies better. I'm hoping someone else will decide
how to get the backend to know that the operation is volatile.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72348 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenFunction.h
aa5083e08e416673c40f6120ff719adf48357432 24-May-2009 Mike Stump <mrs@apple.com> Fix thinko, and implement aggregate volatile reads.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72347 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
9ccb103c6f777fc42343b23b19a8c2c9a740e6e8 24-May-2009 Mike Stump <mrs@apple.com> Fix thinko, and implement aggregate volatile reads.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72347 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
a8bac0223fc8cea48efeaa2cd89dc5d6d4ee93ad 23-May-2009 Mike Stump <mrs@apple.com> More volatile fixes. Can't testcase these yet as ultimately volatile
is still ignored.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72344 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
f1b97f28a53ee09fa2bc38790d964cda3811bdc6 23-May-2009 Mike Stump <mrs@apple.com> More volatile fixes. Can't testcase these yet as ultimately volatile
is still ignored.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72344 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
8e06e03ebce3d642baa4fb39285325284e0f1181 23-May-2009 Mike Stump <mrs@apple.com> Collapse a few FIXMEs together and refactor to make fixing the code easier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72342 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
4ac20ddc7ab324a59862657f756bdd060076b137 23-May-2009 Mike Stump <mrs@apple.com> Collapse a few FIXMEs together and refactor to make fixing the code easier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72342 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
1d694e72a0e3e5c38f1201d389eeb482bf877392 23-May-2009 Mike Stump <mrs@apple.com> Add support for volatile RValues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72341 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
8b3d93a5947981baa1fc21ad3a6e1220aa953e00 23-May-2009 Mike Stump <mrs@apple.com> Add support for volatile RValues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72341 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
b491f80ae71412d423950053351f26669c94ba2d 23-May-2009 Mike Stump <mrs@apple.com> One step to fixing up codegen for a=b, where a is a volatile struct.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72315 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
fde6420cb9142f7f4efe5ec69a216295d83bcda4 23-May-2009 Mike Stump <mrs@apple.com> One step to fixing up codegen for a=b, where a is a volatile struct.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72315 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
8c405781b77a1fd3e0361b42c332849851290ebe 23-May-2009 Daniel Dunbar <daniel@zuster.org> Initialize Obj-C GC attributes when emitting BlockDeclRefExprs.
- Otherwise we may incorrectly miss generation of some write barriers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72313 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
e226534b06dc18a50deae0a1b5221984e7911137 23-May-2009 Daniel Dunbar <daniel@zuster.org> Initialize Obj-C GC attributes when emitting BlockDeclRefExprs.
- Otherwise we may incorrectly miss generation of some write barriers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72313 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
550bba96a8786354794ac0f05ba4301fd2dcafb8 23-May-2009 Mike Stump <mrs@apple.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72308 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
7d74963b97517a74141a9ea475b2d23e9c93d1f1 23-May-2009 Mike Stump <mrs@apple.com> Fix typo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72308 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
fefd5e89c5144fec7fdaff9c2c50f3237879261d 22-May-2009 Fariborz Jahanian <fjahanian@apple.com> This patch adds support for sender-aware dispatch in Objective-C for the GNU runtime, when
compiled with -fobjc-sender-dependent-dispatch. This is used in AOP, COP, implementing object
planes, and a few other things.
Patch by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72275 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
34e65770ad6142b033d6cec4f476ed20fb248bf3 22-May-2009 Fariborz Jahanian <fjahanian@apple.com> This patch adds support for sender-aware dispatch in Objective-C for the GNU runtime, when
compiled with -fobjc-sender-dependent-dispatch. This is used in AOP, COP, implementing object
planes, and a few other things.
Patch by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72275 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
8d9622607584fa3d5bf2fe407079546acf19752d 22-May-2009 Mike Stump <mrs@apple.com> Fixup codegen for __block int i; i += rhs();. Should also slightly
improve codegen in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72273 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
cc0442fa28e5d1f403f820dcdee49911c3e622a9 22-May-2009 Mike Stump <mrs@apple.com> Fixup codegen for __block int i; i += rhs();. Should also slightly
improve codegen in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72273 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1f84f59d3e213196e6ac4fccc918d401919e8bb4 22-May-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Account for sret parameters consuming an integer register.
- PR4242.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72268 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
3a5f5c57e0a262207f7cb721a60df3676ab5209f 22-May-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Account for sret parameters consuming an integer register.
- PR4242.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72268 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
2958e3f7d666440a9326df60cce9d5bb9067fd91 22-May-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Targets like PIC16 generate Static decls for automatic variables, emit the appropriate debug descriptor as well in that case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72261 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
4381d4b83cdab592dbda85c54672dbe06de5b1d9 22-May-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Targets like PIC16 generate Static decls for automatic variables, emit the appropriate debug descriptor as well in that case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72261 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
afed968fa7f4cfe766dcf036325afd260824ad2f 22-May-2009 Edwin Török <edwintorok@gmail.com> Set correct calling convention even if there is a bitcast in the way.
This attempts to fix PR4239.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72251 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
6857d9d43b082ae825c29cca80f2f6b7c3aa4e5f 22-May-2009 Torok Edwin <edwintorok@gmail.com> Set correct calling convention even if there is a bitcast in the way.
This attempts to fix PR4239.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72251 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
68df15c9bf2acaf076a7159c15e3e6a13e9a4f01 21-May-2009 Mike Stump <mrs@apple.com> Fixup blocks codegen for { __block i; i = rhs(); }, we want the rhs
evaluated first. This can also improve codegen just a bit as we might
have another register to play with for the evaluation of the rhs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72226 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
99459b67daa0a49af7c5e5e93324f6ca815c0e6a 21-May-2009 Mike Stump <mrs@apple.com> Fixup blocks codegen for { __block i; i = rhs(); }, we want the rhs
evaluated first. This can also improve codegen just a bit as we might
have another register to play with for the evaluation of the rhs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72226 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
9e6bef4fb5efb19c7286fa24d8aedab9c3d625fc 21-May-2009 Jay Foad <jay.foad@gmail.com> Use v.data() instead of &v[0] when SmallVector v might be empty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72210 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCall.cpp
GDebugInfo.cpp
GStmt.cpp
beaaccd8e2a8748f77b66e2b330fb9136937e14c 21-May-2009 Jay Foad <jay.foad@gmail.com> Use v.data() instead of &v[0] when SmallVector v might be empty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72210 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCall.cpp
GDebugInfo.cpp
GStmt.cpp
86503958e173c8f900115efd03272f90942510a6 21-May-2009 Fariborz Jahanian <fjahanian@apple.com> Minor refactoring. Uses an existing API to lookup a class method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72203 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ecfbdcbaf71609ab99cdebbf2d704173070dbaf3 21-May-2009 Fariborz Jahanian <fjahanian@apple.com> Minor refactoring. Uses an existing API to lookup a class method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72203 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f25adf1bc9bc723ca025d59f59450afa4b2df101 20-May-2009 Fariborz Jahanian <fjahanian@apple.com> This patch provides preliminary support for non-fragile instance variables on the GNU runtime.
It currently requires a patches to GNU libobjc (and so is not enabled by default) which are currently
being tested and reviewed by GNUstep before being pushed upstream.
This patch does not allow support for synthesized ivars, but does provide the infrastructure
needed for supporting them.
Patch by David Chisnall



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72175 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
9cd96ff7dfcb51fdba03df8803fff6cc36e9633f 20-May-2009 Fariborz Jahanian <fjahanian@apple.com> This patch provides preliminary support for non-fragile instance variables on the GNU runtime.
It currently requires a patches to GNU libobjc (and so is not enabled by default) which are currently
being tested and reviewed by GNUstep before being pushed upstream.
This patch does not allow support for synthesized ivars, but does provide the infrastructure
needed for supporting them.
Patch by David Chisnall



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72175 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
58fd6857e0938a868946a8ab87b385936fa644d5 20-May-2009 Eli Friedman <eli.friedman@gmail.com> Handle the remaining unhandled cases in EmitReferenceBindingToExpr.

It would be nice if someone could write an ObjC++ testcase for the case
of passing a property returning a struct to a function taking a const
reference.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72159 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
5df0d426026b3820b5f0b13a8d4e60e9373d8d9d 20-May-2009 Eli Friedman <eli.friedman@gmail.com> Handle the remaining unhandled cases in EmitReferenceBindingToExpr.

It would be nice if someone could write an ObjC++ testcase for the case
of passing a property returning a struct to a function taking a const
reference.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72159 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
f4f0737d7771767ae2f55d88350aac4056829906 20-May-2009 Anders Carlsson <andersca@mac.com> irgen for references to complex rvales (Very important...)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72157 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
7cd3a648b3d3057805c022b9470bbdfe21d732a5 20-May-2009 Anders Carlsson <andersca@mac.com> irgen for references to complex rvales (Very important...)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72157 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
110536d7d0a3f15ce50fb93800718d9311a42cf7 20-May-2009 Anders Carlsson <andersca@mac.com> Create a temporary if the lvalue is a bitfield. Reported by Eli.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72155 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
38d068e8f13a119b89a3b8b0f79f35cab1ffd09a 20-May-2009 Anders Carlsson <andersca@mac.com> Create a temporary if the lvalue is a bitfield. Reported by Eli.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72155 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
0c0f744898a79633af82480c3fa7117b9c142beb 20-May-2009 Anders Carlsson <andersca@mac.com> Add support for binding references to scalar rvalues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72153 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
e04d1c77ae15a6e973e2fac7723f6c364884f58d 20-May-2009 Anders Carlsson <andersca@mac.com> Add support for binding references to scalar rvalues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72153 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
23ea02a2aa2e60ea34b3b8accf1b839d63293b15 20-May-2009 Anders Carlsson <andersca@mac.com> Bind references to lvalues correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72150 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4bbab92167713bf4f79c0b14dcc4e83d08ac4019 20-May-2009 Anders Carlsson <andersca@mac.com> Bind references to lvalues correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72150 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
de55abcad957d86eccd767d83fe0bd5159b08d6a 20-May-2009 Anders Carlsson <andersca@mac.com> Add EmitReferenceBindingToExpr. Have EmitCallArg use it for now. Doesn't support anything but at least we don't crash ;)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72147 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCall.cpp
GExpr.cpp
odeGenFunction.h
4029ca7ae9d3ffd7738fe2ed8782bebc30f36fd6 20-May-2009 Anders Carlsson <andersca@mac.com> Add EmitReferenceBindingToExpr. Have EmitCallArg use it for now. Doesn't support anything but at least we don't crash ;)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72147 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GCall.cpp
GExpr.cpp
odeGenFunction.h
474a2a90ab8bcd425ba4a02a41e06205c275cd45 19-May-2009 Anders Carlsson <andersca@mac.com> Improve support for irgen of references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72133 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
c8667a866bfc1d9f807282f2de5644d6aa4e9423 19-May-2009 Anders Carlsson <andersca@mac.com> Improve support for irgen of references.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72133 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
2078609734b8e1a92c7351b3522844bcae17cad7 19-May-2009 Anders Carlsson <andersca@mac.com> Only do the bitcast in EmitStoreOfScalar if the type is a boolean.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72125 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
3bb423bb7f809c9182be3ba79adfbb38854afa64 19-May-2009 Anders Carlsson <andersca@mac.com> Only do the bitcast in EmitStoreOfScalar if the type is a boolean.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72125 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
05dfa99ec06e87101e1d71843850fad23e32fec2 19-May-2009 Anders Carlsson <andersca@mac.com> Pass the destination QualType to EmitStoreOfScalar. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72118 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDecl.cpp
GExpr.cpp
odeGenFunction.h
b4aa4664ec851573624a7a29c6c750fc1d5cc268 19-May-2009 Anders Carlsson <andersca@mac.com> Pass the destination QualType to EmitStoreOfScalar. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72118 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDecl.cpp
GExpr.cpp
odeGenFunction.h
62943f38aa7bd972548c11b0cba72a38278f9ba3 19-May-2009 Anders Carlsson <andersca@mac.com> Don't always zext the result of the not unary operator to an int.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72117 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
9f84d88a302ea38cf0695ce8cdace47178d2fff4 19-May-2009 Anders Carlsson <andersca@mac.com> Don't always zext the result of the not unary operator to an int.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72117 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
272b5f53612db4fa191ce6a78e5c6b3e0b4130d6 19-May-2009 Anders Carlsson <andersca@mac.com> Have AggExprEmitter::VisitCXXConstructExpr make new variables if necessary. Stub out VisitCXXExprWithTemporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72103 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprScalar.cpp
7f6ad153565245026c7569314f65a4d4ff4ac41f 19-May-2009 Anders Carlsson <andersca@mac.com> Have AggExprEmitter::VisitCXXConstructExpr make new variables if necessary. Stub out VisitCXXExprWithTemporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72103 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprScalar.cpp
9b5cc704fd0e659797c3199876b7ff033da1b57b 19-May-2009 Eli Friedman <eli.friedman@gmail.com> Clean up some unnecessary includes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72101 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ac8d6298a8ae9276412d8c054957dfa65a69eb14 19-May-2009 Eli Friedman <eli.friedman@gmail.com> Clean up some unnecessary includes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72101 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
de629b6e6c310004587bc8292a226f90df5c77f9 19-May-2009 Fariborz Jahanian <fjahanian@apple.com> This patch allows clang to generate code for declared properties on the GNU runtime. As with @synchronized, this requires some extra functions that are included with other libraries (not with the GNU runtime itself) and so will cause linker errors when these are not present.
Patch by David Chisnall.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72079 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
cb9dad0393a000bea87370c4d12faf3667ed22e5 19-May-2009 Fariborz Jahanian <fjahanian@apple.com> This patch allows clang to generate code for declared properties on the GNU runtime. As with @synchronized, this requires some extra functions that are included with other libraries (not with the GNU runtime itself) and so will cause linker errors when these are not present.
Patch by David Chisnall.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72079 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
32ec33d39e0d0de31ddc6fb132e7563ad2566543 18-May-2009 Daniel Dunbar <daniel@zuster.org> Debug info: Initialize runtime language field correctly for Objective-C
interface types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72036 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d86d3361924a89d6c67ddbb3a2307af4008889ab 18-May-2009 Daniel Dunbar <daniel@zuster.org> Debug info: Initialize runtime language field correctly for Objective-C
interface types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72036 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2dfa87acdb71a941656b0c86446374df67136535 18-May-2009 Anders Carlsson <andersca@mac.com> Since we miscompile many cases when declaring a variable with a reference type, make them unsupported for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72034 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
cc0e354c92dd1713d7d8f041a8c4e0ca77c1c31b 18-May-2009 Anders Carlsson <andersca@mac.com> Since we miscompile many cases when declaring a variable with a reference type, make them unsupported for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72034 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
2c82f46840555ba0ced3abaa22d526b6a2c5a2d7 18-May-2009 Anders Carlsson <andersca@mac.com> Remove an unused builtin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72033 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
409bf46742e2f38b2f4cec53c86b109bed42840d 18-May-2009 Anders Carlsson <andersca@mac.com> Remove an unused builtin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72033 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
d657fd86fc1c4de8e7ca9f2670796f3713c1c1be 18-May-2009 Anders Carlsson <andersca@mac.com> Add 'cmp' SSE builtins and get rid of a bunch of other builtins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72032 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
79dcf5f96ad75259867d19bbf69512f320032fce 18-May-2009 Anders Carlsson <andersca@mac.com> Add 'cmp' SSE builtins and get rid of a bunch of other builtins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72032 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
0b17ef40fffedbccd02dabb1cf535e59d9001c4e 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
odeGenTypes.cpp
angle.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
odeGenTypes.cpp
angle.cpp
f3ab5648fe53eadb3e21e711b12bc815d5426572 17-May-2009 Fariborz Jahanian <fjahanian@apple.com> This patch fixes two bugs in the GNU Objective-C runtime implementation. One is a case in rethrowing exceptions where the C types don't match correctly (I already sent this patch to Daniel Dunbar, who found the bug, so it may have already been committed). The other fixes the case properties so that the methods generated as property accessors are added to the class structure correctly.
Patch by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71980 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
1e64a9531bf6e9d99ad3271b3a735ef702689b06 17-May-2009 Fariborz Jahanian <fjahanian@apple.com> This patch fixes two bugs in the GNU Objective-C runtime implementation. One is a case in rethrowing exceptions where the C types don't match correctly (I already sent this patch to Daniel Dunbar, who found the bug, so it may have already been committed). The other fixes the case properties so that the methods generated as property accessors are added to the class structure correctly.
Patch by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71980 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
ee755f748df86c3547b056c2dc0b4f439a9bfb6d 16-May-2009 Anders Carlsson <andersca@mac.com> extern "C" should preserve the 'extern' qualifier for VarDecls. Fixes 6853728.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71957 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2928c2107f2e0007f35fe1c224aab63535f1403d 16-May-2009 Anders Carlsson <andersca@mac.com> extern "C" should preserve the 'extern' qualifier for VarDecls. Fixes 6853728.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71957 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ba2cb0edf6c9e05b8919e91f2a51e93bb61829c6 16-May-2009 Mike Stump <mrs@apple.com> Reflow some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71937 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GCall.cpp
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GObjC.cpp
GObjCMac.cpp
GObjCRuntime.h
GValue.h
odeGenFunction.cpp
odeGenModule.cpp
angle.cpp
f5408fe484495ee4efbdd709c8a2c2fdbbbdb328 16-May-2009 Mike Stump <mrs@apple.com> Reflow some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71937 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GCall.cpp
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
GObjC.cpp
GObjCMac.cpp
GObjCRuntime.h
GValue.h
odeGenFunction.cpp
odeGenModule.cpp
angle.cpp
1dd092b925af7113ad7a3858f23289e10de44340 16-May-2009 Daniel Dunbar <daniel@zuster.org> Classes with "+load" methods need to go in the non-lazy class list (or
else the method will not be found by the runtime at class load time).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71904 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
74d4b127d9f924ad354f47012e0d0e42ab1ee32b 16-May-2009 Daniel Dunbar <daniel@zuster.org> Classes with "+load" methods need to go in the non-lazy class list (or
else the method will not be found by the runtime at class load time).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71904 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
57d4e11f6a967e56144094f3fbf770ff7897361b 15-May-2009 Daniel Dunbar <daniel@zuster.org> Factor code for adding module-level class lists into separate method.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71898 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
463b87687346d3990a9854382abfb41810f0678a 15-May-2009 Daniel Dunbar <daniel@zuster.org> Factor code for adding module-level class lists into separate method.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71898 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
997e36d383573b6173426696b85bf996f1485946 15-May-2009 Anders Carlsson <andersca@mac.com> A C++ member function always has either weak linkage (if it's inline or defined inline) or strong linkage (other cases).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71873 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
167b824ce1947bf71ec8a71296daa2c54ebe58df 15-May-2009 Anders Carlsson <andersca@mac.com> A C++ member function always has either weak linkage (if it's inline or defined inline) or strong linkage (other cases).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71873 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b1008e488a3d2d64a2f3eff5d805a784bf99c521 15-May-2009 Anders Carlsson <andersca@mac.com> Name mangling for class template specializations and template arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71861 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
7a0ba875a7dcee94ec74fa79b7f8a247d200a76c 15-May-2009 Anders Carlsson <andersca@mac.com> Name mangling for class template specializations and template arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71861 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
6cccfb699b734ae6ed11244275c6fd5832ab67b6 15-May-2009 Mike Stump <mrs@apple.com> Fixup debug information for the location information for __block
variables. For this to work, the backend needs to handle more complex
forms for locations.

A typical utterance would be:

%forwarding = getelementptr %0* %use_by_ref, i32 0, i32 1 ; <i8**> [#uses=1]
%0 = load i8** %forwarding ; <i8*> [#uses=1]
%1 = bitcast i8* %0 to %0* ; <%0*> [#uses=1]
%x = getelementptr %0* %1, i32 0, i32 4 ; <i32*> [#uses=1]
%2 = bitcast i32* %x to { }* ; <{ }*> [#uses=1]
call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable to { }*))

Presently when selection finds something it doesn't understand, it
just avoids generating any information, which is safe, just
incomplete. Radar 6867696


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71824 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
fd0e628aa8a1e3932445559cb1d950fee11ea9a9 15-May-2009 Mike Stump <mrs@apple.com> Fixup debug information for the location information for __block
variables. For this to work, the backend needs to handle more complex
forms for locations.

A typical utterance would be:

%forwarding = getelementptr %0* %use_by_ref, i32 0, i32 1 ; <i8**> [#uses=1]
%0 = load i8** %forwarding ; <i8*> [#uses=1]
%1 = bitcast i8* %0 to %0* ; <%0*> [#uses=1]
%x = getelementptr %0* %1, i32 0, i32 4 ; <i32*> [#uses=1]
%2 = bitcast i32* %x to { }* ; <{ }*> [#uses=1]
call void @llvm.dbg.declare({ }* %2, { }* bitcast (%llvm.dbg.variable.type* @llvm.dbg.variable to { }*))

Presently when selection finds something it doesn't understand, it
just avoids generating any information, which is safe, just
incomplete. Radar 6867696


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71824 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
a5bdb59eb328dbe8cbde4c67ddd8597e586b7ba6 14-May-2009 Daniel Dunbar <daniel@zuster.org> Skip the asm prefix when storing the name in block info.
- Otherwise we emit internal names with embedded '\01' characters,
which confuses some tools.

- Ideally all the code which wants to get a "display name" for the
given function should follow one code path, but this should be a
monotonic improvement for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71774 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.h
49f59ec45bf469c700603a656282cf86f1bce382 14-May-2009 Daniel Dunbar <daniel@zuster.org> Skip the asm prefix when storing the name in block info.
- Otherwise we emit internal names with embedded '\01' characters,
which confuses some tools.

- Ideally all the code which wants to get a "display name" for the
given function should follow one code path, but this should be a
monotonic improvement for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71774 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.h
5e996f2e1dcc916334c4fed71df0df1bfd601058 14-May-2009 Mike Stump <mrs@apple.com> Enhance debug information for block literals. Radar 6867696


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71763 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
9bc093c9309e04ebfff4123790405241513da1b4 14-May-2009 Mike Stump <mrs@apple.com> Enhance debug information for block literals. Radar 6867696


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71763 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
986a41b0b6b8380123656499db9dd578ed20c822 14-May-2009 Daniel Dunbar <daniel@zuster.org> We need to specify the "linkage name" to the subprogram now that we
emit the correct "display name". I suspect we need more work here, see
FIXME for example.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71761 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
bbd53af03e4c0d055a312521d97126cd86583c30 14-May-2009 Daniel Dunbar <daniel@zuster.org> We need to specify the "linkage name" to the subprogram now that we
emit the correct "display name". I suspect we need more work here, see
FIXME for example.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71761 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0f10100e2dbb4054154091e7d0937edaec922948 14-May-2009 Daniel Dunbar <daniel@zuster.org> Make sure not to include the LLVM asm prefix in function names for
debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71736 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a289393513d32f463a165a4b2990b11f5c6ab959 14-May-2009 Daniel Dunbar <daniel@zuster.org> Make sure not to include the LLVM asm prefix in function names for
debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71736 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9331792adc11a5520d9adfa188dc0f6291b93838 13-May-2009 Daniel Dunbar <daniel@zuster.org> ABI handling: Fix invalid assertion, it is possible for a valid
coercion to be specified which truncates padding bits. It would be
nice to still have the assert, but we don't have any API call for the
unpadding size of a type yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71695 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
7ef455be9beb7a755d815bfbdc38d55d1ce59b86 13-May-2009 Daniel Dunbar <daniel@zuster.org> ABI handling: Fix invalid assertion, it is possible for a valid
coercion to be specified which truncates padding bits. It would be
nice to still have the assert, but we don't have any API call for the
unpadding size of a type yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71695 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
4ec484bee6fde5bb3890c7a1f6713445c91dd51d 13-May-2009 Fariborz Jahanian <fjahanian@apple.com> Removed 4-letter :) word in comment.
Used simple array for Selector build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71674 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
be53be4551bacfe05ec93ca56d29990da0cc1db9 13-May-2009 Fariborz Jahanian <fjahanian@apple.com> Removed 4-letter :) word in comment.
Used simple array for Selector build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71674 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
019be8f8322dc47913e7d129957d35f982f74bfd 13-May-2009 Chris Lattner <sabre@nondot.org> implement __sync_synchronize and __sync_lock_release,
rdar://6880573


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71637 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
f58cd9bca9c2e7373300fc8bb7c57cff7e4eda4f 13-May-2009 Chris Lattner <sabre@nondot.org> implement __sync_synchronize and __sync_lock_release,
rdar://6880573


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71637 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
33615252c42257bacfeb8921bc8f648bd8271b0e 13-May-2009 Chris Lattner <sabre@nondot.org> add support for __sync_nand_and_fetch and __sync_fetch_and_nand,
rdar://6880573


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71636 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
eebd9d2165a705ce6a8a6b6a7327864189d02785 13-May-2009 Chris Lattner <sabre@nondot.org> add support for __sync_nand_and_fetch and __sync_fetch_and_nand,
rdar://6880573


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71636 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
98a8799ab6704a42e2b9defa7f7b4a3aa541f4b0 13-May-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6880259 - invalid function name in block call (__NSConcreteGlobalBlock2)
by using the appropriate CGM interface instead of directly creating a global.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71617 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
e2f79b6a4f9114738fe50ee30eb222945d914341 13-May-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6880259 - invalid function name in block call (__NSConcreteGlobalBlock2)
by using the appropriate CGM interface instead of directly creating a global.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71617 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
b7062339b0021492a67dbef64aa5a7579487c3f2 12-May-2009 Chris Lattner <sabre@nondot.org> implement l-value codegen of comma expr


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71595 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
7a574ccd5247189693e0764bf1f5711d33ca6064 12-May-2009 Chris Lattner <sabre@nondot.org> implement l-value codegen of comma expr


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71595 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
80f39cc46fe6a543cefe9fb2c4966ffb73418828 12-May-2009 Chris Lattner <sabre@nondot.org> push GlobalDecl through enough of the CodeGenModule interfaces
to allow us to support generation of deferred ctors/dtors.
It looks like codegen isn't emitting a call to the dtor in
member-functions.cpp:test2, but when it does, its body should
get emitted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71594 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDecl.cpp
GExpr.cpp
GExprConstant.cpp
odeGenModule.cpp
odeGenModule.h
b4880bab7fc1b61267cfd9a0ad52188e7a828cb3 12-May-2009 Chris Lattner <sabre@nondot.org> push GlobalDecl through enough of the CodeGenModule interfaces
to allow us to support generation of deferred ctors/dtors.
It looks like codegen isn't emitting a call to the dtor in
member-functions.cpp:test2, but when it does, its body should
get emitted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71594 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDecl.cpp
GExpr.cpp
GExprConstant.cpp
odeGenModule.cpp
odeGenModule.h
177abe556ee158dd8fdd879e3114ccf982271745 12-May-2009 Chris Lattner <sabre@nondot.org> add an initial stab at emitting deferred c++ inline functions. This handles static
functions and methods declared inline, but not ctors/dtors or methods not declared
inline (apparently my previous patch wasn't good enough).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71591 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
0c337ed63ff0f04fd8315afabb2d7a51969fdc97 12-May-2009 Chris Lattner <sabre@nondot.org> add an initial stab at emitting deferred c++ inline functions. This handles static
functions and methods declared inline, but not ctors/dtors or methods not declared
inline (apparently my previous patch wasn't good enough).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71591 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
514e7496f19c2444d57bbc2e159ab601fce22a76 12-May-2009 Chris Lattner <sabre@nondot.org> cleanups, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71590 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
9fa959d5bfbbb17d7c6ba71252219201fc8dc971 12-May-2009 Chris Lattner <sabre@nondot.org> cleanups, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71590 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d36c9d51be33c64bf80e827a5fdc7b672dd1375e 12-May-2009 Chris Lattner <sabre@nondot.org> static methods don't get this pointers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71586 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
3eb67ca786ef75bad43d30349c7334b921ba0dbc 12-May-2009 Chris Lattner <sabre@nondot.org> static methods don't get this pointers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71586 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
37488d4d5995feced27be263b356e725abf0adb3 12-May-2009 Chris Lattner <sabre@nondot.org> revert my previous patch, I committed the wrong file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71585 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
005eedce54da6580de37bb115bf581008637e4b1 12-May-2009 Chris Lattner <sabre@nondot.org> revert my previous patch, I committed the wrong file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71585 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
00dccec313d1794b10f9253e21824e38cee59cb8 12-May-2009 Chris Lattner <sabre@nondot.org> static methods don't get this pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71583 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
43ac9654d088a0e27599e5fa3df532d6de142f5e 12-May-2009 Chris Lattner <sabre@nondot.org> static methods don't get this pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71583 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
e142bf4669606a160b3f48c26f728a908f06c56c 12-May-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed typos, used DenseSet for keeping track of
selectors which need use Nonfrgile API for
message dispatch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71578 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
4523eb0fdfb1e003c3810951d9eb3dddcf08cc24 12-May-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed typos, used DenseSet for keeping track of
selectors which need use Nonfrgile API for
message dispatch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71578 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
02ebfa86912fe41b011d5898881704f2e842cb91 12-May-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to implement ivar synthesis of properties declared in protocols
only and used in class imllementations (objc2 Nonfragile ABI specific).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71571 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9820074dd47d37681085e964cd3392ac0b3e67b9 12-May-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to implement ivar synthesis of properties declared in protocols
only and used in class imllementations (objc2 Nonfragile ABI specific).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71571 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0e727131ccb64be31f8c5c67f8c25adc834d1155 12-May-2009 Daniel Dunbar <daniel@zuster.org> Darwin x86-32 ABI: Now that structure passing is farther along, we
don't need special treatment for unions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71559 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
836a0641ba4109b2c1254eec247ba4d2731bc2b7 12-May-2009 Daniel Dunbar <daniel@zuster.org> Darwin x86-32 ABI: Now that structure passing is farther along, we
don't need special treatment for unions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71559 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
647e30f17e8d2d3c8a70a354d9194ded7333adce 12-May-2009 Daniel Dunbar <daniel@zuster.org> x86-64 ABI: clang incorrectly passes union { long double, float } in
register.
- Merge algorithm was returning MEMORY as it should.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71556 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
20e95c5eb400c864bbd4421624fdf7b25ce70f56 12-May-2009 Daniel Dunbar <daniel@zuster.org> x86-64 ABI: clang incorrectly passes union { long double, float } in
register.
- Merge algorithm was returning MEMORY as it should.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71556 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
f91d9f27286427c8cd143b22a171209c17972c97 12-May-2009 Anders Carlsson <andersca@mac.com> Factor code that's common to EmitCXXMemberCallExpr and EmitCXXConstructorCall out into a EmitCXXMemberCall function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71514 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
b9de2c55b2a33776e2bee8ee57df7599b374c8a5 12-May-2009 Anders Carlsson <andersca@mac.com> Factor code that's common to EmitCXXMemberCallExpr and EmitCXXConstructorCall out into a EmitCXXMemberCall function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71514 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenFunction.h
46bf010fc298cf6e87483225f1e729afe1d77833 12-May-2009 Daniel Dunbar <daniel@zuster.org> Darwin x86-32: Multi-dimensional arrays were not handled correctly,
spotted by Eli!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71490 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
cc401dc651a91f53f9f9a39956732be8f537e7fa 12-May-2009 Daniel Dunbar <daniel@zuster.org> Darwin x86-32: Multi-dimensional arrays were not handled correctly,
spotted by Eli!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71490 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
5c76fd3619de827b30e635124bf2a8833354848e 11-May-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to allow Nonfragile ABI to use 32-bit style legacy
message dispage API for all but a few messages. This is
a runtime performance improvement and there is not meant
to be a functional change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71467 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d0f8a8d17082266c1e774ca07d58bcd4811b2681 11-May-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to allow Nonfragile ABI to use 32-bit style legacy
message dispage API for all but a few messages. This is
a runtime performance improvement and there is not meant
to be a functional change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71467 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
8ac59aeacf4eccb9e99c357d2570fa8f5aeae210 11-May-2009 Daniel Dunbar <daniel@zuster.org> Darwin x86_32: Treat records with unnamed bit-fields as "empty".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71461 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
573b907e8ba3b74fc69cddaf63496c7bb5994196 11-May-2009 Daniel Dunbar <daniel@zuster.org> Darwin x86_32: Treat records with unnamed bit-fields as "empty".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71461 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
5b56c191a72c2bbb79fe40b4764f95aea7ca44fd 11-May-2009 Chris Lattner <sabre@nondot.org> More improvements for GNU runtime objc EH, patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71451 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
d6a9907ceff2c52738a72e38b6a04ab44ce1173f 11-May-2009 Chris Lattner <sabre@nondot.org> More improvements for GNU runtime objc EH, patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71451 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
5d0ead717d57405b4a3b34a55b77579ea8b2774e 10-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement C++0x nullptr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71405 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
6e8ed16ffef02b82995a90bdcf10ffff7d63839a 10-May-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement C++0x nullptr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71405 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
ee6f6f8d59a04c76d26c3b1f553c506cc39f4901 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
GCall.cpp
GExprConstant.cpp
GObjCMac.cpp
odeGenTypes.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
GCall.cpp
GExprConstant.cpp
GObjCMac.cpp
odeGenTypes.cpp
9bb2995513d5aa99a9d10d45d2590147de5da5b3 09-May-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Ignore padding bit-fields during classification.
- {return-types,single-args}-{32,64} pass the first 1k ABI tests with
bit-fields enabled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71272 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
8236bf1800641d1c296579e25218f68f74c5caac 09-May-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Ignore padding bit-fields during classification.
- {return-types,single-args}-{32,64} pass the first 1k ABI tests with
bit-fields enabled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71272 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
9f4a5a438cca80ee89ffcfea7fae118a6642bcaa 08-May-2009 Daniel Dunbar <daniel@zuster.org> Darwin x86_32: When coercing a "single element" structure, make sure
to use a wide enough type. This might be wider than the "single
element"'s type in the presence of padding bit-fields.
- Darwin x86_32 now passes the first 1k ABI tests with bit-field
generation enabled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71270 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
2e0011650fe149bf55916c6f25558bf9bfebf537 08-May-2009 Daniel Dunbar <daniel@zuster.org> Darwin x86_32: When coercing a "single element" structure, make sure
to use a wide enough type. This might be wider than the "single
element"'s type in the presence of padding bit-fields.
- Darwin x86_32 now passes the first 1k ABI tests with bit-field
generation enabled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71270 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
6f3d760dd37102eb54e988a6e708bef18f9b2068 08-May-2009 Daniel Dunbar <daniel@zuster.org> Darwin x86_32: Ignore padding bit-fields when looking for "single
element" structures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71266 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
fcab2ca966d5176839f8698535e0d807bd968629 08-May-2009 Daniel Dunbar <daniel@zuster.org> Darwin x86_32: Ignore padding bit-fields when looking for "single
element" structures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71266 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ecfcfce375855861986e46860eaf47f0bd97b74b 08-May-2009 Daniel Dunbar <daniel@zuster.org> Darwin x86_32: Improve bit-field handling for returning records.
- This turns out to be a no-op now that most of the handling for
everything else is in place.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71261 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
eedd292ea0cf2216ff16d3490147323489102e3a 08-May-2009 Daniel Dunbar <daniel@zuster.org> Darwin x86_32: Improve bit-field handling for returning records.
- This turns out to be a no-op now that most of the handling for
everything else is in place.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71261 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
bfe39d46b5d294b82d4c1bc8618edd6b5f25df3a 08-May-2009 Daniel Dunbar <daniel@zuster.org> Darwin x86_32: Ignore arrays of empty structures inside records.
- This eliminates 5/1000 failures on return-types-32, on the current
ABITest config.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71250 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
f7fff322debe0b7256fe4dbc1103a3c2b43c379a 08-May-2009 Daniel Dunbar <daniel@zuster.org> Darwin x86_32: Ignore arrays of empty structures inside records.
- This eliminates 5/1000 failures on return-types-32, on the current
ABITest config.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71250 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
13395b2f469514815ceea29aa5048b8dc7e82b23 08-May-2009 Chris Lattner <sabre@nondot.org> further improvements to gnu objc EH stuff, patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71227 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
bb422ad4f449cd195a141309a886ff467baac5b2 08-May-2009 Chris Lattner <sabre@nondot.org> further improvements to gnu objc EH stuff, patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71227 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
3a3c29651cb14cc17206ff61cfcd1a060135e929 08-May-2009 Chris Lattner <sabre@nondot.org> "This patch fixes message sends to super in categories for the GNU runtime. This used to work, but I broke it when I modified the code to emit the same thing as GCC for message sends to super in classes."

Patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71220 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
48e6e7e8106f2404bfdd2d8abe7a840aeeaf047b 08-May-2009 Chris Lattner <sabre@nondot.org> "This patch fixes message sends to super in categories for the GNU runtime. This used to work, but I broke it when I modified the code to emit the same thing as GCC for message sends to super in classes."

Patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71220 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
822adfe2333425ef0c6233d82ca99154eee6f168 08-May-2009 Chris Lattner <sabre@nondot.org> reimplement __sync_* builtins to be variadic and to follow the same
semantic rules that gcc and icc use. This implements the variadic
and concrete versions as builtins and has sema do the
disambiguation. There are probably a bunch of details to finish up
but this seems like a large monotonic step forward :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71212 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
5caa370ea6f70bd3e7e4a9cc3b69ac1a849c8534 08-May-2009 Chris Lattner <sabre@nondot.org> reimplement __sync_* builtins to be variadic and to follow the same
semantic rules that gcc and icc use. This implements the variadic
and concrete versions as builtins and has sema do the
disambiguation. There are probably a bunch of details to finish up
but this seems like a large monotonic step forward :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71212 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
fee3eb0574c15181aa025b903dab53e8bd4b5d02 08-May-2009 Chris Lattner <sabre@nondot.org> initial support for ObjC exceptions with the GNU runtime:

"This patch is a first pass at adding support for exceptions for the GNU runtime. There are a few limitations at present:

- @synchronized() is not yet supported at all. gcc currently emits calls to runtime library functions that don't exist for this directive.

- Only id @catch statements are currently working. This is enough for NS_DURING and friends, but I need to spend more time reading the output from gcc -S to work out how it finds the class pointer to make arbitrary class type catch statements work.

- I've tested it with a few common cases[1] and the clang test suite (which doesn't test exceptions for the GNU runtime, but shows I haven't broken anything else), but there are probably a lot of cases I've missed."

Patch by David Chisnall!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71198 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
5dc0867af17b3bd6f567897433853b2b4767446c 08-May-2009 Chris Lattner <sabre@nondot.org> initial support for ObjC exceptions with the GNU runtime:

"This patch is a first pass at adding support for exceptions for the GNU runtime. There are a few limitations at present:

- @synchronized() is not yet supported at all. gcc currently emits calls to runtime library functions that don't exist for this directive.

- Only id @catch statements are currently working. This is enough for NS_DURING and friends, but I need to spend more time reading the output from gcc -S to work out how it finds the class pointer to make arbitrary class type catch statements work.

- I've tested it with a few common cases[1] and the clang test suite (which doesn't test exceptions for the GNU runtime, but shows I haven't broken anything else), but there are probably a lot of cases I've missed."

Patch by David Chisnall!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71198 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
609393540785920b4794ac1d0f5040697eec74a1 08-May-2009 Eli Friedman <eli.friedman@gmail.com> Fix crash with constant initialization of bit-fields in unions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71194 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
b03d9afa3f0522ca02139c9b55d1145369e32a0f 08-May-2009 Eli Friedman <eli.friedman@gmail.com> Fix crash with constant initialization of bit-fields in unions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71194 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
c8007153d78d2fcd77d9bd3ea2f615550f97a177 05-May-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to support Gnu runtime's typed selectors.
Patch by David Chisnall.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71023 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
df9ccc6381314ccca6407abb209155e9273a631d 05-May-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to support Gnu runtime's typed selectors.
Patch by David Chisnall.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71023 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
7b3a22a962c02c6982f32441d14c2935b31f466c 05-May-2009 Chris Lattner <sabre@nondot.org> When defining a function whose type has no prototype, make an effort
to go back and clean up existing uses of the bitcasted function. This
is not just an optimization: it is required for correctness to get
always inline functions to work, see testcases in function-attributes.c.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70971 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
bdb0132722082886558f31eccdba06ae1852c0ee 05-May-2009 Chris Lattner <sabre@nondot.org> When defining a function whose type has no prototype, make an effort
to go back and clean up existing uses of the bitcasted function. This
is not just an optimization: it is required for correctness to get
always inline functions to work, see testcases in function-attributes.c.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70971 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5bcbe1d9a9b76484048ea7ec313d7aecb3797ef9 05-May-2009 Chris Lattner <sabre@nondot.org> fix some more cases where we'd emit a file with a line of 0 for implicit
types. In this case, it was objc_selector and objc_class. This fixes
rdar://6852754 - clang sometimes generates incorrect/unknown file/line info for DW_TAG__structure_type dies


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70969 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d37d9b5bf9dd5addf6d8d3b20c4d828218c99d23 05-May-2009 Chris Lattner <sabre@nondot.org> fix some more cases where we'd emit a file with a line of 0 for implicit
types. In this case, it was objc_selector and objc_class. This fixes
rdar://6852754 - clang sometimes generates incorrect/unknown file/line info for DW_TAG__structure_type dies


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70969 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
95043070891d6a3fc20032a8dd2351031cc45020 05-May-2009 Chris Lattner <sabre@nondot.org> Do not generate bogus location info for DW_TAG_inheritance
DIEs. We were generating a loc with line of 0 and a file.
These tags do not need locations at all, just remove it.
this fixes rdar://6852792 - Clang generates incorrect (and unnecessary) file and line info for DW_TAG_inheritance dies


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70966 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9e55b8a8b34ca1f401425cd14a32ba55d4f7aa73 05-May-2009 Chris Lattner <sabre@nondot.org> Do not generate bogus location info for DW_TAG_inheritance
DIEs. We were generating a loc with line of 0 and a file.
These tags do not need locations at all, just remove it.
this fixes rdar://6852792 - Clang generates incorrect (and unnecessary) file and line info for DW_TAG_inheritance dies


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70966 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
063ce624688582e472acbd4740fe867b84f5b771 05-May-2009 Chris Lattner <sabre@nondot.org> Fix generated debug info for decls with no location (which include self/_cmd
in ObjC) to not emit file/line location information. Previously
we would output a file with bogus line information. This fixes:
rdar://6852814 - Clang generates incorrect file & line info for automatic/understood formal parameters for objc-programs


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70965 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
650cea9cc5ceb9fbcf8897db0e252e5bdb5c5179 05-May-2009 Chris Lattner <sabre@nondot.org> Fix generated debug info for decls with no location (which include self/_cmd
in ObjC) to not emit file/line location information. Previously
we would output a file with bogus line information. This fixes:
rdar://6852814 - Clang generates incorrect file & line info for automatic/understood formal parameters for objc-programs


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70965 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1764af42376bd64b929a14b1080315d90c145301 05-May-2009 Anders Carlsson <andersca@mac.com> Refactor global decls to hold either a regular Decl or a CXXConstructorDecl + ctor type or a CXXDestructorDecl + dtor type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70962 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
2a131fbca2a51085dc083b8c56a2d4ced3cf1413 05-May-2009 Anders Carlsson <andersca@mac.com> Refactor global decls to hold either a regular Decl or a CXXConstructorDecl + ctor type or a CXXDestructorDecl + dtor type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70962 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
671e8a25d8f019872ceb293a0e251135f84eae08 05-May-2009 Daniel Dunbar <daniel@zuster.org> Remove an unneeded lookup routine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70951 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a81419d0b53a40399a589a2fcc13f1ed2ec28f75 05-May-2009 Daniel Dunbar <daniel@zuster.org> Remove an unneeded lookup routine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70951 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
955b39c6106c289dc91dcf8f34d17b954e63e3f3 05-May-2009 Fariborz Jahanian <fjahanian@apple.com> Provide basic support for generation of objc2's
objc_assign_global API when assigning to global
objective-c object pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70939 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
bf63b87ecf1e62ab8871a81325978377c84e1835 05-May-2009 Fariborz Jahanian <fjahanian@apple.com> Provide basic support for generation of objc2's
objc_assign_global API when assigning to global
objective-c object pointer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70939 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
c40d685d97b1aa9de62c3a99d0bd5ca7e6e3de9d 05-May-2009 Daniel Dunbar <daniel@zuster.org> Fix the field count in interface record layout (it was incorrectly
compensating for super classes). This was making the reported class
sizes for empty classes very, very wrong.
- Also, we now report the size info for an empty class like gcc (as
the offset of the start, not as 0, 0).

- Add a few more test cases we were mishandling before (padding bit
field at end of struct, for example).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70938 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6e8575b88bfb2634d7b28c0c4d5ed2a6acc8418a 05-May-2009 Daniel Dunbar <daniel@zuster.org> Fix the field count in interface record layout (it was incorrectly
compensating for super classes). This was making the reported class
sizes for empty classes very, very wrong.
- Also, we now report the size info for an empty class like gcc (as
the offset of the start, not as 0, 0).

- Add a few more test cases we were mishandling before (padding bit
field at end of struct, for example).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70938 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7838752a58ce198761e5773ddf031a48c29ac034 04-May-2009 Daniel Dunbar <daniel@zuster.org> Compute interface instanceStart and instanceSize using the record
layout.
- This is much simpler / more efficient.

- This also properly computes the size in the presence of bit-fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70916 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b4c79e027fdcc752b5a377611fd4cfbb21611a05 04-May-2009 Daniel Dunbar <daniel@zuster.org> Compute interface instanceStart and instanceSize using the record
layout.
- This is much simpler / more efficient.

- This also properly computes the size in the presence of bit-fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70916 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
893fc1870dfbd2dc07c4fe84792042ac203f5594 04-May-2009 Chris Lattner <sabre@nondot.org> "Fix" a problem with debug info in the presence of always_inline
function calls. For a program like this:

#include <stdio.h>
static __inline__ __attribute__((always_inline))
int bar(int x) { return 4; }
int main() {
int X = bar(4);
printf("%d\n", X);
}

clang was not outputing any debug info for the body of main(). This is
because the backend is getting confused by the region_start/end that clang
is emitting for block scopes. For now, just disable these (matching llvm-gcc),
this stuff is in progress of rework anyway.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70889 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
dcd808c1f9ef7cdd9fb7779beec3f3872261f0a4 04-May-2009 Chris Lattner <sabre@nondot.org> "Fix" a problem with debug info in the presence of always_inline
function calls. For a program like this:

#include <stdio.h>
static __inline__ __attribute__((always_inline))
int bar(int x) { return 4; }
int main() {
int X = bar(4);
printf("%d\n", X);
}

clang was not outputing any debug info for the body of main(). This is
because the backend is getting confused by the region_start/end that clang
is emitting for block scopes. For now, just disable these (matching llvm-gcc),
this stuff is in progress of rework anyway.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70889 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
37540371f7e97bd86e2fc7e3d8ae368d4e56bed7 04-May-2009 Chris Lattner <sabre@nondot.org> "The attached diff fixes the //FIXME in message send to super. This should now be faster, and works in the presence of class posing. This is now the same approach as used in GCC (the earlier code was a quick hack to get something working)."

Patch by David Chisnall!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70877 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
c6e2ab0dd61e53fa7889a4f97d74d53f4b1af278 04-May-2009 Chris Lattner <sabre@nondot.org> "The attached diff fixes the //FIXME in message send to super. This should now be faster, and works in the presence of class posing. This is now the same approach as used in GCC (the earlier code was a quick hack to get something working)."

Patch by David Chisnall!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70877 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
c4532f568c61095a51cc6f10b0794fb2424ddeb9 04-May-2009 Daniel Dunbar <daniel@zuster.org> Patch from David Chisnall:

The attached diff fixes the //FIXME in message send to super. This
should now be faster, and works in the presence of class posing. This
is now the same approach as used in GCC (the earlier code was a quick
hack to get something working).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70868 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
5efccb1ab81a029ddeb3ea18e239d0ddc124ec2b 04-May-2009 Daniel Dunbar <daniel@zuster.org> Patch from David Chisnall:

The attached diff fixes the //FIXME in message send to super. This
should now be faster, and works in the presence of class posing. This
is now the same approach as used in GCC (the earlier code was a quick
hack to get something working).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70868 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
b3875948c9325b7a606b7d4a5d13e0ce93b584ca 04-May-2009 Daniel Dunbar <daniel@zuster.org> Remove unnecessary copy of constraint info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70835 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
b84e8a670ad1d00c0a34295c42ac700cdde04815 04-May-2009 Daniel Dunbar <daniel@zuster.org> Remove unnecessary copy of constraint info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70835 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
2208c5a1f9b5579c56fd53655482a8cfdf268f53 04-May-2009 Eli Friedman <eli.friedman@gmail.com> PR4143: don't crash generating debug info for incomplete enum types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70825 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3189e4be4f79f22e0e076e21615b9526de529b43 04-May-2009 Eli Friedman <eli.friedman@gmail.com> PR4143: don't crash generating debug info for incomplete enum types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70825 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
82690d5d35463e2dd983e7077e7df3b2a99c71da 04-May-2009 Eli Friedman <eli.friedman@gmail.com> Remove unnecessary push_back (at least, I think it's unnecessary);
hopefully, this fixes PR4144 without any regressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70823 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
5c667608efe2a49727c996906b771853f694d246 04-May-2009 Eli Friedman <eli.friedman@gmail.com> Remove unnecessary push_back (at least, I think it's unnecessary);
hopefully, this fixes PR4144 without any regressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70823 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
3d091d69953f2c76d41882263dcdd5b7856f6c08 04-May-2009 Daniel Dunbar <daniel@zuster.org> Don't allow clients to traverse into superclass synthesized properties
via CollectObjCIvars.
- In places where we need them, we should have the implementation and
access the properties through it.

This is a fairly substantial functionality change:
1. @encode no longer encodes synthesized ivars, ever.

2. The ivar layout bitmap no longer encodes information for
synthesized ivars in superclasses. Well, actually I had already
broken that, but it is intentional now.

We are now differing substantially from llvm-gcc and gcc
here. However, in my opinion this fundamentally *must* work if
non-fragile classes are to work. Without this change, the result of
@encode and the ivar layout depend on the order that the
implementation is seen in a file (if it is in the same file with its
superclass). Since both scenarios should work the same, our behavior
is now consistent with gcc behavior as if an implementation is never
seen following an implementation of its superclass.

Note that #2 is only a functionality change when (A) an
implementation appears in the same translation unit with the
implementation of its superclass, and (B) the superclass has
synthesized ivars. My belief is that this situation does not occur in
practice.

I am not yet sure of the role/semantics of @encode when synthesized
ivars are present... it's use is fairly unsound in a non-fragile world.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70822 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3715328021f69ed55e7b4cd65465fc761a8b6457 04-May-2009 Daniel Dunbar <daniel@zuster.org> Don't allow clients to traverse into superclass synthesized properties
via CollectObjCIvars.
- In places where we need them, we should have the implementation and
access the properties through it.

This is a fairly substantial functionality change:
1. @encode no longer encodes synthesized ivars, ever.

2. The ivar layout bitmap no longer encodes information for
synthesized ivars in superclasses. Well, actually I had already
broken that, but it is intentional now.

We are now differing substantially from llvm-gcc and gcc
here. However, in my opinion this fundamentally *must* work if
non-fragile classes are to work. Without this change, the result of
@encode and the ivar layout depend on the order that the
implementation is seen in a file (if it is in the same file with its
superclass). Since both scenarios should work the same, our behavior
is now consistent with gcc behavior as if an implementation is never
seen following an implementation of its superclass.

Note that #2 is only a functionality change when (A) an
implementation appears in the same translation unit with the
implementation of its superclass, and (B) the superclass has
synthesized ivars. My belief is that this situation does not occur in
practice.

I am not yet sure of the role/semantics of @encode when synthesized
ivars are present... it's use is fairly unsound in a non-fragile world.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70822 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a15c71eec543854a5fc2005ff106a26d16acea82 04-May-2009 Daniel Dunbar <daniel@zuster.org> Inline GetFieldBaseOffset into sole callsite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70813 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
e05cc98e97ec910829beccd0d890a002ce5ab909 04-May-2009 Daniel Dunbar <daniel@zuster.org> Inline GetFieldBaseOffset into sole callsite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70813 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
56bdd7b6839c2a713cdbadc5cc1db70476d7def1 04-May-2009 Daniel Dunbar <daniel@zuster.org> Avoid recomputing field offsets.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70812 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
900c1980de73d17cdc11b108cde7f9b68be1e5bd 04-May-2009 Daniel Dunbar <daniel@zuster.org> Avoid recomputing field offsets.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70812 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
5e773be27345039e9eceed529e3708f9f809664f 04-May-2009 Daniel Dunbar <daniel@zuster.org> Normalize formatting


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70810 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
31682fd385042369d490b2f73ecff2871467ade9 04-May-2009 Daniel Dunbar <daniel@zuster.org> Normalize formatting


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70810 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b1d3b8e9ce83572082a07bd421104385bef199b2 03-May-2009 Daniel Dunbar <daniel@zuster.org> Use the implementation decl for looking up offset while building the
ivar layout.
- The layout needs access to synthesized ivars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70798 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
5a5a803df8a8e3e567278fdfd8a6c1aff8dc6b82 03-May-2009 Daniel Dunbar <daniel@zuster.org> Use the implementation decl for looking up offset while building the
ivar layout.
- The layout needs access to synthesized ivars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70798 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d42baac9eb44438034448f1edbaa7bef081b3ad3 03-May-2009 Eli Friedman <eli.friedman@gmail.com> PR4134: Implement __builtin_extract_return_addr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70794 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
3b660efb9f9fa3e87096f4a96a2093cd17c43c2e 03-May-2009 Eli Friedman <eli.friedman@gmail.com> PR4134: Implement __builtin_extract_return_addr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70794 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
09d5abc7b52c1c64e6a870d56e734b29e0eafc27 03-May-2009 Eli Friedman <eli.friedman@gmail.com> Fix comment to account for r70786.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70789 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
43907e87c776391d7d96da04b48e7bf06d8baafc 03-May-2009 Eli Friedman <eli.friedman@gmail.com> Fix comment to account for r70786.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70789 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
65144222b72842173c067478d5387c9d2d0d301b 03-May-2009 Eli Friedman <eli.friedman@gmail.com> PR4133: fix always_inline implementation to be consistent with gcc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70786 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5e222139610a9f8b2b5f4ddd112f10dec9ec1e97 03-May-2009 Eli Friedman <eli.friedman@gmail.com> PR4133: fix always_inline implementation to be consistent with gcc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70786 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
342aadcf3e1dbc6f18b8d55018450ba8965f300f 03-May-2009 Anders Carlsson <andersca@mac.com> Make codegen for constructors work again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70785 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
31ccf377f4a676eb6c205b47eef435de616d5e2d 03-May-2009 Anders Carlsson <andersca@mac.com> Make codegen for constructors work again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70785 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
7bb1988174826863e1e8904a228dcfae694e1fce 03-May-2009 Anders Carlsson <andersca@mac.com> assert that mangleName is not called for C++ ctors/dtors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70783 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
578aa64fd162e9b728424e54c5a0a7ec53e7b65a 03-May-2009 Anders Carlsson <andersca@mac.com> assert that mangleName is not called for C++ ctors/dtors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70783 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
40277e665532fc6357f419b081101e3dadabbe97 03-May-2009 Daniel Dunbar <daniel@zuster.org> It turns out BuildAggrIvarLayout wasn't even using the shadow struct,
just computing it!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70779 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7c9f6c51be1c0bbfe59b64e92587d2e37ce73a7d 03-May-2009 Daniel Dunbar <daniel@zuster.org> It turns out BuildAggrIvarLayout wasn't even using the shadow struct,
just computing it!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70779 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9638d367ad7a52615135a7428896c5235124cf96 03-May-2009 Daniel Dunbar <daniel@zuster.org> Lift common subexpression, remove dead "base" variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70778 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
25d583ec27cc2fe4d0dccaa5d41b6c3b645beda0 03-May-2009 Daniel Dunbar <daniel@zuster.org> Lift common subexpression, remove dead "base" variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70778 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7b1da7289354805c6b6f28977e7ce7001df5a65d 03-May-2009 Daniel Dunbar <daniel@zuster.org> Factor out BuildAggrIvarRecordLayout routine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70777 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d58edcb49140b4e82f8b1e2f2e6ab35b9d401c99 03-May-2009 Daniel Dunbar <daniel@zuster.org> Factor out BuildAggrIvarRecordLayout routine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70777 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
25acf211e2fe4ef4782d1cbe9b27bf6c33deee4d 03-May-2009 Daniel Dunbar <daniel@zuster.org> Lift out GetGCAttrTypeForType routine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70776 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
5e563dd38d6ec9f367cfd4b55d3efaf88a97cc09 03-May-2009 Daniel Dunbar <daniel@zuster.org> Lift out GetGCAttrTypeForType routine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70776 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
59df30d346d0e7b06f7d94a4f9c2f89132602eeb 03-May-2009 Daniel Dunbar <daniel@zuster.org> Add constructors for GC_IVAR and SKIP_SCAN, tighten up uses.

Lift up a size calculation and note some asymmetries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70775 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
8b2926c23645627d60d62667fc0e7a310e40815e 03-May-2009 Daniel Dunbar <daniel@zuster.org> Add constructors for GC_IVAR and SKIP_SCAN, tighten up uses.

Lift up a size calculation and note some asymmetries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70775 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
736f47f6753a8e6cb70682644e31b4fc574d3f86 03-May-2009 Daniel Dunbar <daniel@zuster.org> Normalize style, remove a dead assert.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70771 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
487993b90d432e9c866475ff0ffb8915e21c3904 03-May-2009 Daniel Dunbar <daniel@zuster.org> Normalize style, remove a dead assert.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70771 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
94d2ede70eb6074b0c8f0e5ab31ac0fdbae71af8 03-May-2009 Daniel Dunbar <daniel@zuster.org> Use ASTRecordLayout for computing ivar offsets instead of shadow
struct.
- We still need to do more lookup than necessary because ivars don't
live in a reasonable DeclContext.

- The only remaining client of the interface shadow struct is the
ivar layout bitmap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70756 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
532d4daa038d972240138e2fd6e1122517340833 03-May-2009 Daniel Dunbar <daniel@zuster.org> Use ASTRecordLayout for computing ivar offsets instead of shadow
struct.
- We still need to do more lookup than necessary because ivars don't
live in a reasonable DeclContext.

- The only remaining client of the interface shadow struct is the
ivar layout bitmap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70756 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ed4d596b96604e4e2127e7a13042510330916b10 03-May-2009 Daniel Dunbar <daniel@zuster.org> Add a ComputeIvarBaseOffset overload taking an implementation
decl. Only this routine will be suitable for computing the offset of a
synthesized ivar.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70696 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GObjCRuntime.h
9f89f2bc111339ee7fa0df3c2f18e39493b460c4 03-May-2009 Daniel Dunbar <daniel@zuster.org> Add a ComputeIvarBaseOffset overload taking an implementation
decl. Only this routine will be suitable for computing the offset of a
synthesized ivar.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70696 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GObjCRuntime.h
07ddfa98495933358a4c811161d959b68aa22019 03-May-2009 Daniel Dunbar <daniel@zuster.org> Compute Objective-C metadata size information from the record layout,
not the shadow structure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70691 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
2bebbf0acee55404de4b8846713b64429e744e8f 03-May-2009 Daniel Dunbar <daniel@zuster.org> Compute Objective-C metadata size information from the record layout,
not the shadow structure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70691 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
5ce1d6bc9407b6d9449286f2937627b13dbe1e23 03-May-2009 Chris Lattner <sabre@nondot.org> look at the right operand when increasing the size of an asm output,
this fixes http://llvm.org/bugs/show_bug.cgi?id=3373#c20


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70685 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
0bdaa5b576237195a260d347f2646cf42ec7d745 03-May-2009 Chris Lattner <sabre@nondot.org> look at the right operand when increasing the size of an asm output,
this fixes http://llvm.org/bugs/show_bug.cgi?id=3373#c20


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70685 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
a3e92cd3e34f80cd0b1bf72589ca8cafebc93f21 03-May-2009 Daniel Dunbar <daniel@zuster.org> Remove unused argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70684 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
5384b0990ea6995121fd4bad0855e96d41dcad18 03-May-2009 Daniel Dunbar <daniel@zuster.org> Remove unused argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70684 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
35403f942b04224ef218c30eb44edb7c16336f79 03-May-2009 Daniel Dunbar <daniel@zuster.org> Coalesce the ivar offset calculation further.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70683 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
1d7e539bbee1981faddf45284c492deab4ca2e01 03-May-2009 Daniel Dunbar <daniel@zuster.org> Coalesce the ivar offset calculation further.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70683 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
7e91cd30c9caad1343b84959366fd55438f15fde 03-May-2009 Chris Lattner <sabre@nondot.org> don't shadow 'i'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70680 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
ebfc9857de58a326c84629915d9ffe3f36d8cc26 03-May-2009 Chris Lattner <sabre@nondot.org> don't shadow 'i'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70680 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
c11b6c9c62d3d4a07684764a8e39f867eeb7753f 03-May-2009 Chris Lattner <sabre@nondot.org> add support for tying asm operands where the result is smaller than
the input. This is part of PR3373.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70677 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
a077b5c8631596f8d7a588933a9de5d08e9ba428 03-May-2009 Chris Lattner <sabre@nondot.org> add support for tying asm operands where the result is smaller than
the input. This is part of PR3373.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70677 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
68d837ba113826ea9f791afb33ba615ff8a961d1 03-May-2009 Chris Lattner <sabre@nondot.org> implement support for asm outputs targetting non-simple lvalue destinations
like bitfields. incidentally llvm-gcc crashes on this sort of thing also. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70675 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
ede9d900809c4fd0298d52f5a63088ecb8302275 03-May-2009 Chris Lattner <sabre@nondot.org> implement support for asm outputs targetting non-simple lvalue destinations
like bitfields. incidentally llvm-gcc crashes on this sort of thing also. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70675 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
0e4533194b6ea1afab713114d14c5cae65dff02b 03-May-2009 Daniel Dunbar <daniel@zuster.org> Use type from ivar instead of from shadow struct field.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70674 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
e38df86a6ddc48d4a6d37478ac7d20e92edfb63a 03-May-2009 Daniel Dunbar <daniel@zuster.org> Use type from ivar instead of from shadow struct field.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70674 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
67ba4f08842563bf06f0e3732218dd7449bb0e69 03-May-2009 Chris Lattner <sabre@nondot.org> handle codegen of asms where a small input is tied to a large output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70672 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
4df4ee0ff6f804e9d3dd478712e3b5b20cd3bf2f 03-May-2009 Chris Lattner <sabre@nondot.org> handle codegen of asms where a small input is tied to a large output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70672 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
d5ebe3487715c1f5ab95fabfc8750cae433e2456 03-May-2009 Chris Lattner <sabre@nondot.org> refactor some code to get the input/output constraint info before
processing the outputs, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70671 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
481fef9e25128fe87b19e41c48f771ee20c33cbe 03-May-2009 Chris Lattner <sabre@nondot.org> refactor some code to get the input/output constraint info before
processing the outputs, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70671 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
098b434887fd3cb3f55b6a6b9090581700a61505 02-May-2009 Chris Lattner <sabre@nondot.org> When creating a dwarf record type for an objc interface, make sure to propagate
the runtime version number onto it, so that the debugger knows it's an objc
interface, not a C struct. rdar://6848435


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70618 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ac7c814d817bbfafd924586b9025f2dffc655708 02-May-2009 Chris Lattner <sabre@nondot.org> When creating a dwarf record type for an objc interface, make sure to propagate
the runtime version number onto it, so that the debugger knows it's an objc
interface, not a C struct. rdar://6848435


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70618 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0f7fe5d5dadd5d9b29b3c4f5dab8c5b3e388dd5c 02-May-2009 Chris Lattner <sabre@nondot.org> capture whether optimizations are enabled or not in debug info


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70617 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b95ee58f6c9838695b1704e879e263aec49bfa88 02-May-2009 Chris Lattner <sabre@nondot.org> capture whether optimizations are enabled or not in debug info


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70617 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2ded8f80518163330a13aa779d9c195c61ea45d5 02-May-2009 Chris Lattner <sabre@nondot.org> encode the version of the objc runtime into the dwarf compile unit. rdar://6848435,
several other fixes coming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70616 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4c2577a31f460afc1f0110b937a250b8e2a1b789 02-May-2009 Chris Lattner <sabre@nondot.org> encode the version of the objc runtime into the dwarf compile unit. rdar://6848435,
several other fixes coming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70616 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4598af142917d5756f1e250e04cc3f719a093b8b 01-May-2009 Anders Carlsson <andersca@mac.com> We can now call member functions where the base is a pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70579 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
3dad49f2b60353638586ad1893a72f335618f919 01-May-2009 Anders Carlsson <andersca@mac.com> We can now call member functions where the base is a pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70579 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
159875f624d17a1ab55886c75f756846f1eb5360 01-May-2009 Mike Stump <mrs@apple.com> Don't assert when we think we need copy/dispose, but don't need them.
Radar 6838889


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70525 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
dd2fb9c5ebc02f48a5b91a9c2a5f1e4562d02a0b 01-May-2009 Mike Stump <mrs@apple.com> Don't assert when we think we need copy/dispose, but don't need them.
Radar 6838889


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70525 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
6f5661f43769f5b75cf863b1e966b9c1e58da6e0 01-May-2009 Anders Carlsson <andersca@mac.com> Don't use indirect memory destinations for inline asm. Fixes 6841383.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70523 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
bad3a94d506874355fc15b336c6f0ed360e46a06 01-May-2009 Anders Carlsson <andersca@mac.com> Don't use indirect memory destinations for inline asm. Fixes 6841383.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70523 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
9d7167d14941fddfeedb51607e519d78cd524409 01-May-2009 Fariborz Jahanian <fjahanian@apple.com> Remove a warning when this file is compiled optimized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70518 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
70b51c7e112757fa958f696c6b90e6c3e48922a3 01-May-2009 Fariborz Jahanian <fjahanian@apple.com> Remove a warning when this file is compiled optimized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70518 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
865260c4648d76c4a781367a939c7e24a4175bb8 30-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> API for message dispatch of methods returning floats
to match gcc's closely.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70493 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
5b2bad017b5f86c83aeb80d186696a4c8d59f68f 30-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> API for message dispatch of methods returning floats
to match gcc's closely.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70493 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0737c0c082e50a4e0f86c20991129872ad261a2b 30-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR4108: be a bit looser with the casts that we accept in
constant initializers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70483 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
944af7156db03d4ad15973dad259ab51d405e609 30-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR4108: be a bit looser with the casts that we accept in
constant initializers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70483 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
3d8e068ca8fcb8449d3faf3cce82ca378091c6ea 30-Apr-2009 Chris Lattner <sabre@nondot.org> fix i128 to return in 2 64-bit registers (rax/rdx on x86-64)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70481 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ae69e005a9072a30262dfe87360b034d4b8e45f2 30-Apr-2009 Chris Lattner <sabre@nondot.org> fix i128 to return in 2 64-bit registers (rax/rdx on x86-64)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70481 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
6cc7e415d42291bf01e0295d9d6344e106613c48 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
GCall.cpp
odeGenTypes.cpp
angle.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
GCall.cpp
odeGenTypes.cpp
angle.cpp
817d1f5707d7a0dd43098cb0752aacfa14fc414a 30-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Undid setting of the flag for msg_Send for 32bit code gen.
It seems to effect code gen. Add a FIXME instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70423 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
65257cafb2cdf353d017c3860e15b813b9244bca 30-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Undid setting of the flag for msg_Send for 32bit code gen.
It seems to effect code gen. Add a FIXME instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70423 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d11bc1d6cfd2e1dd8e54fc0e9bfc25e51eb05564 29-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Export lazy references of .objc_class_name of class names
referenced in a category implementation meta-data
(Next objc 32bit abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70407 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
679cd7fcbd341fa3747e598f537601db421b1002 29-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Export lazy references of .objc_class_name of class names
referenced in a category implementation meta-data
(Next objc 32bit abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70407 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f6b0dcf35343a3cba90efe97d6bca71589b84b29 29-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Type of msgSend message dispatch API is a vararg.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70404 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
2f87216d26d2fce02d2aa6d6dd0a37d61f75fdfb 29-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Type of msgSend message dispatch API is a vararg.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70404 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
67e1144edd7fde23b60c1b9359ac6160b50b837f 28-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Improve compatibility with GCC regarding inline semantics in GNU89
mode and in the presence of __gnu_inline__ attributes. This should fix
both PR3989 and PR4069.

As part of this, we now keep track of all of the attributes attached
to each declaration even after we've performed declaration
merging. This fixes PR3264.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70292 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
9f9bf258f8ebae30bfb70feb9d797d6eb67b0460 28-Apr-2009 Douglas Gregor <dgregor@apple.com> Improve compatibility with GCC regarding inline semantics in GNU89
mode and in the presence of __gnu_inline__ attributes. This should fix
both PR3989 and PR4069.

As part of this, we now keep track of all of the attributes attached
to each declaration even after we've performed declaration
merging. This fixes PR3264.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70292 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f2107de6d0fb32736c035491f2caeb1515789f2f 28-Apr-2009 Devang Patel <dpatel@apple.com> While generating debug info ignore unnamed fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70266 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
de13502158c6577aaff251abff30999417dabfe1 28-Apr-2009 Devang Patel <dpatel@apple.com> While generating debug info ignore unnamed fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70266 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ef495d46cf81924551e8953831bf04f75cd136de 27-Apr-2009 Daniel Dunbar <daniel@zuster.org> x86-32 ABI: Fix crash on return of structure with flexible array
member.

Also, spell bitfield more consistently as bit-field.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70220 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
8e03444e924665d4d90f5cfc0624c815256e0309 27-Apr-2009 Daniel Dunbar <daniel@zuster.org> x86-32 ABI: Fix crash on return of structure with flexible array
member.

Also, spell bitfield more consistently as bit-field.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70220 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
bc9ef257b887506228e86a7f4c933aecc8f554a9 26-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement function-try-blocks. However, there's a very subtle bug that I can't track down.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70155 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.cpp
d3a413d3b8eb39bcee5944bc545d9997c1abe492 26-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Implement function-try-blocks. However, there's a very subtle bug that I can't track down.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70155 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.cpp
5255e7ae5cde3039284ca49a4c03f7bd4869894f 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
GBuiltin.cpp
GCall.cpp
GDebugInfo.cpp
GObjCMac.cpp
odeGenTypes.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
GBuiltin.cpp
GCall.cpp
GDebugInfo.cpp
GObjCMac.cpp
odeGenTypes.cpp
0cd323da459fbce4e19d1bbf2923afe80bb39e44 26-Apr-2009 Chris Lattner <sabre@nondot.org> pull operands names "[foo]" into ConstraintInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70136 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
2819fa85651526d59ade4fdc9da2cadd7b132973 26-Apr-2009 Chris Lattner <sabre@nondot.org> pull operands names "[foo]" into ConstraintInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70136 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
9f8e50205526b02ae170d4e0f0b10bf0b3e66f87 26-Apr-2009 Chris Lattner <sabre@nondot.org> pull the constraint string into the ConstraintInfo struct
instead of passing it around in addition to it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70135 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
432c86969eced2ce658b3f3f2aa7407c8864f21b 26-Apr-2009 Chris Lattner <sabre@nondot.org> pull the constraint string into the ConstraintInfo struct
instead of passing it around in addition to it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70135 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
c49cc1a57583d78783137ff7914526617d032af7 26-Apr-2009 Chris Lattner <sabre@nondot.org> change TargetInfo::ConstraintInfo to be a struct that contains
the enum along with some other data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70114 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
44def070435a2b5d67f0534f7a3a85a7389d60f2 26-Apr-2009 Chris Lattner <sabre@nondot.org> change TargetInfo::ConstraintInfo to be a struct that contains
the enum along with some other data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70114 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
4a9e927b03ecc65ca47cc4e1cd7b8d5c1fae1cf9 26-Apr-2009 Chris Lattner <sabre@nondot.org> split ObjC and C++ Statements out into their own headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70105 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.h
16f0049415ec596504891259e2a83e19871c0d52 26-Apr-2009 Chris Lattner <sabre@nondot.org> split ObjC and C++ Statements out into their own headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70105 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.h
05d8d001a94064782808b13a833a96fbb37d1f9e 26-Apr-2009 Anders Carlsson <andersca@mac.com> When calling the cleanup function specified by __attribute__((cleanup)), make sure to bitcast the argument so it has the same type as the first argument of the cleanup function. Fixes <rdar://problem/6827047>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70098 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
cabec03f5d1aa3bb7b5c99867c5e75f38452afab 26-Apr-2009 Anders Carlsson <andersca@mac.com> When calling the cleanup function specified by __attribute__((cleanup)), make sure to bitcast the argument so it has the same type as the first argument of the cleanup function. Fixes <rdar://problem/6827047>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70098 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
7eaa9f0b94c90d0851964c9f450cf633430e54d4 26-Apr-2009 Chris Lattner <sabre@nondot.org> "This fixes message sends to super in a way that both works with real code and passes the test in the test suite. It also fixes a crash when using recent versions of GNU libobjc and compiling modules that do not contain any constant strings but do contain a declaration of the constant string class and possible some other corner cases (thanks to Pete French for providing me with a test case for that one)."

Patch by David Chisnall!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70093 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
71238f67c5df13eef19450d66b7a7ab28377192a 26-Apr-2009 Chris Lattner <sabre@nondot.org> "This fixes message sends to super in a way that both works with real code and passes the test in the test suite. It also fixes a crash when using recent versions of GNU libobjc and compiling modules that do not contain any constant strings but do contain a declaration of the constant string class and possible some other corner cases (thanks to Pete French for providing me with a test case for that one)."

Patch by David Chisnall!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70093 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
335d2d16d2aed6268ed1a53c2358e6d71c5d647f 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
odeGenTypes.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
odeGenTypes.cpp
eec3a59912dfd69d0a2471fb9083a2535f1bcac2 25-Apr-2009 Chris Lattner <sabre@nondot.org> fix PR4067: [Linux kernel] cannot aggregate codegen stmtexpr as lvalue


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70067 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
654599454c8e6cc83b1b9b3af43c49c2f66a26cb 25-Apr-2009 Chris Lattner <sabre@nondot.org> fix PR4067: [Linux kernel] cannot aggregate codegen stmtexpr as lvalue


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70067 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
6864c0d8bb8547d6f2e00d49bb949e328d67927d 25-Apr-2009 Daniel Dunbar <daniel@zuster.org> Fix pointer addressing and array subscripting of Objective-C interface
types.
- I broke this in the switch to representing interfaces with opaque
types.

- <rdar://problem/6822660> clang crashes on subscript of interface in
32-bit mode


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70009 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
2a866251a80a8d88f6908f7dc68ce06d1023ec1d 25-Apr-2009 Daniel Dunbar <daniel@zuster.org> Fix pointer addressing and array subscripting of Objective-C interface
types.
- I broke this in the switch to representing interfaces with opaque
types.

- <rdar://problem/6822660> clang crashes on subscript of interface in
32-bit mode


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70009 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
8978f59ba3d741b909b011f7a400b6618b7f742d 24-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Minor refactoring. No intended change in behavior.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69988 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d019d96e1ea39cec32f1320b1f9f772aae28247e 24-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Minor refactoring. No intended change in behavior.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69988 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1fb3c2da1ec14c2a0db44b66787a3877a6cdec38 24-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Minor refactoring. No change in functionality.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69979 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
8c2f2d1849247ebf7b2c0dbf1ebba15fe163664b 24-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Minor refactoring. No change in functionality.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69979 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
06facb787eb1f42b762dc55d553cf4e9f75bdd14 24-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Some code clean up of objc2's bitmap layout.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69970 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
81adc058eaf450b43671633b2ad92e8bfa08d9b3 24-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Some code clean up of objc2's bitmap layout.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69970 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
cee8fea5debf6f1dacba79dd1781ac2f89597c80 24-Apr-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Clang part of r69947. Reverting back 69574 as it is no longer needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69949 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
7cabee5b18212bd3106aea8415b044b2b3b43518 24-Apr-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Clang part of r69947. Reverting back 69574 as it is no longer needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69949 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
9b6348dcc3aaa88b9b04dd51acb0d4c0bb35cf9b 23-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Fix handling of C99 "extern inline" semantics when dealing with
multiple declarations of the function. Should fix PR3989 and
<rdar://problem/6818429>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69905 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b3efa98e320590e8be9d62818e89e599303e65b4 23-Apr-2009 Douglas Gregor <dgregor@apple.com> Fix handling of C99 "extern inline" semantics when dealing with
multiple declarations of the function. Should fix PR3989 and
<rdar://problem/6818429>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69905 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2d6bb2b7a224f513aeb6f984908e3c7adf22fd28 23-Apr-2009 Devang Patel <dpatel@apple.com> Handle corner case where clang-cc is invoked directly to compile preprocessed source file without -main-file-name. In this case, CDDebugInfo is not able identify correct main source file becase SM.isFromMainFile() returns true for locations from header files as well as locations from main source file.
This patch takes conservative approach by not emitting more then one compile unit with isMain bit set.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69902 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
87de6497f45243fbcef6dac5be6a641ca9331f61 23-Apr-2009 Devang Patel <dpatel@apple.com> Handle corner case where clang-cc is invoked directly to compile preprocessed source file without -main-file-name. In this case, CDDebugInfo is not able identify correct main source file becase SM.isFromMainFile() returns true for locations from header files as well as locations from main source file.
This patch takes conservative approach by not emitting more then one compile unit with isMain bit set.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69902 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
8005c6cffe3390c2089fd9fe4519d5dbd3d0afdb 23-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Removed bunch of FIXMEs no longer needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69896 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
2eada631e99ae5239c55572d65b41433db6fa172 23-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Removed bunch of FIXMEs no longer needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69896 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ac277998e7dd169801c538e5ee46b240a8f4d07f 23-Apr-2009 Daniel Dunbar <daniel@zuster.org> Mark IMAGE_INFO as constant on x86_64-darwin.
- This shouldn't change anything, we never actually access it, but
this is consistent with llvm-gcc (and 32-bit)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69880 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
325f75896d346605a00b9cc3494ed20a2a5dfb4e 23-Apr-2009 Daniel Dunbar <daniel@zuster.org> Mark IMAGE_INFO as constant on x86_64-darwin.
- This shouldn't change anything, we never actually access it, but
this is consistent with llvm-gcc (and 32-bit)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69880 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ab3d373c38a05fcc0d74ee7fcacdf48d3ea2ceab 23-Apr-2009 Chris Lattner <sabre@nondot.org> fix a problem producing debug info with global blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69875 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
4863db4266d066617a1e5ad7c0f3f28c7995c61b 23-Apr-2009 Chris Lattner <sabre@nondot.org> fix a problem producing debug info with global blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69875 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
016d55e7b08507d7e710b52273db658c44b8e400 23-Apr-2009 Chris Lattner <sabre@nondot.org> implement debug info for _Complex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69873 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
b700377f850a29a4fc8cb3e1b07809ef1afdcce5 23-Apr-2009 Chris Lattner <sabre@nondot.org> implement debug info for _Complex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69873 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
f6279ae5cf4070f1ff869efd99de24f86f1c4c30 23-Apr-2009 Chris Lattner <sabre@nondot.org> the logic for computing __func__ and friends is really broken:
the type assigned by sema (and is visible with sizeof(__func__) for
example) has nothing to do with what codegen ends up producing.
We should eventually add a method on PredefinedExpr to handle this.
In the meantime, just set up some framework and add some fixme's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69872 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
odeGenFunction.cpp
odeGenFunction.h
b5437d238752dc297e42410e98d38d5250fe0463 23-Apr-2009 Chris Lattner <sabre@nondot.org> the logic for computing __func__ and friends is really broken:
the type assigned by sema (and is visible with sizeof(__func__) for
example) has nothing to do with what codegen ends up producing.
We should eventually add a method on PredefinedExpr to handle this.
In the meantime, just set up some framework and add some fixme's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69872 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
odeGenFunction.cpp
odeGenFunction.h
484451822c2311d0cdfbdb521861a979647b631f 23-Apr-2009 Daniel Dunbar <daniel@zuster.org> Use std::sort instead of qsort.
- Notably, there was a memory error here, SkipIvars does not have to
be the same size as IvarsInfo.

- Fariborz, please check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69850 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0941b49af3b7204ddb69ed21f07c966b8d949cf4 23-Apr-2009 Daniel Dunbar <daniel@zuster.org> Use std::sort instead of qsort.
- Notably, there was a memory error here, SkipIvars does not have to
be the same size as IvarsInfo.

- Fariborz, please check.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69850 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
cd19b57e8c03a742954680830bc440b8b0e08965 23-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate the three SmallVectors in ObjCImplDecl (for instance
methods, class methods, and property implementations) and instead
place all of these entities into the DeclContext.

This eliminates more linear walks when looking for class or instance
methods and should make PCH (de-)serialization of ObjCDecls trivial
(and lazy).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69849 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
653f1b1bf293a9bd96fd4dd6372e779cc7af1597 23-Apr-2009 Douglas Gregor <dgregor@apple.com> Eliminate the three SmallVectors in ObjCImplDecl (for instance
methods, class methods, and property implementations) and instead
place all of these entities into the DeclContext.

This eliminates more linear walks when looking for class or instance
methods and should make PCH (de-)serialization of ObjCDecls trivial
(and lazy).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69849 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
31b96494c5ed39354f2c3434d1dd5eaf3b03ae5c 23-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> ivar layout bitmap is alive!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69838 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c71303de3e295d19c3617b6738da009f6e679337 23-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> ivar layout bitmap is alive!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69838 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1af336e2c61518f7adee56b0d901989fb1f8040f 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Reapply r69771, with updates & fixes:

Rework the shadow struct that is layed out for Objective-C classes.

- Superclasses are now always laid out in their shadow structure at
the first field.

- Prior to this, the entire class heirarchy was flattened into a
single structure which meant that alignment, padding, and bitfields
were incorrect (the ASTRecordLayout was correct however, which
meant our debug info didn't coincide with ivar offsets, for
example).

- This is still very suboptimal (for example, ivar are looked up
recursively, but I believe the ivar layout itself is now at least
close to correct.

- <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding
backwards


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69811 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a80a0f6398df06c018af779a7ca82a29172c45d1 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Reapply r69771, with updates & fixes:

Rework the shadow struct that is layed out for Objective-C classes.

- Superclasses are now always laid out in their shadow structure at
the first field.

- Prior to this, the entire class heirarchy was flattened into a
single structure which meant that alignment, padding, and bitfields
were incorrect (the ASTRecordLayout was correct however, which
meant our debug info didn't coincide with ivar offsets, for
example).

- This is still very suboptimal (for example, ivar are looked up
recursively, but I believe the ivar layout itself is now at least
close to correct.

- <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding
backwards


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69811 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
fb65bfb53f9f9a9f00f129d0fb98f2b4c62a2318 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Remove lookupFieldDeclFromIvar from ObjCIvarDecl interface.
- This is only used by CGObjCRuntime now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69800 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a24357887dc2e6971fb84286be4484953565dc4d 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Remove lookupFieldDeclFromIvar from ObjCIvarDecl interface.
- This is only used by CGObjCRuntime now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69800 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
fa6fda40da3f365e650af6879f99d42376dece0d 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
GObjCMac.cpp
odeGenModule.cpp
odeGenTypes.cpp
odeGenTypes.h
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
GObjCMac.cpp
odeGenModule.cpp
odeGenTypes.cpp
odeGenTypes.h
e5bb23c3e0e709c3ee40b32fba6f07b8b43596d9 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add CGObjCRuntime::GetConcreteClassStruct to encapsulate access to the
underlying llvm::StructType for an interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69796 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
84ad77a8f83121713ea69d8002d1fd19565f87ab 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add CGObjCRuntime::GetConcreteClassStruct to encapsulate access to the
underlying llvm::StructType for an interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69796 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
fff345952fb88de27bef44036662ff57c4e372e6 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
odeGenTypes.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
odeGenTypes.cpp
e42aede34fd75d93d08751ad6fcdfde792853f87 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Emit meta data using the Ivar, not a looked up FieldDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69790 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3fea0c01e178e46eb20e81de4907a3d144c21fd6 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Emit meta data using the Ivar, not a looked up FieldDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69790 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
bdeefcc85cfae0f2ad62aa78d9b0d3f488624ed6 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Use ComputeIvarBaseOffset instead of looking up by hand.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69789 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
c8cbf1944863160f5f6f82967270b68bfb41361f 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Use ComputeIvarBaseOffset instead of looking up by hand.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69789 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
85d375460263b3a5d4b56b1b55f98b1093521e2b 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Merge ivar access amongst the three runtimes.
- For now, this means we are always doing the address computations by
hand instead of constructing a proper GEP. Right now, however, this
is less important than having fewer entry points to dealing with
Objective-C interface layout.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69787 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
9777687562c338601c2f17906e65e1c1a0aad96f 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Merge ivar access amongst the three runtimes.
- For now, this means we are always doing the address computations by
hand instead of constructing a proper GEP. Right now, however, this
is less important than having fewer entry points to dealing with
Objective-C interface layout.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69787 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
eee8c7c821c818532827a7fc598b808f7b198637 22-Apr-2009 Chris Lattner <sabre@nondot.org> implement debug info support for id<proto> and interface<proto>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69784 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
aa2b5799d2dc2c02f71a19cf846f8fd22ccbf5ef 22-Apr-2009 Chris Lattner <sabre@nondot.org> implement debug info support for id<proto> and interface<proto>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69784 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b64206c5f93e51a1857706eeab24cf945491ef42 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
GDebugInfo.cpp
odeGenTypes.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
GDebugInfo.cpp
odeGenTypes.cpp
61e14a61fbd677693c0552b66df26e03720182df 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Make ObjCInterfaceDecl's const in some more places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69775 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
2a03192a02dbf4fdff438d1e658356bde871aba4 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Make ObjCInterfaceDecl's const in some more places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69775 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
e0edb2eea011810e42287fcddc1ac575f2ac26c8 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Revert r69771, I missed some (obvious) details. :/


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69773 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d4ae6c038ea8dd2faaadd1f9da725ec37b4f7ef9 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Revert r69771, I missed some (obvious) details. :/


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69773 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
be1ff27081f5dda61e46171ccdcd46970a173fae 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
odeGenTypes.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
odeGenTypes.cpp
5573a5839eca4c84b22c36e3cbdbea0a2dd5086f 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Rework the shadow struct that is layed out for Objective-C classes.

- Superclasses are now always laid out their shadow structure at the
first field.

- Prior to this, the entire class heirarchy was flattened into a
single structure which meant that alignment, padding, and bitfields
weren't packed correctly (the ASTRecordLayout was correct however,
which meant our debug info didn't coincide with ivar offsets, for
example).

- This is still very suboptimal, but I believe the ivar layout itself
is now at least close to correct.

- <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding
backwards


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69771 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0c45793173ebdf15ba7345a1f71919c47abbeed0 22-Apr-2009 Daniel Dunbar <daniel@zuster.org> Rework the shadow struct that is layed out for Objective-C classes.

- Superclasses are now always laid out their shadow structure at the
first field.

- Prior to this, the entire class heirarchy was flattened into a
single structure which meant that alignment, padding, and bitfields
weren't packed correctly (the ASTRecordLayout was correct however,
which meant our debug info didn't coincide with ivar offsets, for
example).

- This is still very suboptimal, but I believe the ivar layout itself
is now at least close to correct.

- <rdar://problem/6773388> error: objc[29823]: layout bitmap sliding
backwards


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69771 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ada416b72c14f22ae4a726dd92c2ce25a5001e9e 22-Apr-2009 Chris Lattner <sabre@nondot.org> move 64-bit abi functions to lazy model, everything is lazy now, yay.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69767 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1c02f86f5be46f36d6c5facb88c2d15e0e19266c 22-Apr-2009 Chris Lattner <sabre@nondot.org> move 64-bit abi functions to lazy model, everything is lazy now, yay.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69767 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a7ecda441df4278e1f3777e881baf30f7561daef 22-Apr-2009 Chris Lattner <sabre@nondot.org> remove the last of the non-lazy objc runtime functions for the 32-bit ABI,
7 left for 64-bit ABI.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69766 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
72db6c3db7b3f992f06c880f9039f03b4cdeb517 22-Apr-2009 Chris Lattner <sabre@nondot.org> remove the last of the non-lazy objc runtime functions for the 32-bit ABI,
7 left for 64-bit ABI.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69766 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f6ec7e4023b88fe1785e58e43786b1484042b88e 22-Apr-2009 Chris Lattner <sabre@nondot.org> number of non-lazy runtime functions from 9 -> 4.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69765 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
bbccd611bb3ccf36703992592ef5209327f259b9 22-Apr-2009 Chris Lattner <sabre@nondot.org> number of non-lazy runtime functions from 9 -> 4.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69765 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
61114190da75c65349772a96dcfef41bd9f3d28a 22-Apr-2009 Chris Lattner <sabre@nondot.org> make message send functions lazy, we're down from 14 non-lazy functions to 9.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69764 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
4176b0c632b166548f5d0437efff10a748cd62c4 22-Apr-2009 Chris Lattner <sabre@nondot.org> make message send functions lazy, we're down from 14 non-lazy functions to 9.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69764 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
e05d4cb32e11111697fe513396cf2f21d6e20a8f 22-Apr-2009 Chris Lattner <sabre@nondot.org> move more EH stuff to being lazily created. An empty .m file now
produces just 14 dead "declares" in llvm ir instead of 19.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69763 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
34b02a11576fd6123a703102fc0405a5bb29f6a9 22-Apr-2009 Chris Lattner <sabre@nondot.org> move more EH stuff to being lazily created. An empty .m file now
produces just 14 dead "declares" in llvm ir instead of 19.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69763 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
93dca5b91c878d42c0fe1eed915f0486d289ced6 22-Apr-2009 Chris Lattner <sabre@nondot.org> make try/catch objc runtime functions be lazily generated.
rdar://6809612



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69762 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
8a56911956aa875922a5faa3787c6829e7f7011f 22-Apr-2009 Chris Lattner <sabre@nondot.org> make try/catch objc runtime functions be lazily generated.
rdar://6809612



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69762 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
11ac02512fb47e253ae0c72f7e3b60bb940aa960 22-Apr-2009 Chris Lattner <sabre@nondot.org> Fix some mishandling of the attr(gnu_inline) mode when used with
extern. Previously we would warn about it and ignore the attribute.
This is incorrect, it should be handled as a c89 "extern inline"
function. Many thanks to Matthieu Castet for pointing this out and
beating me over the head until I got it.

PR3988: extern inline function are not externally visible




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69756 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d55a71d852d4d8b785122b8d033a0c06b187067b 22-Apr-2009 Chris Lattner <sabre@nondot.org> Fix some mishandling of the attr(gnu_inline) mode when used with
extern. Previously we would warn about it and ignore the attribute.
This is incorrect, it should be handled as a c89 "extern inline"
function. Many thanks to Matthieu Castet for pointing this out and
beating me over the head until I got it.

PR3988: extern inline function are not externally visible




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69756 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
1a3965ed2cfaeee4724fef508922fd2cc1c2b058 22-Apr-2009 Chris Lattner <sabre@nondot.org> fix PR4026: Clang can't codegen __func__ without implicit cast


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69747 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
f0a990c2aa0b596a7e3cdd8fa2a5909d591ffe66 22-Apr-2009 Chris Lattner <sabre@nondot.org> fix PR4026: Clang can't codegen __func__ without implicit cast


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69747 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
dbc8af7f9499e1508b1db68dd79d77051d7ecdd1 21-Apr-2009 Daniel Dunbar <daniel@zuster.org> Make sure to mark the interface as completed when we see an
@implementation that closes a @class delcaration.
- I don't know how to make a test case for this, but this strengthens
the invariants that hold internally. The functionality change here
is the edit to SemaDeclObjC.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69728 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
24c8991f4dd0ab86678b5ab11f05586687b55be9 21-Apr-2009 Daniel Dunbar <daniel@zuster.org> Make sure to mark the interface as completed when we see an
@implementation that closes a @class delcaration.
- I don't know how to make a test case for this, but this strengthens
the invariants that hold internally. The functionality change here
is the edit to SemaDeclObjC.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69728 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
afcde0cbd69f12cb3a64dfae4cc475d306e4b7fd 21-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Fix emission of static tentative definitions referenced from other static functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69699 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7520bd1de12af10ea08c662440565adbdf589317 21-Apr-2009 Douglas Gregor <dgregor@apple.com> Fix emission of static tentative definitions referenced from other static functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69699 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7e0528135913552fe42b8682f02bafd54aec1200 21-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> More objc2's ivar layout bitmap. No change in functionality.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69695 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7fb162785f42d74d419db3d0d37ba698bca780a1 21-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> More objc2's ivar layout bitmap. No change in functionality.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69695 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
96086d866ad96c02de2099a498785770c9f06cf7 21-Apr-2009 Chris Lattner <sabre@nondot.org> don't bother emitting a zero byte memset at all. We used to get them
in cases like this:

typedef struct {
short instance;
char name[0];
} ATTR_LIST_ENTRY2;

void test() {
ATTR_LIST_ENTRY2 X = (ATTR_LIST_ENTRY2) { .instance = 7, };
}

While it is safe to emit them, it is pretty silly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69687 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
88207c9ca218486b93ae7df14e9764cd0c2c3383 21-Apr-2009 Chris Lattner <sabre@nondot.org> don't bother emitting a zero byte memset at all. We used to get them
in cases like this:

typedef struct {
short instance;
char name[0];
} ATTR_LIST_ENTRY2;

void test() {
ATTR_LIST_ENTRY2 X = (ATTR_LIST_ENTRY2) { .instance = 7, };
}

While it is safe to emit them, it is pretty silly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69687 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
9cdb4a1f7769e97892b7b6ccb54b6f6914cd29ae 21-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Explictly track tentative definitions within Sema, then hand those
tentative definitions off to the ASTConsumer at the end of the
translation unit.

Eliminate CodeGen's internal tracking of tentative definitions, and
instead hook into ASTConsumer::CompleteTentativeDefinition. Also,
tweak the definition-deferal logic for C++, where there are no
tentative definitions.

Fixes <rdar://problem/6808352>, and will make it much easier for
precompiled headers to cope with tentative definitions in the future.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69681 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
b6c8c8bd8d362c8a6cdb767415b0d21e62b77eb2 21-Apr-2009 Douglas Gregor <dgregor@apple.com> Explictly track tentative definitions within Sema, then hand those
tentative definitions off to the ASTConsumer at the end of the
translation unit.

Eliminate CodeGen's internal tracking of tentative definitions, and
instead hook into ASTConsumer::CompleteTentativeDefinition. Also,
tweak the definition-deferal logic for C++, where there are no
tentative definitions.

Fixes <rdar://problem/6808352>, and will make it much easier for
precompiled headers to cope with tentative definitions in the future.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69681 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
88b4e51f1f1d676f260b6b2a0affbbd55afa1f0b 21-Apr-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Pass and return aggregate types directly to function calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69668 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
70aa5f9e9f3ec77327f701562efc53d7c36c5843 21-Apr-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Pass and return aggregate types directly to function calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69668 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
5b742a46ab6cc8fb43d2ab510545a0252cd5a3b8 21-Apr-2009 Chris Lattner <sabre@nondot.org> use of predefined identifiers like __func__ at global scope warn in sema,
but crashed codegen. Fix this to report the name of the llvm function.
This fixes rdar://6808051


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69658 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
f1c97eb52e55d2d1340a0345ed91e345fddcb65d 21-Apr-2009 Chris Lattner <sabre@nondot.org> use of predefined identifiers like __func__ at global scope warn in sema,
but crashed codegen. Fix this to report the name of the llvm function.
This fixes rdar://6808051


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69658 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
c27a03b6bbce694b2c06e1bb715198bdf45fb3fe 21-Apr-2009 Daniel Dunbar <daniel@zuster.org> Remove unnused variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69650 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
7818a4d888d73d102a82d99b4134ecdce5e162e5 21-Apr-2009 Daniel Dunbar <daniel@zuster.org> Remove unnused variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69650 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
f5254bda2945bd427acad4a0f0f62026333b66ce 21-Apr-2009 Daniel Dunbar <daniel@zuster.org> Kill ASTContext::[gs]etFieldForDecl, instead we just lookup things
when we need them -- which is exactly what some code was already
doing!
- No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69648 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
525c9b7baeeff022127cd1b167579f3bda73b3ed 21-Apr-2009 Daniel Dunbar <daniel@zuster.org> Kill ASTContext::[gs]etFieldForDecl, instead we just lookup things
when we need them -- which is exactly what some code was already
doing!
- No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69648 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
f9ff804593eecb8016d944a7ce1eab61e03a442e 21-Apr-2009 Daniel Dunbar <daniel@zuster.org> Remove LateBoundIVars() runtime interface, it is unused.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69641 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCRuntime.h
6bf2ae05c777052e5ec05649710380dea263e7e0 21-Apr-2009 Daniel Dunbar <daniel@zuster.org> Remove LateBoundIVars() runtime interface, it is unused.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69641 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCRuntime.h
0ac5bbc5a99f5f3671a681c16436097cf2d876d2 21-Apr-2009 Daniel Dunbar <daniel@zuster.org> Assert on a few conditions that (I believe) should hold
w.r.t. ASTContext::[gs]etFieldDecl, and the Field argument to
EmitObjCValueForIvar).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69639 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
9e6c20bae697c908b7d368c0f79f5510d1006a65 21-Apr-2009 Daniel Dunbar <daniel@zuster.org> Assert on a few conditions that (I believe) should hold
w.r.t. ASTContext::[gs]etFieldDecl, and the Field argument to
EmitObjCValueForIvar).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69639 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
31614740b391abf27e18b4091f093795d3877b91 21-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> ObjC2's Ivar bitmap layout work. No change in functionality.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69629 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3d2ad66b47d19fb771276a66ab8ac7c9c38694b7 21-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> ObjC2's Ivar bitmap layout work. No change in functionality.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69629 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7287872f9b454d9f0ecb596fe1634b4f636ddc4b 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Move countInheritedIvars to within striking distance of
GetClassSizeInfo

Reduce nesting in GetInterfaceDeclStructLayout.

Tweak some comments.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69621 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6c1aac8883ef2732a2d8543d7ac2a5ca9a199f86 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Move countInheritedIvars to within striking distance of
GetClassSizeInfo

Reduce nesting in GetInterfaceDeclStructLayout.

Tweak some comments.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69621 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
15ce6cc75018b69a2fc849c9ee5bceb30e0e67c1 20-Apr-2009 Chris Lattner <sabre@nondot.org> the __gnuc_inline__ attribute is actually named __gnu_inline__,
PR4023


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69618 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
cf2a7211b4785068c7efa836baab90b198a4d2a6 20-Apr-2009 Chris Lattner <sabre@nondot.org> the __gnuc_inline__ attribute is actually named __gnu_inline__,
PR4023


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69618 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
de5857290f1d7da7ec7ebfe9d83e986b987df422 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Inline GetFirstIvarInRecord into sole caller.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69582 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6ec07164b4c678645036c0e43007cc9663d2af74 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Inline GetFirstIvarInRecord into sole caller.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69582 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b79f5a949147cb8567eb493d8e6cebd3253cdfce 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Set a bit in IMAGE_INFO to indicate that we don't contain any
@synthesized ivars for superclasses.
- <rdar://problem/6806371> [clang] Mark code without miscompiled
@synthesized properties


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69581 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c7c6dc0c7ad547f03778502a63a18c3277dd93b5 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Set a bit in IMAGE_INFO to indicate that we don't contain any
@synthesized ivars for superclasses.
- <rdar://problem/6806371> [clang] Mark code without miscompiled
@synthesized properties


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69581 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
356f074b31d545ab3bc36eb47d0bbfcd922dcca5 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Lift out GetNamedIvarList.

Drop uses of GetFirstInvarInRecord, instead we lookup the ivars we
know are in the record.
- This is somewhat less efficient, but I need to detangle this code
first...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69579 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3e5f0d88d7eda79b7a679188d1e6da54cec72f5d 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Lift out GetNamedIvarList.

Drop uses of GetFirstInvarInRecord, instead we lookup the ivars we
know are in the record.
- This is somewhat less efficient, but I need to detangle this code
first...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69579 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d73f5f299c0295285ab9d5a425db247160120640 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Don't emit ivar offsets for unnamed bit fields.

Also, added assertion that the field matches what would be looked up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69572 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3eec8aac935eda70975d7d88f1f4a09be90f33c9 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Don't emit ivar offsets for unnamed bit fields.

Also, added assertion that the field matches what would be looked up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69572 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a7ef8e554c7ac5916fc94582f9c720965f45b2d9 20-Apr-2009 Eli Friedman <eli.friedman@gmail.com> PR3247: Handle a couple of cases where we weren't emitting VLA sizes (and
subsequently crashed).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69567 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprScalar.cpp
c62aad8f45ec3dd893376bd1c51e5e8019a76d8e 20-Apr-2009 Eli Friedman <eli.friedman@gmail.com> PR3247: Handle a couple of cases where we weren't emitting VLA sizes (and
subsequently crashed).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69567 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprScalar.cpp
04659bd55c08ba8eeeef83f53d3d451b8dd15ff8 20-Apr-2009 Eli Friedman <eli.friedman@gmail.com> PR3248: Make sure the evaluate the operand of a sizeof when it has a VLA type.

Adapted from patch by Tim Northover.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69566 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
8f426fa9fca022201fc0944d6c1cb2cf9918db7d 20-Apr-2009 Eli Friedman <eli.friedman@gmail.com> PR3248: Make sure the evaluate the operand of a sizeof when it has a VLA type.

Adapted from patch by Tim Northover.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69566 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
f0587c6ee2d465d64c0f64fda81cfb665f400a43 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Remove non-const form of lookupFieldDeclForIvar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69563 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
60952f94cf67ddb566600434857cad7a48264c3b 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Remove non-const form of lookupFieldDeclForIvar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69563 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
1748ac3346ccf93ac31105a8f8afccf09f793627 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Comment fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69562 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
91636d6c4c07fd2edf19a510b02c6e793a28741f 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Comment fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69562 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ecb5d406ce2faf5f0e67fd08cd8513b1f23081e1 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Lift GetClassSizeInfo out of GenerateClass, add a FIXME.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69561 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b02532a9e34d23de996cbf1f46fc978ef556c0e5 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Lift GetClassSizeInfo out of GenerateClass, add a FIXME.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69561 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f6bce3666c9ae72272a20e849f1266f06c4f0949 19-Apr-2009 Eli Friedman <eli.friedman@gmail.com> PR3853: Add CodeGen support for __thread.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69545 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
56ebe5082da7411fb37479e230b52735f77cff35 19-Apr-2009 Eli Friedman <eli.friedman@gmail.com> PR3853: Add CodeGen support for __thread.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69545 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
aef88bacd8cc14c5b66117b245c55464b38cac73 19-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Silence gcc warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69541 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
1768fabfbae60202ba497b98dd9be9eb09bb2e20 19-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Silence gcc warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69541 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
ecdc0c5ccf4f930bdce55a5745d663e2c651c564 19-Apr-2009 Chris Lattner <sabre@nondot.org> silence a warning, it isn't clear what the right answer is here,
will talk to steve.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69519 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
271474e32f38cc5bd735c1006e499996cbc6e2d1 19-Apr-2009 Chris Lattner <sabre@nondot.org> silence a warning, it isn't clear what the right answer is here,
will talk to steve.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69519 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f9890530465f20378d20e6c1568ab0fa2ecffa9a 19-Apr-2009 Chris Lattner <sabre@nondot.org> silence a warning, I need to talk to Devang about this code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69517 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
adb1a6fae75a70bc4572ea1188612e2f9f78bd5e 19-Apr-2009 Chris Lattner <sabre@nondot.org> silence a warning, I need to talk to Devang about this code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69517 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9fe470d8701683adb59a843fa3859aba69cace1c 19-Apr-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6804402 - crash on objc implementations declared with
@class but no implementation. This was broken in all 3 runtime
impls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69512 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
b7b58b1fcd3007730fd46471583543c9b57c7693 19-Apr-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6804402 - crash on objc implementations declared with
@class but no implementation. This was broken in all 3 runtime
impls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69512 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
1cfb519ff4ca649b5a865695d2f60066ef3a4972 19-Apr-2009 Daniel Dunbar <daniel@zuster.org> Fix bug in computation of ivar offsets for (adjacent) bitfields.
- The confusing IRgen bitfield interface is partly to blame here;
fixing the functional error for now, cleanups to the interface to
follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69503 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
48fa064aa62526def4a0d804c43ed08ef44136eb 19-Apr-2009 Daniel Dunbar <daniel@zuster.org> Fix bug in computation of ivar offsets for (adjacent) bitfields.
- The confusing IRgen bitfield interface is partly to blame here;
fixing the functional error for now, cleanups to the interface to
follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69503 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
27e2840829b64cb7f51b598d3ecc4792c4886d1e 19-Apr-2009 Chris Lattner <sabre@nondot.org> revert david's patch, which causes a testsuite failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69501 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
33b3bc9cab760cc5104f5f7be8eb25d35e7b6c61 19-Apr-2009 Chris Lattner <sabre@nondot.org> revert david's patch, which causes a testsuite failure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69501 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
0438ff43b17636d07d853aad6d9256577628590c 19-Apr-2009 Daniel Dunbar <daniel@zuster.org> Reuse ObjcIvarOffsetVariable instead of duplicating code.
- No functionality change (but added a FIXME).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69496 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
737c502a3f259fc3790542366597c7e3fccad6fd 19-Apr-2009 Daniel Dunbar <daniel@zuster.org> Reuse ObjcIvarOffsetVariable instead of duplicating code.
- No functionality change (but added a FIXME).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69496 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
07d204ae6d26c0988de05cb11b69b0e4d93a2067 19-Apr-2009 Daniel Dunbar <daniel@zuster.org> Remove some unnecessary complexity.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69495 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
5e88beaa0a86b162dfb9f53891adfdfbe925cc64 19-Apr-2009 Daniel Dunbar <daniel@zuster.org> Remove some unnecessary complexity.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69495 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6ed36eeb11a8c15bf1146aec4c97a9bcb0a624f4 19-Apr-2009 Chris Lattner <sabre@nondot.org> "This patch fixes message sends to super in class methods for the GNU runtime (currently an instance method lookup is being performed)."

Patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69493 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
39d462e231de8f37fffd5a32394fb7642f489d10 19-Apr-2009 Chris Lattner <sabre@nondot.org> "This patch fixes message sends to super in class methods for the GNU runtime (currently an instance method lookup is being performed)."

Patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69493 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
804de01d7555052cb4c1e98334f1daa413e2c47d 18-Apr-2009 Anders Carlsson <andersca@mac.com> Use EmitCallArgs in EmitObjCMessageExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69471 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
131038e2125d98f1be0d9cb62561a7cede41bb44 18-Apr-2009 Anders Carlsson <andersca@mac.com> Use EmitCallArgs in EmitObjCMessageExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69471 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
1373a950af9289f68e2ed04f7d580bc930dfcee6 18-Apr-2009 Anders Carlsson <andersca@mac.com> Make CodeGenFunction::EmitCallArgs a template function that takes a generic "Type Info" parameter. The type info parameter knows how to iterate over its arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69469 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.h
af23f69aa6247e6bd20a66b2e16babb91f192535 18-Apr-2009 Anders Carlsson <andersca@mac.com> Make CodeGenFunction::EmitCallArgs a template function that takes a generic "Type Info" parameter. The type info parameter knows how to iterate over its arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69469 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.h
d4271f63432647e695eb3b2e56e6db0b0f387f4d 18-Apr-2009 Daniel Dunbar <daniel@zuster.org> Use getAsPointerType instead of using getCanonicalType directly.
- <rdar://problem/6803995>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69435 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
f3ef07cbe8f154ba373f42291132048687f80bf0 18-Apr-2009 Daniel Dunbar <daniel@zuster.org> Use getAsPointerType instead of using getCanonicalType directly.
- <rdar://problem/6803995>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69435 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
3c1908152159ea8f056d13ae03829d96e5543cd5 18-Apr-2009 Daniel Dunbar <daniel@zuster.org> Fix a bug found by inspection, class/meta references could be emitted
into the wrong section (they shared the same lookup table).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69433 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1139452ae326e96a11f9740e5fda7f995fd3a6be 18-Apr-2009 Daniel Dunbar <daniel@zuster.org> Fix a bug found by inspection, class/meta references could be emitted
into the wrong section (they shared the same lookup table).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69433 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
83d6fe632d53b501493b9fc9b8e5d6f1fffbee94 18-Apr-2009 Chris Lattner <sabre@nondot.org> fix incorrect lowering of __builtin_ia32_shufpd, rdar://6803924


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69428 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
f29c8ad917e5fdc8fdd3d43707073be217bad625 18-Apr-2009 Chris Lattner <sabre@nondot.org> fix incorrect lowering of __builtin_ia32_shufpd, rdar://6803924


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69428 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
e3241e9ede65d127bd9e98fa29d8aa7546288434 18-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> FunctionDecl::getBody() is getting an ASTContext argument for use in
lazy PCH deserialization. Propagate that argument wherever it needs to
be. No functionality change, except that I've tightened up a few PCH
tests in preparation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69406 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.cpp
odeGenModule.cpp
7297134f128423fce2e88f92421ed135bded7d4e 18-Apr-2009 Douglas Gregor <dgregor@apple.com> FunctionDecl::getBody() is getting an ASTContext argument for use in
lazy PCH deserialization. Propagate that argument wherever it needs to
be. No functionality change, except that I've tightened up a few PCH
tests in preparation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69406 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.cpp
odeGenModule.cpp
293c1d3f0411e2907b1250748bb19f1c392738d3 18-Apr-2009 Chris Lattner <sabre@nondot.org> fix a crash compiling code with its own definition of objc_assign_weak.
rdar://6800430



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69392 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
96508e1fea58347b6401ca9a4728c0b268174603 18-Apr-2009 Chris Lattner <sabre@nondot.org> fix a crash compiling code with its own definition of objc_assign_weak.
rdar://6800430



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69392 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9b3f5f7f4e1befca6c3734d29f8d87ad0a0e4f18 17-Apr-2009 Devang Patel <dpatel@apple.com> Use PresumedLoc to record line number in debug info entries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69389 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4f6fa233be8e7d1d10445c704c8cfb1869ce8c4c 17-Apr-2009 Devang Patel <dpatel@apple.com> Use PresumedLoc to record line number in debug info entries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69389 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a77581b0403e69648c53df48ccb9a3ac5710c372 17-Apr-2009 Daniel Dunbar <daniel@zuster.org> Don't put msgrefs in used globals (in particular, we don't want
no-dead-strip set on them).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69388 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
8a81e1e858f9bb75c295c12b5b05e17b49fcd279 17-Apr-2009 Daniel Dunbar <daniel@zuster.org> Don't put msgrefs in used globals (in particular, we don't want
no-dead-strip set on them).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69388 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6fe2e15bb90f030651fba7d28d69ed99161dfab3 17-Apr-2009 Devang Patel <dpatel@apple.com> Appropriately set file name and directory name in debug info compile units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69387 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
446c619f37349815a3ccfb703b1ac08684279ae1 17-Apr-2009 Devang Patel <dpatel@apple.com> Appropriately set file name and directory name in debug info compile units.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69387 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
bb87be2507579a463f5898f466ed73229903c614 17-Apr-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6800926 - crash compiling non-fragile _Bool bitfield ivar,
the functional change here is changing ConvertType -> ConvertTypeForMem
so that we handle i1 fields properly as memory.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69361 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
51123fe78c92a4d1e76b6599db9db6a87db7b679 17-Apr-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6800926 - crash compiling non-fragile _Bool bitfield ivar,
the functional change here is changing ConvertType -> ConvertTypeForMem
so that we handle i1 fields properly as memory.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69361 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
552914b2623e02960780c348c3cef5fc50c57e90 17-Apr-2009 Chris Lattner <sabre@nondot.org> tidy some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69360 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
26f074b249b7b113c78fad22e80b0e03289aa7d2 17-Apr-2009 Chris Lattner <sabre@nondot.org> tidy some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69360 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4811c309214dd08b99a73ec889650f8f33a59fa6 17-Apr-2009 Anders Carlsson <andersca@mac.com> Add support for generating (very basic) C++ destructors. These aren't called by anything yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69343 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
angle.cpp
angle.h
27ae53665f8b00fe4ba21da0fa79a4ce6e0b6cd5 17-Apr-2009 Anders Carlsson <andersca@mac.com> Add support for generating (very basic) C++ destructors. These aren't called by anything yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69343 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
angle.cpp
angle.h
5b90ae15eccdd0de8688a82df2a86a7adabd27e9 17-Apr-2009 Daniel Dunbar <daniel@zuster.org> Attributes on block functions were not being set.
- <rdar://problem/6800351> clang not producing correct large struct
return code for Blocks


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69337 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GObjC.cpp
odeGenModule.cpp
odeGenModule.h
0e4f40e1bbc4dce16bbb9870300a435419f1b3d5 17-Apr-2009 Daniel Dunbar <daniel@zuster.org> Attributes on block functions were not being set.
- <rdar://problem/6800351> clang not producing correct large struct
return code for Blocks


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69337 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GObjC.cpp
odeGenModule.cpp
odeGenModule.h
72f4829a0205e1afffaaf59de7cf007c29493417 17-Apr-2009 Anders Carlsson <andersca@mac.com> Implement basic code generation of constructor calls. We can now compile:

struct S {
S(int, int);
};

void f() {
S s(10, 10);
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69330 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
b14095aa98c6fedd3625920c4ce834bcaf24d9f7 17-Apr-2009 Anders Carlsson <andersca@mac.com> Implement basic code generation of constructor calls. We can now compile:

struct S {
S(int, int);
};

void f() {
S s(10, 10);
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69330 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
GExprAgg.cpp
odeGenFunction.h
890a9fdcec8ababaf7a3f1e77925c1953e7d3261 17-Apr-2009 Anders Carlsson <andersca@mac.com> Add GetAddrOfCXXConstructor and use it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69328 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.h
363c184139e26ea38223b477ad64ee67b22bb9a7 17-Apr-2009 Anders Carlsson <andersca@mac.com> Add GetAddrOfCXXConstructor and use it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69328 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.h
e10f8e0a2767d78f62a700c81c3cedee56374d26 16-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Removed a no longer needed FIXME comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69315 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
fdb5e1c5317fb59415b8eea10a584030cf997627 16-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Removed a no longer needed FIXME comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69315 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6e4b7378344175f8de062f6cf1f330a435dcf6e1 16-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Category method synbols must be qualified by gategory name to
match gcc's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69305 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1e9aef31545b2312ddfc5ac2593ad8e48754e2c6 16-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Category method synbols must be qualified by gategory name to
match gcc's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69305 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
bd26196393e625829ded9aab83e56c39b65c9ed0 16-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Fix a crash bug when comparing overload quality of conversion operators with conversion constructors.
Remove an atrocious amount of trailing whitespace in the overloaded operator mangler. Sorry, couldn't help myself.
Change the DeclType parameter of Sema::CheckReferenceInit to be passed by value instead of reference. It wasn't changed anywhere.
Let the parser handle C++'s irregular grammar around assignment-expression and conditional-expression.
And finally, the reason for all this stuff: implement C++ semantics for the conditional operator. The implementation is complete except for determining lvalueness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69299 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
3201f6beec688ab9fe8750527e28f52d5420e22d 16-Apr-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Fix a crash bug when comparing overload quality of conversion operators with conversion constructors.
Remove an atrocious amount of trailing whitespace in the overloaded operator mangler. Sorry, couldn't help myself.
Change the DeclType parameter of Sema::CheckReferenceInit to be passed by value instead of reference. It wasn't changed anywhere.
Let the parser handle C++'s irregular grammar around assignment-expression and conditional-expression.
And finally, the reason for all this stuff: implement C++ semantics for the conditional operator. The implementation is complete except for determining lvalueness.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69299 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
5645039beca9e7e30067fc23e8503b11727883ab 16-Apr-2009 Daniel Dunbar <daniel@zuster.org> Ensure that the most recent declaration of a tentative definition wins
when generating a common definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69287 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6463ef4caf2fb576d38b1b2e15a29ac9f2abb3e7 16-Apr-2009 Daniel Dunbar <daniel@zuster.org> Ensure that the most recent declaration of a tentative definition wins
when generating a common definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69287 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b71fa97cdd6b81b12dffc511c584b54bb5ace971 16-Apr-2009 Mike Stump <mrs@apple.com> Fixup codegen for copy/dispose for block literals. Radar 6791245


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69232 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
c2f4c34ed8f79b4136f2c03e41ce3ea0c781bc9a 16-Apr-2009 Mike Stump <mrs@apple.com> Fixup codegen for copy/dispose for block literals. Radar 6791245


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69232 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
f25d8a9b70d9bf8eb3900e21b6fed8e9a98514c2 16-Apr-2009 Daniel Dunbar <daniel@zuster.org> Defer generation of tentative definitions.
- PR3980.

- <rdar://problem/6762287> [irgen] crash when generating tentative
definition of incomplete structure

- This also avoids creating common definitions for things which are
later overwritten.

- XFAIL'ed external-defs.c, it isn't completing types properly yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69231 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
03f5ad9a7707e098f601921fcec17ed65eb355a7 16-Apr-2009 Daniel Dunbar <daniel@zuster.org> Defer generation of tentative definitions.
- PR3980.

- <rdar://problem/6762287> [irgen] crash when generating tentative
definition of incomplete structure

- This also avoids creating common definitions for things which are
later overwritten.

- XFAIL'ed external-defs.c, it isn't completing types properly yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69231 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
6ae64bb93a7c56625e92e4240c8674927a829c3d 15-Apr-2009 Devang Patel <dpatel@apple.com> Set DebugInfo at the beginning of GenerateBlockFunction().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69228 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
963dfbde17a28bc88ee1647bc85fd8407bfc9555 15-Apr-2009 Devang Patel <dpatel@apple.com> Set DebugInfo at the beginning of GenerateBlockFunction().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69228 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
8496c69732c23ec9f13c0bf51e5bc88f1f4afd8a 15-Apr-2009 Anders Carlsson <andersca@mac.com> Actually generate code for the simple constructors we know we can generate code for.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69222 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
59d8e0ff383274d992b3fa9ebee48b5e4a5ebdd1 15-Apr-2009 Anders Carlsson <andersca@mac.com> Actually generate code for the simple constructors we know we can generate code for.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69222 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
da630460f9b5a0484efb1f1ab51ae583b5436caf 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Don't use \01 in symbol name if unnecessary.
- This was particularly bad since I fixed one instance of this name
and not another, meaning we got an LLVM module with the same
effective name in two different globals!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69205 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7595fb1418243ac715d729b4dc62d995a7a1d5a5 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Don't use \01 in symbol name if unnecessary.
- This was particularly bad since I fixed one instance of this name
and not another, meaning we got an LLVM module with the same
effective name in two different globals!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69205 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a405f78c70a917941309ff113e6da02cb7f4a0d1 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Fix alignment on obj_msgrefs to match llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69199 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f59c1a6d27ff23fb0ea1f5b94be0e1dc866f68b9 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Fix alignment on obj_msgrefs to match llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69199 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
4993e29520a5e4973de75711c169fa93d0737922 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add test case for superrefs section (and make spacing consistent).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69198 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
33af70f0f003d9765b92621f4fdd801e2b6c0ae7 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add test case for superrefs section (and make spacing consistent).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69198 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c140203a307ade42e1bcf8343956c287299554b9 15-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> __objc_superrefs belongs to __DATA segment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69170 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
93ae2c780e2ab6382f60610866217213a9fa182a 15-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> __objc_superrefs belongs to __DATA segment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69170 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
652951a25f88dc0c24492994595736b5f3d3d3ec 15-Apr-2009 Anders Carlsson <andersca@mac.com> Start attempting to generate code for C++ ctors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69168 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
95d4e5d2f87a0f07fb143ccb824dfc4c5c595c78 15-Apr-2009 Anders Carlsson <andersca@mac.com> Start attempting to generate code for C++ ctors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69168 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
odeGenModule.cpp
odeGenModule.h
6b6adf2a20e6bad4ba2aa2eedb475e98509fc364 15-Apr-2009 Anders Carlsson <andersca@mac.com> Add support for mangling C++ constructors. Review appreciated (I'm looking at you, Doug)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69150 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
3ac86b59b03086ce2acc1ddf3b30ffcd18aeeb65 15-Apr-2009 Anders Carlsson <andersca@mac.com> Add support for mangling C++ constructors. Review appreciated (I'm looking at you, Doug)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69150 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
eb2e912e338df50a6f21a86af61684ca5fb91687 15-Apr-2009 Anders Carlsson <andersca@mac.com> Add CGCXX.h with ctor/dtor type enumerations. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69137 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.h
68a359cac7532c465d7673314f294710a7054c38 15-Apr-2009 Anders Carlsson <andersca@mac.com> Add CGCXX.h with ctor/dtor type enumerations. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69137 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.h
922266314822f000f556847ad7f3bb0487d403e3 15-Apr-2009 Anders Carlsson <andersca@mac.com> Simplify CodeGenFunction::GenerateCode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69134 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
d7c62b1929b024047a06697d2fedbd4c2e7d0cdf 15-Apr-2009 Anders Carlsson <andersca@mac.com> Simplify CodeGenFunction::GenerateCode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69134 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
9dfd3a7a3f9d01a16ac2e42cf848d02ce6e1c0ea 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Tweaks to Objective-C metadata (32 & 64-bit) to match llvm-gcc.
- Set alignment on property lists.
- 32-bit:
o Set section on property lists.
o Fix section name for category class methods.
o Fix symbol name for property lists.
o Fix section name for class method.
o Set alignment and section on class extension structure.
o Set alignment on a number of things: instance variables, methods,
method descriptions, the symbols structure.
- 64-bit:
o Fix section flags for protocol list.

I doubt most of these were problems in practice, but it is nice to
match llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69132 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0bf2199b79b1ca2dcbb0d0406fd90335c8575752 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Tweaks to Objective-C metadata (32 & 64-bit) to match llvm-gcc.
- Set alignment on property lists.
- 32-bit:
o Set section on property lists.
o Fix section name for category class methods.
o Fix symbol name for property lists.
o Fix section name for class method.
o Set alignment and section on class extension structure.
o Set alignment on a number of things: instance variables, methods,
method descriptions, the symbols structure.
- 64-bit:
o Fix section flags for protocol list.

I doubt most of these were problems in practice, but it is nice to
match llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69132 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
fbfd92aaacda33584b7a74c275da3fe74349b970 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Set alignment on __cstring metadata variables to 1 (matching
llvm-gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69097 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b90bb0099e9c8914ba18ddb2d30f9369b6de74d5 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Set alignment on __cstring metadata variables to 1 (matching
llvm-gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69097 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
bcaba2c8eb92972e0c9a780f19681101f25a229b 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Avoid use of magic \01 prefix when unneeded.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69093 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
dd1319879fedf30690fbbb63d5330ad4e54ffe9f 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Avoid use of magic \01 prefix when unneeded.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69093 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
bfc45331279a021c20a2dc1c6b7046194ba11741 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Comment fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69091 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
57d5cee133495bc21d1abdbce45ab05a79274a23 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Comment fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69091 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
614dcfb90655c293d67ca61908bd9cbcd7a90aac 14-Apr-2009 Chris Lattner <sabre@nondot.org> remove dead enum


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69070 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
44e79b1b60ada12119bd9b39fef28f7f69cddd7c 14-Apr-2009 Chris Lattner <sabre@nondot.org> remove dead enum


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69070 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
67104c8e73065222de7c99a4b8d325100ad8e3c2 14-Apr-2009 Chris Lattner <sabre@nondot.org> Fix PR3988: extern inline functions get strong symbol definitions in
C99 mode. This is a regression from an earlier patch of mine.

This also simplifies the linkage enums a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69069 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
cbb8fc18d86a886856f5b852a6a3ead71fec17f9 14-Apr-2009 Chris Lattner <sabre@nondot.org> Fix PR3988: extern inline functions get strong symbol definitions in
C99 mode. This is a regression from an earlier patch of mine.

This also simplifies the linkage enums a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69069 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
ab438847debf14874ed4e68fe30dee12fa2f201d 14-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Do not dead code strip global meta-data objects.
This will match gcc's behavior in the arena.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69061 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0f9029406b4dcdcf740cf99edc8652c43c9350cd 14-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Do not dead code strip global meta-data objects.
This will match gcc's behavior in the arena.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69061 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1214b585792644466e8cd19e3274df3f9836a09f 14-Apr-2009 Mike Stump <mrs@apple.com> Fixup whitespacing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69055 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
aa771a838a8f39633947ccc597e11d57e2839089 14-Apr-2009 Mike Stump <mrs@apple.com> Fixup whitespacing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69055 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
6b343694cb40d1ac1094022d397a096fa038829f 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Fix comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69053 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c15830694f2bd01080e6c39a88c5b8ff2288af18 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Fix comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69053 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
49d4a5764d89e1fd1ed1912fe194cec8cdc59a2e 14-Apr-2009 Anders Carlsson <andersca@mac.com> Support code generation of 'this' exprs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69050 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprScalar.cpp
odeGenFunction.h
5f4307b7ba164b03c853c8d3eb4674d33f8967a6 14-Apr-2009 Anders Carlsson <andersca@mac.com> Support code generation of 'this' exprs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69050 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprScalar.cpp
odeGenFunction.h
cf7ce67ceb36f0eac343f91ba0ee79a934a11327 14-Apr-2009 Chris Lattner <sabre@nondot.org> implement codegen support for __attribute((__gnuc_inline__)),
pulling some attribute munging stuff into GetLinkageForFunction.

This should fix PR3986


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69045 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
86daeee2d4aa6523679f07f27a826bf4c42ca95d 14-Apr-2009 Chris Lattner <sabre@nondot.org> implement codegen support for __attribute((__gnuc_inline__)),
pulling some attribute munging stuff into GetLinkageForFunction.

This should fix PR3986


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69045 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
096948cdebb8c1ee41d3d99600085cc431e7dc46 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Refactor how attributes are set on values.
- Pull out SetCommonAttributes, which handles the things common to
aliases, methods, functions, and variables.

- Pull out SetLLVMFunctionAttributesForDefinition, which handles the
LLVM attributes which we only want to apply to a definition (like
noinline and alwaysinline).

- Kill SetGVDeclarationAttributes (inlined into SetFunctionAttributes
and specialized).

- Kill SetFunctionAttributesForDefinition (inlined into sole caller).

- Inline SetGVDefinitionAttributes into SetMethodAttributes and
specialize.

- Rename SetGVDefinitionAttributes to SetFunctionDefinitionAttributes.

This is supposed to be a no functionality change commit, but I may
have made a mistake.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69036 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
7c65e990e9f0dafaf9adbc59b766dcc23eaee845 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Refactor how attributes are set on values.
- Pull out SetCommonAttributes, which handles the things common to
aliases, methods, functions, and variables.

- Pull out SetLLVMFunctionAttributesForDefinition, which handles the
LLVM attributes which we only want to apply to a definition (like
noinline and alwaysinline).

- Kill SetGVDeclarationAttributes (inlined into SetFunctionAttributes
and specialized).

- Kill SetFunctionAttributesForDefinition (inlined into sole caller).

- Inline SetGVDefinitionAttributes into SetMethodAttributes and
specialize.

- Rename SetGVDefinitionAttributes to SetFunctionDefinitionAttributes.

This is supposed to be a no functionality change commit, but I may
have made a mistake.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69036 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
f5dc6eed04adda7a02931e23edcad949dca57e11 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Split SetGlobalValueAttributes into definition/declaration halves.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69035 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
55d6f50b23a1fd0a04b568787a25beb7537e6c9b 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Split SetGlobalValueAttributes into definition/declaration halves.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69035 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
06cfb13cdb9c7d17e92117b51860f8d0e906f5e9 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Rename (one) SetFunctionAttributes to SetLLVMFunctionAttributes to
disambiguate it.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69034 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
7dbd8197040313d796282d4af06eccdf8a17319c 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Rename (one) SetFunctionAttributes to SetLLVMFunctionAttributes to
disambiguate it.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69034 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
57940debf37cb86accc453eb8d4663b000106000 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Reduce indentation, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69033 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
529d7d2c6ed88930bc3d7aab7611a50b6169e279 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Reduce indentation, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69033 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6ee2b32cf052ce7f92a5db87124f5c56c8c1d25c 14-Apr-2009 Chris Lattner <sabre@nondot.org> defer emission of always_inline, extern_inline, and inline functions (when
not in c89 mode).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69032 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
dbb5a376c8b9272813a30c5519031e9ea2fb071f 14-Apr-2009 Chris Lattner <sabre@nondot.org> defer emission of always_inline, extern_inline, and inline functions (when
not in c89 mode).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69032 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
1650bd172df6677f3342c2c3b43e93ec74ccc7af 14-Apr-2009 Chris Lattner <sabre@nondot.org> give always_inline functions internal linkage. If they cannot be
inlined for some reason, then we don't want a strong or even weak
definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69031 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d5ee6677c5f22409039a019accf41ec3937afe99 14-Apr-2009 Chris Lattner <sabre@nondot.org> give always_inline functions internal linkage. If they cannot be
inlined for some reason, then we don't want a strong or even weak
definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69031 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5f106ea695af845617df587bd8b848a4932508db 14-Apr-2009 Chris Lattner <sabre@nondot.org> set the linkage of an inline function according to its language rules.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69030 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d9d049a93c55624908e81cf3927b7905efeba05f 14-Apr-2009 Chris Lattner <sabre@nondot.org> set the linkage of an inline function according to its language rules.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69030 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8091e796d9b0fbdf9107c52265891004265fd200 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add a comment on SetGlobalValueAttributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69029 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b97b69244a4e7916c7b8fca28fa21b36ce5b30b2 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add a comment on SetGlobalValueAttributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69029 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
3f2eb81132dbb44d2b62f5283608c9524817c06b 14-Apr-2009 Chris Lattner <sabre@nondot.org> add a new enum type for linkage, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69028 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
44b0bc008ee11cdee69ad12210ca7550e4fa426a 14-Apr-2009 Chris Lattner <sabre@nondot.org> add a new enum type for linkage, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69028 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
8394fda08a9d9d837c14da025465d4f169987d36 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Clean up handling of visibility.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69027 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
04d4078425614bf9fd58d606335c1f5f74ee7fa4 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Clean up handling of visibility.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69027 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
4567fc7ef42927ade78db31af40244b3e836486f 14-Apr-2009 Chris Lattner <sabre@nondot.org> reduce indentation, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69026 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
9f9427999cf69b3b89cd0ed3be16ed27a1c282c7 14-Apr-2009 Chris Lattner <sabre@nondot.org> reduce indentation, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69026 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
59ea184d2d3fc0199b82868264779ae003188721 14-Apr-2009 Chris Lattner <sabre@nondot.org> do not set visibility on "private" or "available externally" linkage objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69025 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
df102fcb978588d5edbc661fb5da0b6922f9ab1c 14-Apr-2009 Chris Lattner <sabre@nondot.org> do not set visibility on "private" or "available externally" linkage objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69025 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
e9bc433d82d11956c68e57678f4b05cd67d3cfdd 14-Apr-2009 Mike Stump <mrs@apple.com> Use hasAttr instead of getAttr for conditionals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69021 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
f0c9083c04d9c7d7aa099813f06d339bdbb5eab9 14-Apr-2009 Mike Stump <mrs@apple.com> Use hasAttr instead of getAttr for conditionals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69021 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
644c15e1dab2d3c7db731143ead7831646c2f348 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Audit __private_extern__ handling.
- Exposed quite a few Sema issues and a CodeGen crash.

- See FIXMEs in test case, and in SemaDecl.cpp (PR3983).

I'm skeptical that __private_extern__ should actually be a storage
class value. I think that __private_extern__ basically amounts to
extern A __attribute__((visibility("hidden")))
and would be better off handled (a) as that, or (b) with an extra bit
in the VarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69020 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GExpr.cpp
5466c7b0ca8ce662e2c0bc295cecba2b78d6957d 14-Apr-2009 Daniel Dunbar <daniel@zuster.org> Audit __private_extern__ handling.
- Exposed quite a few Sema issues and a CodeGen crash.

- See FIXMEs in test case, and in SemaDecl.cpp (PR3983).

I'm skeptical that __private_extern__ should actually be a storage
class value. I think that __private_extern__ basically amounts to
extern A __attribute__((visibility("hidden")))
and would be better off handled (a) as that, or (b) with an extra bit
in the VarDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69020 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GExpr.cpp
f41021d40f46f1577ec42ce20a1c270354bc0768 14-Apr-2009 Mike Stump <mrs@apple.com> Fixup CodeGen for __weak __block variables. Radar 6756266


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69010 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
f33651c2d79d47d8d05908185613fe33a3e18d89 14-Apr-2009 Mike Stump <mrs@apple.com> Fixup CodeGen for __weak __block variables. Radar 6756266


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69010 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
b836cd3d4037266a360bca2b03636a0de9d615d7 13-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Minor work related to removing the assumption that value initialization
implies an all-zero bit pattern.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68994 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
odeGenModule.h
0f59312e7b625fa5821a63db65377d4b3b667e99 13-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Minor work related to removing the assumption that value initialization
implies an all-zero bit pattern.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68994 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
odeGenModule.h
234d1d2c20d3736e55e4d037d6c4e0c31601476d 13-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Minor simplification.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68992 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
8a3e0b1b8222d52df3d42ca345dc48f991e1908a 13-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Minor simplification.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68992 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
7858286537746ecd2cebac6df94d927120385d94 13-Apr-2009 Daniel Dunbar <daniel@zuster.org> Update to use hasAttr() instead of getAttr().
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68987 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCall.cpp
GDecl.cpp
GExpr.cpp
GObjC.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
angle.cpp
b11fa0d25d86169f0e0a29d5398116c0212bb787 13-Apr-2009 Daniel Dunbar <daniel@zuster.org> Update to use hasAttr() instead of getAttr().
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68987 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GCall.cpp
GDecl.cpp
GExpr.cpp
GObjC.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
angle.cpp
9c9dc527f0bb4daa54a9d7e1aacb8f076ad92fb6 13-Apr-2009 Steve Naroff <snaroff@apple.com> Move/update recent FIXME (wrt UTF-8 checking for ObjC @-strings).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68982 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
fd942628abfe30e30427875db953222ae99b4325 13-Apr-2009 Steve Naroff <snaroff@apple.com> Move/update recent FIXME (wrt UTF-8 checking for ObjC @-strings).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68982 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
59076213a66d024853c73a5cfaf7728023abc781 13-Apr-2009 Steve Naroff <snaroff@apple.com> Fixed crasher in <rdar://problem/6780904> [irgen] Assertion failed: (Result == conversionOK && "UTF-8 to UTF-16 conversion failed"), function GetAddrOfConstantCFString, file CodeGenModule.cpp, line 1063.

Still a diagnostic related FIXME (will discuss with Daniel/Fariborz offline).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68975 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
aa4a756185e77755aaa10ae50db08ae5be58e70a 13-Apr-2009 Steve Naroff <snaroff@apple.com> Fixed crasher in <rdar://problem/6780904> [irgen] Assertion failed: (Result == conversionOK && "UTF-8 to UTF-16 conversion failed"), function GetAddrOfConstantCFString, file CodeGenModule.cpp, line 1063.

Still a diagnostic related FIXME (will discuss with Daniel/Fariborz offline).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68975 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
33e65e500f644c200f5ade50161dd0b10ef0421a 13-Apr-2009 Anders Carlsson <andersca@mac.com> Use the new guard variable mangling function and get rid of the old code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68971 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
283a062a633d6e868aa2be319da812341fe73728 13-Apr-2009 Anders Carlsson <andersca@mac.com> Use the new guard variable mangling function and get rid of the old code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68971 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
53f73bc1dcacfc0408671dcb59a10a7eb46bb5fb 13-Apr-2009 Anders Carlsson <andersca@mac.com> Add support for mangling guard variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68969 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
41aa8c1e40416aad3595567415a5faa021ca8b6c 13-Apr-2009 Anders Carlsson <andersca@mac.com> Add support for mangling guard variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68969 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
angle.h
de6a64915d9d77937f4c7d21b7a8a3749972e566 11-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Minor refactoring of my last patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68870 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
da0895d003dff3e9c57ca899fc2a3a2b397edb2e 11-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Minor refactoring of my last patch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68870 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
3413b1a3310c298b7d5223ed392247c7427b4181 11-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a ir-gen crash for K&R style blocks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68865 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
140fb26e747a1ba728287f02d585d0bb65d5d0da 11-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a ir-gen crash for K&R style blocks.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68865 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
c3e84aee93b016302964226c6354d254ddf11b59 11-Apr-2009 Anders Carlsson <andersca@mac.com> Don't mangle variables that are at translation unit scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68853 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
9ccb06598f724b1fa4c2c88e283879fb550925d5 11-Apr-2009 Anders Carlsson <andersca@mac.com> Don't mangle variables that are at translation unit scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68853 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
5dfe30797428d7236627e1f12484ac83ed7fdebc 11-Apr-2009 Anders Carlsson <andersca@mac.com> Add support for generating reference initialization code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68852 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
1e5dc6e12ccda4e783c67fa9ae11be419d7b0573 11-Apr-2009 Anders Carlsson <andersca@mac.com> Add support for generating reference initialization code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68852 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
67774335ce8b85651316497186970679dc723190 11-Apr-2009 Mike Stump <mrs@apple.com> Fixup copy/dispose helpers for Objective-C. Radar 6756504


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68837 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.h
c0c0ef061f2aaf054c7a970f28961097e46661f3 11-Apr-2009 Mike Stump <mrs@apple.com> Fixup copy/dispose helpers for Objective-C. Radar 6756504


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68837 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.h
db0d656c267e0bd48ef0f989a1aae09cc94964e2 11-Apr-2009 Anders Carlsson <andersca@mac.com> Remove asserts that weren't really useful, and that would fire in case the CleanupEntries vector needed to be reallocated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68835 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
a6cd009e17e21ce7fc84c7c510d190ab1ff69070 11-Apr-2009 Anders Carlsson <andersca@mac.com> Remove asserts that weren't really useful, and that would fire in case the CleanupEntries vector needed to be reallocated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68835 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
521c3a31cbfd9834ef859ef75f5e7e2702a0e675 11-Apr-2009 Daniel Dunbar <daniel@zuster.org> Don't set both readnone and readonly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68833 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
64c2e0762628eba26c100642521b6100c2515cc5 11-Apr-2009 Daniel Dunbar <daniel@zuster.org> Don't set both readnone and readonly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68833 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
40f94f793a99266a722873d0630abcdc1131d8c5 10-Apr-2009 Daniel Dunbar <daniel@zuster.org> Internal variables could mistakenly have "hidden" visibility when
their emission was deferred.
- <rdar://problem/6775234> variables with internal linkage should not
be exposed with -fvisibility=hidden.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68818 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7e714cd931fa3a90bfd728318a92485aa3e95748 10-Apr-2009 Daniel Dunbar <daniel@zuster.org> Internal variables could mistakenly have "hidden" visibility when
their emission was deferred.
- <rdar://problem/6775234> variables with internal linkage should not
be exposed with -fvisibility=hidden.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68818 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2f9a426369affa802474897fcf67b3788112326d 10-Apr-2009 Mike Stump <mrs@apple.com> Fixup codegen for nested blocks that use copy/dispose in the inner
blocks, so that the outer blocks use it as well. Radar 6762279


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68811 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
b7477cf6cf6cf4f132ba7beff42684e59bed15f4 10-Apr-2009 Mike Stump <mrs@apple.com> Fixup codegen for nested blocks that use copy/dispose in the inner
blocks, so that the outer blocks use it as well. Radar 6762279


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68811 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
d324332c43f06854b750026d1cfb9d9e5011b97a 10-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to generate meta-data for prtocol used
in @protocol expression.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68806 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
960cd06eab1325071d331b462553c9e4135c926e 10-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to generate meta-data for prtocol used
in @protocol expression.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68806 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a828a721cb91a52190b0010776344f0ba187bf30 10-Apr-2009 Anders Carlsson <andersca@mac.com> Rename variables to avoid conflict.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68764 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
12e330c46ab3a4a12dbbd4ad7e96ffdd399f5518 10-Apr-2009 Anders Carlsson <andersca@mac.com> Rename variables to avoid conflict.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68764 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
079b04fd4f25f0e648dc21a044ff0dbca3430687 10-Apr-2009 Chris Lattner <sabre@nondot.org> Make messages consistent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68756 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
11c7d32ac2f8a784a3cc4714a9f1977ab5859185 10-Apr-2009 Chris Lattner <sabre@nondot.org> Make messages consistent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68756 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
b1802ce54c25b4c7c586935ba1ae7c8cd9e1fb5c 10-Apr-2009 Chris Lattner <sabre@nondot.org> reject codegen of __thread variables as unimplemented, rdar://6775265


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68755 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.cpp
odeGenModule.cpp
b75863d53b8a2bbf0ece8e6df2b6e5be7f3896c4 10-Apr-2009 Chris Lattner <sabre@nondot.org> reject codegen of __thread variables as unimplemented, rdar://6775265


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68755 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.cpp
odeGenModule.cpp
c55b0b035289cd7702034bad930c71302bc80836 09-Apr-2009 Douglas Gregor <doug.gregor@gmail.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
GCall.cpp
GDebugInfo.cpp
GExprAgg.cpp
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
odeGenTypes.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
GCall.cpp
GDebugInfo.cpp
GExprAgg.cpp
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
odeGenTypes.cpp
6759c4d351e7e31c4f5ed5321d72066ef61f5aab 09-Apr-2009 Anders Carlsson <andersca@mac.com> Use the new EmitCallArgs function. No indented functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68652 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GExpr.cpp
GObjC.cpp
782f397c1459ef7d8b910c0fb6b95c5f1c19c14f 09-Apr-2009 Anders Carlsson <andersca@mac.com> Use the new EmitCallArgs function. No indented functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68652 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCXX.cpp
GExpr.cpp
GObjC.cpp
d927fa769e4e467841fc610ddbbd73427daddb6f 08-Apr-2009 Anders Carlsson <andersca@mac.com> Add code for emitting call arguments (not used yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68639 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.h
0139bb96494b4c4ba0824617d5d2495dc7e44c76 08-Apr-2009 Anders Carlsson <andersca@mac.com> Add code for emitting call arguments (not used yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68639 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.h
c5223144213cf2e1d3103a161889b65b1f5d0978 08-Apr-2009 Anders Carlsson <andersca@mac.com> We weren't generating correct code for calls to variadic member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68635 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
e9918d2443ad524e0f488e8f15d9bce4e7373cd1 08-Apr-2009 Anders Carlsson <andersca@mac.com> We weren't generating correct code for calls to variadic member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68635 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
7f9e209f3194f7f3e162f523716a771a52aee267 08-Apr-2009 Devang Patel <dpatel@apple.com> Use presumed location to get line number info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68630 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
0f78feaecf91143b498e22cbbf860fd0e40d9671 08-Apr-2009 Devang Patel <dpatel@apple.com> Use presumed location to get line number info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68630 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
96e909b708cc145fb0453993b47355728e9fbfc7 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Make sure value is initialized when built w/o asserts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68615 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
ab4eff620a9ce0ea62cdf29529a66c2c98d116f5 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Make sure value is initialized when built w/o asserts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68615 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
dedc94c29b4dd7cec9aa290170f7bb1062a2a9b1 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Make debug info work when using -save-temps.
- This is pretty ugly, but the most obvious solution. Chime in if you
have a nicer one.

- The problem is that with -save-temps, clang-cc has no idea what the
name of the original input file is. However, the user expects to be
able to set breakpoints based on the input file name.

- We support this by providing a new option -main-file-name (similar
to -dumpbase used by gcc) which allows the driver to pass in the
original file name.

- <rdar://problem/6753383> building with clang using --save-temps
gets the compile unit name from the .i file...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68595 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
c9abc043af88f90d177a5bd147f627b78ca49fde 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Make debug info work when using -save-temps.
- This is pretty ugly, but the most obvious solution. Chime in if you
have a nicer one.

- The problem is that with -save-temps, clang-cc has no idea what the
name of the original input file is. However, the user expects to be
able to set breakpoints based on the input file name.

- We support this by providing a new option -main-file-name (similar
to -dumpbase used by gcc) which allows the driver to pass in the
original file name.

- <rdar://problem/6753383> building with clang using --save-temps
gets the compile unit name from the .i file...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68595 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e7d97c2317a49d9adb2e5820bd56d9692879ff68 08-Apr-2009 Anders Carlsson <andersca@mac.com> Add a destination type argument to EmitConstantExpr. This will be used for when the destination has a reference type. (No functionality change yet)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68593 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDecl.cpp
GExprConstant.cpp
odeGenModule.cpp
odeGenModule.h
e9352cc9818ba59e7cf88500ef048991c90f3821 08-Apr-2009 Anders Carlsson <andersca@mac.com> Add a destination type argument to EmitConstantExpr. This will be used for when the destination has a reference type. (No functionality change yet)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68593 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDecl.cpp
GExprConstant.cpp
odeGenModule.cpp
odeGenModule.h
c21295326bd6b2945ae104a872f3567e2525bf5e 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Implementation definition of interfaces with __objc_exception attribute.
- Complete <rdar://problem/6635883> Support __objc_exception__
attribute


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68591 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
8158a2f78c47bf332dbd8b0b680de8a9b8d0511e 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Implementation definition of interfaces with __objc_exception attribute.
- Complete <rdar://problem/6635883> Support __objc_exception__
attribute


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68591 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
fde30e2fcebbd1d0e3dcbb4cc8131abf0b9a6197 08-Apr-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Pointer width on targets like PIC16 is 16-bit, while the valid index size to GEP is only 32 or 64. So promote index to 32 in such cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68590 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
75c47a5cdf480571a71935cf80d49f802fec15a3 08-Apr-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Pointer width on targets like PIC16 is 16-bit, while the valid index size to GEP is only 32 or 64. So promote index to 32 in such cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68590 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
ea92a92dc10686ad5152286473da0a6fbc37dd2f 08-Apr-2009 Anders Carlsson <andersca@mac.com> Don't assume that a block always has a FunctionProtoType. Fixes rdar://6768379.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68583 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCall.cpp
odeGenTypes.h
a17d7ccc2ed77e321855990e180f2a34ec304bfc 08-Apr-2009 Anders Carlsson <andersca@mac.com> Don't assume that a block always has a FunctionProtoType. Fixes rdar://6768379.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68583 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GCall.cpp
odeGenTypes.h
7034bfbe4ca266deb6a2bd85c08ec5a983b8b357 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Visibility attributes should only be set on definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68561 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
03abc9ec05e8edce5e8d0c7f08a05027b9e04170 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Visibility attributes should only be set on definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68561 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
417d9839d0b1a3cd5f114e9acc216c50f49ca0f9 08-Apr-2009 Anders Carlsson <andersca@mac.com> Shuffle some call code around. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68557 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
6e460ff03f984d34d6f3ba7f191380b823b6062f 08-Apr-2009 Anders Carlsson <andersca@mac.com> Shuffle some call code around. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68557 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
00da58a1388d201f4fbf667dab302b6d509d349a 07-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Propagte -fvisibility to objc2's class symbols.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68543 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
cf71dd4242fd00ab155b5430a4c6c9f88fe5c4be 07-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Propagte -fvisibility to objc2's class symbols.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68543 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7acb3a4171d5b400e1369356ce1cb5db46aab79b 07-Apr-2009 Anders Carlsson <andersca@mac.com> Remove some dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68532 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
8ac67a7725ef25f5df8a992277182f51316500e6 07-Apr-2009 Anders Carlsson <andersca@mac.com> Remove some dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68532 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
afac9be652a80c26fe55c568e229886983a54a7d 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Handle use side of __objc_exception__ attribute; when using an
exception with this attribute we don't need to emit a weak definition
for the exception type information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68513 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7e075cb62c06e0b0023fd12875c95da9c5ddefb7 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Handle use side of __objc_exception__ attribute; when using an
exception with this attribute we don't need to emit a weak definition
for the exception type information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68513 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a2d275ddb449816c2c9e94c550840b05c313576a 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Various fixes to symbols used for Obj-C x86_64 metadata.
- Changed method names to match gcc (categories names still aren't
mangled in).

- Expose correct name for class and metadata symbols (although
-fvisibility=hidden isn't yet correct).

- Remove several things from llvm.used that didn't need to be there
(I suspect this can still be trimmed).

- Don't use asm-prefix extension for _objc_empty_{cache,vtable} (not
needed).

- Hide EH type class info with -fvisibility=hidden

- Change setGlobal[Option]Visibility to not change the visibility of
functions with internal linkage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68510 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
odeGenModule.cpp
6ab187a49a42de6d351248d8a6e0206e39743a0c 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Various fixes to symbols used for Obj-C x86_64 metadata.
- Changed method names to match gcc (categories names still aren't
mangled in).

- Expose correct name for class and metadata symbols (although
-fvisibility=hidden isn't yet correct).

- Remove several things from llvm.used that didn't need to be there
(I suspect this can still be trimmed).

- Don't use asm-prefix extension for _objc_empty_{cache,vtable} (not
needed).

- Hide EH type class info with -fvisibility=hidden

- Change setGlobal[Option]Visibility to not change the visibility of
functions with internal linkage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68510 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
odeGenModule.cpp
8654a5b5e407cdc32b1c4ea62363160d37eed055 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Implement __sync_{add,sub,and,or,xor}_and_fetch and
__sync_bool_compare_and_swap.
- <rdar://problem/6762223> [sema/irgen] support
__sync_bool_compare_and_swap and __sync_add_and_fetch


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68482 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
0002d23aaf10f307273dab5facda01c137283d22 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Implement __sync_{add,sub,and,or,xor}_and_fetch and
__sync_bool_compare_and_swap.
- <rdar://problem/6762223> [sema/irgen] support
__sync_bool_compare_and_swap and __sync_add_and_fetch


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68482 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
3f03b811274590663ca545558ae1892860ea111d 07-Apr-2009 Anders Carlsson <andersca@mac.com> Use the new getFunctionInfo that takes a BlockPointerType parameter, and get rid of getBlockFunctionType from CGBlocks.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68478 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
f8544a466744a1c02ebceffee9b54071f7801753 07-Apr-2009 Anders Carlsson <andersca@mac.com> Use the new getFunctionInfo that takes a BlockPointerType parameter, and get rid of getBlockFunctionType from CGBlocks.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68478 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
745fd89c8fefb3e56e69c43b24d0faea8539200b 06-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed visibility issues related to objc2's synthesized
ivars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68453 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
77c9fd2eee4cdac3c5a38a353788f308990598af 06-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed visibility issues related to objc2's synthesized
ivars.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68453 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f6ee888f4c11ae6aa953bbdae65caddc4e09c56a 06-Apr-2009 Anders Carlsson <andersca@mac.com> Add a getFunctionInfo that takes a BlockPointerType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68452 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenTypes.h
5529b24500a9cdeb45e9d4482ceb54fc39a7471e 06-Apr-2009 Anders Carlsson <andersca@mac.com> Add a getFunctionInfo that takes a BlockPointerType.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68452 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenTypes.h
b271ec599e0deaef0fec2383c70bbd5f8c47d46d 06-Apr-2009 Anders Carlsson <andersca@mac.com> Simplify C++ member function calls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68451 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
6c247e38e59caacf4a84a16c621fd470261998c9 06-Apr-2009 Anders Carlsson <andersca@mac.com> Simplify C++ member function calls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68451 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
23e246513afc115c3dbeb5c564fb2bde6c797d10 06-Apr-2009 Chris Lattner <sabre@nondot.org> Fix a couple of cases where Constant* pointers can dangle in
ObjCNonFragileABITypesHelper by converting them to dynamic
getters. This fixes a crash on rdar://6757213. The others
should be converted over as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68445 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b02e53b5a859f12ad1e3f90a22b6fb711901a172 06-Apr-2009 Chris Lattner <sabre@nondot.org> Fix a couple of cases where Constant* pointers can dangle in
ObjCNonFragileABITypesHelper by converting them to dynamic
getters. This fixes a crash on rdar://6757213. The others
should be converted over as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68445 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
aa3afc75578ba07b99ef0c3d414553f9efd526be 04-Apr-2009 Anders Carlsson <andersca@mac.com> Add some basic support for generating C++ member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68425 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
2b77ba8bc7a842829ad9193816dc1d7d5e9c5be6 04-Apr-2009 Anders Carlsson <andersca@mac.com> Add some basic support for generating C++ member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68425 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
2431e605018b816767570dc53eae345183d9f8e6 04-Apr-2009 Anton Korobeynikov <asl@math.spbu.ru> Basic support for regparm codegen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68414 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenModule.cpp
1102f4282ceb430dbc9fcedb9dd2ad25898a09e8 04-Apr-2009 Anton Korobeynikov <asl@math.spbu.ru> Basic support for regparm codegen

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68414 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenModule.cpp
7a9b298ed29e973ffbf64f9ec209e0d24259264f 04-Apr-2009 Anders Carlsson <andersca@mac.com> Add support for calling C++ member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68412 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
odeGenFunction.h
774e7c6881ee6cb970cd42239d700dce87ed402a 04-Apr-2009 Anders Carlsson <andersca@mac.com> Add support for calling C++ member functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68412 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExpr.cpp
odeGenFunction.h
7a78535ca5e76de39e620a7d3cb9be888c8bc242 04-Apr-2009 Anders Carlsson <andersca@mac.com> Add a getFunctionInfo that takes a CXXMethodDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68411 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenTypes.h
f6f8ae561ef78af169cbd2c067cae7ee4b2044e9 04-Apr-2009 Anders Carlsson <andersca@mac.com> Add a getFunctionInfo that takes a CXXMethodDecl.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68411 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenTypes.h
dfe09d8ff958b34d8f8274562bbeeda5261a8e4b 03-Apr-2009 Steve Naroff <snaroff@apple.com> Add a comment/FIXME so Eli can sleep better:-))


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68379 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
db6d4f65f9f0a4b6e9b4b6ead9968c2e372e9642 03-Apr-2009 Steve Naroff <snaroff@apple.com> Add a comment/FIXME so Eli can sleep better:-))


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68379 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
49343339a8f693f76108e9c84b8a4c3ea48a99e9 03-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Implement -fvisibility.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68369 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7cd2e93125e2f3b6ca01b24ed0c3fd7e94683fd9 03-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Implement -fvisibility.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68369 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6a91648fe9226db360759a23c89bb5aec3f3ceab 03-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add target hook for setting symbol prefix and section of unicode
string literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68363 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a9668e0b4c451a1021fe650c451b54dc98c2d18d 03-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add target hook for setting symbol prefix and section of unicode
string literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68363 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
304f7c7625d09aeac371cc12f4fc66a46132deff 02-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Fix up lookup rules for properties declared in
objc's continuation class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68339 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d09a456e466597fe1667ea5e757bfe53be2cba7d 02-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Fix up lookup rules for properties declared in
objc's continuation class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68339 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f71b7740f3a3544b325cec81205c7e989149f773 02-Apr-2009 Mike Stump <mrs@apple.com> Remove -ftrapu.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68330 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
035cf8911c2282550411be70f370dfe5d282b5c9 02-Apr-2009 Mike Stump <mrs@apple.com> Remove -ftrapu.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68330 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
cb1df2f4b45688639faeb2184f8108859acc5d55 02-Apr-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Don't use static globals for params as it confuses the optimzer that their values are never being used in the function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68328 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
08ae3de4c90a9c4b79fedf878760144df6758ecc 02-Apr-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Don't use static globals for params as it confuses the optimzer that their values are never being used in the function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68328 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
fd8c56b3438d606a1a0ca5515759973d17bdfbf9 02-Apr-2009 Anders Carlsson <andersca@mac.com> Implement mangling of declarations inside functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68321 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
1b42c794481f6f958267e4ba913d74fef43161f6 02-Apr-2009 Anders Carlsson <andersca@mac.com> Implement mangling of declarations inside functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68321 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
af6bb355632baa2ab6b7bf3e1972e78683e9d267 02-Apr-2009 Anders Carlsson <andersca@mac.com> Mangle VarDecls correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68320 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
329749c1ec1ead3c41af52260f1203e4991b4e83 02-Apr-2009 Anders Carlsson <andersca@mac.com> Mangle VarDecls correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68320 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
70cc0d28e3e9d8ebf81a0a557976d305f4e7b602 02-Apr-2009 Anders Carlsson <andersca@mac.com> Move the function decl mangling code out into its own function. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68319 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
43f1740b7eeef0f39479474f199ec7cfa290b57e 02-Apr-2009 Anders Carlsson <andersca@mac.com> Move the function decl mangling code out into its own function. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68319 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
b573e46360a2374ffaa2419df2845d193320e588 02-Apr-2009 Anders Carlsson <andersca@mac.com> Emit code for linkage specifications.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68300 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
91e20dd8bf1bc8980ee93839383d2bd170bce050 02-Apr-2009 Anders Carlsson <andersca@mac.com> Emit code for linkage specifications.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68300 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
337972357b27115268d39325e2f14202145c3372 02-Apr-2009 Anders Carlsson <andersca@mac.com> When compiling C++ code, always mangle the names of static block var decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68280 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
17c35acad1248ec919e76992c03b47d848502a15 02-Apr-2009 Anders Carlsson <andersca@mac.com> When compiling C++ code, always mangle the names of static block var decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68280 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
0f595bbd73ed9dc1ede9d4d9ea597e37a89227ce 02-Apr-2009 Mike Stump <mrs@apple.com> Fixup -ftrapv to be more gcc compatible. -ftrapu (for want of a
better name) is the option that SmallTalk can use to intercept all
overflows, including unsigned. I added some testcases so we don't
break anything.

Also included is another patch from David for += and friends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68267 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
5d8b2cf9fd704f6ca5e33525803a65421c0b440e 02-Apr-2009 Mike Stump <mrs@apple.com> Fixup -ftrapv to be more gcc compatible. -ftrapu (for want of a
better name) is the option that SmallTalk can use to intercept all
overflows, including unsigned. I added some testcases so we don't
break anything.

Also included is another patch from David for += and friends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68267 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
5e6084cc603111587df403ce188b17e5928e5ac9 01-Apr-2009 Steve Naroff <snaroff@apple.com> CodeGenModule::GetAddrOfConstantCFString():
- Finish up support for converting UTF8->UTF16 to support ObjC @"string" constants.

Remove warning from CheckObjCString.

As the FIXME in the test case indicates, I still have a bug to work out (apparently with \u handling).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68245 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b59212a6e494d2c364b54462f545833902c29158 01-Apr-2009 Steve Naroff <snaroff@apple.com> CodeGenModule::GetAddrOfConstantCFString():
- Finish up support for converting UTF8->UTF16 to support ObjC @"string" constants.

Remove warning from CheckObjCString.

As the FIXME in the test case indicates, I still have a bug to work out (apparently with \u handling).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68245 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
db789919a1dd1af6123a4caff699a40f082b5514 01-Apr-2009 Mike Stump <mrs@apple.com> Add -ftrapv support, patch from David Chisnall; well all except the
clang option code that is and two bug fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68240 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
2add47387d39ee6c40dcb0e9f3d51c27ad1e113c 01-Apr-2009 Mike Stump <mrs@apple.com> Add -ftrapv support, patch from David Chisnall; well all except the
clang option code that is and two bug fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68240 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
defa06a83ff229d97f5f9dba424042cafa2f56d1 01-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a problem where the compiler is reporting the wrong size to the Gnu
runtime on 64-bit architectures.
Patch by David Chisnall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68238 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
91a0b51438e5259a79d68d7450c453827beed9e2 01-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Fixes a problem where the compiler is reporting the wrong size to the Gnu
runtime on 64-bit architectures.
Patch by David Chisnall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68238 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
84c45699089f35feae9763d39a042d82cb459c85 01-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Nonfragile ivar synthesis with property is in a continuation
class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68234 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
99eee3675e830ff367ae1fe35ce19fb49e7e4114 01-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Nonfragile ivar synthesis with property is in a continuation
class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68234 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
789c0106af6dfcd4d614839d2a32c71d77db36d2 01-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Revert r68221, -ftrapv support, which causes several regressions in
Clang's test suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68230 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
7e203b7f5d894b1969765332e35c6a8b4d45556f 01-Apr-2009 Douglas Gregor <dgregor@apple.com> Revert r68221, -ftrapv support, which causes several regressions in
Clang's test suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68230 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
d4b0bd683558291a28dfc5be82f976e31c94230d 01-Apr-2009 Mike Stump <mrs@apple.com> Add -ftrapv support, patch from David Chisnall; well all except the
clang option code that is.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68221 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
3fb07bdc32cb301a8438c297fe7d68542a7537b2 01-Apr-2009 Mike Stump <mrs@apple.com> Add -ftrapv support, patch from David Chisnall; well all except the
clang option code that is.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68221 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
82e5db22dbf69459dc108176bbef86bd1287c151 01-Apr-2009 Steve Naroff <snaroff@apple.com> Add ConvertUTF module from http://www.unicode.org/Public/PROGRAMS/CVTUTF.

#ifdef'd out the 5 conversion routines that we don't currently need.

Still need a bit more work in GetAddrOfConstantCFString(). Added a FIXME to indicate this.

Expect to remove the FIXME today...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68208 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
e9b7d8ace8674585818990cff585daae7745bd88 01-Apr-2009 Steve Naroff <snaroff@apple.com> Add ConvertUTF module from http://www.unicode.org/Public/PROGRAMS/CVTUTF.

#ifdef'd out the 5 conversion routines that we don't currently need.

Still need a bit more work in GetAddrOfConstantCFString(). Added a FIXME to indicate this.

Expect to remove the FIXME today...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68208 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
9a744e58dcfc2ba9a639be2d7a07e806415d206b 01-Apr-2009 Steve Naroff <snaroff@apple.com> More "prep" work for handling UTF16 CFString.

Patch by Jean-Daniel Dupas. Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68203 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
8d4141f83d9de379547cf05bd75d4c6cf894b189 01-Apr-2009 Steve Naroff <snaroff@apple.com> More "prep" work for handling UTF16 CFString.

Patch by Jean-Daniel Dupas. Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68203 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
558e7fbf9f61dae0a4e0fafbb17d6451eaaeb388 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> x86-32 Darwin ABI: Handle small structures correctly.
- Small structures are returned in a register if:
1. They fit nicely in a register.
2. All fields fit nicely in a register.
(more or less)

- We now pass the first 5000 ABITests if unions are disabled.

- <rdar://problem/6497882> [irgen] x86-32 ABI compatibility with
small structs


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68197 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
cf6bde343ff5653744ca782e04d5a9c54b260042 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> x86-32 Darwin ABI: Handle small structures correctly.
- Small structures are returned in a register if:
1. They fit nicely in a register.
2. All fields fit nicely in a register.
(more or less)

- We now pass the first 5000 ABITests if unions are disabled.

- <rdar://problem/6497882> [irgen] x86-32 ABI compatibility with
small structs


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68197 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
49b32d4f15eb2b8c329d646ea20ca26fbca2e84b 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> x86-32 Darwin ABI: Single element arrays can be part of "single
element structures", which have different ABI rules.
- Current return-arguments-32 status is: 1 out of 1000 failures (-7)

- Also, vectors inside "single element structs" require special
handling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68196 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
dfc6b80ee13a9102cd67e0b2398fa999eebcbf8e 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> x86-32 Darwin ABI: Single element arrays can be part of "single
element structures", which have different ABI rules.
- Current return-arguments-32 status is: 1 out of 1000 failures (-7)

- Also, vectors inside "single element structs" require special
handling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68196 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
46ee0f3f00561293f0dd50eee67083227273113f 01-Apr-2009 Chris Lattner <sabre@nondot.org> remove ASTContext::buildObjCInterfaceType, which breaks canonical
types. It is no longer needed now that the code generator
re-lays-out interfaces if they are defines after being laid out
from a forward decl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68194 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GObjCMac.cpp
03d9f34a96ea28eaa698cc779462a1ce1dc79105 01-Apr-2009 Chris Lattner <sabre@nondot.org> remove ASTContext::buildObjCInterfaceType, which breaks canonical
types. It is no longer needed now that the code generator
re-lays-out interfaces if they are defines after being laid out
from a forward decl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68194 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GObjCMac.cpp
2a7bb3f7f1c10f8c3a64a0359e73c209f9018406 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> x86-32 Darwin ABI: Handle direct return of vectors.
- Current return-arguments-32 status is: 8 out of 1000 failures (-7)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68192 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
360431660b2245a109f5c6870729126dbcdea254 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> x86-32 Darwin ABI: Handle direct return of vectors.
- Current return-arguments-32 status is: 8 out of 1000 failures (-7)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68192 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
e7534da5767e6709fe369f60f2e54bc9a6080aac 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> Fix a subtle bug where the cleanup scope entries had a dangling block reference
- <rdar://problem/6732143> Crash when generating @synchronize for
zero-cost exception

- Thanks to Anders for helping track down the problem.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68186 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
aa5bd87f1fd5f9ca47924248817c89325759b30e 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> Fix a subtle bug where the cleanup scope entries had a dangling block reference
- <rdar://problem/6732143> Crash when generating @synchronize for
zero-cost exception

- Thanks to Anders for helping track down the problem.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68186 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
4f718b4b4f0cb575102285f96b44d1b3c9c510ef 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
odeGenModule.cpp
odeGenTypes.cpp
odeGenTypes.h
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
odeGenModule.cpp
odeGenTypes.cpp
odeGenTypes.h
52e809a46c0ad5df9ccc2a76913e753ac5189672 01-Apr-2009 Chris Lattner <sabre@nondot.org> move trivial forwarding function inline.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68176 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
5ad0f6778556535dca448e9d82e674d2d255ad06 01-Apr-2009 Chris Lattner <sabre@nondot.org> move trivial forwarding function inline.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68176 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
b63b55078a5a22e8a831a37a13d9f614f8202a21 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
GObjCGNU.cpp
odeGenTypes.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
GObjCGNU.cpp
odeGenTypes.cpp
896ceed74e95f043ef74f74d86d80b9909a7ebab 01-Apr-2009 Mike Stump <mrs@apple.com> Fix block comparisons. Radar 6732116.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68171 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
aab0f7a749e939d1d485a436f57ae56d14ba3016 01-Apr-2009 Mike Stump <mrs@apple.com> Fix block comparisons. Radar 6732116.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68171 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
8ff34a6eac4b7329d01ae78bc0dc94c518d771e0 01-Apr-2009 Anders Carlsson <andersca@mac.com> Implement code generation of namespaces and add mangling tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68170 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
984e06874685396ca2cb51f0008cfff7c9b3d9c6 01-Apr-2009 Anders Carlsson <andersca@mac.com> Implement code generation of namespaces and add mangling tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68170 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
8c4c12ab5881dafe010874bfcccfed48ee191d74 01-Apr-2009 Anders Carlsson <andersca@mac.com> Fix a bug (that I thought I had fixed already) where mangling a prefix could get us into an infinite loop

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68168 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
c8dee9ce29686d3230ecfdc651542934d1f661c8 01-Apr-2009 Anders Carlsson <andersca@mac.com> Fix a bug (that I thought I had fixed already) where mangling a prefix could get us into an infinite loop

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68168 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
51e6552060cddbf6fe65ca74c7dc0d83f48416d4 01-Apr-2009 Anders Carlsson <andersca@mac.com> Fix a mangling bug where functions with no arguments weren't getting the 'v' parameter specifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68162 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
c6c91bc019ff7fa09f6570025ba011aad4c0d004 01-Apr-2009 Anders Carlsson <andersca@mac.com> Fix a mangling bug where functions with no arguments weren't getting the 'v' parameter specifier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68162 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
c3a4893262053ed2efc04a6128358cc8f706a5a0 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add Target hooks for IRgen of [cf]string literals.
- Notably, set section on cfstring literal string data (for now, this
is done everywhere because it matches what we were already doing
for the CFString data itself)

- <rdar://problem/6599098> [irgen] linker requires objc string data
to go into cstring


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68160 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8e5c2b8072f4409c7c0004331d1db9652d5209c0 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add Target hooks for IRgen of [cf]string literals.
- Notably, set section on cfstring literal string data (for now, this
is done everywhere because it matches what we were already doing
for the CFString data itself)

- <rdar://problem/6599098> [irgen] linker requires objc string data
to go into cstring


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68160 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4494c0a63bef7cfe37c2576de4ae93651ffdef7b 01-Apr-2009 Chris Lattner <sabre@nondot.org> Change UsedArray to be a vector of WeakVH to fix a dangling pointer problem that occurs when
attribute(used) and asm renaming are used together.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68155 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
35f38a2c22d68c22e2dbe8e9ee84c120c8f327bb 01-Apr-2009 Chris Lattner <sabre@nondot.org> Change UsedArray to be a vector of WeakVH to fix a dangling pointer problem that occurs when
attribute(used) and asm renaming are used together.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68155 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
fea1a66c6e7cd1d6e4e37e94f63f3a40f0d10fbe 01-Apr-2009 Chris Lattner <sabre@nondot.org> remove some obsolete comments, use an AssertingVH.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68151 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
481769b5dc102b0256b35581e787909ad5edfab5 01-Apr-2009 Chris Lattner <sabre@nondot.org> remove some obsolete comments, use an AssertingVH.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68151 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
a744642ab7733a56fcc1921c5d7e7023d17f41af 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> x86_32 Darwin ABI: Treat empty unions like empty structures.
- Current return-arguments-32 status: 15/1000 failures


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68132 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
5bde6f41506535ddaf6e9ff60bd1488db8ded952 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> x86_32 Darwin ABI: Treat empty unions like empty structures.
- Current return-arguments-32 status: 15/1000 failures


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68132 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
926c37106e6f4e413dbb4caea9bae77c89e013b9 31-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to fix proptocol reference ir-gen for GNU runtime.
Patch by David Chisnal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68125 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
f8c4f5469d7db591eeacfc3381d91f773fb7af43 31-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to fix proptocol reference ir-gen for GNU runtime.
Patch by David Chisnal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68125 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
fbf446476fb9466876821f6e8e20b20c2361aa1f 31-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen support for nonfragile abi's synthesized ivars.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68122 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
18191886554407b4260c40165bc294c3ea732033 31-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen support for nonfragile abi's synthesized ivars.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68122 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
13c22d77dce233efc7d5f5a226bc2196cc1f280e 31-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More toward nonfragile abi's synthesized ivars.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68115 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
5a4b45354cf81b27c1835c035a29c18eb101e686 31-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More toward nonfragile abi's synthesized ivars.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68115 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
2c8a08e939d78d1aff70bdda1f122a200861f4ab 31-Mar-2009 Steve Naroff <snaroff@apple.com> Some "prep" work for handling ObjC @-string constants that contain UTF-8. No functionality change.

Changed GenerateConstantString() to take an ObjCStringLiteral (instead of a std::string). While this isn't strictly necessary, it seems cleaner and allows us to cache to "containsNonAscii" if necessary (to avoid checking in both Sema and CodeGen).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68114 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
33fdb738a6c125f4c788733897021b7c1a062b0c 31-Mar-2009 Steve Naroff <snaroff@apple.com> Some "prep" work for handling ObjC @-string constants that contain UTF-8. No functionality change.

Changed GenerateConstantString() to take an ObjCStringLiteral (instead of a std::string). While this isn't strictly necessary, it seems cleaner and allows us to cache to "containsNonAscii" if necessary (to avoid checking in both Sema and CodeGen).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68114 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
107e77d6c0da15e7e4d5236f52a5617bb8b47bbc 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
odeGenTypes.cpp
odeGenTypes.h
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
odeGenTypes.cpp
odeGenTypes.h
1c0f5fca681d48dc9240c96b5711813c09ece20c 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
odeGenTypes.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
odeGenTypes.cpp
e4a42de163e5e70978a6a45acb3f3e7612d01a2e 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
odeGenTypes.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
odeGenTypes.cpp
9329cf566969b233c3ed0f85132fc718aa7ef812 31-Mar-2009 Chris Lattner <sabre@nondot.org> fill in temporary smallvectors instead of vectors for performance.
Fix BuildAggrIvarLayout to not access vectors out of range.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68101 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f1690858344968358131f8d5690d9ee458883000 31-Mar-2009 Chris Lattner <sabre@nondot.org> fill in temporary smallvectors instead of vectors for performance.
Fix BuildAggrIvarLayout to not access vectors out of range.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68101 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d391dabbb53abb22adffd05aae70333b781a8458 31-Mar-2009 Chris Lattner <sabre@nondot.org> small cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68095 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
cd0ee14a3b8ba7293670f760c982063f4615e105 31-Mar-2009 Chris Lattner <sabre@nondot.org> small cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68095 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
dd13e8468462e60971487bcd5915419762dab814 31-Mar-2009 Douglas Gregor <doug.gregor@gmail.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
GDebugInfo.cpp
odeGenTypes.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
GDebugInfo.cpp
odeGenTypes.cpp
5b1fe3329651e7a7bef3e442386ddfa970d7b88c 30-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen does not yet supports __asm__ on a variable
declaration. Reject it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68058 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
ba8639dd25b0bc9b9c49b305047d069342a126f2 30-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen does not yet supports __asm__ on a variable
declaration. Reject it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68058 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
6158e69fd5e607ddbc5fdb90fd4c15960a92cfad 30-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Use CodeGenModule API for ObjC runtime function references.
Patch by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68043 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
26c8294dacc2efc83d8d560593ff863e7a32a48f 30-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Use CodeGenModule API for ObjC runtime function references.
Patch by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68043 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
a17991fc70d5f5d774a4ea21feefcfc64b1f73a3 29-Mar-2009 Chris Lattner <sabre@nondot.org> Push DeclGroup much farther throughout the compiler. Now the various
productions (except the already broken ObjC cases like @class X,Y;) in
the parser that can produce more than one Decl return a DeclGroup instead
of a Decl, etc.

This allows elimination of the Decl::NextDeclarator field, and exposes
various clients that should look at all decls in a group, but which were
only looking at one (such as the dumper, printer, etc). These have been
fixed.

Still TODO:

1) there are some FIXME's in the code about potentially using
DeclGroup for better location info.
2) ParseObjCAtDirectives should return a DeclGroup due to @class etc.
3) I'm not sure what is going on with StmtIterator.cpp, or if it can
be radically simplified now.
4) I put a truly horrible hack in ParseTemplate.cpp.

I plan to bring up #3/4 on the mailing list, but don't plan to tackle
#1/2 in the short term.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68002 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
682bf92db408a6cbc3d37b5496a99b6ef85041ec 29-Mar-2009 Chris Lattner <sabre@nondot.org> Push DeclGroup much farther throughout the compiler. Now the various
productions (except the already broken ObjC cases like @class X,Y;) in
the parser that can produce more than one Decl return a DeclGroup instead
of a Decl, etc.

This allows elimination of the Decl::NextDeclarator field, and exposes
various clients that should look at all decls in a group, but which were
only looking at one (such as the dumper, printer, etc). These have been
fixed.

Still TODO:

1) there are some FIXME's in the code about potentially using
DeclGroup for better location info.
2) ParseObjCAtDirectives should return a DeclGroup due to @class etc.
3) I'm not sure what is going on with StmtIterator.cpp, or if it can
be radically simplified now.
4) I put a truly horrible hack in ParseTemplate.cpp.

I plan to bring up #3/4 on the mailing list, but don't plan to tackle
#1/2 in the short term.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68002 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
ac90d8e797f337aa288393e9eae49e0a1e27ad63 29-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Initial implementation of ARM ABI. Mostly untested. Note that I'm not
really intending to take ownership of this; I wrote this mostly because
I was curious about how the ARM ABI works. It should be a decent start,
though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67969 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
a027ea94d6e4f501f9fa690ac728f68c62612a7d 29-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Initial implementation of ARM ABI. Mostly untested. Note that I'm not
really intending to take ownership of this; I wrote this mostly because
I was curious about how the ARM ABI works. It should be a decent start,
though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67969 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
4a9a85e7edac3b86b7bddc70b193de210ae0517a 28-Mar-2009 Chris Lattner <sabre@nondot.org> rename some methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67923 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
7e24e82a70a2c681f4291a3397bcd1e1005f251a 28-Mar-2009 Chris Lattner <sabre@nondot.org> rename some methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67923 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
2a594d0d2a5c1fe506608f75b7d135d743b56911 28-Mar-2009 Chris Lattner <sabre@nondot.org> change HandleTranslationUnit to take an ASTContext instead of TranslationUnit


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67910 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
dacbc5d46aaeea817742b8c76c987b87d2490c85 28-Mar-2009 Chris Lattner <sabre@nondot.org> change HandleTranslationUnit to take an ASTContext instead of TranslationUnit


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67910 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
d453194f9d3072544d12c3ea334da4d43d26eaeb 28-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Trivial cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67899 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
515ff5a31d75df9f4f099458a31cd7a405cf513d 28-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Trivial cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67899 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
584abaf98e833054967779815b3c607b6efb4e0c 28-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Move where block-related variables are initialized so that block
types don't get generated when blocks aren't used.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67898 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenFunction.cpp
48f9122dc6f1f1cef540246b0412d8ff9e90a868 28-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Move where block-related variables are initialized so that block
types don't get generated when blocks aren't used.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67898 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenFunction.cpp
2494bc39a1ce2df5d50b126eb571ff610a6e87c1 28-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67896 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
ccf0ed885952a52caa25767c787e0bf29f4688bd 28-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67896 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
4a0073b12bcfb28af391b1d73f9624e8c3089cad 28-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Misc small fixes/cleanups/comment changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67895 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
daa24a29f881fb2ae53c4022e593eda1adf4b95b 28-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Misc small fixes/cleanups/comment changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67895 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
3cd92880b42cd67bcb631c769a7ab62068e9aac9 28-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Change compound assignment operators to keep track of both the promoted
LHS type and the computation result type; this encodes information into
the AST which is otherwise non-obvious. Fix Sema to always come up with the
right answer for both of these types. Fix IRGen and the analyzer to
account for these changes. This fixes PR2601. The approach is inspired
by PR2601 comment 2.

Note that this changes real *= complex in CodeGen from a silent
miscompilation to an explicit error.

I'm not really sure that the analyzer changes are correct, or how to
test them... someone more familiar with the analyzer should check those
changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67889 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
GExprScalar.cpp
ab3a852ae713189444dcbf75e70accf1e8c2b7f2 28-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Change compound assignment operators to keep track of both the promoted
LHS type and the computation result type; this encodes information into
the AST which is otherwise non-obvious. Fix Sema to always come up with the
right answer for both of these types. Fix IRGen and the analyzer to
account for these changes. This fixes PR2601. The approach is inspired
by PR2601 comment 2.

Note that this changes real *= complex in CodeGen from a silent
miscompilation to an explicit error.

I'm not really sure that the analyzer changes are correct, or how to
test them... someone more familiar with the analyzer should check those
changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67889 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
GExprScalar.cpp
bcded19d61dfa06bf461dd4d52d4f477fbbc5df7 28-Mar-2009 Devang Patel <dpatel@apple.com> Do not emit debug information for variables while generating optimized code. The llvm optimizer and code generator are not yet ready to support optimized code debugging.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67876 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
odeGenModule.h
0773903975631a4baa41e495e8654e2f88a6f3dd 28-Mar-2009 Devang Patel <dpatel@apple.com> Do not emit debug information for variables while generating optimized code. The llvm optimizer and code generator are not yet ready to support optimized code debugging.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67876 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
odeGenModule.h
404adca9e6daa75b26b07f23b63b2deedec55b06 27-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Finish off semantic analysis for regparm, and remove the warning. Also
remove a redundant error in CodeGen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67868 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
55d3aaf9a537888734762170823daf750ea9036d 27-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Finish off semantic analysis for regparm, and remove the warning. Also
remove a redundant error in CodeGen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67868 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
97703437b51ac8fdbd4adbc8edb33ad6cc161a08 27-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Besides the warning, issue unsupported diagnostics in
ir gen. No intended change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67857 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ee760330a415635369556796a97afcfd6207f4dc 27-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Besides the warning, issue unsupported diagnostics in
ir gen. No intended change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67857 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a73e9f80b887ca3e2a86318969da828524a38bf8 26-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> - Minor change to dump of ivar layout map.
- Temporarily undef'ed __OBJC2__ in nonfragile objc abi mode
as it was forcing ivar synthesis in a certain project which clang
does not yet support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67766 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
dbf15cb5709067b3d23b3cdd8d014610ba4a8783 26-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> - Minor change to dump of ivar layout map.
- Temporarily undef'ed __OBJC2__ in nonfragile objc abi mode
as it was forcing ivar synthesis in a certain project which clang
does not yet support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67766 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f04a7561dc267ed9c54670386d9b5dfebc84d416 26-Mar-2009 Chris Lattner <sabre@nondot.org> most of this is plumbing to get CompileOptions down into
CodeGenModule. Once there, add a new NoCommon option to
it and implement -fno-common.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67735 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
bd3606426d389370616126af969904ec493cb105 26-Mar-2009 Chris Lattner <sabre@nondot.org> most of this is plumbing to get CompileOptions down into
CodeGenModule. Once there, add a new NoCommon option to
it and implement -fno-common.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67735 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
738ee715ac82a1d7230a845f96df4c871ea6b3f8 25-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More for for objc2's ivar layout map (currently
is not in use).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67713 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
667423a545c1f62efc32b48e5ce19c1c90181d4a 25-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More for for objc2's ivar layout map (currently
is not in use).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67713 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ebfb8948d3bfdeb495ebb37de1545235fa386a6e 25-Mar-2009 Mike Stump <mrs@apple.com> Remove -f__block as codegen for __block variables should be solid.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67697 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
4927abdc2e8c630117261fd9266304290b1cf32f 25-Mar-2009 Mike Stump <mrs@apple.com> Remove -f__block as codegen for __block variables should be solid.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67697 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
68bb7a281a28833003a0f053f17028b2d73a37d1 25-Mar-2009 Mike Stump <mrs@apple.com> Fixup codegen for block literals that bleed copy/dispose information
from previous block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67696 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenFunction.h
a803b0e6ca0d1c71a0b3f5d7380da8bbacf2f983 25-Mar-2009 Mike Stump <mrs@apple.com> Fixup codegen for block literals that bleed copy/dispose information
from previous block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67696 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenFunction.h
a9aae3ef3613f7e4b9be9635d1ebe7d756d73cfb 25-Mar-2009 Chris Lattner <sabre@nondot.org> simplify some conditionals, don't copy LangOptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67674 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
515455ac32e2accac51c33ceaa7e2dd7c36ef3f2 25-Mar-2009 Chris Lattner <sabre@nondot.org> simplify some conditionals, don't copy LangOptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67674 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
07461fa308e6570d40191f89eff75966234a3407 24-Mar-2009 Devang Patel <dpatel@apple.com> Encode language.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67650 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
8d9aefcb479cf2d1a5e397114ed3e22429ab9ac0 24-Mar-2009 Devang Patel <dpatel@apple.com> Encode language.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67650 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
aecb49310fd431ea15fb4da637a4495a00b5fd6a 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Support member reference on ?: of struct type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67603 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
9034558f2f9ac1dc6bd2e74f4481ca62fce28718 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Support member reference on ?: of struct type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67603 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
5e175809e0e1c7d26cbfca6813d38346a8d739e7 24-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Fix the ABI convention for struct returns on x86 outside of Darwin.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67577 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
9fd58e85d59f8244c7ba289ae4f9b4f5e0b4c98f 24-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Fix the ABI convention for struct returns on x86 outside of Darwin.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67577 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ad51ca0bb8800dae13bfef10e7efc4aabb7b1455 23-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Must allow for strong cast of floats as well (objc2 gc).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67551 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0a855d0bad7a32d5d0f8a03ac9ce7660c8c98b26 23-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Must allow for strong cast of floats as well (objc2 gc).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67551 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
09dc48aaa313947b284e6bbb27aab2a99300e78e 23-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Some minor fixes for complex IRGen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67501 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
c110c545810670871f54d0e999b5384ca0d6519d 23-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Some minor fixes for complex IRGen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67501 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
6a259872b22c0f8e17c225d5e5e8e97a49aed7f7 23-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Fix a subtle bug in CodeGen for the increment of a bitfield.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67499 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
f52bbeb1ce55aa10b4519024258b8962777fa8d4 23-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Fix a subtle bug in CodeGen for the increment of a bitfield.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67499 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
e6247a24555916031e0c209fdb70061357462ce5 22-Mar-2009 Chris Lattner <sabre@nondot.org> switch getBuiltinLibFunction to use the new GetOrCreateLLVMFunction
functionality, fixing a crash on the attached testcase. Eliminate the
BuiltinFunctions cache, as it can contain dangling pointers. This fixes
a bunch of valgrind errors on test/CodeGen/builtins.c


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67484 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
b808c952bbff821dce727dd801a1098d64394f98 22-Mar-2009 Chris Lattner <sabre@nondot.org> switch getBuiltinLibFunction to use the new GetOrCreateLLVMFunction
functionality, fixing a crash on the attached testcase. Eliminate the
BuiltinFunctions cache, as it can contain dangling pointers. This fixes
a bunch of valgrind errors on test/CodeGen/builtins.c


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67484 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
89a5b4e1b17ac36869e2307cc6e50b3c34b26525 22-Mar-2009 Chris Lattner <sabre@nondot.org> emit aliases as the definitions fly by, don't bother deferring until
the end of the module.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67482 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
bd53271dc7570b54f7b7cab7b09bcf04c6e927f6 22-Mar-2009 Chris Lattner <sabre@nondot.org> emit aliases as the definitions fly by, don't bother deferring until
the end of the module.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67482 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
9b011e66ed57a00231261269622ea405eae46c4b 22-Mar-2009 Chris Lattner <sabre@nondot.org> make alias definition logic more similar to functions/globals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67481 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
35f6c136dd5201b87831dcdacc1eb4d2c2de0744 22-Mar-2009 Chris Lattner <sabre@nondot.org> make alias definition logic more similar to functions/globals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67481 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
1313754d84412f39cb0ebf1865c9b68a3c86a670 22-Mar-2009 Chris Lattner <sabre@nondot.org> fix PR3200 by making alias emission use the new infrastructure. Fold
some tests into the alias.c file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67479 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
82227ff4eb665bbf41720ebdc0dc9215a86ba838 22-Mar-2009 Chris Lattner <sabre@nondot.org> fix PR3200 by making alias emission use the new infrastructure. Fold
some tests into the alias.c file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67479 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
aea1aee0b86381b8179ad0d2fc1517579445be16 22-Mar-2009 Chris Lattner <sabre@nondot.org> pull "runtime globals" into the same framework as other functions/global variables.
No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67478 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
odeGenModule.h
74391b48b4791cded373683a3baf67314f358d50 22-Mar-2009 Chris Lattner <sabre@nondot.org> pull "runtime globals" into the same framework as other functions/global variables.
No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67478 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
odeGenModule.h
d7ddaf7fc4da2c4ab3ca8c9a2778d486ab3efbd6 22-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Remove dead code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67477 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
3023ca870d545685881116f2c6e2bd5d1736e33c 22-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Remove dead code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67477 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
b7cee9769bf09ac27c2712dce3c0b7a5678adc8e 22-Mar-2009 Chris Lattner <sabre@nondot.org> fix a fixme: non-proto struct returning function definitions should be compiled
to something like:
define void @bar(%struct.foo* noalias sret %agg.result) nounwind {
instead of:
define void @bar(%struct.foo* noalias sret %agg.result, ...) nounwind {



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67475 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ff75e1db95a53c7606e0bb114cf9adc59ab3d7f6 22-Mar-2009 Chris Lattner <sabre@nondot.org> fix a fixme: non-proto struct returning function definitions should be compiled
to something like:
define void @bar(%struct.foo* noalias sret %agg.result) nounwind {
instead of:
define void @bar(%struct.foo* noalias sret %agg.result, ...) nounwind {



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67475 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
28466637ea70057c96125bee515cb796ddf5f7cb 22-Mar-2009 Chris Lattner <sabre@nondot.org> don't set the name of a call instruction to "call" in release-asserts
build. This shaves another 3% off.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67460 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDecl.cpp
3403084886b3d0fc23eee2b5708f0ac0329423e0 22-Mar-2009 Chris Lattner <sabre@nondot.org> don't set the name of a call instruction to "call" in release-asserts
build. This shaves another 3% off.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67460 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDecl.cpp
7fbb70d084eecd9fb4c0ad1a4c333b21e53c27cd 22-Mar-2009 Chris Lattner <sabre@nondot.org> fix CreateTempAlloca to not set a name on the alloca for temporaries
in release-assert builds. For automatic variables, explicitly set
a name with setName that does not make a temporary std::string.

This speeds up -emit-llvm-only -disable-free on PR3810 by 4.6%


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67459 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
odeGenFunction.cpp
f1466848dce9c4c75d96a6cabdc8db560e26aac8 22-Mar-2009 Chris Lattner <sabre@nondot.org> fix CreateTempAlloca to not set a name on the alloca for temporaries
in release-assert builds. For automatic variables, explicitly set
a name with setName that does not make a temporary std::string.

This speeds up -emit-llvm-only -disable-free on PR3810 by 4.6%


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67459 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
odeGenFunction.cpp
68306b36880703b5910c43444a2c6c6e778a433a 22-Mar-2009 Chris Lattner <sabre@nondot.org> set function/global names with setName instead of passing the name into the
ctor function. This avoids creating a temporary std::string for the name,
speeding up the testcase in PR3810 by 3.8%


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67457 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d972678a053d4785772b75cf6c8d4ab74ac2c7f6 22-Mar-2009 Chris Lattner <sabre@nondot.org> set function/global names with setName instead of passing the name into the
ctor function. This avoids creating a temporary std::string for the name,
speeding up the testcase in PR3810 by 3.8%


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67457 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
29782dea83e1d6dc062d084cca760fa2b5410440 21-Mar-2009 Mike Stump <mrs@apple.com> Fixup codegen for nested block literals so that we generate
copy_helpers and dispose_helpers as necessary for them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67453 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
a8b60c9bd8e992bed2096aa2c9982c3045e8247c 21-Mar-2009 Mike Stump <mrs@apple.com> Fixup codegen for nested block literals so that we generate
copy_helpers and dispose_helpers as necessary for them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67453 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
ca277321b9f701b45abbd450657bdbfb72428d0f 21-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Issue error if variables are defined inside an objc class,
category or protocol.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67450 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b31cb7f1752ea011fd06ac9574ce24667d11cbdb 21-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Issue error if variables are defined inside an objc class,
category or protocol.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67450 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
38837f92e4ed1e863e92848a5a1dec88fe946445 21-Mar-2009 Chris Lattner <sabre@nondot.org> now that all the decl reference and creation stuff is going through two
very simple places, reimplement the deferred decl emission logic to not be O(N^2),
fixing PR3810.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67447 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
67b00520c8f5b48fad722b790d87fea6be764efe 21-Mar-2009 Chris Lattner <sabre@nondot.org> now that all the decl reference and creation stuff is going through two
very simple places, reimplement the deferred decl emission logic to not be O(N^2),
fixing PR3810.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67447 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
5dd030fce37915c2bd9c8b6b30178629f20ff5f3 21-Mar-2009 Chris Lattner <sabre@nondot.org> fix a crash that could occur when a variable declaration became a
function definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67446 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
0558e79840bfdbbd38c6e2b4f6765bf0158e85f4 21-Mar-2009 Chris Lattner <sabre@nondot.org> fix a crash that could occur when a variable declaration became a
function definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67446 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
a698493e48ca24761a9b1f47d1826ed302968461 21-Mar-2009 Chris Lattner <sabre@nondot.org> simplify and cleanup global variable creation stuff to all go through one
code path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67445 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
570585c91dee98d7ba8ccf1198c03208ba17966b 21-Mar-2009 Chris Lattner <sabre@nondot.org> simplify and cleanup global variable creation stuff to all go through one
code path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67445 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
d26784e27c6a5e9946b871504ec41cbcfe50f896 21-Mar-2009 Chris Lattner <sabre@nondot.org> simplify management of llvm::Function creation to all go through
GetAddrOfFunction. This is simpler and more efficient.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67444 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
34809507232bc4c3c4840c7d092c7440219fddaf 21-Mar-2009 Chris Lattner <sabre@nondot.org> simplify management of llvm::Function creation to all go through
GetAddrOfFunction. This is simpler and more efficient.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67444 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
e28718c24278b9ecec7b583458edb9288570ff36 21-Mar-2009 Chris Lattner <sabre@nondot.org> code cleanups, rename EmitForwardFunctionDefinition ->
CreateFunctionPrototypeIR, though my next patch will eliminate
it entirely.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67443 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
62b33ea51adbd0e7f2f05983e9e4a3a2b2ed26de 21-Mar-2009 Chris Lattner <sabre@nondot.org> code cleanups, rename EmitForwardFunctionDefinition ->
CreateFunctionPrototypeIR, though my next patch will eliminate
it entirely.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67443 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
8af0e26f741de71c60b611ddd971d6efeb8c632f 21-Mar-2009 Chris Lattner <sabre@nondot.org> fix several problems with asm renaming, by pulling it into the mangling code:

1. it wasn't applying to definitions, only declarations, e.g. int x __asm("foo")
2. multiple definitions were conflicting, they weren't getting merged.
3. the code was duplicated in several places.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67442 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
angle.cpp
angle.h
ca3f25c1fb9bbf0d807985baee460670b7f195b4 21-Mar-2009 Chris Lattner <sabre@nondot.org> fix several problems with asm renaming, by pulling it into the mangling code:

1. it wasn't applying to definitions, only declarations, e.g. int x __asm("foo")
2. multiple definitions were conflicting, they weren't getting merged.
3. the code was duplicated in several places.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67442 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
angle.cpp
angle.h
23afd5b8199346fb040871cb33285520125158dd 21-Mar-2009 Chris Lattner <sabre@nondot.org> add some fixmes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67441 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2d58406872e5af0c924623d9f7c194c4f09936d3 21-Mar-2009 Chris Lattner <sabre@nondot.org> add some fixmes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67441 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
0b506259e7e5c7ac02503954ec468adaf2cc722e 21-Mar-2009 Chris Lattner <sabre@nondot.org> reduce redundant calls of getMangledName.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67440 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5d4f5c724533b994de05df49ae259120482ec366 21-Mar-2009 Chris Lattner <sabre@nondot.org> reduce redundant calls of getMangledName.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67440 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7e5888f0a5ebb144dbbef3c1f3ade2eebc9a09fe 21-Mar-2009 Chris Lattner <sabre@nondot.org> simplify some more code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67439 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
99b53613ebe2c59d41030e987962c1ed101b2efe 21-Mar-2009 Chris Lattner <sabre@nondot.org> simplify some more code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67439 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
535998b3edd09a76ca86e0579bfd389d807e0469 21-Mar-2009 Chris Lattner <sabre@nondot.org> simplify and comment some code better. Make BindRuntimeGlobals
more optimistic that it will work (optimizing for the common case).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67438 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenModule.cpp
odeGenModule.h
e21c4b829c9e69c20f4baab4916e05cdb786d9ae 21-Mar-2009 Chris Lattner <sabre@nondot.org> simplify and comment some code better. Make BindRuntimeGlobals
more optimistic that it will work (optimizing for the common case).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67438 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenModule.cpp
odeGenModule.h
08b05eb40cfb536213e418505d715777de0c71d4 21-Mar-2009 Chris Lattner <sabre@nondot.org> random code cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67437 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
3c8f153ae767fa55b2da74438c7f8ec370a06d6f 21-Mar-2009 Chris Lattner <sabre@nondot.org> random code cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67437 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
71fc581fd645882723fb2b889ed4468e6da7092c 21-Mar-2009 Chris Lattner <sabre@nondot.org> remove obviously dead code: you can't bitcast a pointer to "Ty" (a function type).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67436 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5b60a0e369521825f892d755150255645d923646 21-Mar-2009 Chris Lattner <sabre@nondot.org> remove obviously dead code: you can't bitcast a pointer to "Ty" (a function type).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67436 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
c3a2648f89038836c97200db26e7409ded61d5af 21-Mar-2009 Chris Lattner <sabre@nondot.org> avoid making constant folding logic eliminate obviously dead bitcasts, speeding up PR3810
by ~2%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67434 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8f431a554367d2828b82612b456c3a2ce737e799 21-Mar-2009 Chris Lattner <sabre@nondot.org> avoid making constant folding logic eliminate obviously dead bitcasts, speeding up PR3810
by ~2%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67434 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
daa199cd42eaeb12e0435f248bf80f4e8ed4d02d 21-Mar-2009 Chris Lattner <sabre@nondot.org> Add a fast path to CodeGenModule::getMangledName for almost all C functions,
speeding up the testcase in PR3810 by 60%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67431 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
c50689bd1e8788a7fc8f19070b7505ff95034979 21-Mar-2009 Chris Lattner <sabre@nondot.org> Add a fast path to CodeGenModule::getMangledName for almost all C functions,
speeding up the testcase in PR3810 by 60%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67431 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5cbf58836bbad17233bb01ea8d758975c684e626 21-Mar-2009 Chris Lattner <sabre@nondot.org> simplify CXXNameMangler::mangle, making it exit earlier for C functions.
This speeds up a testcase in 3810 by ~16%.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67429 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
bc7a0299e4b9d6f669726976d00a08f47f03aa3f 21-Mar-2009 Chris Lattner <sabre@nondot.org> simplify CXXNameMangler::mangle, making it exit earlier for C functions.
This speeds up a testcase in 3810 by ~16%.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67429 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
fc5e6ded83b96145b3e83ca8fc0da4f4eaa60e43 20-Mar-2009 Mike Stump <mrs@apple.com> Fix codegen for support for super inside block literal expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67406 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GObjC.cpp
odeGenFunction.h
6cc88f78fd36d3511b89412b193494b3e423cbff 20-Mar-2009 Mike Stump <mrs@apple.com> Fix codegen for support for super inside block literal expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67406 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GObjC.cpp
odeGenFunction.h
516584022e3b98185cfd937755e584e4474d71bf 20-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Fix a crash during meta-data generation of objc2's nonfragile abi.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67402 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ebf9ed3193e3e2f32141781bd517369a58dbab61 20-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Fix a crash during meta-data generation of objc2's nonfragile abi.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67402 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0be55c1c6d22a7ed713dfe86c5e7a20406831da9 20-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More super dot-syntax property implementation
when there is actually a property declaration
used in the dot-syntax.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67391 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.h
f469557743f77918d2ca8226e2ee2888998ffd4a 20-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More super dot-syntax property implementation
when there is actually a property declaration
used in the dot-syntax.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67391 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.h
806af7dad86767f0fef038f678c86dfd2898e3ce 20-Mar-2009 Devang Patel <dpatel@apple.com> Fix ivar's size encoding.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67389 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
99c20ebfbd7261bc4b92d617ada412b4ffe4f717 20-Mar-2009 Devang Patel <dpatel@apple.com> Fix ivar's size encoding.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67389 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
bafa3c2f859546ca7ecf04c9b810a491f51cc8da 20-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Implement ir gen. for setter/getter applied to 'super'
in a property dot-syntax notation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67382 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
8e5d23236ad05f9b18114d5486b3a3aeadf42e00 20-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Implement ir gen. for setter/getter applied to 'super'
in a property dot-syntax notation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67382 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
36acae416d82aae25343a602dbfb06213557e997 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> IRgen support for alias of global variable.
- PR3818.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67297 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
5e1e1f95c98b1add70c238093bbd5dc8d4f9c4e9 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> IRgen support for alias of global variable.
- PR3818.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67297 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
000ee2ff6eaae63703c1bdeb42ada9c9ca4d1ec5 19-Mar-2009 Devang Patel <dpatel@apple.com> Encode ivar access control info.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67267 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
c20482b10ee4ffcea31f67392743ccdf6df1f7f4 19-Mar-2009 Devang Patel <dpatel@apple.com> Encode ivar access control info.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67267 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
734b4baa8e7677d03085a3d3716fa550fb40be63 19-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce a representation for types that we referred to via a
qualified name, e.g.,

foo::x

so that we retain the nested-name-specifier as written in the source
code and can reproduce that qualified name when printing the types
back (e.g., in diagnostics). This is PR3493, which won't be complete
until finished the other tasks mentioned near the end of this commit.

The parser's representation of nested-name-specifiers, CXXScopeSpec,
is now a bit fatter, because it needs to contain the scopes that
precede each '::' and keep track of whether the global scoping
operator '::' was at the beginning. For example, we need to keep track
of the leading '::', 'foo', and 'bar' in

::foo::bar::x

The Action's CXXScopeTy * is no longer a DeclContext *. It's now the
opaque version of the new NestedNameSpecifier, which contains a single
component of a nested-name-specifier (either a DeclContext * or a Type
*, bitmangled).

The new sugar type QualifiedNameType composes a sequence of
NestedNameSpecifiers with a representation of the type we're actually
referring to. At present, we only build QualifiedNameType nodes within
Sema::getTypeName. This will be extended to other type-constructing
actions (e.g., ActOnClassTemplateId).

Also on the way: QualifiedDeclRefExprs will also store a sequence of
NestedNameSpecifiers, so that we can print out the property
nested-name-specifier. I expect to also use this for handling
dependent names like Fibonacci<I - 1>::value.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67265 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e4e5b054b4917f0ee493bb2fda5b1ec749bfb9a1 19-Mar-2009 Douglas Gregor <dgregor@apple.com> Introduce a representation for types that we referred to via a
qualified name, e.g.,

foo::x

so that we retain the nested-name-specifier as written in the source
code and can reproduce that qualified name when printing the types
back (e.g., in diagnostics). This is PR3493, which won't be complete
until finished the other tasks mentioned near the end of this commit.

The parser's representation of nested-name-specifiers, CXXScopeSpec,
is now a bit fatter, because it needs to contain the scopes that
precede each '::' and keep track of whether the global scoping
operator '::' was at the beginning. For example, we need to keep track
of the leading '::', 'foo', and 'bar' in

::foo::bar::x

The Action's CXXScopeTy * is no longer a DeclContext *. It's now the
opaque version of the new NestedNameSpecifier, which contains a single
component of a nested-name-specifier (either a DeclContext * or a Type
*, bitmangled).

The new sugar type QualifiedNameType composes a sequence of
NestedNameSpecifiers with a representation of the type we're actually
referring to. At present, we only build QualifiedNameType nodes within
Sema::getTypeName. This will be extended to other type-constructing
actions (e.g., ActOnClassTemplateId).

Also on the way: QualifiedDeclRefExprs will also store a sequence of
NestedNameSpecifiers, so that we can print out the property
nested-name-specifier. I expect to also use this for handling
dependent names like Fibonacci<I - 1>::value.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67265 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2c7de6dabb766d0ab8350090fc9afc18743378de 18-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> objc: Implemented variables declared in class interface
whose sema decl is at the translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67249 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
38e24c782c17b6058bf61d635747bbde19fb1bc7 18-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> objc: Implemented variables declared in class interface
whose sema decl is at the translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67249 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
39ea2c139b7f23e653e4acd3fc17779ac155567f 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> PR3835: Interaction with ABI structure passing can inhibit
readnone/readonly attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67224 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
0ac86f0821a2ba7ae09793fee4451bef99e9b2f3 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> PR3835: Interaction with ABI structure passing can inhibit
readnone/readonly attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67224 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
96a3a2d144ed967a2d4d991a7b5fe840e4eda080 18-Mar-2009 Chris Lattner <sabre@nondot.org> fix the more complex cases by actually codegen'ing the right expr :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67219 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
40f929242a58103f7883e7dbe2415787895b5cbe 18-Mar-2009 Chris Lattner <sabre@nondot.org> fix the more complex cases by actually codegen'ing the right expr :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67219 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
22523ba67213e92406e0e51255d424b7b779bce1 18-Mar-2009 Chris Lattner <sabre@nondot.org> add codegen support for casting an element to a union.
There are some more complex cases (_Complex and structs)
that I'm still working on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67218 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
75dfedaf702822c9e51a4f3c5d3ecf2d2ad99272 18-Mar-2009 Chris Lattner <sabre@nondot.org> add codegen support for casting an element to a union.
There are some more complex cases (_Complex and structs)
that I'm still working on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67218 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
68c3a8c32ebf08694dad142170ec0a38bf6fd7b6 18-Mar-2009 Mike Stump <mrs@apple.com> Add codegen support for aggregate BlockDeclRefExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67207 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
f8575aa49b528e34617d7988f2105e492d4b2c1c 18-Mar-2009 Mike Stump <mrs@apple.com> Add codegen support for aggregate BlockDeclRefExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67207 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
8360c610ad7f1065112a05bef365c817c5c88b27 18-Mar-2009 Chris Lattner <sabre@nondot.org> fix PR3809, codegen for inc/dec of function pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67165 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
8cc9d08eb8b2652ca939d724ab64dec906e418a0 18-Mar-2009 Chris Lattner <sabre@nondot.org> fix PR3809, codegen for inc/dec of function pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67165 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
504239f453887b4c1f3035b4e8104eda538868e9 18-Mar-2009 Chris Lattner <sabre@nondot.org> teach codegen to handle noop casts as lvalues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67164 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
c3953a61f7e2a9919ce18d418f8b26a8612e87f2 18-Mar-2009 Chris Lattner <sabre@nondot.org> teach codegen to handle noop casts as lvalues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67164 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
031eb3e40f18eaa5aa9bc8b896b51194a8cd9022 17-Mar-2009 Anders Carlsson <andersca@mac.com> Initialize the cleanup.dst variable if necessary. Fixes PR3789.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67075 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
0ae7b2b2f964bd6145d65ef52dc2a28025b2bd06 17-Mar-2009 Anders Carlsson <andersca@mac.com> Initialize the cleanup.dst variable if necessary. Fixes PR3789.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67075 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
b3a08ba5349c7c33816ff91a31d26b8bdfb0fa19 17-Mar-2009 Devang Patel <dpatel@apple.com> Fix struct field's debug info.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67062 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ec9b5d510b4068bf6cf87cc8729ee7d5018c2b32 17-Mar-2009 Devang Patel <dpatel@apple.com> Fix struct field's debug info.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67062 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
ce6fff0486d0e15bc969fb0e3e4850c0784e997f 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
GDebugInfo.cpp
GExprScalar.cpp
odeGenTypes.cpp
angle.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
GDebugInfo.cpp
GExprScalar.cpp
odeGenTypes.cpp
angle.cpp
026a2ef889178bbf6707465b73909aa38aaf7e6b 17-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Build system changes to use TableGen to generate the various
diagnostics. This builds on the patch that Sebastian committed and
then revert. Major differences are:

- We don't remove or use the current ".def" files. Instead, for now,
we just make sure that we're building the ".inc" files.
- Fixed CMake makefiles to run TableGen and build the ".inc" files
when needed. Tested with both the Xcode and Makefile generators
provided by CMake, so it should be solid.
- Fixed normal makefiles to handle out-of-source builds that involve
the ".inc" files.

I'll send a separate patch to the list with Sebastian's changes that
eliminate the use of the .def files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67058 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
a393e9eedcc28b25f521a4feceb3b56e3d0d360f 17-Mar-2009 Douglas Gregor <dgregor@apple.com> Build system changes to use TableGen to generate the various
diagnostics. This builds on the patch that Sebastian committed and
then revert. Major differences are:

- We don't remove or use the current ".def" files. Instead, for now,
we just make sure that we're building the ".inc" files.
- Fixed CMake makefiles to run TableGen and build the ".inc" files
when needed. Tested with both the Xcode and Makefile generators
provided by CMake, so it should be solid.
- Fixed normal makefiles to handle out-of-source builds that involve
the ".inc" files.

I'll send a separate patch to the list with Sebastian's changes that
eliminate the use of the .def files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67058 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
4b65e4fa7d8ac61837fc590d40a9ed2475fb2efe 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Add note on theoretical IRgen improvement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67024 91177308-0d34-0410-b5e6-96231b3b80d8
EADME.txt
c8a7952dba5014d654739fdbaedc457183e441ec 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Add note on theoretical IRgen improvement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67024 91177308-0d34-0410-b5e6-96231b3b80d8
EADME.txt
7509979dcf0912f384a8c64ecb877b7287fe3a01 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Remove a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67022 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
73f697f1f94fb59999c37a16bcf4703001ae3ebb 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Remove a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67022 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a20c59ec866c7a55706d923972f1fd6370921660 14-Mar-2009 Mike Stump <mrs@apple.com> Do up codegen for function static data and externs in functions in block
literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66984 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenFunction.h
7f28a9c37e67ae16396042ad9c085830969daf29 14-Mar-2009 Mike Stump <mrs@apple.com> Do up codegen for function static data and externs in functions in block
literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66984 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenFunction.h
aae6ae57639fef3fa7a0c616aec914fe13e5b522 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
odeGenTypes.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
odeGenTypes.cpp
d07e0604ebdf439d7aa233d1acb1fb7ed16d906a 13-Mar-2009 Mike Stump <mrs@apple.com> Remove FIXME, issue has been resolved.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66931 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
9d25423797de98f4e286fd681a6bbe5b48b0493a 13-Mar-2009 Mike Stump <mrs@apple.com> Remove FIXME, issue has been resolved.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66931 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
1e3eedb7a8ef93f39107d9da4a5bba25899ab50d 13-Mar-2009 Chris Lattner <sabre@nondot.org> introduce a new -fheinous-gnu-extensions flag that enables really
really horrible extensions that are disabled by default but that can
be accepted by -fheinous-gnu-extensions (but which always emit a
warning when enabled).

As our first instance of this, implement PR3788/PR3794, which allows
non-lvalues in inline asms in contexts where lvalues are required. bleh.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66910 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
810f6d5d6223adaab0ccf0139f40de6484ad1bb5 13-Mar-2009 Chris Lattner <sabre@nondot.org> introduce a new -fheinous-gnu-extensions flag that enables really
really horrible extensions that are disabled by default but that can
be accepted by -fheinous-gnu-extensions (but which always emit a
warning when enabled).

As our first instance of this, implement PR3788/PR3794, which allows
non-lvalues in inline asms in contexts where lvalues are required. bleh.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66910 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
494cb0fa1fd613f3dff87a25ab47049f1d9201f9 13-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6675489> BlockDecl should not use llvm::smallvector.

Also changed BlockDecl API to be more consistent (wrt FunctionDecl).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66904 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
e78b809bbcd92928a63da81f2cd843faad3e4dfd 13-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6675489> BlockDecl should not use llvm::smallvector.

Also changed BlockDecl API to be more consistent (wrt FunctionDecl).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66904 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
664da98a55f093ebf9c5fdcd9a54721184af8bbf 13-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed an ir-gen bug related to strong-cast generation of
source being a non-pointer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66854 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3b8a652d60ddc4419c1fab5c7b5347560283cdc1 13-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed an ir-gen bug related to strong-cast generation of
source being a non-pointer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66854 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d0e808aea9172a79bf0542ce26ca4ddb65ae9108 12-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More objc2's ivar layout bitmap.
bitmap generation for basic ivars seem to
work now. This is work in progress.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66836 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c8ce9c8c0b24e45aac06795a0222d8d1dbdeafcc 12-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More objc2's ivar layout bitmap.
bitmap generation for basic ivars seem to
work now. This is work in progress.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66836 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
adaf35f78e6c1a03976d68f72134b11ad767d3bc 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Fix uninitialized use in GetAddrOfGlobalBlock, reenable assert.
- Mike, please verify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66762 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
d67b09abf241e527ecb2fd02b772f9486b30fd2f 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Fix uninitialized use in GetAddrOfGlobalBlock, reenable assert.
- Mike, please verify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66762 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
9f052cbb0c67e0fe45d9fa60952b3860c12c95b8 11-Mar-2009 Daniel Dunbar <daniel@zuster.org> x86_32 ABI: Don't try and expand structures with bitfields.
- This is an ABI incompatiblity, but this is not likely to be a huge
deal in practice. For now we at least generate self consistent code
instead of crashing.
- <rdar://problem/6657601> x86-32 ABI: Bitfields in small structures
are not passed correctly


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66713 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
e06a75f4c8ea30b6a99d5aa1dce5feda64da09c6 11-Mar-2009 Daniel Dunbar <daniel@zuster.org> x86_32 ABI: Don't try and expand structures with bitfields.
- This is an ABI incompatiblity, but this is not likely to be a huge
deal in practice. For now we at least generate self consistent code
instead of crashing.
- <rdar://problem/6657601> x86-32 ABI: Bitfields in small structures
are not passed correctly


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66713 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
6d49ab667fce4edec3577eb18ad936121ba35500 11-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Code refactoring. No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66710 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
21e6f176015f8ffa0f162618c03f6d63746361ef 11-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Code refactoring. No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66710 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
df1d90315f96c9c8c06fc6d380a3550f408dff6f 11-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More of objc2's ivar layout bitmap (Next: specific).
Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66707 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9397e1dd41cb52fb3f49e1872d48897dcfb14859 11-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More of objc2's ivar layout bitmap (Next: specific).
Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66707 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
78c33ccb7e72d540af9d7e6a5a08accac575d8b0 11-Mar-2009 Duncan Sands <baldrick@free.fr> Adjust for linkage name change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66691 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ceb77d909f80d4949ee6177094510413c391cddc 11-Mar-2009 Duncan Sands <baldrick@free.fr> Adjust for linkage name change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66691 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
9aa5c261bf6aab898384528d1780db4caaa94230 11-Mar-2009 Duncan Sands <baldrick@free.fr> Correct for change of this name in LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66652 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
e3fedbeee8a014cd4f4e7cad8e7f6059eae12410 11-Mar-2009 Duncan Sands <baldrick@free.fr> Correct for change of this name in LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66652 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7c0c17b528295299020428f583a480a6dcb4c7e0 11-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More Next objc2's gc ivar layout bitmap work.
Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66615 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
820e0203079afd64b0de422832f9e0b31a27c0c8 11-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More Next objc2's gc ivar layout bitmap work.
Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66615 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c516473346d49d9613d2931fc3caa64e52a5d17c 11-Mar-2009 Chris Lattner <sabre@nondot.org> add plumbing to report diagnostics back through sema for malformed asmstrings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66598 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
fb5058ef67c054296c88db18ab1b3717845cb71d 11-Mar-2009 Chris Lattner <sabre@nondot.org> add plumbing to report diagnostics back through sema for malformed asmstrings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66598 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
5c6a6c5f5756bb9b4902b4db4dbc023c73197f52 11-Mar-2009 Chris Lattner <sabre@nondot.org> move the asm string analysis code out of codegen into common
code where Sema can get to it. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66596 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
458cd9c8a79b25b87dcea43c9d97a4c59f194799 11-Mar-2009 Chris Lattner <sabre@nondot.org> move the asm string analysis code out of codegen into common
code where Sema can get to it. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66596 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
e6178df29a6b816d21b7c98711390387fd2e9a64 10-Mar-2009 Devang Patel <dpatel@apple.com> Emit super class debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66580 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
fbe899f7143d85f11d16423568fee5ebd99beab1 10-Mar-2009 Devang Patel <dpatel@apple.com> Emit super class debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66580 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a5dfc18d3700f95c6f48790977d609e7e79e4099 10-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen support for class getter/setter call
using property dot-syntax.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66556 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
3523d4f59eb0aa1f200dcb943093ecfe75008735 10-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen support for class getter/setter call
using property dot-syntax.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66556 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
24c169debdbe1f6779664296f1b831eeb00bc051 10-Mar-2009 Daniel Dunbar <daniel@zuster.org> Remove some now-unneeded calls to llvm::errs().flush().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66555 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
4a77edb3f0fabc8e214a3d5636c4d0aff031645c 10-Mar-2009 Daniel Dunbar <daniel@zuster.org> Remove some now-unneeded calls to llvm::errs().flush().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66555 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
fdaed4c5837a0e7e66e063705a5b8c1e57fbca34 10-Mar-2009 Anders Carlsson <andersca@mac.com> Address Doug's comments wrt the mangler and fix Eli's test case

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66549 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
4843e584b54460973b8445d38907bab0401ebb0c 10-Mar-2009 Anders Carlsson <andersca@mac.com> Address Doug's comments wrt the mangler and fix Eli's test case

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66549 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
37931065a7d2746d0d75a97afed85d33284e1e6a 10-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More objc2's gc meta-data work related to ivar layout bitmap.
Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66546 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a5a10c37a02ac65f88624a29d1f7ad1d196fc7ea 10-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More objc2's gc meta-data work related to ivar layout bitmap.
Work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66546 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
02cfdb53ac474d48a1d2f48c5037588a5f768b61 10-Mar-2009 Chris Lattner <sabre@nondot.org> Fix PR3682 by just disabling a broken assertion. This check should be
done in sema, and is reflected by the existing PR3258. In the meantime,
fix PR3682 by disabling a bogus assertion (which doesn't account for +
operands).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66533 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
88beebe6ecab1810c3f62f0b5f8be796855861cc 10-Mar-2009 Chris Lattner <sabre@nondot.org> Fix PR3682 by just disabling a broken assertion. This check should be
done in sema, and is reflected by the existing PR3258. In the meantime,
fix PR3682 by disabling a bogus assertion (which doesn't account for +
operands).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66533 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
d86eb966a26e9e169b7f45f66e9dc92b39e4aa83 10-Mar-2009 Chris Lattner <sabre@nondot.org> reduce duplication of parsing code between %0 and %x0 and
add support for modifiers on named references, like %c[foo].



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66532 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
02af974dca0f855dc36d8a8c26bb87f373310815 10-Mar-2009 Chris Lattner <sabre@nondot.org> reduce duplication of parsing code between %0 and %x0 and
add support for modifiers on named references, like %c[foo].



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66532 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
20ac04cc4d10990aa85513d44ba748302f6c1f5a 10-Mar-2009 Chris Lattner <sabre@nondot.org> move matching of named operands into AsmStmt class. At the same
time handle + operands in operand counting, fixing asm.c:t7 to
expand into $2 instead of $1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66531 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
10ca96ae9aed6906c3302403ef1a146a8d4c6b74 10-Mar-2009 Chris Lattner <sabre@nondot.org> move matching of named operands into AsmStmt class. At the same
time handle + operands in operand counting, fixing asm.c:t7 to
expand into $2 instead of $1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66531 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
0e46afb31413914f144c9ef0ef4fed004d5c4732 10-Mar-2009 Chris Lattner <sabre@nondot.org> reduce nesting, use memchr instead of explicit loop, eliminate a
temporary std::string to fix a fixme.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66530 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
bb57265fdba1e8af05dd917b8bf243d49cfb3465 10-Mar-2009 Chris Lattner <sabre@nondot.org> reduce nesting, use memchr instead of explicit loop, eliminate a
temporary std::string to fix a fixme.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66530 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
8c23f9722b40224ce92eb9a1c2628881a7e82afd 10-Mar-2009 Chris Lattner <sabre@nondot.org> Expand %= into ${:uid} so that the code generator emits a unique ID for the
asm. This allows us to properly handle the case when an optimizer duplicates
the asm, such as here:

void bar() {
int i;
for (i = 0; i < 3; ++i)
asm("foo %=" : : "r"(0));
}

we now produce:

_bar:
xorl %eax, %eax
## InlineAsm Start
foo 0
## InlineAsm End
## InlineAsm Start
foo 1
## InlineAsm End
## InlineAsm Start
foo 2
## InlineAsm End
ret

instead of:

_bar:
xorl %eax, %eax
## InlineAsm Start
foo 1
## InlineAsm End
## InlineAsm Start
foo 1
## InlineAsm End
## InlineAsm Start
foo 1
## InlineAsm End
ret

This also fixes a fixme by eliminating a static.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66528 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
63c8b14ddc15147f443806408db6459183af26c1 10-Mar-2009 Chris Lattner <sabre@nondot.org> Expand %= into ${:uid} so that the code generator emits a unique ID for the
asm. This allows us to properly handle the case when an optimizer duplicates
the asm, such as here:

void bar() {
int i;
for (i = 0; i < 3; ++i)
asm("foo %=" : : "r"(0));
}

we now produce:

_bar:
xorl %eax, %eax
## InlineAsm Start
foo 0
## InlineAsm End
## InlineAsm Start
foo 1
## InlineAsm End
## InlineAsm Start
foo 2
## InlineAsm End
ret

instead of:

_bar:
xorl %eax, %eax
## InlineAsm Start
foo 1
## InlineAsm End
## InlineAsm Start
foo 1
## InlineAsm End
## InlineAsm Start
foo 1
## InlineAsm End
ret

This also fixes a fixme by eliminating a static.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66528 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
e8625110518534a980a44226f0f7c249604b22f4 10-Mar-2009 Chris Lattner <sabre@nondot.org> add some helper methods to AsmStmt and add some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66521 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
b327793860737d1c103a73aeda8057dd628a101d 10-Mar-2009 Chris Lattner <sabre@nondot.org> add some helper methods to AsmStmt and add some comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66521 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
504fba2e919040bc88a700d6c47597db93d636c4 10-Mar-2009 Chris Lattner <sabre@nondot.org> slightly simplify some code, pull the 'is simple asm' case up in
ConvertAsmString and shrink it a bit. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66520 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
f1a08caedb52a3287d38dfff0ac6e1c0a6531c3e 10-Mar-2009 Chris Lattner <sabre@nondot.org> slightly simplify some code, pull the 'is simple asm' case up in
ConvertAsmString and shrink it a bit. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66520 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
edf953cc0d215cc00af9cf533e241263b7411af4 10-Mar-2009 Daniel Dunbar <daniel@zuster.org> Backout r66408, we don't want handling of globals to rely on the
module symbol table. The root problem inspiring this was fixed in
r66316 (and again in r66506).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66512 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
42745815fa4e90bfb07e581d2e5152b2c2db08ff 10-Mar-2009 Daniel Dunbar <daniel@zuster.org> Backout r66408, we don't want handling of globals to rely on the
module symbol table. The root problem inspiring this was fixed in
r66316 (and again in r66506).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66512 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
56756c36615069eb4f21c1f91d576121f62b7fc6 09-Mar-2009 Daniel Dunbar <daniel@zuster.org> NeXT: Set alignment on a number of ObjC metadata variables (matching llvm-gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66481 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
58a29128005f6e54c7d3aa39797d86ada8d40006 09-Mar-2009 Daniel Dunbar <daniel@zuster.org> NeXT: Set alignment on a number of ObjC metadata variables (matching llvm-gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66481 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
90d88f905a7bab49832bdd4a4dc91260978d89e3 09-Mar-2009 Daniel Dunbar <daniel@zuster.org> NeXT: Move some routines over to CreateMetadataVar.
- No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66473 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
63c5b50d80b9843acaea0a89d425b77454ac88d9 09-Mar-2009 Daniel Dunbar <daniel@zuster.org> NeXT: Move some routines over to CreateMetadataVar.
- No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66473 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
eddddd2f582a6965be64187092446a5a758a2adf 09-Mar-2009 Daniel Dunbar <daniel@zuster.org> Tweak CreateMetadataVar, take the exact alignment instead of relying
on LLVM TargetData.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66455 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
35bd763b9438b53f7920521ed19c1ef74c7a6795 09-Mar-2009 Daniel Dunbar <daniel@zuster.org> Tweak CreateMetadataVar, take the exact alignment instead of relying
on LLVM TargetData.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66455 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
40a94a96381a484a1a5dc9440b08b32625d1cb1c 09-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More fix for bitfield ivar meta-data and code gen accessing it.
Now, we can actually execute dejagnu test with bitfield ivars
in non-fragile abi mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66448 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a6681ae9bb1578b7a5be65eb34e22b026ecbe884 09-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More fix for bitfield ivar meta-data and code gen accessing it.
Now, we can actually execute dejagnu test with bitfield ivars
in non-fragile abi mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66448 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7ba87d46343ba6a9b1cf0a9a15da8c76e8b0db03 09-Mar-2009 Daniel Dunbar <daniel@zuster.org> Fix typo in pref commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66433 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d6e941d37dbf75a20f94b94af377e44c38ab0070 09-Mar-2009 Daniel Dunbar <daniel@zuster.org> Fix typo in pref commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66433 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c4594f2d5782f98314ed75a42a0779f8a18c3022 09-Mar-2009 Daniel Dunbar <daniel@zuster.org> NeXT: Add CreateMetadataVar utility method to encapsulate creation of
Obj-C metadata variables (which generally should be handled the same,
although they aren't currently).
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66432 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
fd65d370b14209e35cdbf7bb3b899b60ef207eab 09-Mar-2009 Daniel Dunbar <daniel@zuster.org> NeXT: Add CreateMetadataVar utility method to encapsulate creation of
Obj-C metadata variables (which generally should be handled the same,
although they aren't currently).
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66432 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7de82e3006d80d9e091c31c158e0738dc3d333d9 09-Mar-2009 Mike Stump <mrs@apple.com> Be sure to never create two functions with the same name, instead arrange to
reuse the prior one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66408 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
53d89225560fb9434a68e25019a31a75c0006537 09-Mar-2009 Mike Stump <mrs@apple.com> Be sure to never create two functions with the same name, instead arrange to
reuse the prior one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66408 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
d65949b899ecb979e5e7e2c5196b6d89d6ebbfd1 08-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Code refactoring. No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66391 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b21f07e056b6c9918bf938f19ca561c60f778695 08-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Code refactoring. No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66391 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c34a6844663ea7f0744c3dbc249ac0c7c29af504 08-Mar-2009 Anders Carlsson <andersca@mac.com> Make mangling work with anonymous tag types. Doug, please review

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66353 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
b1d947b1011cb559be5745153f292b2dfb46b8e6 08-Mar-2009 Anders Carlsson <andersca@mac.com> Make mangling work with anonymous tag types. Doug, please review

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66353 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
fae4586ad2cd4054da32114f2431d49716ac0a1a 07-Mar-2009 Anders Carlsson <andersca@mac.com> Mangle Objective-C interfaces correctly (where correctly refers to what gcc does)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66349 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
a40c5e4f6969c6e9c980e7506b6f0a9477808645 07-Mar-2009 Anders Carlsson <andersca@mac.com> Mangle Objective-C interfaces correctly (where correctly refers to what gcc does)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66349 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
dc8d1c6ceaedfd2f4b3c0582a3b8a5c3ce19f787 07-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Make constant emission for @encode use the common string emission code.
This is a bit cleaner, and also "fixes" bad code that compares the
addresses of the string constants.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66346 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a210f350fa78c263caa26e0f999cce85bb235309 07-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Make constant emission for @encode use the common string emission code.
This is a bit cleaner, and also "fixes" bad code that compares the
addresses of the string constants.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66346 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d6d0c935e51466f45dbfcdfee980c0ac90eee732 07-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> correct bitfield ivar offset in ivar meta-data.
(objc abi specific).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66345 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
11894a4ad600a4919008b2693143cde395b9e9de 07-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> correct bitfield ivar offset in ivar meta-data.
(objc abi specific).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66345 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
737b9526c3006b5b4801ca3b63b46387e2f83837 07-Mar-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Mangle param names with .arg. only.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66343 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
863cffbaf66b0a46df17d45d8b497d762dcabd6b 07-Mar-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Mangle param names with .arg. only.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66343 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
36dbf222753dca253a0b22ff7050c7e8ee0f8dbc 07-Mar-2009 Mike Stump <mrs@apple.com> Fixup our uses of various linkages to match how llvm now works. I think they are all
correct, but an extra set of ObjC eyes would be good.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66342 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenModule.cpp
286acbdbe0c82e9a6bcad5fca3c4fa582f3f1a2c 07-Mar-2009 Mike Stump <mrs@apple.com> Fixup our uses of various linkages to match how llvm now works. I think they are all
correct, but an extra set of ObjC eyes would be good.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66342 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenModule.cpp
5225ad8844e292165d3b86effbde84d0550961de 07-Mar-2009 Mike Stump <mrs@apple.com> If someone could figure out this is necessary, that would be good.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66341 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
a91b5905755a9066576db16f1d3ac0ffb9e43e09 07-Mar-2009 Mike Stump <mrs@apple.com> If someone could figure out this is necessary, that would be good.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66341 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
e43c54a9c5ada72c474a38ea172f549ba09f929f 07-Mar-2009 Mike Stump <mrs@apple.com> Fix typo, need parens.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66337 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
8e5d9f1aadc11fb39b669770f729fbe40c94f5be 07-Mar-2009 Mike Stump <mrs@apple.com> Fix typo, need parens.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66337 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
9cc59542e9852e097b6563c46ceda2c734f0a3e6 07-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Some struct/class mismatch fixes, to silence MSVC warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66335 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
43af76e845c95be160c088ec11ba3c43e2527fa8 07-Mar-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Some struct/class mismatch fixes, to silence MSVC warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66335 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
b0fa8b5b67bc095b62d5bde597d444ee67acd874 07-Mar-2009 Mike Stump <mrs@apple.com> Remove last FIXME for block literal codegen that I know about and turn
on all the new code by default. There is still plenty of testing to
do and issues I'm sure need resolving. Let me know if you find
anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66323 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
63822bab6e76041b623204566c9ea657023315b0 07-Mar-2009 Mike Stump <mrs@apple.com> Remove last FIXME for block literal codegen that I know about and turn
on all the new code by default. There is still plenty of testing to
do and issues I'm sure need resolving. Let me know if you find
anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66323 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
0a33ed3c9a844a7bf7d3db63aea5aea115f3d972 07-Mar-2009 Mike Stump <mrs@apple.com> Remove some FIXMEs for block literals that should be close to working.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66322 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
f4bc312fc701100af8d3b5af73366715169f5585 07-Mar-2009 Mike Stump <mrs@apple.com> Remove some FIXMEs for block literals that should be close to working.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66322 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
f846623d8cd070eb074a96abe1188cc2a2e2337c 07-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Back out the patch in r66302, and re-fix it properly. We assume for
performance that the type of the returned llvm::Value for an expression
matches the converted type of the clang::Expr; mismatches will cause all
sorts of errors and silent miscompilations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66321 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjCMac.cpp
8339b35ca05dd040a9a0ecfc92e7b49d80c5a96b 07-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Back out the patch in r66302, and re-fix it properly. We assume for
performance that the type of the returned llvm::Value for an expression
matches the converted type of the clang::Expr; mismatches will cause all
sorts of errors and silent miscompilations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66321 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjCMac.cpp
05a6d4edd2f27e35b04e405135b567d6e2df4ba6 07-Mar-2009 Mike Stump <mrs@apple.com> codegen support for dispose helpers for block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66320 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
1edf6b646ea161ce1193ba278ae88de82ff7114d 07-Mar-2009 Mike Stump <mrs@apple.com> codegen support for dispose helpers for block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66320 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
1fa52fede687d807957a5f49d6c1f3effdbac022 07-Mar-2009 Mike Stump <mrs@apple.com> Codegen support for copy helpers for block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66319 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
0892099dbc640720400a1d9decd2733a09d733e5 07-Mar-2009 Mike Stump <mrs@apple.com> Codegen support for copy helpers for block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66319 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
a6825f00687a6798c661296f99cba0fb3a2c3bf0 07-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a bug where generation of read-barriers caused
crash in ir-gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66302 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
a6e27790acb6d06be6c1113ea94165c4b7e056cd 07-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a bug where generation of read-barriers caused
crash in ir-gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66302 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
f8fa6e19b356b782073d0474b09c345719efa6d6 06-Mar-2009 Daniel Dunbar <daniel@zuster.org> (LLVM svn up) Generalize RuntimeFunctions to RuntimeGlobals and add
CodeGenModule::CreateRuntimeVariable.

- No real functionality change; although we now assert on silly
things like:
--
int objc_exception_throw;
void f0() { @throw(@"A"); }
--
instead of accepting it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66292 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
b681b8ffab2aa016b3897916d5110927c34a584b 06-Mar-2009 Daniel Dunbar <daniel@zuster.org> (LLVM svn up) Generalize RuntimeFunctions to RuntimeGlobals and add
CodeGenModule::CreateRuntimeVariable.

- No real functionality change; although we now assert on silly
things like:
--
int objc_exception_throw;
void f0() { @throw(@"A"); }
--
instead of accepting it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66292 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
9d8c126aa73dd11b014fcdc753777d2f9164cd39 06-Mar-2009 Mike Stump <mrs@apple.com> Pass the type of the block literal around to make required temporal ordering of code clearer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66284 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
odeGenFunction.h
cf62d39bc2f09855c6ab08bdc5d0bf54067f0041 06-Mar-2009 Mike Stump <mrs@apple.com> Pass the type of the block literal around to make required temporal ordering of code clearer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66284 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
odeGenFunction.h
78d7d4559d8b20e64dc61747bbbfa5495a0b5437 06-Mar-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Handle long double in union when upper eightbyte results
in a lone X87 class.
- PR3735.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66277 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
100f402451da96f74ea58b1f49fc53b4fa149a57 06-Mar-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Handle long double in union when upper eightbyte results
in a lone X87 class.
- PR3735.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66277 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
80f5f99b2ffa59dd3456d6e1f2042f57816cf123 06-Mar-2009 Daniel Dunbar <daniel@zuster.org> IRgen support for weak_import.
- <rdar://problem/6652110> clang should support weak_import


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66270 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5e27314eb5a9cba7997cf9f6fc82428d99667077 06-Mar-2009 Daniel Dunbar <daniel@zuster.org> IRgen support for weak_import.
- <rdar://problem/6652110> clang should support weak_import


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66270 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
11973b669dd166e6bcf15cc0264a828274a39d63 06-Mar-2009 Mike Stump <mrs@apple.com> Complete __Block_byref_id_object_copy cogegen for block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66257 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
ee09422b014151a6a47c2ce704a81e94467bc786 06-Mar-2009 Mike Stump <mrs@apple.com> Complete __Block_byref_id_object_copy cogegen for block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66257 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
4a0e513e1a23418c288b23ae3cd040ac7dadf94b 06-Mar-2009 Mike Stump <mrs@apple.com> Finish off __Block_byref_id_object_dispose codegen for block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66247 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
1851b68aaa6717783609f366f5d87bbd0030f189 06-Mar-2009 Mike Stump <mrs@apple.com> Finish off __Block_byref_id_object_dispose codegen for block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66247 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
84d513743484917596fb62d0baa34674e29dabda 06-Mar-2009 Mike Stump <mrs@apple.com> Remove extra arg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66243 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
416d92ef0b8ad96ab679de7856bdb55c5f31d814 06-Mar-2009 Mike Stump <mrs@apple.com> Remove extra arg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66243 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
f4b6234418d92739f2b666bb7f0b5afbe7d7caae 06-Mar-2009 Mike Stump <mrs@apple.com> More codegen support for the copy/dispose helpers for block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66241 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
45031c08c608e548ac12caf0547f89574e994b96 06-Mar-2009 Mike Stump <mrs@apple.com> More codegen support for the copy/dispose helpers for block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66241 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
ecd794236681208bc2cadb0ada4b0b8a800c9f1a 06-Mar-2009 Mike Stump <mrs@apple.com> Framework for codegen for copy/dispose helpers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66231 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
odeGenFunction.cpp
a4f668f3b7e03629066a01b04e415cb2b4655daf 06-Mar-2009 Mike Stump <mrs@apple.com> Framework for codegen for copy/dispose helpers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66231 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
odeGenFunction.cpp
0098e7a6d87b8823c7468a30c79858da396d1230 06-Mar-2009 Daniel Dunbar <daniel@zuster.org> Cleanup EH a bit given changes to ObjCCatchStmt.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66218 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ede8de95ebea858e65c79e54aa2455a394f27f13 06-Mar-2009 Daniel Dunbar <daniel@zuster.org> Cleanup EH a bit given changes to ObjCCatchStmt.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66218 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
947cb1d3bd5d8781f4ae9e662fdbb154600c8237 05-Mar-2009 Daniel Dunbar <daniel@zuster.org> Don't mangle names of local variables.
- For one thing, this adds unneeded overhead; for another, this
routine can be used to emit unnamed decls which we shouldn't try to
mangle.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66212 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
fe345572459b69a6b680322fef504b4f8bd98dd7 05-Mar-2009 Daniel Dunbar <daniel@zuster.org> Don't mangle names of local variables.
- For one thing, this adds unneeded overhead; for another, this
routine can be used to emit unnamed decls which we shouldn't try to
mangle.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66212 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
01b3e348ceaa9e209e77e9a0286425e16d49c593 05-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More function stop for objc2's ivar layout bit map.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66209 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d61a50a84d87a317cf929c6c1babf27d404b1e29 05-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> More function stop for objc2's ivar layout bit map.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66209 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7345eba4f0211ae9c6aec263788c63c29562beda 05-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Adds a template for a function for objc2's gc's ivar layout
bitmap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66175 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d80d81b53c08db00078c14d30aba4fa259a20ae0 05-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Adds a template for a function for objc2's gc's ivar layout
bitmap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66175 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1bdbf635cb571c894147c9cb38eaaacbf7ded611 05-Mar-2009 Mike Stump <mrs@apple.com> prep work for copy/destroy helpers for block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66159 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
odeGenFunction.h
00470a1c4c44c5ed26bad9a38b4d3904b02d7a28 05-Mar-2009 Mike Stump <mrs@apple.com> prep work for copy/destroy helpers for block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66159 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
odeGenFunction.h
614edd3004e9ab064b792666b576666a3c97f116 05-Mar-2009 Chris Lattner <sabre@nondot.org> if we die in IR generation of a compound statement, include
it in the stack trace, giving us stuff like:

Stack dump:
0. Program arguments: clang t.c -emit-llvm
1. <eof> parser at end of file
2. t.c:1:5: LLVM IR generation of declaration 'a'
3. t.c:1:9: LLVM IR generation of compound statement ('{}')
4. t.c:2:3: LLVM IR generation of compound statement ('{}')
Abort



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66154 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
7d22bf00dbabca86ba791f56a99e006181fa22dd 05-Mar-2009 Chris Lattner <sabre@nondot.org> if we die in IR generation of a compound statement, include
it in the stack trace, giving us stuff like:

Stack dump:
0. Program arguments: clang t.c -emit-llvm
1. <eof> parser at end of file
2. t.c:1:5: LLVM IR generation of declaration 'a'
3. t.c:1:9: LLVM IR generation of compound statement ('{}')
4. t.c:2:3: LLVM IR generation of compound statement ('{}')
Abort



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66154 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
040f4db6b05de5ede64572c2ae79f9a42b6ebd77 05-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Make IRGen compatible with declaring a function with incomplete
return/argument types. (The generated IR isn't ideal, but we can't
really do better in general.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66132 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2136b2e9345c23c26426110873dd97ef5d761ef2 05-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Make IRGen compatible with declaring a function with incomplete
return/argument types. (The generated IR isn't ideal, but we can't
really do better in general.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66132 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8f61f952ad7ac0d8f17ceaf7c36d9c9e727316a9 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
odeGenTypes.cpp
odeGenTypes.h
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
odeGenTypes.cpp
odeGenTypes.h
6663f1bbf24e00671f0fc29b89128e6a3db3cb33 05-Mar-2009 Mike Stump <mrs@apple.com> Avoid dispose calls when only doing gc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66126 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
d9e0fae40a902ddbd4d53ef60ba7fb908788fe60 05-Mar-2009 Mike Stump <mrs@apple.com> Avoid dispose calls when only doing gc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66126 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
2b34d8f09704bae934c52e692e9173b73e1c7266 05-Mar-2009 Devang Patel <dpatel@apple.com> Set isMain bit for MainFile.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66120 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4db4c9cc3e668ab713a5d1a9bad342c939ec61c6 05-Mar-2009 Devang Patel <dpatel@apple.com> Set isMain bit for MainFile.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66120 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
6029466e22ee3c684760ab020496bd699795e92d 05-Mar-2009 Mike Stump <mrs@apple.com> Add codegen support for __block variables to call _Block_object_dispose as necessary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66117 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
odeGenFunction.cpp
797b6327571f9d7b1c45404a56ddcbf9b9298ae8 05-Mar-2009 Mike Stump <mrs@apple.com> Add codegen support for __block variables to call _Block_object_dispose as necessary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66117 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
GDecl.cpp
odeGenFunction.cpp
f13eac17ea548684a87e3146d150ac4f713d0ed6 04-Mar-2009 Mike Stump <mrs@apple.com> Fixup __block codegen in nested block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66091 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
58a851409298a53e1a6245cb24b8403ac09264ff 04-Mar-2009 Mike Stump <mrs@apple.com> Fixup __block codegen in nested block literals.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66091 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
788fa7ded6245bfecc37d2cdc99c5aea2e05efca 04-Mar-2009 Mike Stump <mrs@apple.com> Move more blocks CodeGenFunction code up and out.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66049 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.h
odeGenFunction.h
ad75ab414ecdddd193d6f2f0e798e85ad5a07242 04-Mar-2009 Mike Stump <mrs@apple.com> Move more blocks CodeGenFunction code up and out.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66049 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.h
odeGenFunction.h
a79696d301d54c735d9319477351db0eda0dbe4d 04-Mar-2009 Mike Stump <mrs@apple.com> Move some of the CodeGenFunction blocks code up and out. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66048 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
odeGenFunction.cpp
odeGenFunction.h
3947de5edda7e0c32060c568cc5f7b2aae6f70b4 04-Mar-2009 Mike Stump <mrs@apple.com> Move some of the CodeGenFunction blocks code up and out. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66048 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
odeGenFunction.cpp
odeGenFunction.h
d6d0ebe66e55f4f55aacef5a67bb24c0c8206846 04-Mar-2009 Mike Stump <mrs@apple.com> Move more of the blocks code up and out.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66046 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
odeGenModule.cpp
odeGenModule.h
90a904309c79977fcba2ff0542e2e4cd8e3c3faf 04-Mar-2009 Mike Stump <mrs@apple.com> Move more of the blocks code up and out.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66046 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
odeGenModule.cpp
odeGenModule.h
593a07aab2739f87655e24a1b27484cb282964c2 04-Mar-2009 Devang Patel <dpatel@apple.com> Refactor code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66043 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7794bb8271d97bea5d0bf52f4f050fbfff1a7420 04-Mar-2009 Devang Patel <dpatel@apple.com> Refactor code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66043 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1f010b59707a0416b2777242d75275b13ce981ab 04-Mar-2009 Mike Stump <mrs@apple.com> Move more of blocks codegen out of CodeGenModule and into the
BlockModule. No functionality change. This should help people that
don't want to know anything about blocks not be confused by the
overloaded use of the term block or nor want to see all the blocks
goop.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66042 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
2a998148a6823c44d67da347c95eb2ea21f6b986 04-Mar-2009 Mike Stump <mrs@apple.com> Move more of blocks codegen out of CodeGenModule and into the
BlockModule. No functionality change. This should help people that
don't want to know anything about blocks not be confused by the
overloaded use of the term block or nor want to see all the blocks
goop.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66042 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GBlocks.h
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
7cbac8472807e51b24967a20d24917eb1e1245ec 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Support "asm" renaming of external symbols.
- PR3698.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66038 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
3f75c43bd77e063342bc888ac276daf64ba0ce07 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Support "asm" renaming of external symbols.
- PR3698.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66038 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
16c92a17520038b84124b69864113265e1d15972 04-Mar-2009 Mike Stump <mrs@apple.com> Start the migration of more of the blocks code out of sight for most
people. De-duplicates BLOCK_NEEDS_FREE and friends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66035 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.h
d883d841c20729972e70853cb08c2e4c7d044d2d 04-Mar-2009 Mike Stump <mrs@apple.com> Start the migration of more of the blocks code out of sight for most
people. De-duplicates BLOCK_NEEDS_FREE and friends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66035 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.h
629608cc5e8b9594a93bbc692107281b99fdc7ad 04-Mar-2009 Mike Stump <mrs@apple.com> Start the migration of more of the blocks code out of sight for most
people. De-duplicates BLOCK_NEEDS_FREE and friends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66034 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
odeGenModule.h
96bd13ae1ab89f5a04b3ad3ec8ec1864cbba3482 04-Mar-2009 Mike Stump <mrs@apple.com> Start the migration of more of the blocks code out of sight for most
people. De-duplicates BLOCK_NEEDS_FREE and friends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66034 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
odeGenModule.h
b3a6fac013de2524359dd3f78cef51fb854ae5ff 04-Mar-2009 Mike Stump <mrs@apple.com> Add __block codegen testcase. We introduce a temporary flag to enable
codegen, until such time as codegen is complete enough to turn on with
-fblocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66031 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
58919e1f982da4f57356afd38bc86b13d84199df 04-Mar-2009 Mike Stump <mrs@apple.com> Add __block codegen testcase. We introduce a temporary flag to enable
codegen, until such time as codegen is complete enough to turn on with
-fblocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66031 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
d540c115b24af3e5bd17f1b49b0b8bd9af2c6b33 04-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup for choose expressions: add a helper that returns the
chosen sub-expression, rather than just evaluating the condition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66018 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprComplex.cpp
GExprScalar.cpp
7976932a1c256d447316ffac58e9821417725e34 04-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup for choose expressions: add a helper that returns the
chosen sub-expression, rather than just evaluating the condition.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66018 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprComplex.cpp
GExprScalar.cpp
5137a30f8977abbc562710b7f68d5d53d5343113 04-Mar-2009 Chris Lattner <sabre@nondot.org> add a special case for codegen that improves the case where we have
multiple sequential cases to a) not create tons of fall-through basic blocks
and b) not recurse deeply. This fixes codegen on 100K deep cases, and improves
codegen on moderate cases from this:

switch i32 %tmp, label %sw.epilog [
i32 1000, label %sw.bb
i32 1001, label %sw.bb1
i32 1002, label %sw.bb2
i32 1003, label %sw.bb3
i32 1004, label %sw.bb4
...
sw.bb: ; preds = %entry
br label %sw.bb1

sw.bb1: ; preds = %entry, %sw.bb
br label %sw.bb2

sw.bb2: ; preds = %entry, %sw.bb1
br label %sw.bb3

sw.bb3: ; preds = %entry, %sw.bb2
br label %sw.bb4

to:

switch i32 %tmp, label %sw.epilog [
i32 1000, label %sw.bb
i32 1001, label %sw.bb
i32 1002, label %sw.bb
i32 1003, label %sw.bb
i32 1004, label %sw.bb
sw.bb: ;; many preds




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66015 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
5512f28fa7b26e87e613dc1558b29b2a89647809 04-Mar-2009 Chris Lattner <sabre@nondot.org> add a special case for codegen that improves the case where we have
multiple sequential cases to a) not create tons of fall-through basic blocks
and b) not recurse deeply. This fixes codegen on 100K deep cases, and improves
codegen on moderate cases from this:

switch i32 %tmp, label %sw.epilog [
i32 1000, label %sw.bb
i32 1001, label %sw.bb1
i32 1002, label %sw.bb2
i32 1003, label %sw.bb3
i32 1004, label %sw.bb4
...
sw.bb: ; preds = %entry
br label %sw.bb1

sw.bb1: ; preds = %entry, %sw.bb
br label %sw.bb2

sw.bb2: ; preds = %entry, %sw.bb1
br label %sw.bb3

sw.bb3: ; preds = %entry, %sw.bb2
br label %sw.bb4

to:

switch i32 %tmp, label %sw.epilog [
i32 1000, label %sw.bb
i32 1001, label %sw.bb
i32 1002, label %sw.bb
i32 1003, label %sw.bb
i32 1004, label %sw.bb
sw.bb: ;; many preds




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66015 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
86fc61a43fa2d652b95d938be87439b8041cdcbe 04-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Continuation of PR3687: fix more places to use the right type for
booleans.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66012 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
a3460ac8a17bd82fc21db9ff8db7c7efcb5bb1a9 04-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Continuation of PR3687: fix more places to use the right type for
booleans.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66012 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
9a8a4960ec11bc8b653a49bf609bc6e7b67a7c61 04-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Comment fix: change a question to an answer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66010 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
074dda6d81315d3e1414ce018325c166bcb02028 04-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Comment fix: change a question to an answer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66010 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
35bcec883abb79e9a735e3c6b7b154739326c72f 04-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Attempt to fix PR3709: when converting from an integer to a pointer,
first extend the integer to the correct width.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66009 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
25615424741bcce31fe52c896f76268f0307f00d 04-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Attempt to fix PR3709: when converting from an integer to a pointer,
first extend the integer to the correct width.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66009 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
ad9605d5e7acba2faa57a9fa0addd5702ea05914 04-Mar-2009 Mike Stump <mrs@apple.com> Improved ABI compliance for __block variables. No testcases yet as we
still give an unsupported error for them due to the fact this is a
work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66007 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GExpr.cpp
odeGenFunction.h
odeGenModule.h
dab514fc30242c7afd6c03956e46136c400fb0d3 04-Mar-2009 Mike Stump <mrs@apple.com> Improved ABI compliance for __block variables. No testcases yet as we
still give an unsupported error for them due to the fact this is a
work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66007 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GExpr.cpp
odeGenFunction.h
odeGenModule.h
0e8b96abd2515a746cefe47cbc92feacc8c5b841 03-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6640991> Exception handling executes wrong clause (Daniel, please verify).

Also necessary to fix:

<rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements
<rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65964 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7ba138abd329e591a8f6d5001f60dd7082f71b3b 03-Mar-2009 Steve Naroff <snaroff@apple.com> Fix <rdar://problem/6640991> Exception handling executes wrong clause (Daniel, please verify).

Also necessary to fix:

<rdar://problem/6632061> [sema] non object types should not be allowed in @catch statements
<rdar://problem/6252237> [sema] qualified id should be disallowed in @catch statements



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65964 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b66b3fa01c77ef8774d066af3fa4ad7556388290 03-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed an ir-gen bug in syntheszing a getter function
with property type which does not match its ivar and
in -fobjc-gc-only mode!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65955 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
ed1d29d62595a83ccf6ef23eb2759d355206df2e 03-Mar-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed an ir-gen bug in syntheszing a getter function
with property type which does not match its ivar and
in -fobjc-gc-only mode!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65955 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
452fcbcbfbd5e4260bf68783d0fca813bfa719e7 03-Mar-2009 Anders Carlsson <andersca@mac.com> Return 0 if the ConstExprEmitter can't handle an expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65951 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
069880ef6a2ecfdbc98a4980de53d3902499e83b 03-Mar-2009 Anders Carlsson <andersca@mac.com> Return 0 if the ConstExprEmitter can't handle an expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65951 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
9282e77c2fba4f734d4f2a1bc9e555ebb425532c 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
odeGenTypes.cpp
odeGenTypes.h
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
odeGenTypes.cpp
odeGenTypes.h
8e379f2ed4826e19f1cd80e7535adae8c17bde2a 02-Mar-2009 Anders Carlsson <andersca@mac.com> inline asm calls should be nounwind. Chris, please review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65866 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
bc0822bad87ac4d2dcac8e1b71960301656a2699 02-Mar-2009 Anders Carlsson <andersca@mac.com> inline asm calls should be nounwind. Chris, please review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65866 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
5a1ff3ba3a41122bf4f22cffef59ea06b18c33e8 02-Mar-2009 Devang Patel <dpatel@apple.com> Enable Objective-C interface debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65850 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
e798706bd20e514fcfeba5a7bd7200392d0e6231 02-Mar-2009 Devang Patel <dpatel@apple.com> Enable Objective-C interface debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65850 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
56941d36013d4f33f774a39162a549c9c0a4646e 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Avoid crash when child iterator gives null result.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65812 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
82573ee7419091e5ec87e2f4fa254c7a285781d6 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Avoid crash when child iterator gives null result.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65812 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
c0318b22eb4f6f5d1fa3ba2c51ade96d8db92b7b 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> First cut at zero-cost EH support.
- Still manually generates the EH code; the parts related to cleanup
need to be integrated into the cleanup stack (for proper
interaction with VLAs, etc.).

- Some differences vs gcc in corner cases; I believe our behavior is
correct but need to verify/file bugs vs gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65809 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
4ff36847f44b35c2677330c39e87dff1d745944a 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> First cut at zero-cost EH support.
- Still manually generates the EH code; the parts related to cleanup
need to be integrated into the cleanup stack (for proper
interaction with VLAs, etc.).

- Some differences vs gcc in corner cases; I believe our behavior is
correct but need to verify/file bugs vs gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65809 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ea8f4a2762f0163c23658155991bc0497e12d97a 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Make sure to invoke (not call) to objc_exception_throw if necessary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65808 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
cec4c77bf422528f4536d30574b82f878bc705b3 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Make sure to invoke (not call) to objc_exception_throw if necessary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65808 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
66b4751ebe982d1ca8503343dd0d3adef3b2d642 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Fix completely broken thinko in GetClassGlobal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65807 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
dfff23060b4a3add79a3bb68ccec606ade4f39bf 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Fix completely broken thinko in GetClassGlobal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65807 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a47bb8e72bf8dd379d521ba8bb106f64411b6964 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Don't set nounwind on functions when in using the new Obj-C ABI.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65806 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
74ac74ae244c501027924c99f2a33559a1e23b53 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Don't set nounwind on functions when in using the new Obj-C ABI.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65806 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
90e4345ffa4354d81b54d60d3597f5d1aeddd3f6 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Cleanup handling of function attributes in calls.
- No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65805 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
d14151d5f52fa9048d41d7539299243e05755ec4 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Cleanup handling of function attributes in calls.
- No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65805 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
eca2c191dbc3b55efff778e216806d3da70d3bb3 02-Mar-2009 Mike Stump <mrs@apple.com> Push checking down, also, give the user a hit as to which part of the
block literal is causing the problem, instead of the vague reference
to the entire block literal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65798 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
31937a5f7cb689377ff39397f4d0a8cff22d7359 02-Mar-2009 Mike Stump <mrs@apple.com> Push checking down, also, give the user a hit as to which part of the
block literal is causing the problem, instead of the vague reference
to the entire block literal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65798 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
63810c69cdeb4197670505248f71b855d076f49a 01-Mar-2009 Anders Carlsson <andersca@mac.com> Add BLOCK_HAS_DESCRIPTOR to global blocks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65788 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
8045ee072879657370cbd97dca46aea45ec44e2d 01-Mar-2009 Anders Carlsson <andersca@mac.com> Add BLOCK_HAS_DESCRIPTOR to global blocks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65788 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
a7db9be9d6a71dff809ad27a143f76b094989bd0 01-Mar-2009 Mike Stump <mrs@apple.com> Be sure to mark blocks with no imports as being global.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65784 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
5570cfec4ee736bd01b2fb940631acf49110bf41 01-Mar-2009 Mike Stump <mrs@apple.com> Be sure to mark blocks with no imports as being global.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65784 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
72cdb966d81a4b047c29478b3b8f2c6de0662f33 01-Mar-2009 Chris Lattner <sabre@nondot.org> simplify some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65782 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4667c4a309f7d49f858e14c4c2462fe595bcc536 01-Mar-2009 Chris Lattner <sabre@nondot.org> simplify some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65782 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
58e39bb4c1342757f0ea91d241ad01277cd74816 01-Mar-2009 Daniel Dunbar <daniel@zuster.org> Obj-C non fragile ABI: Use GetClassGlobal in one more instance I missed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65762 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
8def799ef5b006d4a28f9466e4637a90dcab2b0d 01-Mar-2009 Daniel Dunbar <daniel@zuster.org> Obj-C non fragile ABI: Use GetClassGlobal in one more instance I missed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65762 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9c285e781fdc29f3f0354e25df4cdd227f985096 01-Mar-2009 Daniel Dunbar <daniel@zuster.org> Obj-C non fragile ABI: Add GetInterfaceEHType for getting the Obj-C
exception typeinfo metadata, and a few other EH related types/functions.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65761 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
e588b9924fb36975fada46d48e74a948653e7526 01-Mar-2009 Daniel Dunbar <daniel@zuster.org> Obj-C non fragile ABI: Add GetInterfaceEHType for getting the Obj-C
exception typeinfo metadata, and a few other EH related types/functions.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65761 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
abbda2212c3ffbd0bbc5ebeaf63ba4c3776dfd6d 01-Mar-2009 Daniel Dunbar <daniel@zuster.org> NeXT: Unify code for creating a class global.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65760 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
5a7379a0d7a89d646322cfa61d80c60ef23d4569 01-Mar-2009 Daniel Dunbar <daniel@zuster.org> NeXT: Unify code for creating a class global.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65760 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d23d9922e00dd86aab5349208a00c8ea52b556a7 01-Mar-2009 Daniel Dunbar <daniel@zuster.org> ObjCAtCatchStmt's ParamStmt is always a DeclStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65759 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
93b2bdb866d49e3dab4623a822db281042e87382 01-Mar-2009 Daniel Dunbar <daniel@zuster.org> ObjCAtCatchStmt's ParamStmt is always a DeclStmt.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65759 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1a4f79ccf019366ab95912abcf10d467ae394a7e 01-Mar-2009 Anders Carlsson <andersca@mac.com> Remove debugging code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65753 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
554d6caff0c4fc8fed336e6f7d81cf51d1658d25 01-Mar-2009 Anders Carlsson <andersca@mac.com> Remove debugging code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65753 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
a1363ff119ab3c8b8f93e3ea980981991443f461 01-Mar-2009 Anders Carlsson <andersca@mac.com> Emit errors about unsupported blocks features.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65751 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
0df8c925710facc059d643b16dffc6df3d415363 01-Mar-2009 Anders Carlsson <andersca@mac.com> Emit errors about unsupported blocks features.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65751 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
42f56fa4a991204ab05f523a0f97101056017be6 01-Mar-2009 Anders Carlsson <andersca@mac.com> Initialize NSConcreteStackBlock

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65749 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
22c818aa988b7e0750716ca869e8757586da65b6 01-Mar-2009 Anders Carlsson <andersca@mac.com> Initialize NSConcreteStackBlock

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65749 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6cf64be42e756471f874efbbdc77ae946b22177a 01-Mar-2009 Anders Carlsson <andersca@mac.com> Do some blocks cleanup and simplification. Fix a crash, and add a test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65746 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprConstant.cpp
odeGenFunction.h
4de9fce48e42cc7ec1345c0fd21b3dbc5b9114c8 01-Mar-2009 Anders Carlsson <andersca@mac.com> Do some blocks cleanup and simplification. Fix a crash, and add a test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65746 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprConstant.cpp
odeGenFunction.h
17636faf0532cbd2ddb3a4537e3ea32df7b93ed6 28-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Obscure code gen bug related to sending
message to 'super' in a class method declared in
cateogy (darwin specific).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65709 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
7ce77920a35060f1c8dd72e541e42ce296ccd168 28-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Obscure code gen bug related to sending
message to 'super' in a class method declared in
cateogy (darwin specific).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65709 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
8130e7f3d4ea29d62a87b75211da451b95aba6c5 28-Feb-2009 Chris Lattner <sabre@nondot.org> improve compatibility with the VC++'08 C++ compiler. Patch by
Niklas Larsson!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65706 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenFunction.h
161d36de7ee686b09525bb919ad1b20592e499fc 28-Feb-2009 Chris Lattner <sabre@nondot.org> improve compatibility with the VC++'08 C++ compiler. Patch by
Niklas Larsson!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65706 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenFunction.h
1ec0251c85b654ac60e82fb29f71baa6ac0900ef 28-Feb-2009 Chris Lattner <sabre@nondot.org> brain thinking memcpy, fingers thinking memset :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65701 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
83c9629291e3f4d4619fa98f8a57e4ec347c6154 28-Feb-2009 Chris Lattner <sabre@nondot.org> brain thinking memcpy, fingers thinking memset :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65701 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
1db26edd045d3210a7e0b4fc054549afd34a7264 28-Feb-2009 Chris Lattner <sabre@nondot.org> after going around in circles a few times, finally cave and emit structure
copies with memcpy instead of memmove. This matches what GCC does and if it
causes a problem with a particular libc we can always fix it with a target
hook.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65699 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
ca4fc2c2620e184e8b96845a87b19d54f9e045c1 28-Feb-2009 Chris Lattner <sabre@nondot.org> after going around in circles a few times, finally cave and emit structure
copies with memcpy instead of memmove. This matches what GCC does and if it
causes a problem with a particular libc we can always fix it with a target
hook.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65699 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
2b6933f81da99dfeff3591819959de5b597e745d 28-Feb-2009 Mike Stump <mrs@apple.com> First cut CodeGen support for __block variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65688 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
a99038c0757a836c6faeeddaa5dfd249b32f6e9e 28-Feb-2009 Mike Stump <mrs@apple.com> First cut CodeGen support for __block variables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65688 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GDecl.cpp
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
2e0475984442f3da3e8359ca453d430ba7b2b2d1 28-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate CXXRecordType

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65671 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
odeGenTypes.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
GDebugInfo.cpp
odeGenTypes.cpp
c5a02555255640f3d377390950f3fb9958dca2f7 28-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Alignment of pointers in __objc_classlist must be on their
natural alignment. Otherwise, the excess hole confuses the
objc2 runtime (this is darwin specific).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65666 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
5a1edf6c0dc70bd555e51bedba782da8e3552f94 28-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Alignment of pointers in __objc_classlist must be on their
natural alignment. Otherwise, the excess hole confuses the
objc2 runtime (this is darwin specific).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65666 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
673e91b149c7ac89f50992ce440fad372c536766 28-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Fix enumeration in switch warnings. No behavior change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65659 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
00524e3c12bf1319121db8fba076b29e13b32dcf 28-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Fix enumeration in switch warnings. No behavior change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65659 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
96b7a152b1af758fc080e669d9700a6c18d1a516 27-Feb-2009 Mike Stump <mrs@apple.com> Fix PR3612. We ensure that we add builtins to the GlobalDeclMap and
we ensure that things added to the module can be found even when they
are not in GlobalDeclMap. The later is for increased flexibility,
should someone want to do something tricky like extern "Ada" in the
same module.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65657 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
c136e6cf237711f9f1324637a0b2cdf6ae8e79e4 27-Feb-2009 Mike Stump <mrs@apple.com> Fix PR3612. We ensure that we add builtins to the GlobalDeclMap and
we ensure that things added to the module can be found even when they
are not in GlobalDeclMap. The later is for increased flexibility,
should someone want to do something tricky like extern "Ada" in the
same module.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65657 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
342d943fa54d78948ac52237dafdba3629618f42 27-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Change the AST generated for offsetof a bit so that it looks like a
normal expression, and change Evaluate and IRGen to evaluate it like a
normal expression. This simplifies the code significantly, and fixes
PR3396.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65622 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
35183aca180a2b9b2c637cd625a40a7e147d6a32 27-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Change the AST generated for offsetof a bit so that it looks like a
normal expression, and change Evaluate and IRGen to evaluate it like a
normal expression. This simplifies the code significantly, and fixes
PR3396.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65622 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
8f1d4059b55678f4b73087e669632881b0a2d32b 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
odeGenTypes.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
odeGenTypes.cpp
175b73f99cc6204f4495a4eb95f20f78bf91ffea 27-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup: use getDeclAlignInBytes helper.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65611 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
0de40af3a3aa14e3854c0eafeabd08f6762801f9 27-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Minor cleanup: use getDeclAlignInBytes helper.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65611 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4fa58905062efa6a12137b1983a1367220182a20 27-Feb-2009 Douglas Gregor <doug.gregor@gmail.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
GBlocks.cpp
GCall.cpp
GDebugInfo.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenTypes.cpp
odeGenTypes.h
angle.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
GBlocks.cpp
GCall.cpp
GDebugInfo.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenTypes.cpp
odeGenTypes.h
angle.cpp
14032226751d936ceec4d385eb61853ee9861ff4 27-Feb-2009 Chris Lattner <sabre@nondot.org> fix some sema problems with wide strings and hook up basic codegen for them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65582 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
dbb1ecc32ca122b07b7c98fd0a8f6f53985adacc 27-Feb-2009 Chris Lattner <sabre@nondot.org> fix some sema problems with wide strings and hook up basic codegen for them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65582 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ba825d72a07c6eff1e389abb9d42d433751b2a68 26-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Couple of meta-data segments were wrong. This patch fixes them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65578 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
21228b7753c6579d1ea273b52316239bf059ab75 26-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Couple of meta-data segments were wrong. This patch fixes them.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65578 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3fc13e30dc79e560f5ea5e4c4cc9d3711874689a 26-Feb-2009 Devang Patel <dpatel@apple.com> Add support to emit debug info for objective-c interfaces.
(This is not yet used.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65573 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
9ca36b66410f2f9155df9d573f6da3114ac685a2 26-Feb-2009 Devang Patel <dpatel@apple.com> Add support to emit debug info for objective-c interfaces.
(This is not yet used.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65573 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
fc096bf9d87834466e82482f99b1f6fe7e02bf2a 26-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add Type::hasPointerRepresentation predicate.
- For types whose native representation is a pointer.

- Use to replace ExprConstant.cpp:HasPointerEvalType,
CodeGenFunction::isObjCPointerType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65569 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.cpp
odeGenFunction.h
8958891f5fa1e593c4519a36b3df427ee019d70b 26-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add Type::hasPointerRepresentation predicate.
- For types whose native representation is a pointer.

- Use to replace ExprConstant.cpp:HasPointerEvalType,
CodeGenFunction::isObjCPointerType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65569 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.cpp
odeGenFunction.h
554af94c53e3a182233fc4fb0f374a9eb3ae6bf6 26-Feb-2009 Daniel Dunbar <daniel@zuster.org> Remove PointerLikeType.
- Having pointers and references share a base was not a useful
notion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65567 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTypes.h
68694ada8f4d8f6c4b00ea5b900df96428b28fc8 26-Feb-2009 Daniel Dunbar <daniel@zuster.org> Remove PointerLikeType.
- Having pointers and references share a base was not a useful
notion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65567 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenTypes.h
6b7faf85bb23eb099a273010f0a5a6f5fcc0c0f2 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
odeGenTypes.cpp
odeGenTypes.h
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
odeGenTypes.cpp
odeGenTypes.h
720878063218b3fa6b753cffe881ecc3fbb9df60 26-Feb-2009 Daniel Dunbar <daniel@zuster.org> Drop uses of isPointerLikeType.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65560 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.cpp
24a9f6e11d222f2d9feaf5f9605c1a66006f7061 26-Feb-2009 Daniel Dunbar <daniel@zuster.org> Drop uses of isPointerLikeType.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65560 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.cpp
514c63b3e3df86d0f59fa72000ea3ac03001a210 26-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Fix an inconsistance in objc2's meta-data related to
the symbol for the root meta-data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65548 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
fab98c4e24a55960322c0f5e349df22c48597a73 26-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Fix an inconsistance in objc2's meta-data related to
the symbol for the root meta-data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65548 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1d234465213e18d139abebc0698feca76cbe2084 26-Feb-2009 Anders Carlsson <andersca@mac.com> Classify enum types correctly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65533 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
708762b66a813543078a6d1c4fc2b69ee4361ec7 26-Feb-2009 Anders Carlsson <andersca@mac.com> Classify enum types correctly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65533 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
707af2747955f8c73257f8bae81b2684db7046ca 26-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Qualified id types are passed as pointers.
- <rdar://problem/6622451> Bad x86_64 code gen for message call taking one argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65510 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
9a8c2e9051b3db6909e5efa872ad60ff524be065 26-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Qualified id types are passed as pointers.
- <rdar://problem/6622451> Bad x86_64 code gen for message call taking one argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65510 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
f171182ed69c71344b2fb0c520be9f5ccee6ca3a 26-Feb-2009 Mike Stump <mrs@apple.com> CodeGen support for copied BlockDeclRefExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65487 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
8a2b4b1c5b960710db95e9b296d9a600aee37c00 26-Feb-2009 Mike Stump <mrs@apple.com> CodeGen support for copied BlockDeclRefExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65487 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
5f5ff8cb859e6233e3b82064222d11b2b7c7b1a1 25-Feb-2009 Daniel Dunbar <daniel@zuster.org> Temporarily disable clearing of insert point (to indicate unreachable
code) when calling noreturn functions; general expression emission
isn't ready to do the right thing in all cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65473 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
0334a4ec63c43ac9ed13faa30fbcfc7697828ffd 25-Feb-2009 Daniel Dunbar <daniel@zuster.org> Temporarily disable clearing of insert point (to indicate unreachable
code) when calling noreturn functions; general expression emission
isn't ready to do the right thing in all cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65473 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
06d71d847072f52e553034c52c78cbe115324142 25-Feb-2009 Daniel Dunbar <daniel@zuster.org> Allow constant initializers to reference their defining decl.
- PR3662.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65472 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
e5731f81497d11f95027a500a3ee118f4fc9e1be 25-Feb-2009 Daniel Dunbar <daniel@zuster.org> Allow constant initializers to reference their defining decl.
- PR3662.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65472 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
e9b9bba0892983ffe009bf46933b1377e75803de 25-Feb-2009 Daniel Dunbar <daniel@zuster.org> Fold GeneraticStaticBlockVarDecl into callers.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65470 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.h
a985b31fc36aa22859983b4a5e7385796c627bdc 25-Feb-2009 Daniel Dunbar <daniel@zuster.org> Fold GeneraticStaticBlockVarDecl into callers.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65470 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.h
dea592138c8bcb8e8a2708d6a2ccabe43a1a3eb3 25-Feb-2009 Daniel Dunbar <daniel@zuster.org> Pull COdeGenFunction::CreateStaticBlockVarDecl (just for creating the
global variable) out of GenerateStaticBlockVarDecl.
- No intended functionality change.
- Prep for some mild cleanups and PR3662.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65466 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDecl.cpp
odeGenFunction.cpp
odeGenFunction.h
0096acf421c4609ce7f43e8b05f8c5ca866d4611 25-Feb-2009 Daniel Dunbar <daniel@zuster.org> Pull COdeGenFunction::CreateStaticBlockVarDecl (just for creating the
global variable) out of GenerateStaticBlockVarDecl.
- No intended functionality change.
- Prep for some mild cleanups and PR3662.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65466 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDecl.cpp
odeGenFunction.cpp
odeGenFunction.h
a4cc0c47fbb97a2ee95ce5173392278350b737d0 25-Feb-2009 Devang Patel <dpatel@apple.com> Fix comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65423 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
65e99f219a627a31eede53eebfd952d18cf0596a 25-Feb-2009 Devang Patel <dpatel@apple.com> Fix comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65423 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9c9dd7f0fa0e0a805557b8de2b01f2bc1740780f 25-Feb-2009 Devang Patel <dpatel@apple.com> Enable debug info emission for objc methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65422 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
1d6a451ceed4bd654462040bd8e880f69649ee9a 25-Feb-2009 Devang Patel <dpatel@apple.com> Enable debug info emission for objc methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65422 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
27f5896fb2fb105d810ce99e037bc7ebb1cd785f 25-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> patch for two things.
make sure objc2's nonfragile abi is enacted for Leopard too.
add -fobjc-gc-only flag to the image_info symbol.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65413 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
66a5c2c0da225d45334c8062f10e73b7dee50681 25-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> patch for two things.
make sure objc2's nonfragile abi is enacted for Leopard too.
add -fobjc-gc-only flag to the image_info symbol.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65413 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6191007f5290470d78940c808b4d4b34f07b17c6 25-Feb-2009 Devang Patel <dpatel@apple.com> If Loc is invalid (e.g. "self" in Objective-C) then use MainFileID's compile unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65403 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7782022c0c9c4721b097953f49378aa34358cea1 25-Feb-2009 Devang Patel <dpatel@apple.com> If Loc is invalid (e.g. "self" in Objective-C) then use MainFileID's compile unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65403 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
c5d3263682ab5aa9d7f0b7cb3a46200f6ea23287 24-Feb-2009 Chris Lattner <sabre@nondot.org> first wave of fixes for @encode sema support. This is part of PR3648.

The big difference here is that (like string literal) @encode has
array type, not pointer type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65391 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
eaf2bb89eb2aad3b80673de30febe52df43c10ec 24-Feb-2009 Chris Lattner <sabre@nondot.org> first wave of fixes for @encode sema support. This is part of PR3648.

The big difference here is that (like string literal) @encode has
array type, not pointer type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65391 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
4d7933a2de7db8454339aee7c63d256cd93b73c5 24-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Set flag for -fobjc-gc in IMAGE_INFO variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65387 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
067986e534121a0226b5580d026c7afaf5ee514d 24-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Set flag for -fobjc-gc in IMAGE_INFO variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65387 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c473a701c5727dc8189753c4ddc93b7a3c8eb551 24-Feb-2009 Daniel Dunbar <daniel@zuster.org> Fix IRgen of constant expressions referring to external/static
variables.
- PR3657.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65381 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
d01b669f26703663da3515638e254fa7a987e860 24-Feb-2009 Daniel Dunbar <daniel@zuster.org> Fix IRgen of constant expressions referring to external/static
variables.
- PR3657.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65381 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
75de89f84b77d2d54c1b2e9476dd2cd67a1a8d2b 24-Feb-2009 Daniel Dunbar <daniel@zuster.org> Some initial Obj-C zero cost EH support.
- Only handles cases with @try with no @catch blocks, and there are a
number of problems with the implementation. Nevertheless, this is
good enough to handled @synchronized correctly, and some other
basic uses.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65378 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
8ecbaf25c1373be6fb5a9d332b08b6be16d9fd4e 24-Feb-2009 Daniel Dunbar <daniel@zuster.org> Some initial Obj-C zero cost EH support.
- Only handles cases with @try with no @catch blocks, and there are a
number of problems with the implementation. Nevertheless, this is
good enough to handled @synchronized correctly, and some other
basic uses.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65378 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d245f2794c57dc1de027f05154bb6622a7e0aa3c 24-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add a note about an IRgen optimization opportunity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65376 91177308-0d34-0410-b5e6-96231b3b80d8
EADME.txt
6eba1438ae905ca2a863dc32480712c8a6411aa3 24-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add a note about an IRgen optimization opportunity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65376 91177308-0d34-0410-b5e6-96231b3b80d8
EADME.txt
7688138d4f3cf7b64bf26360fb9986a341c6b355 24-Feb-2009 Anders Carlsson <andersca@mac.com> Prevent accidental copying of CodeGenFunction and CodeGenModule.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65372 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
odeGenModule.h
8a219ceda2b5afd447e7199b9c53079bead31b89 24-Feb-2009 Anders Carlsson <andersca@mac.com> Prevent accidental copying of CodeGenFunction and CodeGenModule.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65372 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
odeGenModule.h
0402972dd279a35c51e9a6ffea12ca3201c2b6a8 24-Feb-2009 Anders Carlsson <andersca@mac.com> Pass the CodeGenModule object to GenerateBlockFunction, instead of *this (which will call the copy constructor).

Also, since we're creating a new CodeGenFunction object for each block function, we don't need to clear the BreakContinueStack.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65371 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
911e0af45196b15e9dd8557ca9ebf00fb01c4fdc 24-Feb-2009 Anders Carlsson <andersca@mac.com> Pass the CodeGenModule object to GenerateBlockFunction, instead of *this (which will call the copy constructor).

Also, since we're creating a new CodeGenFunction object for each block function, we don't need to clear the BreakContinueStack.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65371 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
358d494ede629c0f8fc14f267ee830e564bacf62 24-Feb-2009 Mike Stump <mrs@apple.com> Ensure that we can't break or continue out of a block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65370 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
3d5e06254909d5a58cc5fcff4ebeef1f3faebaf9 24-Feb-2009 Mike Stump <mrs@apple.com> Ensure that we can't break or continue out of a block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65370 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
34416d6d5bc0e3ccba66fc1a816ad1208883d34a 24-Feb-2009 Daniel Dunbar <daniel@zuster.org> Fix two @synchronized bugs found by inspection: the expression to sychronize on should only be evaluated once, and it is evaluated outside the cleanup scope.

Also, lift SyncEnter and SyncExit up in nervous anticipation of x86-64
zero cost EH.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65362 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1c56667febcf8e2d78bd8c1c720eca1888ff1d60 24-Feb-2009 Daniel Dunbar <daniel@zuster.org> Fix two @synchronized bugs found by inspection: the expression to sychronize on should only be evaluated once, and it is evaluated outside the cleanup scope.

Also, lift SyncEnter and SyncExit up in nervous anticipation of x86-64
zero cost EH.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65362 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
af6820210f1dcee448b3a0edfdd3d5717d0f5953 24-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Improve merging of function declarations. Specifically:

- When we are declaring a function in local scope, we can merge with
a visible declaration from an outer scope if that declaration
refers to an entity with linkage. This behavior now works in C++
and properly ignores entities without linkage.
- Diagnose the use of "static" on a function declaration in local
scope.
- Diagnose the declaration of a static function after a non-static
declaration of the same function.
- Propagate the storage specifier to a function declaration from a
prior declaration (PR3425)
- Don't name-mangle "main"



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65360 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
04495c859f81e440748a9b86baa2913461652bb0 24-Feb-2009 Douglas Gregor <dgregor@apple.com> Improve merging of function declarations. Specifically:

- When we are declaring a function in local scope, we can merge with
a visible declaration from an outer scope if that declaration
refers to an entity with linkage. This behavior now works in C++
and properly ignores entities without linkage.
- Diagnose the use of "static" on a function declaration in local
scope.
- Diagnose the declaration of a static function after a non-static
declaration of the same function.
- Propagate the storage specifier to a function declaration from a
prior declaration (PR3425)
- Don't name-mangle "main"



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65360 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
2224fb2a5e9f13c36ef1ccbaece050af6900bc22 23-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> We should not generate __weak write barrier on indirect reference
of a pointer to object; This patch does this odd behavior according to
gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65334 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
207c5210eb0ac7b632609f0c006eb97ef2738948 23-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> We should not generate __weak write barrier on indirect reference
of a pointer to object; This patch does this odd behavior according to
gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65334 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
0a06740ad4e0623309a48c63ff0642a0a95b87ac 23-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add low level support for generating invoke instead of calls.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65325 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.cpp
odeGenFunction.h
9834ffbe54788239c8361d3cfe5826fd277ddfb2 23-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add low level support for generating invoke instead of calls.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65325 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.cpp
odeGenFunction.h
03650a5acbf55f0a9d11750ec06cb0642b0baa4c 22-Feb-2009 Anders Carlsson <andersca@mac.com> Make sure to reset the DidCallStackSave variable before emitting a compound statement. Fixes PR3649.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65291 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
66b41512466db9a4b2859db517692fb79dae449e 22-Feb-2009 Anders Carlsson <andersca@mac.com> Make sure to reset the DidCallStackSave variable before emitting a compound statement. Fixes PR3649.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65291 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
0c195b98f48e29dd5bc19747d9736769b9585e43 22-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> More objc gc work. Match gcc's treatment of ivar access
true a local pointer to objective-c object in generating
write barriers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65290 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
44baa8abba2a1552b6b50bf750a8750ab9da9f76 22-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> More objc gc work. Match gcc's treatment of ivar access
true a local pointer to objective-c object in generating
write barriers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65290 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
be72b7cde4fc58830d203aa88c51fd12ba877d4e 22-Feb-2009 Mike Stump <mrs@apple.com> Copy some clenaups from Eli to code that I copied. :-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65286 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
6eef49819da450de398dcbe008066ccc9546ee31 22-Feb-2009 Mike Stump <mrs@apple.com> Copy some clenaups from Eli to code that I copied. :-)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65286 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
39bcc615b3bdf37a91f43796d989c941ebc66910 22-Feb-2009 Mike Stump <mrs@apple.com> Cleanp code with some recent suggestions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65285 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprScalar.cpp
odeGenFunction.h
20733cd4fd5c9755cdfab583db862223c93732c8 22-Feb-2009 Mike Stump <mrs@apple.com> Cleanp code with some recent suggestions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65285 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprScalar.cpp
odeGenFunction.h
d0536ac5102183c08f7d59ab942ae324e0b836a6 22-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Actually, we can always pass things we want to pass in
memory using Indirect; this was a holdover from when CGCall wasn't as
robust.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65278 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
245f5534a520c23e703fd239632273c551be50b3 22-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Actually, we can always pass things we want to pass in
memory using Indirect; this was a holdover from when CGCall wasn't as
robust.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65278 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
e31e02de11491899b3f0d29f65de38f5f0958fb9 22-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Eliminate a bunch of code which should be dead.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65267 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
ddd2b6e1e7406ab45f71398fb78b86c36acd789b 22-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Eliminate a bunch of code which should be dead.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65267 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
4e958f06ff443a57871e35a65d89c425fb68d3b4 22-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Make sure to pass vectors that we want to pass in memory
as byval. Otherwise LLVM will have its own opinion about where to put
things.

We now pass all gcc dg.compat tests on x86_64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65266 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
775e43b3bd47d9388608a57f7489982d3024fdc5 22-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Make sure to pass vectors that we want to pass in memory
as byval. Otherwise LLVM will have its own opinion about where to put
things.

We now pass all gcc dg.compat tests on x86_64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65266 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
d97f5956b64338dd94ff730c5f0f4148eb8d6fcc 22-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Pass 32-bit vectors as Integer to match gcc. We don't care
about these much but <2 x i16> shows up in the gcc test suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65264 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
e28099bf301ad8b0b77cb11f94caad3c38d97dda 22-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Pass 32-bit vectors as Integer to match gcc. We don't care
about these much but <2 x i16> shows up in the gcc test suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65264 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
b341feb98baef1956a57aba6f6285090ab899737 22-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Classify <1 x i64> as INTEGER (match gcc not llvm-gcc).

Also, make sure to pass <1 x i64> as i64 (not <1 x i64>, which doesn't
quite work yet in the backend).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65262 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
0af9929e1ba8e5b9ae0a8999439736d249599bbe 22-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Classify <1 x i64> as INTEGER (match gcc not llvm-gcc).

Also, make sure to pass <1 x i64> as i64 (not <1 x i64>, which doesn't
quite work yet in the backend).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65262 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
eb142926662ea05fdfc7c1cba501c9cefbfe4f42 22-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Last part of PR3254: use the same alignment computation in Sema and
CodeGen. I'm not sure whether this actually makes any visible
difference, but it's better to be consistent anyway.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65259 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
9c2f06b373e6209447baf1fd5a86dd6602c573a8 22-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Last part of PR3254: use the same alignment computation in Sema and
CodeGen. I'm not sure whether this actually makes any visible
difference, but it's better to be consistent anyway.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65259 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
1ff3c9d87fef766c43d06ee0728b4d2b9abc3568 22-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> local array of objects are non-gc'able.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65251 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
643887ab8de731c7096f48816f19a18017d05924 22-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> local array of objects are non-gc'able.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65251 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
d305a86f087fd359cf0f033eba0c968e55a61ff4 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
odeGenTypes.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
odeGenTypes.cpp
139c3961c7a84de006a722b08e25d5bcb8c0d237 21-Feb-2009 Mike Stump <mrs@apple.com> The blocks ABI is wrong, add a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65243 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
d6840002c37ba25effe5eb4bb89c4ae2e1d80945 21-Feb-2009 Mike Stump <mrs@apple.com> The blocks ABI is wrong, add a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65243 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
fca5da01fb5db68b2692540e26238f37af4e6d10 21-Feb-2009 Mike Stump <mrs@apple.com> Add CodeGen support for the helper for BlockDeclRefExprs. The easier
stuff is mostly done. Move BlockHasCopyDispose up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65242 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
4e7a1f7682d94811bd41fca8aefccc38f686db23 21-Feb-2009 Mike Stump <mrs@apple.com> Add CodeGen support for the helper for BlockDeclRefExprs. The easier
stuff is mostly done. Move BlockHasCopyDispose up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65242 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
a4c010e869ffbfba7fe5c5c0601d425ff1bfdd64 21-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Handle case of none gc'able objects regardless of their
type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65205 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
4f676edd08bf1f1281b162107424141afe143055 21-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Handle case of none gc'able objects regardless of their
type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65205 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
9fe04116cdb0dd69d5aed8ee911d4466bb3549d3 21-Feb-2009 Daniel Dunbar <daniel@zuster.org> Emit extern_weak when needed.
- PR3629.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65203 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
eda9a5ec380f172f4e0063744eb796144a125480 21-Feb-2009 Daniel Dunbar <daniel@zuster.org> Emit extern_weak when needed.
- PR3629.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65203 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
455cc33638f6a04c321a01bbebb645455f911980 21-Feb-2009 Daniel Dunbar <daniel@zuster.org> We must always mangle attribute overloadable functions; even if in a
system header.
- Prevents a codegen crash when anything used anything in tgmath! :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65200 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
524ed953823ee605793c93452a2f86e4a7c4a2fe 21-Feb-2009 Daniel Dunbar <daniel@zuster.org> We must always mangle attribute overloadable functions; even if in a
system header.
- Prevents a codegen crash when anything used anything in tgmath! :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65200 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
126556954ce0088c66c03d054df8aa7d11344f76 20-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add some IRgen improvement notes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65146 91177308-0d34-0410-b5e6-96231b3b80d8
EADME.txt
e6a90167aa29c126ce5d0398faedbbba582df7c3 20-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add some IRgen improvement notes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65146 91177308-0d34-0410-b5e6-96231b3b80d8
EADME.txt
337f60ac7958f1919ddf6d631ffafc260d1f4804 20-Feb-2009 Daniel Dunbar <daniel@zuster.org> Shorten; no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65145 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
dd7b89788c9d8a7484fd9f5c7443d4a2e3f0f826 20-Feb-2009 Daniel Dunbar <daniel@zuster.org> Shorten; no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65145 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
af438dcf061cc161c16b5b636bd25682d0ba8eb6 20-Feb-2009 Daniel Dunbar <daniel@zuster.org> Take advantage of noreturn attribute to add unreachable instruction &
clear insertion point. The rest of IRgen should theoretically take
advantage of this to avoid emitting dead code. Theory != Practice.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65141 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
f4fe0f082f21048c0777ad5aeac04a5a94db1f46 20-Feb-2009 Daniel Dunbar <daniel@zuster.org> Take advantage of noreturn attribute to add unreachable instruction &
clear insertion point. The rest of IRgen should theoretically take
advantage of this to avoid emitting dead code. Theory != Practice.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65141 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
5c6b2c638375da5002f93373e5e0f890d300aeb9 20-Feb-2009 Chris Lattner <sabre@nondot.org> remove some more methods from objc decls, using the iterator
interfaces more consistently.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65138 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
89951a86b594513c2a013532ed45d197413b1087 20-Feb-2009 Chris Lattner <sabre@nondot.org> remove some more methods from objc decls, using the iterator
interfaces more consistently.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65138 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
191eb9ef144ecf28018e3fb8c2955519583d711d 20-Feb-2009 Daniel Dunbar <daniel@zuster.org> Set call attribute for direct calls (i.e. noreturn).
- Remove an unused variant of EmitCallExpr overload.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65130 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
odeGenFunction.h
c0ef9f59937c3971c48b6fed37cf5bd8985c024b 20-Feb-2009 Daniel Dunbar <daniel@zuster.org> Set call attribute for direct calls (i.e. noreturn).
- Remove an unused variant of EmitCallExpr overload.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65130 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
odeGenFunction.h
9408eb1b33ae4bef17163a644df6fad8624de469 20-Feb-2009 Chris Lattner <sabre@nondot.org> switch ObjCMethodDecl's parameter list from being explicitly managed to an ObjCList.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65114 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
2073216a1075767b5d25c23d1462b7034686d94d 20-Feb-2009 Chris Lattner <sabre@nondot.org> switch ObjCMethodDecl's parameter list from being explicitly managed to an ObjCList.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65114 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
442959a2de199a804f0ae6214258f04b8fa922d3 20-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Initialize the Init variable to something reasonable when we emit an
error, so we don't crash.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65099 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6e656f45ae04b415ba7a4c0c25e55633e2d0ecd0 20-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Initialize the Init variable to something reasonable when we emit an
error, so we don't crash.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65099 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4d41b95f258c6bac67f7a62d5b25c7d5f73f74c3 20-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> More objc gc's ir-gen fixes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65097 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4f54526a31458c19aad19e5d3fb4ba2a5275ecb6 20-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> More objc gc's ir-gen fixes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65097 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
fdb4f4899ce52894f819b5dfe135fdc5e928ae98 20-Feb-2009 Mike Stump <mrs@apple.com> Deox and Capitolize.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65093 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
da5c86f097645c3818faf14f99fc3cf23bbf054c 20-Feb-2009 Mike Stump <mrs@apple.com> Deox and Capitolize.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65093 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
f3aafd6ab4f59a84b96c9813de31580806532ff2 20-Feb-2009 Mike Stump <mrs@apple.com> Fix spacing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65089 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
4451bd943c7dcdc4ac1542d176e548cf73021d97 20-Feb-2009 Mike Stump <mrs@apple.com> Fix spacing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65089 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
bbd4ca9a66275d821312cea898ce05d2d80c57f4 20-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> More objc's gc ir-gen stuff.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65077 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
a223cca7751637f8ec1a860010c4148757fb4752 20-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> More objc's gc ir-gen stuff.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65077 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
ae93d65fa7478040fffc73e3fa11181b527c7aa2 19-Feb-2009 Mike Stump <mrs@apple.com> Add enough checking to ensure that non-constant block literals don't
appear to be constant. I'll probably redo this and throw it all away
later once we have codegen for BlockDeclRefExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65070 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
b83d287bc7f47d36fb0751a481e2ef9308b37252 19-Feb-2009 Mike Stump <mrs@apple.com> Add enough checking to ensure that non-constant block literals don't
appear to be constant. I'll probably redo this and throw it all away
later once we have codegen for BlockDeclRefExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65070 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
786b146e49bf4cfa7025f51fc20917cdda05f2fe 19-Feb-2009 Daniel Dunbar <daniel@zuster.org> Remove IRgen constant emission assumption that LValue APValue results
only occur for pointer types; they are also possible for integer types
now.
- No intended functionality change, IntExprEvaluate doesn't return
LValue results yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65066 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
e20de512d88cf42a26ef994687d87fc6f5826625 19-Feb-2009 Daniel Dunbar <daniel@zuster.org> Remove IRgen constant emission assumption that LValue APValue results
only occur for pointer types; they are also possible for integer types
now.
- No intended functionality change, IntExprEvaluate doesn't return
LValue results yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65066 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
2157eec760a75795dc794e4a6057328fa3799a75 19-Feb-2009 Anders Carlsson <andersca@mac.com> Add irgen support for the noinline attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65056 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
81ebbde0fb30a40df0f5e913d8a1f71c383d271a 19-Feb-2009 Anders Carlsson <andersca@mac.com> Add irgen support for the noinline attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65056 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5a0c3419d16a8c5f3fcbdaf605a4b78649cafe6d 19-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Generate the conservative objc gc's API for now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65051 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
167fdc137edbfe57be11317b69c35b8d6bc33cf0 19-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Generate the conservative objc gc's API for now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65051 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
3f197846129cdd3a5b13d16de55254b9efbf0975 19-Feb-2009 Daniel Dunbar <daniel@zuster.org> Don't emit K&R unprototyped function definitions as varargs.
- <rdar://problem/6584606> clang/x86-64 - too many reg saves


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65032 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
d5d31801fc87239436fa349c89dce7797cf13537 19-Feb-2009 Daniel Dunbar <daniel@zuster.org> Don't emit K&R unprototyped function definitions as varargs.
- <rdar://problem/6584606> clang/x86-64 - too many reg saves


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65032 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
3d78d3dd23547a79b8f22affdadf2fc542a52e2b 19-Feb-2009 Daniel Dunbar <daniel@zuster.org> Emission of global variable initialializer was broken in rare
situation where a tentative decl was emitted *after* the actual
initialization. This occurs in some rare situations with static decls.
- PR3613.

- I'm not particularly happy with this fix, but I don't see a simpler
or more elegant solution yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65018 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
232350d4faf46ec38d5ff60e11505f9c4fa9535b 19-Feb-2009 Daniel Dunbar <daniel@zuster.org> Emission of global variable initialializer was broken in rare
situation where a tentative decl was emitted *after* the actual
initialization. This occurs in some rare situations with static decls.
- PR3613.

- I'm not particularly happy with this fix, but I don't see a simpler
or more elegant solution yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65018 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d55240e3f5beb7a9f08b4cbdebb6811530f7c286 19-Feb-2009 Mike Stump <mrs@apple.com> More codegen for blocks. The type of block literals should be better.
The size calculation is improved.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64994 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenModule.h
bd65cac8de63d108a681035782a71d42954b03ab 19-Feb-2009 Mike Stump <mrs@apple.com> More codegen for blocks. The type of block literals should be better.
The size calculation is improved.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64994 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenModule.h
cc59d47c38e7a9b3ded4ee9043f645f19eab327a 19-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Some code simplification. ir gen for gc'able array
of objects in objc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64992 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
c1debf333186f1307cd7d086c3db3e39d7da0a12 19-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Some code simplification. ir gen for gc'able array
of objects in objc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64992 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
3c3c454c782dcf317315e34405f6284c797c9e6e 19-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Address Chris's comments regarding C++ name mangling.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64984 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
angle.cpp
angle.h
6ec3668a2608b63473207319f5ceff9bbd22ea51 19-Feb-2009 Douglas Gregor <dgregor@apple.com> Address Chris's comments regarding C++ name mangling.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64984 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
angle.cpp
angle.h
7b7f4f487531cf4a61a740870db4cf0f49d2c9f6 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add anti-FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64969 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b5da3e94b72a0106abd69c2a84bf650e773fa4ac 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add anti-FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64969 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
bae4b662a3e889bc3e0be78090f0799cc45d3db0 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> i386 ABI: Offset computation in va_arg was incorrect for sizeof(Ty)>4.

We are down to only failing gcc.dg/compat/vector-[12] (8 tests total).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64967 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
570f0cf734f321b902eb18dd1b07f53543f0a393 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> i386 ABI: Offset computation in va_arg was incorrect for sizeof(Ty)>4.

We are down to only failing gcc.dg/compat/vector-[12] (8 tests total).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64967 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
631187651a3ad71ef1d01b2baa26579b9d888b14 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Fix thinko in computation of bound for "passed in SSE regs" test.

Two more gcc/x86_64 failures down.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64963 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
90dafa1638edaffbba4b50f504d1470428a2d25d 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Fix thinko in computation of bound for "passed in SSE regs" test.

Two more gcc/x86_64 failures down.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64963 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
1fc4791c3be994d661401a4ce134831ba442ebc2 18-Feb-2009 Chris Lattner <sabre@nondot.org> rip out __builtin_overload


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64961 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
1e4db7c468c002c58f07e059ff7925384f053e85 18-Feb-2009 Chris Lattner <sabre@nondot.org> rip out __builtin_overload


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64961 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
72198846f28f7c0266d21834523f0537463e93eb 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: "is passed in regs" computation for va_arg was broken for
things passed in mixed registers.

This knocks out 8 x86_64 failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64958 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
f231346438e61e59ff7b72d5ecbd58b6ae484211 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: "is passed in regs" computation for va_arg was broken for
things passed in mixed registers.

This knocks out 8 x86_64 failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64958 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
b8ca6ff810e0131a6d6c5cc9875ec10c416e9970 18-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Some refactoring and simplificaiotn of objc's gc
ir gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64954 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4fd83ea566f4a0c083001c84b75da6cc8c99c1d6 18-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Some refactoring and simplificaiotn of objc's gc
ir gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64954 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
f8eb23b0c7eac73255777351cc07602d8978140b 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> Simplify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64944 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6aee306b1c653bc7d86ae6cb2b905e8b8d0ac27f 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> Simplify.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64944 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
31804e14ac2c60f459c42367c7c6a1a7424392bb 18-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Start generating gc'able code using the new
objc gc type attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64935 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
5934e75d98d99374f72722a69c5eefe026f35c74 18-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Start generating gc'able code using the new
objc gc type attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64935 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
80ff83cc9136a4737632dc84ad8d124e82f45b76 18-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Cleanup objc's gc attributes code no longer needed.
This make warn-weak-field.m to fail (subject of
a followup patch).
attr-objc-gc.m no passes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64925 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
ba372b85524f712e5b97a176f6ce0197d365835d 18-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Cleanup objc's gc attributes code no longer needed.
This make warn-weak-field.m to fail (subject of
a followup patch).
attr-objc-gc.m no passes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64925 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
4fc0d49f9ddfb47d475f201ad2a27760f9c1ad0c 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Two bug fixes.
1. Return of _Complex long double used wrong type.

2. va_arg of types passed in two SSE registers didn't account for
extra space in register save area.

Down to 18 failures on gcc/compat/x86_64. Combined 32/64 results are:
--
=== gcc Summary ===

# of expected passes 1292
# of unexpected failures 34
# of unsupported tests 2
--


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64880 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
3e030b4c04546229c81449fde66f71b23b3fc550 18-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Two bug fixes.
1. Return of _Complex long double used wrong type.

2. va_arg of types passed in two SSE registers didn't account for
extra space in register save area.

Down to 18 failures on gcc/compat/x86_64. Combined 32/64 results are:
--
=== gcc Summary ===

# of expected passes 1292
# of unexpected failures 34
# of unsupported tests 2
--


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64880 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
459207f0de0dac8fd7e04cd523716019ecbcdfbb 18-Feb-2009 Mike Stump <mrs@apple.com> Avoid getNameAsCString when the decl doesn't have a name.
Build of the parm list with the iterator, not end().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64851 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
190506199ebbfe9bf33c1b4410c7aecd7f348ab1 18-Feb-2009 Mike Stump <mrs@apple.com> Avoid getNameAsCString when the decl doesn't have a name.
Build of the parm list with the iterator, not end().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64851 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
b50464f6665ba9e50579bb5edc2abc573107dbfc 17-Feb-2009 Argiris Kirtzidis <akyrtzi@gmail.com> Remove some redundant Decl -> Decl castings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64804 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
d311f376c364e5a6c88b63b1d5c53f560ea5e650 17-Feb-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove some redundant Decl -> Decl castings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64804 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
f69d19e634d76a675a6efba85af57a6eebeea7d7 17-Feb-2009 Daniel Dunbar <daniel@zuster.org> Change EmitConstantExpr to allow failure.

IRgen no longer relies on isConstantInitializer, instead we just try
to emit the constant. If that fails then in C we emit an error
unsupported (this occurs when Sema accepted something that it doesn't
know how to fold, and IRgen doesn't know how to emit) and in C++ we
emit a guarded initializer.

This ends up handling a few more cases, because IRgen was actually
able to emit some of the constants Sema accepts but can't Evaluate().
For example, PR3398.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64780 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprConstant.cpp
odeGenModule.h
d60f2fbf69df08e952377b498c036f269395024d 17-Feb-2009 Daniel Dunbar <daniel@zuster.org> Change EmitConstantExpr to allow failure.

IRgen no longer relies on isConstantInitializer, instead we just try
to emit the constant. If that fails then in C we emit an error
unsupported (this occurs when Sema accepted something that it doesn't
know how to fold, and IRgen doesn't know how to emit) and in C++ we
emit a guarded initializer.

This ends up handling a few more cases, because IRgen was actually
able to emit some of the constants Sema accepts but can't Evaluate().
For example, PR3398.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64780 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprConstant.cpp
odeGenModule.h
6a3b16ec34ede29406b9fc6f5b3ba4eb17e6edaf 17-Feb-2009 Daniel Dunbar <daniel@zuster.org> 80-cols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64779 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
bb7677391a9db7d062a7cc637db8960d89ec7c93 17-Feb-2009 Daniel Dunbar <daniel@zuster.org> 80-cols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64779 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
b60352aa80d17026f445267940db558ab9cfb92e 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
GDebugInfo.cpp
odeGenTypes.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
GDebugInfo.cpp
odeGenTypes.cpp
11c46e239f241786552345829320a2ff45caf949 17-Feb-2009 Mike Stump <mrs@apple.com> Be sure to initialize Name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64769 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
cb71722bce938bebaa02f4482b284380a44a19f7 17-Feb-2009 Mike Stump <mrs@apple.com> Be sure to initialize Name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64769 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
9319ed4d8b8028024ba2f5d8cae04a608ca2cb21 17-Feb-2009 Mike Stump <mrs@apple.com> Fixup spacing a little.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64768 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
09429b962811f2c0a7a81a1b0a89f96f5878b20c 17-Feb-2009 Mike Stump <mrs@apple.com> Fixup spacing a little.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64768 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
92e88643571f49ec4e3b74d15840b48c908628d3 17-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Fix assert on return of _Complex long double.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64756 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
6e53e9b8795022ed08d5e59b8d78b2c616c2ef9a 17-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Fix assert on return of _Complex long double.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64756 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
d6fb35c69ce9b65e3bc560ce7b86f64291b064c2 17-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Implement classification for bit-fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64727 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
dd81d44fac2631e6ca9fe1f52366aea0f51b03e1 17-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Implement classification for bit-fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64727 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
2ab71bdee1572a5364649d0b5ef8399bc9a31f3d 17-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Handle va_arg arguments with alignment > 8.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64701 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
c5bcee4dce79458c4f490490c71619e06cbde357 17-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Handle va_arg arguments with alignment > 8.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64701 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
1cf7536fb74342e1981f7a3bc1cff529e6f634ba 16-Feb-2009 Anders Carlsson <andersca@mac.com> Add support for throwing exceptions to the nonfragile ABI

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64692 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f57c5b2ef767223f349be6adba9bf1b4f9d19283 16-Feb-2009 Anders Carlsson <andersca@mac.com> Add support for throwing exceptions to the nonfragile ABI

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64692 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
5eefb43b6ab22a53d0fb8c9d0e947816b6eac66b 16-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Added implementation of objc2's gc API calls for
nonfragile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64690 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6948aea3664832416031eaac6fb55af3efb99b48 16-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Added implementation of objc2's gc API calls for
nonfragile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64690 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
fd46ea2d06cfd25a032c1202d129b8f86f740f66 16-Feb-2009 Daniel Dunbar <daniel@zuster.org> Support IRgen of sqrt -> llvm.sqrt, pow -> llvm.pow.

- Define pow[lf]?, sqrt[lf]? as builtins.

- Add -fmath-errno option which binds to LangOptions.MathErrno

- Add new builtin flag Builtin::Context::isConstWithoutErrno for
functions which can be marked as const if errno isn't respected for
math functions. Sema automatically marks these functions as const
when they are defined, if MathErrno=0.

- IRgen uses const attribute on sqrt and pow library functions to
decide if it can use the llvm intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64689 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
odeGenFunction.h
ef2abfee3ea16ec74942dc09e9e425f46aeb2582 16-Feb-2009 Daniel Dunbar <daniel@zuster.org> Support IRgen of sqrt -> llvm.sqrt, pow -> llvm.pow.

- Define pow[lf]?, sqrt[lf]? as builtins.

- Add -fmath-errno option which binds to LangOptions.MathErrno

- Add new builtin flag Builtin::Context::isConstWithoutErrno for
functions which can be marked as const if errno isn't respected for
math functions. Sema automatically marks these functions as const
when they are defined, if MathErrno=0.

- IRgen uses const attribute on sqrt and pow library functions to
decide if it can use the llvm intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64689 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
odeGenFunction.h
9df79c3b3e6731f51777fec1ceb34a49f241a43b 16-Feb-2009 Chris Lattner <sabre@nondot.org> fix volatile handling with ExtVectorElementExpr, so that we
emit two volatile loads for:
typedef __attribute__(( ext_vector_type(4) )) float float4;

float test(volatile float4 *P) {
return P->x+P->y;
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64683 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
1bd885efe4bfeadb1980b39315b026cefe2795c3 16-Feb-2009 Chris Lattner <sabre@nondot.org> fix volatile handling with ExtVectorElementExpr, so that we
emit two volatile loads for:
typedef __attribute__(( ext_vector_type(4) )) float float4;

float test(volatile float4 *P) {
return P->x+P->y;
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64683 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
98e7fcc0d68043d6f132afcdf4783682b30e42f2 16-Feb-2009 Chris Lattner <sabre@nondot.org> introduce and use a new ExtVectorElementExpr::isArrow method, at Eli's suggestion


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64681 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
2140e904dbe53657339cb5b1cc13de563ca0d1fc 16-Feb-2009 Chris Lattner <sabre@nondot.org> introduce and use a new ExtVectorElementExpr::isArrow method, at Eli's suggestion


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64681 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
8c260490668e6d7ea285dade790f41f8cd18872e 16-Feb-2009 Daniel Dunbar <daniel@zuster.org> Fix IRgen of __builtin_memset.
- Fix test case to not only have negative tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64674 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
62c29c667f5bcb854e99ccb3aec1280c84115951 16-Feb-2009 Daniel Dunbar <daniel@zuster.org> Fix IRgen of __builtin_memset.
- Fix test case to not only have negative tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64674 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
09020eed49ea73a177a1ff116c2736065bb000de 16-Feb-2009 Chris Lattner <sabre@nondot.org> enhance ExtVectorElementExpr to allow V->xxyy to work like (*V).xxyy


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64667 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
73525de7fd9bdd534382dc89a24f1f76db3e04b9 16-Feb-2009 Chris Lattner <sabre@nondot.org> enhance ExtVectorElementExpr to allow V->xxyy to work like (*V).xxyy


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64667 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
978d2be111979be7fba04fce18fe98a63579d43f 16-Feb-2009 Daniel Dunbar <daniel@zuster.org> assert/ErrorUnsupported in unimplemented stub functions instead of
miscompiling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64647 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
28ed0847480b76ce76a7e605156608b1cea80e53 16-Feb-2009 Daniel Dunbar <daniel@zuster.org> assert/ErrorUnsupported in unimplemented stub functions instead of
miscompiling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64647 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1f42bb01d033792574c7bbd01ac33ea50ff8987e 15-Feb-2009 Daniel Dunbar <daniel@zuster.org> Obj-C non-fragile ABI: Fix types of a few globals; these were not
creating valid LLVM structures (although they work fined).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64580 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
948e2589505aa1b334b2cff81b28a741db49f701 15-Feb-2009 Daniel Dunbar <daniel@zuster.org> Obj-C non-fragile ABI: Fix types of a few globals; these were not
creating valid LLVM structures (although they work fined).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64580 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
4b55c7f0cbd91692c481b6b91692edb4df586333 14-Feb-2009 Mike Stump <mrs@apple.com> Use getNameAsCString instead of getNameAsString and reflow the type.
Thanks Anders.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64571 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenFunction.h
odeGenModule.h
30395dd7b77ec1abfae9ebfcacf86f5d72b91fef 14-Feb-2009 Mike Stump <mrs@apple.com> Use getNameAsCString instead of getNameAsString and reflow the type.
Thanks Anders.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64571 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenFunction.h
odeGenModule.h
084ba46baba0d42c89f105caaf51de4dc46df216 14-Feb-2009 Mike Stump <mrs@apple.com> Generate the helper function for blocks. Now basic codegen is
starting to work for blocks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64570 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenFunction.h
odeGenModule.h
67a6448a8d52ae46d1cba4e474f9f6b3968d2ff9 14-Feb-2009 Mike Stump <mrs@apple.com> Generate the helper function for blocks. Now basic codegen is
starting to work for blocks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64570 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenFunction.h
odeGenModule.h
f3c17751bea9b993a907d9372f93ecba553b7c21 14-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a bad ir-gen bug which caused a dejagnu test to fail.
Now we are pretty close to be in sync with objc's classic
abi when it comes to passing dejagnu objc executable tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64569 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3ab75bde6d8d2798a1f400b9335d359e25fb1765 14-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a bad ir-gen bug which caused a dejagnu test to fail.
Now we are pretty close to be in sync with objc's classic
abi when it comes to passing dejagnu objc executable tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64569 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
27ecc6736fbd9a91a710a40719d68934370a700f 14-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a problem caused by foreward @class use
which consequently caused a Seg fault. during meta-data
generation. It also addresses an issue related to
late binding of newly synthesize ivars (when we support it).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64563 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f3710babc1ba40779c0fc64e6657cfc84dee7545 14-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a problem caused by foreward @class use
which consequently caused a Seg fault. during meta-data
generation. It also addresses an issue related to
late binding of newly synthesize ivars (when we support it).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64563 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b5af738b7338a799a7885b1fe2eebdba858b96cb 14-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Add hook to add attributes to function declarations that we know
about, whether they are builtins or not. Use this to add the
appropriate "format" attribute to NSLog, NSLogv, asprintf, and
vasprintf, and to translate builtin attributes (from Builtins.def)
into actual attributes on the function declaration.

Use the "printf" format attribute on function declarations to
determine whether we should do format string checking, rather than
looking at an ad hoc list of builtins and "known" function names.

Be a bit more careful about when we consider a function a "builtin" in
C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64561 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
3c385e5f8d9008fff18597ca302be19fa86e51f6 14-Feb-2009 Douglas Gregor <dgregor@apple.com> Add hook to add attributes to function declarations that we know
about, whether they are builtins or not. Use this to add the
appropriate "format" attribute to NSLog, NSLogv, asprintf, and
vasprintf, and to translate builtin attributes (from Builtins.def)
into actual attributes on the function declaration.

Use the "printf" format attribute on function declarations to
determine whether we should do format string checking, rather than
looking at an ad hoc list of builtins and "known" function names.

Be a bit more careful about when we consider a function a "builtin" in
C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64561 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
e60d533c10e9e86f21c87b7e0cf65b67bfb0e950 14-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Need to use canonical types when comparing against
ASTContext types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64533 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
3327f6ead9362e5689674a4aaab5b7f23ea0dea3 14-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Need to use canonical types when comparing against
ASTContext types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64533 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
87c4dc9cb72e6c61955573d7d0c60699d88cd136 14-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Pass simple types directly when possible. This is
important for both keeping the generated LLVM simple and for ensuring
that integer types are passed/promoted correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64529 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
644f4c3fe4130c7be75d6191340ba8d857ba0730 14-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Pass simple types directly when possible. This is
important for both keeping the generated LLVM simple and for ensuring
that integer types are passed/promoted correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64529 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
1fa246d43b7a24a18ac4f37e83b962277e6ebbb3 14-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Make it possible for builtins to expression FILE* arguments, so that
we can define builtins such as fprintf, vfprintf, and
__builtin___fprintf_chk. Give a nice error message when we need to
implicitly declare a function like fprintf.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64526 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
370ab3f1373841d70582feac9e35c3c6b3489f63 14-Feb-2009 Douglas Gregor <dgregor@apple.com> Make it possible for builtins to expression FILE* arguments, so that
we can define builtins such as fprintf, vfprintf, and
__builtin___fprintf_chk. Give a nice error message when we need to
implicitly declare a function like fprintf.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64526 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8603171ea17bcea313108bff5c5d325f713b0088 14-Feb-2009 Chris Lattner <sabre@nondot.org> fix rdar://6586493, a bug in codegen of the GNU
missing-?:-true-value extension.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64505 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
12d152f61ccef9a2c0372ba39be7cf416c6e1a9e 14-Feb-2009 Chris Lattner <sabre@nondot.org> fix rdar://6586493, a bug in codegen of the GNU
missing-?:-true-value extension.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64505 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
411889e15e0335f6951d2410c5bd67839c4fff66 14-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Implicitly declare certain C library functions (malloc, strcpy, memmove,
etc.) when we perform name lookup on them. This ensures that we
produce the correct signature for these functions, which has two
practical impacts:

1) When we're supporting the "implicit function declaration" feature
of C99, these functions will be implicitly declared with the right
signature rather than as a function returning "int" with no
prototype. See PR3541 for the reason why this is important (hint:
GCC always predeclares these functions).

2) If users attempt to redeclare one of these library functions with
an incompatible signature, we produce a hard error.

This patch does a little bit of work to give reasonable error
messages. For example, when we hit case #1 we complain that we're
implicitly declaring this function with a specific signature, and then
we give a note that asks the user to include the appropriate header
(e.g., "please include <stdlib.h> or explicitly declare 'malloc'"). In
case #2, we show the type of the implicit builtin that was incorrectly
declared, so the user can see the problem. We could do better here:
for example, when displaying this latter error message we say
something like:

'strcpy' was implicitly declared here with type 'char *(char *, char
const *)'

but we should really print out a fake code line showing the
declaration, like this:

'strcpy' was implicitly declared here as:

char *strcpy(char *, char const *)

This would also be good for printing built-in candidates with C++
operator overloading.

The set of C library functions supported by this patch includes all
functions from the C99 specification's <stdlib.h> and <string.h> that
(a) are predefined by GCC and (b) have signatures that could cause
codegen issues if they are treated as functions with no prototype
returning and int. Future work could extend this set of functions to
other C library functions that we know about.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64504 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
odeGenModule.cpp
3e41d60eb627dc227c770f1c1c87d06909cf05fd 14-Feb-2009 Douglas Gregor <dgregor@apple.com> Implicitly declare certain C library functions (malloc, strcpy, memmove,
etc.) when we perform name lookup on them. This ensures that we
produce the correct signature for these functions, which has two
practical impacts:

1) When we're supporting the "implicit function declaration" feature
of C99, these functions will be implicitly declared with the right
signature rather than as a function returning "int" with no
prototype. See PR3541 for the reason why this is important (hint:
GCC always predeclares these functions).

2) If users attempt to redeclare one of these library functions with
an incompatible signature, we produce a hard error.

This patch does a little bit of work to give reasonable error
messages. For example, when we hit case #1 we complain that we're
implicitly declaring this function with a specific signature, and then
we give a note that asks the user to include the appropriate header
(e.g., "please include <stdlib.h> or explicitly declare 'malloc'"). In
case #2, we show the type of the implicit builtin that was incorrectly
declared, so the user can see the problem. We could do better here:
for example, when displaying this latter error message we say
something like:

'strcpy' was implicitly declared here with type 'char *(char *, char
const *)'

but we should really print out a fake code line showing the
declaration, like this:

'strcpy' was implicitly declared here as:

char *strcpy(char *, char const *)

This would also be good for printing built-in candidates with C++
operator overloading.

The set of C library functions supported by this patch includes all
functions from the C99 specification's <stdlib.h> and <string.h> that
(a) are predefined by GCC and (b) have signatures that could cause
codegen issues if they are treated as functions with no prototype
returning and int. Future work could extend this set of functions to
other C library functions that we know about.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64504 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
odeGenModule.cpp
21f3b7bda69981f0f3357ac590dafa70683db0af 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> Set constant bit on static block vars as well. Patch by Anders Johnson!q


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64502 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
e4c9238795d206e22694101d6d727d2ee1f0028d 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> Set constant bit on static block vars as well. Patch by Anders Johnson!q


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64502 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
0c79d78558051fa9f497494a3dfe08fc6c947f5f 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> Simplify predicate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64500 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7542bca16b63c84e401b44b586ac3378aed446c5 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> Simplify predicate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64500 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
375da3f17db50216eed1e294059e804c9e66cff4 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> IRgen support for attribute used.
- PR3566


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64492 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
odeGenModule.h
5c61d97ad442b2c0bbecb617c8f21857ce1fff6d 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> IRgen support for attribute used.
- PR3566


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64492 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
odeGenModule.h
f3482b3612137a25341688a75199b540e1265057 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> Pull MayDeferGeneration out of EmitGlobal.
- Fix emission of static functions with constructor attribute while I
was here.
<rdar://problem/6140899> [codegen] "static" and attribute-constructor interact poorly


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64488 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
73241dfeb5c498255b662984cca369fd28ec3147 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> Pull MayDeferGeneration out of EmitGlobal.
- Fix emission of static functions with constructor attribute while I
was here.
<rdar://problem/6140899> [codegen] "static" and attribute-constructor interact poorly


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64488 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
21f3cf7b0cce1ebc05bb2a737c34e0b3bd005ef1 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> Rename EmitStatics (etc) to EmitDeferred; provide basic infrastructure
for attribute used support.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64487 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
0269871c9cba493f76237175ab60313406f3bafa 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> Rename EmitStatics (etc) to EmitDeferred; provide basic infrastructure
for attribute used support.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64487 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
92ea888eae96b6f1ccfb709713dc5d48ce828c71 13-Feb-2009 Mike Stump <mrs@apple.com> Let the backend unique these.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64486 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenModule.cpp
odeGenModule.h
7d6dc4ff45917c480d8b3350385337f34511ebaf 13-Feb-2009 Mike Stump <mrs@apple.com> Let the backend unique these.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64486 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenModule.cpp
odeGenModule.h
5644790d8c5df95915f035a9cd3584f99f8c0a47 13-Feb-2009 Mike Stump <mrs@apple.com> Fix spelling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64482 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
f744895f3c2ebc27d15a523c3be8ebcd9f3644be 13-Feb-2009 Mike Stump <mrs@apple.com> Fix spelling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64482 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
075329c737262b797ec14e81d308c651512b0078 13-Feb-2009 Mike Stump <mrs@apple.com> Move DescriptorUniqueCount into CGM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64481 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenModule.cpp
odeGenModule.h
324699105567f2948db316c3a3dc4c1d38a3657e 13-Feb-2009 Mike Stump <mrs@apple.com> Move DescriptorUniqueCount into CGM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64481 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenModule.cpp
odeGenModule.h
eb3a5ca38db352c19eef382524bcff98a4c5acb6 13-Feb-2009 Mike Stump <mrs@apple.com> Move NSConcreteStackBlock into CGM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64479 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenModule.h
59c5b118dfbcbc22c65ae42b8f5ef5979ec802ee 13-Feb-2009 Mike Stump <mrs@apple.com> Move NSConcreteStackBlock into CGM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64479 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenModule.h
0f6504f83bf65a6ebe9974be912cd89fcfd27b4b 13-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Eliminate an unused variable

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64476 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
3fa3dc13e9fddb3394c28b4384f28f087f2d7cb8 13-Feb-2009 Douglas Gregor <dgregor@apple.com> Eliminate an unused variable

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64476 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
c1b5a6c6e92313ee4ebb213547eadf1234706b10 13-Feb-2009 Mike Stump <mrs@apple.com> Reflow to 80col.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64475 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
ecc90e9512b2ddaced6cb02a08f933fc7afa8e3f 13-Feb-2009 Mike Stump <mrs@apple.com> Reflow to 80col.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64475 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
ef2c82f8f6537ee58ce63befa424d8c03f9c1071 13-Feb-2009 Mike Stump <mrs@apple.com> Move GlobalUniqueCount up into CGM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64473 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenModule.cpp
odeGenModule.h
26efc3388adb010984da2f70e1f24e8286e6476d 13-Feb-2009 Mike Stump <mrs@apple.com> Move GlobalUniqueCount up into CGM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64473 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenModule.cpp
odeGenModule.h
8c7904b18b32688bb598acaa9249f3fe8fc715d7 13-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a 64bit code gen bug of a cateogory
implementation with no category declaration!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64470 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
943ed6ff5fafabc5ee1ea6a015908562688fbd47 13-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed a 64bit code gen bug of a cateogory
implementation with no category declaration!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64470 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a96ec38ad0699edcbc84b837037725ccfa83a74a 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Support va_arg passed in mixed registers.
- Now at 1274 passes on gcc compat suite vs 1262.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64469 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
55e5d8956be516d66db2196bd0ce3c30ebf5fbf0 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Support va_arg passed in mixed registers.
- Now at 1274 passes on gcc compat suite vs 1262.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64469 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
5f87e9d2656b8a0a1f5ca93f8e2c9d0a1c2642cc 13-Feb-2009 Mike Stump <mrs@apple.com> Condense NSConcreteGlobalBlock handling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64461 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenModule.h
f99f1d022614200f04a94f0fc5586aa2f5e6226d 13-Feb-2009 Mike Stump <mrs@apple.com> Condense NSConcreteGlobalBlock handling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64461 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenModule.h
ac9b4dfb7fb19f883c17b6daad1f9b56a708283d 13-Feb-2009 Mike Stump <mrs@apple.com> Calculate size correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64459 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
3ba8215d5b14fca14835076f0f40334ecc967121 13-Feb-2009 Mike Stump <mrs@apple.com> Calculate size correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64459 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
ff8f087642d02d9bcd9c35018b46725b6f4cd8c3 13-Feb-2009 Mike Stump <mrs@apple.com> Size should be unsigned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64458 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
56129b1f98e8a40d493476fdb7f57cee63ceb7e7 13-Feb-2009 Mike Stump <mrs@apple.com> Size should be unsigned.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64458 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
b95bc00dc0bd40f3a6685c23f3d498f39a26ac45 13-Feb-2009 Mike Stump <mrs@apple.com> Condense all the blocks code into CGBlocks.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64457 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprScalar.cpp
odeGenFunction.h
e5fee25e71266712522cff554f25c59b3078a429 13-Feb-2009 Mike Stump <mrs@apple.com> Condense all the blocks code into CGBlocks.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64457 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprScalar.cpp
odeGenFunction.h
7b7cd8b4c75ca750363306a6f1e0ec7c7b66388b 13-Feb-2009 Mike Stump <mrs@apple.com> Fixup types, the runtime uses int, not int32.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64456 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
7cbb3608a7c28a7fb285fdc7f44060c5c175c8a0 13-Feb-2009 Mike Stump <mrs@apple.com> Fixup types, the runtime uses int, not int32.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64456 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
20284fe537eef869bbb54e5f244928415e780f43 13-Feb-2009 Mike Stump <mrs@apple.com> Fix cmake builds.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64455 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
47837874d94f2c5958741a4f4a44b32f89425e27 13-Feb-2009 Mike Stump <mrs@apple.com> Fix cmake builds.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64455 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
c4ae963cbd20b1bc66a16579a65ed6298172f62d 13-Feb-2009 Mike Stump <mrs@apple.com> Fixup spacing a tad.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64454 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
a5448544eea6663f8dce30a50343ef5125559794 13-Feb-2009 Mike Stump <mrs@apple.com> Fixup spacing a tad.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64454 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
0dffa4669aaea5b572350a35b11d94e28fb76eec 13-Feb-2009 Mike Stump <mrs@apple.com> Move GenericBlockLiteralType into CGM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64452 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenModule.cpp
odeGenModule.h
9b8a7977109604d573b49d517e98badbbb9d5ac7 13-Feb-2009 Mike Stump <mrs@apple.com> Move GenericBlockLiteralType into CGM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64452 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenModule.cpp
odeGenModule.h
95e548007f7a076db707c15e9e86e29730bab835 13-Feb-2009 Mike Stump <mrs@apple.com> Move BlockDescriptorType into CGM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64451 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenModule.cpp
odeGenModule.h
ab695143861b520f5c9f8f982534a71d355396f1 13-Feb-2009 Mike Stump <mrs@apple.com> Move BlockDescriptorType into CGM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64451 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
odeGenModule.cpp
odeGenModule.h
7300779bb741ba8b64a3bbba14a8b60b58560898 13-Feb-2009 Anders Carlsson <andersca@mac.com> Add CodeGen support for the nodebug attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64445 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
e896d98548b02223c7740d807a0aa6e20fba7079 13-Feb-2009 Anders Carlsson <andersca@mac.com> Add CodeGen support for the nodebug attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64445 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
ff3fcdf47370a4577d971a2adefd259807152078 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
odeGenTypes.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
odeGenTypes.cpp
77cfb3cf42d34bf57f17a23982330a118dd84cc0 13-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Add mangling for variadic functions and conversion functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64425 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
219cc61b505960195d538052f0e629b387ad60ca 13-Feb-2009 Douglas Gregor <dgregor@apple.com> Add mangling for variadic functions and conversion functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64425 91177308-0d34-0410-b5e6-96231b3b80d8
angle.cpp
3556bc72a4c38332a94becb05a4e8ff1f9917ef9 13-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Add basic support for C++ name mangling according to the Itanium C++
ABI to the CodeGen library. Since C++ code-generation is so
incomplete, we can't exercise much of this mangling code. However, a
few smoke tests show that it's doing the same thing as GCC. When C++
codegen matures, we'll extend the ABI tester to verify name-mangling
as well, and complete the implementation here.

At this point, the major client of name mangling is in the uses of the
new "overloadable" attribute in C, which allows overloading. Any
"overloadable" function in C (or in an extern "C" block in C++) will
be mangled the same way that the corresponding C++ function would be
mangled.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64413 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
MakeLists.txt
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
angle.cpp
angle.h
5f2bfd4811996abb783aa6c7254c56baa6930e8c 13-Feb-2009 Douglas Gregor <dgregor@apple.com> Add basic support for C++ name mangling according to the Itanium C++
ABI to the CodeGen library. Since C++ code-generation is so
incomplete, we can't exercise much of this mangling code. However, a
few smoke tests show that it's doing the same thing as GCC. When C++
codegen matures, we'll extend the ABI tester to verify name-mangling
as well, and complete the implementation here.

At this point, the major client of name mangling is in the uses of the
new "overloadable" attribute in C, which allows overloading. Any
"overloadable" function in C (or in an extern "C" block in C++) will
be mangled the same way that the corresponding C++ function would be
mangled.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64413 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
MakeLists.txt
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
angle.cpp
angle.h
d79bb397bb334b263f8cc057a4a13043199a8f9f 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> Honor attribute section on static block var decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64411 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
30510abee628c645285e01cfd4779610d46a822c 13-Feb-2009 Daniel Dunbar <daniel@zuster.org> Honor attribute section on static block var decls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64411 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
a09a514186e0e22977daba183929ee389119507c 12-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Fix a bug whereby, an ivar used to synthesize a property belongs
to a base class (nonfragile abi ir gen bug).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64391 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
01a0c3624aaa976ccba08b6cee1606521b8378d2 12-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Fix a bug whereby, an ivar used to synthesize a property belongs
to a base class (nonfragile abi ir gen bug).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64391 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
4eb81dc56e386abc11b3114109a5feb6179ea13e 12-Feb-2009 Mike Stump <mrs@apple.com> Initial codegen for block literals. This is a work in progress. I've
tried to put FIXMEs on the most important things to fix up. Lots left
to do including more codegen, more documentation and cleaning code and
style cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64390 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
df6b68c9487aed2042c7fc23db10a79f89083a11 12-Feb-2009 Mike Stump <mrs@apple.com> Initial codegen for block literals. This is a work in progress. I've
tried to put FIXMEs on the most important things to fix up. Lots left
to do including more codegen, more documentation and cleaning code and
style cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64390 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1f1cd39d71dadad454d96ec5eafb9b7450c832e4 12-Feb-2009 Anders Carlsson <andersca@mac.com> Add a very basic implemenation of global blocks. This needs to be cleaned up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64387 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprConstant.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
d5cab5435371b8cc74a9e05ebd40b5995ebad149 12-Feb-2009 Anders Carlsson <andersca@mac.com> Add a very basic implemenation of global blocks. This needs to be cleaned up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64387 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExprConstant.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
17c0382b4b42417de088ae2ce467aa74b16fca65 12-Feb-2009 Steve Naroff <snaroff@apple.com> Several cleanups:
- rename isObjCIdType/isObjCClassType -> isObjCIdStructType/isObjCClassStructType. The previous name didn't do what you would expect.
- add back isObjCIdType/isObjCClassType to do what you would expect. Not currently used, however many of the isObjCIdStructType/isObjCClassStructType clients could be converted over time.
- move static Sema function areComparableObjCInterfaces to ASTContext (renamed to areComparableObjCPointerTypes, since it now operates on pointer types).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64385 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
389bf46ae41241a656ed71b00ac2177d7f385651 12-Feb-2009 Steve Naroff <snaroff@apple.com> Several cleanups:
- rename isObjCIdType/isObjCClassType -> isObjCIdStructType/isObjCClassStructType. The previous name didn't do what you would expect.
- add back isObjCIdType/isObjCClassType to do what you would expect. Not currently used, however many of the isObjCIdStructType/isObjCClassStructType clients could be converted over time.
- move static Sema function areComparableObjCInterfaces to ASTContext (renamed to areComparableObjCPointerTypes, since it now operates on pointer types).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64385 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9750972322487f439c511244b303ad3e849b193d 12-Feb-2009 Daniel Dunbar <daniel@zuster.org> Support __attribute__(section(<name>))


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64380 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
17f194f4393a67fd28ad822c06d32b8cb99bad3f 12-Feb-2009 Daniel Dunbar <daniel@zuster.org> Support __attribute__(section(<name>))


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64380 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
3cfcec72f8a20de4e1f7dfc514ac1fa86cd5ff0e 12-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64: Initial varargs support.
- Doesn't yet handle case where values are passed in mixed (general
purpose & floating point) registers; otherwise largely
functional. Code still needs some cleaning.

Fixes:
MultiSource/Applications/lua/lua
MultiSource/Applications/siod/siod
MultiSource/Applications/sqlite3/sqlite3
SingleSource/Regression/C/PR640
SingleSource/UnitTests/2003-07-09-SignedArgs
SingleSource/UnitTests/2007-03-02-VaCopy

gcc compat test suite results (Darwin x86-32 & -64):
--
# of expected passes 1262
# of unexpected failures 56
# of unresolved testcases 34
# of unsupported tests 2

Compare to: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090209/012050.html


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64370 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
be9eb0937c667e2823971966adf960f86d3985d6 12-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64: Initial varargs support.
- Doesn't yet handle case where values are passed in mixed (general
purpose & floating point) registers; otherwise largely
functional. Code still needs some cleaning.

Fixes:
MultiSource/Applications/lua/lua
MultiSource/Applications/siod/siod
MultiSource/Applications/sqlite3/sqlite3
SingleSource/Regression/C/PR640
SingleSource/UnitTests/2003-07-09-SignedArgs
SingleSource/UnitTests/2007-03-02-VaCopy

gcc compat test suite results (Darwin x86-32 & -64):
--
# of expected passes 1262
# of unexpected failures 56
# of unresolved testcases 34
# of unsupported tests 2

Compare to: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090209/012050.html


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64370 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
d2a889be35ed978ce1334303b0d33d042cd6759b 12-Feb-2009 Anders Carlsson <andersca@mac.com> Add support for generating block call expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64346 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
odeGenFunction.h
acfde805d644bc71dfeac54ddbc9f12cdae0bb02 12-Feb-2009 Anders Carlsson <andersca@mac.com> Add support for generating block call expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64346 91177308-0d34-0410-b5e6-96231b3b80d8
GBlocks.cpp
GExpr.cpp
odeGenFunction.h
63378cf242ad6b9a4a526aca977fc688e4568f22 11-Feb-2009 Daniel Dunbar <daniel@zuster.org> Use EmitVAListRef instead of EmitLValue directly to handle array decay
case on x86_64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64333 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
0785570af3ef5f8c5a0377129e41efe6f3f8d770 11-Feb-2009 Daniel Dunbar <daniel@zuster.org> Use EmitVAListRef instead of EmitLValue directly to handle array decay
case on x86_64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64333 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
95d08f232710754243c7782e73eb1f76807b7489 11-Feb-2009 Daniel Dunbar <daniel@zuster.org> Support IRgen of va_arg of structure as l-value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64325 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
5b5c9ef865607e179413462dcd71bcebb5b7daae 11-Feb-2009 Daniel Dunbar <daniel@zuster.org> Support IRgen of va_arg of structure as l-value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64325 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
ebb82c6ccf8c014fedc70c7eee2f9dffdea73aea 11-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for objc's @selector expression in nonfragile abi mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64323 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
26cc89ffb1cc57313371b4175ceac56a2f975641 11-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for objc's @selector expression in nonfragile abi mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64323 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ec85e817fa054c652f9b4700454a461a3c2f5a24 11-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Silence a warning about an unused variable in -Asserts builds

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64306 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
71d817451626fe7ac6b080955ff87624b76bd058 11-Feb-2009 Douglas Gregor <dgregor@apple.com> Silence a warning about an unused variable in -Asserts builds

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64306 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
49083176d4f79a56e444b22e6dcea6ca8a4d2adc 11-Feb-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6518463, increment of a bool is always true, due to
subtle and non-obvious promotion rules. We already handle +=
and +1 correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64296 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
db3bd4b4eabc325781a6a407c3dcf68a8d6db0f9 11-Feb-2009 Chris Lattner <sabre@nondot.org> Fix rdar://6518463, increment of a bool is always true, due to
subtle and non-obvious promotion rules. We already handle +=
and +1 correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64296 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
6d2e349c613230dd264733f53cb76d49594de04b 11-Feb-2009 Chris Lattner <sabre@nondot.org> finish off codegen support for sub of pointer to functions,
finishing off rdar://6520707


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64295 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
e5ed15195b71b8fa440e67d49db0168bb58e4e8a 11-Feb-2009 Chris Lattner <sabre@nondot.org> finish off codegen support for sub of pointer to functions,
finishing off rdar://6520707


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64295 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
7a56d8c06482bdebe71c671771da69de896868f7 10-Feb-2009 Anders Carlsson <andersca@mac.com> Handle the case where EmitBlock might be called multiple times for the same block. Fixes PR3536.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64252 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
22ab8d86ec613ace6602b6de11fa9ccc08580f6b 10-Feb-2009 Anders Carlsson <andersca@mac.com> Handle the case where EmitBlock might be called multiple times for the same block. Fixes PR3536.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64252 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
41a88311279855d9f6d2918190a9732d18f8a2df 10-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> This patch is all it takes to pass all objc2's fast-enumeration
tests in the dejagnu test suite in the nonfragile abi mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64251 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3afdfd70616b5ba569dc4e78f41063d35b127464 10-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> This patch is all it takes to pass all objc2's fast-enumeration
tests in the dejagnu test suite in the nonfragile abi mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64251 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
003327a895ebf5e7b176dbf5311bdbc9aa97127f 10-Feb-2009 Daniel Dunbar <daniel@zuster.org> Pull CodeGenFunction::EmitVAArg into target specific ABIInfo classes.
- Missed this file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64238 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
b53e3e71383233ebb68a6a736cbe8af6d8065700 10-Feb-2009 Daniel Dunbar <daniel@zuster.org> Pull CodeGenFunction::EmitVAArg into target specific ABIInfo classes.
- Missed this file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64238 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
7fbcf9cf8e44a8adc15c0e10f6addd24f1775cd9 10-Feb-2009 Daniel Dunbar <daniel@zuster.org> Pull CodeGenFunction::EmitVAArg into target specific ABIInfo classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64235 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.cpp
b4094ea09eee7d3a847cadf181a81efc99003daf 10-Feb-2009 Daniel Dunbar <daniel@zuster.org> Pull CodeGenFunction::EmitVAArg into target specific ABIInfo classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64235 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenFunction.cpp
cc00f926649d6d09e8c1ea6edf965aced4a091a5 10-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Generate ir for ivar offset. This will pass
type-nsobject-attribute.m in the dejagnu test suite
in the nonfragile abi mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64233 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ed157d3952637afe0ec38bf850b4d025b9a701ac 10-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Generate ir for ivar offset. This will pass
type-nsobject-attribute.m in the dejagnu test suite
in the nonfragile abi mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64233 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
27cc6664e809f4485f44c0008830c0409064ac84 10-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Some refactoring of Ivar offset code gen.
in preparation for nonfragile ivar offset work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64225 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
f63aa3fd429cdb9145d78f0b656bc78754efedb9 10-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Some refactoring of Ivar offset code gen.
in preparation for nonfragile ivar offset work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64225 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
e978cb9e5faba2dbf2ecca64bf492793973e215f 10-Feb-2009 Daniel Dunbar <daniel@zuster.org> Tweak x86-64 ABI to allow reuse for vararg handling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64221 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
3b4e9cd0655467f66332575b816a958d319e8ca6 10-Feb-2009 Daniel Dunbar <daniel@zuster.org> Tweak x86-64 ABI to allow reuse for vararg handling.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64221 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
c2d3715d853f52e36bc16ff2a4b6a328d3b9658a 10-Feb-2009 Anders Carlsson <andersca@mac.com> Remove the last remnants of the Obj-C EH stack code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64205 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
fa1f756f88f4e6f3da2673082fdc1e8f54bccd6f 10-Feb-2009 Anders Carlsson <andersca@mac.com> Remove the last remnants of the Obj-C EH stack code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64205 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
7c314906a7341c9a0040bc432b862442eee273d0 10-Feb-2009 Anders Carlsson <andersca@mac.com> Start removing the old Obj-C EH stack now that the cleanup stack is used instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64203 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GStmt.cpp
odeGenFunction.h
e4b6d342c29d5cb9d311756100df1603810fa892 10-Feb-2009 Anders Carlsson <andersca@mac.com> Start removing the old Obj-C EH stack now that the cleanup stack is used instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64203 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GStmt.cpp
odeGenFunction.h
d3281379b2b09022f9c4bd359f9247f8ca53d308 10-Feb-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Function parameters for PIC16 are like local variables. So use the keyword ".auto." to mangle their names. The working of PIC16AsmPrinter relies on that keyword currently.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64198 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
193cdbe73e77171a5800ca6ecd783d909764dc88 10-Feb-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Function parameters for PIC16 are like local variables. So use the keyword ".auto." to mangle their names. The working of PIC16AsmPrinter relies on that keyword currently.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64198 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
9d96b32ad1fc99cb75cc7075d7d385ee688e7de6 10-Feb-2009 Daniel Dunbar <daniel@zuster.org> Support va_arg on _Complex.

gcc compat test suite results (Darwin x86-32 & -64):
--
# of expected passes 1110
# of unexpected failures 74
# of unresolved testcases 168
# of unsupported tests 2


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64197 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
4e484b8134c7eaeced03be7e4e0f7349def9b355 10-Feb-2009 Daniel Dunbar <daniel@zuster.org> Support va_arg on _Complex.

gcc compat test suite results (Darwin x86-32 & -64):
--
# of expected passes 1110
# of unexpected failures 74
# of unresolved testcases 168
# of unsupported tests 2


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64197 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
8559b5dcfe866081153397e62874293ec8fe0740 10-Feb-2009 Daniel Dunbar <daniel@zuster.org> ABI: Correctly handle load/store of values which have a different LLVM
memory representation (e.g., bool).
- This upgrades (downgrades) MultiSource/Applications/ClamAV/clamscan
to a miscompile and fixes
SingleSource/UnitTests/2003-05-31-CastToBool.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64194 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
adc8bdd6ab6f4f90d16f696f16948e46acf66267 10-Feb-2009 Daniel Dunbar <daniel@zuster.org> ABI: Correctly handle load/store of values which have a different LLVM
memory representation (e.g., bool).
- This upgrades (downgrades) MultiSource/Applications/ClamAV/clamscan
to a miscompile and fixes
SingleSource/UnitTests/2003-05-31-CastToBool.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64194 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
f1c5d845a20291cb1e062c7ce1f47f8a92ad4f61 10-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add util Emit{LoadOf,StoreTo}Scalar methods to encapsulate conversion
from LLVM memory type to/from LLVM temporary type.
- No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64191 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
9d9cc874bcc168474757a8f90476684b4a93ed76 10-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add util Emit{LoadOf,StoreTo}Scalar methods to encapsulate conversion
from LLVM memory type to/from LLVM temporary type.
- No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64191 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
94b4fec1104f3af644ad46f8e5ed12a55aac41ca 10-Feb-2009 Daniel Dunbar <daniel@zuster.org> Make sure to initialize local variables, even if they were ignored by
ABI.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64187 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
8b979d9e4c41fb67eb276996bdaa608fb4b11ccd 10-Feb-2009 Daniel Dunbar <daniel@zuster.org> Make sure to initialize local variables, even if they were ignored by
ABI.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64187 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
c5656e7d1210c8b048fd8f7dc7209f9748e25044 09-Feb-2009 Anders Carlsson <andersca@mac.com> Use the new cleanup infrastructure for VLAs. The next iteration of patches will remove the old Obj-C EH cleanup code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64161 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
5ecb1b9377a6408486df5a10538bdc932706e053 09-Feb-2009 Anders Carlsson <andersca@mac.com> Use the new cleanup infrastructure for VLAs. The next iteration of patches will remove the old Obj-C EH cleanup code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64161 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
00ffb96399c0ed2ff4d48b4863c481d70008f56a 09-Feb-2009 Anders Carlsson <andersca@mac.com> Use the new cleanup infrastructure for @try/@finally

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64160 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f3a79a96eecff0fba4de8e29831a5ec0eaf90385 09-Feb-2009 Anders Carlsson <andersca@mac.com> Use the new cleanup infrastructure for @try/@finally

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64160 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
de6fd8c98451bd40bba34070621e1e57e6997098 09-Feb-2009 Anders Carlsson <andersca@mac.com> Replace a bunch of EmitBranch calls with EmitBranchThroughCleanup. No functionality change (yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64159 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
82d8ef0be44ddba608c1ce5c8b6b48da83bc1821 09-Feb-2009 Anders Carlsson <andersca@mac.com> Replace a bunch of EmitBranch calls with EmitBranchThroughCleanup. No functionality change (yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64159 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
d5c4234d64f2758773c78ecf57fd1fd2933c95ed 09-Feb-2009 Anders Carlsson <andersca@mac.com> Save and restore the DidCallStackSave variable

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64157 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
7433189b6e9d6661a7edb80d73e43afc26456f3c 09-Feb-2009 Anders Carlsson <andersca@mac.com> Save and restore the DidCallStackSave variable

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64157 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
60c4c404a298b32ac7a4dba28e2472b8652138a4 09-Feb-2009 Anders Carlsson <andersca@mac.com> Add DidCallStackSave variable to CodeGenFunction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64156 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
4cc1a4703363ff940b6273aeef9d96a87edeb04b 09-Feb-2009 Anders Carlsson <andersca@mac.com> Add DidCallStackSave variable to CodeGenFunction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64156 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
8e458f48f07276fe279a3d02e709e7ce15b2f9c3 09-Feb-2009 Douglas Gregor <doug.gregor@gmail.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
odeGenTypes.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
odeGenTypes.cpp
b699aa6ac0106ced89a7fa5290ccea25909e4e9a 09-Feb-2009 Mike Stump <mrs@apple.com> Add some more documentation. Also reflowed comments to 80 col.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64105 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
0dd9e88aa972d80025c66fb3d7df0266b44cad1a 09-Feb-2009 Mike Stump <mrs@apple.com> Add some more documentation. Also reflowed comments to 80 col.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64105 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
8be6340986b0069100122de6013773ce346fc808 08-Feb-2009 Anders Carlsson <andersca@mac.com> Reuse case destinations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64100 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
cc8992021caf316a282116d509d2a4fb54349341 08-Feb-2009 Anders Carlsson <andersca@mac.com> Reuse case destinations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64100 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
98720f0c1f55de308b5523074a45c4aef05d1883 08-Feb-2009 Anders Carlsson <andersca@mac.com> Always check if we can remove branch fixups, even if the cleanup stack is empty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64099 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
ad9d00e371f4f4e63a540f4e4c501797db2a43de 08-Feb-2009 Anders Carlsson <andersca@mac.com> Always check if we can remove branch fixups, even if the cleanup stack is empty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64099 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
e833ebaa77305b23b249abdee0e75aa9aba5fc31 08-Feb-2009 Anders Carlsson <andersca@mac.com> Add a simplified EmitJumpThroughFinally and use it in CGObjC in preparation of making it use the cleanup stack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64098 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenFunction.h
48de1012a2d8525362b417efce6fbfdf1c2b36e1 08-Feb-2009 Anders Carlsson <andersca@mac.com> Add a simplified EmitJumpThroughFinally and use it in CGObjC in preparation of making it use the cleanup stack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64098 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenFunction.h
32fffb71232aff076b5c6f11c4f90147f378e6d2 08-Feb-2009 Anders Carlsson <andersca@mac.com> Misc fixes to the cleanup stack code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64096 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
46831a93e1805ddaebd68f37cdb5496a86b44cf0 08-Feb-2009 Anders Carlsson <andersca@mac.com> Misc fixes to the cleanup stack code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64096 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
2be787c81ea1b79ded49cb5c80deed9b42a977a3 08-Feb-2009 Mike Stump <mrs@apple.com> When we're at the stack depth we want, there isn't anything to do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64095 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
225b16dbaaca36aae6934fafd0ab718393f97019 08-Feb-2009 Mike Stump <mrs@apple.com> When we're at the stack depth we want, there isn't anything to do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64095 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
7e39f18e0142c245e69f8f62e6cbaa09ff7dd490 08-Feb-2009 Mike Stump <mrs@apple.com> Wire up break and continue processing to the new stack depth adjuster.
If people could beat on it and let me know if there are any new
semantics required by newer language standards or DRs or any little
details I goofed on, I'd be happy to fix any issues found.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64079 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
ec9771d57f94cc204491b3174e88069d08cdd684 08-Feb-2009 Mike Stump <mrs@apple.com> Wire up break and continue processing to the new stack depth adjuster.
If people could beat on it and let me know if there are any new
semantics required by newer language standards or DRs or any little
details I goofed on, I'd be happy to fix any issues found.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64079 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
df27419b24187e861dac9244c5c1a18f5ddc9297 08-Feb-2009 Anders Carlsson <andersca@mac.com> More cleanup stack work, PopCleanupBlock now returns a struct with the switch block and end block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64072 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
bb66f9f2e454135b86462d121629275b6ac38e96 08-Feb-2009 Anders Carlsson <andersca@mac.com> More cleanup stack work, PopCleanupBlock now returns a struct with the switch block and end block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64072 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
e75ae4d1f72ceee8f2fd8df7a58f99ee92c912ef 08-Feb-2009 Anders Carlsson <andersca@mac.com> Split some functions up

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64069 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
d66a9f9019c00d889990c947e16a8f019aa2c1f8 08-Feb-2009 Anders Carlsson <andersca@mac.com> Split some functions up

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64069 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
459ee36b688dbef1bdaf4815e8eeb28ad0b22972 08-Feb-2009 Anders Carlsson <andersca@mac.com> CleanupScope needs to push the cleanup block in its destructor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64068 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
6fc559136b8ef98bfb824a0fd49df385405f2879 08-Feb-2009 Anders Carlsson <andersca@mac.com> CleanupScope needs to push the cleanup block in its destructor

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64068 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
9b39979f00f1b65609e38f49d22f82805afdbee4 08-Feb-2009 Anders Carlsson <andersca@mac.com> Implement support for branch fixups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64064 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
1093c2c40a7c262d206d724e912b32cbad2d4e14 08-Feb-2009 Anders Carlsson <andersca@mac.com> Implement support for branch fixups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64064 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
ed536bc298b1632406f03d9312d28d3d19fe6794 08-Feb-2009 Anders Carlsson <andersca@mac.com> More cleanup stack work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64059 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
87eaf17cc88516277e4389dfa15df93ecfdce559 08-Feb-2009 Anders Carlsson <andersca@mac.com> More cleanup stack work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64059 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
e7de35284ed1122d2b1b7fb352c930cc96761486 08-Feb-2009 Anders Carlsson <andersca@mac.com> When emitting blocks, keep track of which cleanup scope they have. Minor fixes and cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64053 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
bd6fa3d032acd7eafc6c10827c41103df45beab7 08-Feb-2009 Anders Carlsson <andersca@mac.com> When emitting blocks, keep track of which cleanup scope they have. Minor fixes and cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64053 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
c40e10c4c5c4494ce9d2ed8857a663c0344acafb 08-Feb-2009 Anders Carlsson <andersca@mac.com> Emit a cleanup block for the cleanup attribute

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64052 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
69c68b7454dc7f47def4ebf593a584d0f02c1ddb 08-Feb-2009 Anders Carlsson <andersca@mac.com> Emit a cleanup block for the cleanup attribute

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64052 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
883fa557fe3112c939b5dc5324ede43529c196aa 08-Feb-2009 Anders Carlsson <andersca@mac.com> Add support for emitting cleanup blocks. Make EmitCompoundStatement emit cleanup blocks if necessary

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64051 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
c71c845fe77ee1f891d60232ec320912d88557ee 08-Feb-2009 Anders Carlsson <andersca@mac.com> Add support for emitting cleanup blocks. Make EmitCompoundStatement emit cleanup blocks if necessary

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64051 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
ca2fec6470a14dda82a831c3509bab49905f6b1f 08-Feb-2009 Anders Carlsson <andersca@mac.com> Add a simple RAII object, to be used for pushing a cleanup entry and make the insertion point be the cleanup block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64048 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
0d5c6851393d260dfb5ab0420b50adc173e1c549 08-Feb-2009 Anders Carlsson <andersca@mac.com> Add a simple RAII object, to be used for pushing a cleanup entry and make the insertion point be the cleanup block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64048 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
a1ac47768f731f660877d2d0ed75acfd972b0242 08-Feb-2009 Mike Stump <mrs@apple.com> Ensure we track all the stack depths for all break and continue points
correctly. This should lay the ground work to throw the big switch
and start code gening break and continue in the presense of vlas.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64046 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GStmt.cpp
odeGenFunction.h
3e9da66ac7e88d64d30ee777588677320660cf84 08-Feb-2009 Mike Stump <mrs@apple.com> Ensure we track all the stack depths for all break and continue points
correctly. This should lay the ground work to throw the big switch
and start code gening break and continue in the presense of vlas.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64046 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GStmt.cpp
odeGenFunction.h
9c5b2a408fca81cf95712d1558862d7b3e956a2e 07-Feb-2009 Anders Carlsson <andersca@mac.com> Add plumbing for the cleanup stack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64043 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
6ccc47698d0311ddabf32fa0f6db8e4f09ac96f8 07-Feb-2009 Anders Carlsson <andersca@mac.com> Add plumbing for the cleanup stack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64043 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
ecd81835ea4b40da73e4045e177ca08f9baa49f5 07-Feb-2009 Anders Carlsson <andersca@mac.com> Split the exception object out into its own stack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64032 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenFunction.h
273558fbd891a0872e620e0d3d109b92c1160d72 07-Feb-2009 Anders Carlsson <andersca@mac.com> Split the exception object out into its own stack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64032 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenFunction.h
8559de1b26f27c8f6f2f43b9fb5f11b55566a5f2 07-Feb-2009 Anders Carlsson <andersca@mac.com> Simplify the Objective-C exception handling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64031 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenFunction.h
190d00e1396214c77539c7095756b9ea38160463 07-Feb-2009 Anders Carlsson <andersca@mac.com> Simplify the Objective-C exception handling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64031 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenFunction.h
024c71febd951523fd43a35227ce647d149089d4 07-Feb-2009 Mike Stump <mrs@apple.com> Format for 80-cols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64030 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
20926c6eaad539459925d857f64600cd4cc77e99 07-Feb-2009 Mike Stump <mrs@apple.com> Format for 80-cols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64030 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
304100bcdc339dbeeede08d81be7db5123e8b891 07-Feb-2009 Mike Stump <mrs@apple.com> Ensure that we don't miscodegen if vlas creap into the top of the for.
This will allow us to generate break and continue even if vlas are
involved without worry that we'll silently generate bad code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64028 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
501af1f721d837a565b947bf194a3476db32d926 07-Feb-2009 Mike Stump <mrs@apple.com> Ensure that we don't miscodegen if vlas creap into the top of the for.
This will allow us to generate break and continue even if vlas are
involved without worry that we'll silently generate bad code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64028 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
cfdf4c244fb3704eb741c4fa22f1da1beb73767d 07-Feb-2009 Mike Stump <mrs@apple.com> Arrange to have the correct StackDepth for while statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64021 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
72cac2ccce8058833f56358e3391e28a8ddeeaa4 07-Feb-2009 Mike Stump <mrs@apple.com> Arrange to have the correct StackDepth for while statements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64021 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
80225e1666c36518496b06d37806d777acf95de8 07-Feb-2009 Mike Stump <mrs@apple.com> Fit into 80-col.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64020 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
16b16206741f5139c4ad870632db8f9ea4c6c943 07-Feb-2009 Mike Stump <mrs@apple.com> Fit into 80-col.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64020 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
88ad911d8f5c9ef06ca2d26f6820e6af9e796a9c 07-Feb-2009 Mike Stump <mrs@apple.com> Fixup goto codegen in and around VLAs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64014 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GObjC.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
36a2ada69fdb457b0e46d0ef452c150b360d8888 07-Feb-2009 Mike Stump <mrs@apple.com> Fixup goto codegen in and around VLAs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64014 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GObjC.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
3f062383f9732d081afa30410ee3fd415c748e20 07-Feb-2009 Daniel Dunbar <daniel@zuster.org> Set load/store alignment when doing ABI coercions.
- Currently, this is producing poor code, but we prefer correctness
to performance for now. Eventually we should be able to generally
avoid having to set the alignment when we control the alignment of
the alloca.

- This knocks out 33/1000 failures on my single argument ABI tests,
down to 22/1000 and 18 of these appear to be gcc bugs. Woot.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64001 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
386621f5e12f5db95af3b82250b08fdae3e3d321 07-Feb-2009 Daniel Dunbar <daniel@zuster.org> Set load/store alignment when doing ABI coercions.
- Currently, this is producing poor code, but we prefer correctness
to performance for now. Eventually we should be able to generally
avoid having to set the alignment when we control the alignment of
the alloca.

- This knocks out 33/1000 failures on my single argument ABI tests,
down to 22/1000 and 18 of these appear to be gcc bugs. Woot.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64001 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
2863cae46a29a1a9b19530f2518cb48754e4ee39 07-Feb-2009 Daniel Dunbar <daniel@zuster.org> When making dummy file entries, the directory name should also be
non-empty.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63986 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f8e58d0b94b03d6662d9a9529cee108c64bcd0b2 07-Feb-2009 Daniel Dunbar <daniel@zuster.org> When making dummy file entries, the directory name should also be
non-empty.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63986 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
c81226cd5a912167c855c01be71b85c78ddb4102 07-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed an objc2 nonfragile-abi code gen bug.
Now we can say 'hello world' objective-c style
in the nonfragile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63981 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
169c7f8fa6d1d361f44708609cf0cd0780c4f6fb 07-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Fixed an objc2 nonfragile-abi code gen bug.
Now we can say 'hello world' objective-c style
in the nonfragile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63981 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f3a4401ac50b719dda3a4bdf73513bab55f98498 06-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> objc2's nonfragile abi API for messages sent to 'super'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63959 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7a06aae468c94a21c267106ec16bd2c79dab2857 06-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> objc2's nonfragile abi API for messages sent to 'super'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63959 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c5ba49127b614f164b088ceb95f89aad29e88992 06-Feb-2009 Daniel Dunbar <daniel@zuster.org> Use 'compile' instead of 'codegen' when reporting error to user.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63952 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
56b8001b42bd603ef593e3cb278d8b9b9ba26ca9 06-Feb-2009 Daniel Dunbar <daniel@zuster.org> Use 'compile' instead of 'codegen' when reporting error to user.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63952 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
917c0408a641c4699f96d354129825bc4ba9b37f 05-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> objc2's nonfragile-abi - API selection for when receiver is a class


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63881 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0e81f4b58d4e9767efbca7f3e856dcbc2192b1b5 05-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> objc2's nonfragile-abi - API selection for when receiver is a class


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63881 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
8f30de930589581e0c4f8698f0fca4e90fcc0df6 05-Feb-2009 Anders Carlsson <andersca@mac.com> Follow Eli's advice and store the VLA size with the native size_t type. Fixes PR3491.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63879 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprScalar.cpp
odeGenFunction.cpp
96f214776c0f69069fee4d67557c8c7f416009a8 05-Feb-2009 Anders Carlsson <andersca@mac.com> Follow Eli's advice and store the VLA size with the native size_t type. Fixes PR3491.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63879 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprScalar.cpp
odeGenFunction.cpp
bea03191f9dc00f04551b942a6465691aa1bd105 05-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> More objc2's API chanes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63878 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1a6b3686bf5671075c5b217fcfc1840cb0aae172 05-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> More objc2's API chanes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63878 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
13ab25eb6a43eb46a33e6f2eb1231ab0423c77db 05-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> #ifdef'out out objc2 API selection which is not done in gcc (unlike
the documentation to the contrary).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63871 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c170852db6af081810c6fca01e2f434cb8709209 05-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> #ifdef'out out objc2 API selection which is not done in gcc (unlike
the documentation to the contrary).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63871 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
cc81150dc0144a2680a1c9f63fcf4db06056d1e7 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Implement Direct ABIInfo semantics.
- No intended functionality change, this is essentially enabling
direct passing of complex and aggregate values, which no ABI is
using.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63863 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
2fbf2f547cf23c0dd89719c2b5c5d6c6f0fa469c 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Implement Direct ABIInfo semantics.
- No intended functionality change, this is essentially enabling
direct passing of complex and aggregate values, which no ABI is
using.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63863 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
32cae461a5348d92f935a3102161af0e9656d41c 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Simplify test for whether we need an alloca to hold an indirect return
value.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63859 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
2969a0243b0939286a45d0ba58dd3e1de226ac60 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Simplify test for whether we need an alloca to hold an indirect return
value.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63859 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
6f56e45ad2bb406a23d84c4568907ebcf5066115 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Implement ABI Indirect sematics for arguments.
- No intended functionality change, all current ABI implementations
were only using indirect for complex/aggregate types, which were
being passed indirectly with the Direct ABIInfo kind.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63858 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
1f7459814ed78067a8f0db3e1082b45ec89c16ab 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Implement ABI Indirect sematics for arguments.
- No intended functionality change, all current ABI implementations
were only using indirect for complex/aggregate types, which were
being passed indirectly with the Direct ABIInfo kind.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63858 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
88dde9bd0a501853bbe4bfab6048179bf5f458df 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Merge ABIInfo StructRet/ByVal into Indirect.
- No (intended) functionality change, the semantic changes are to come.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63850 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
11e383aa491a23ebd4a49688a09984c5e16a2e34 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Merge ABIInfo StructRet/ByVal into Indirect.
- No (intended) functionality change, the semantic changes are to come.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63850 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
900c85a60e0480003728421402dad268d623330e 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Pull CodeGenFunction::GetUndefRValue() out of EmitUnsupportedRValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63845 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
odeGenFunction.h
13e81737a433b23f8c662d10d1d57356122a8caa 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Pull CodeGenFunction::GetUndefRValue() out of EmitUnsupportedRValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63845 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
odeGenFunction.h
bef07b40ecaf18fa77a8b929eb1315492a0eccb8 05-Feb-2009 Dale Johannesen <dalej@apple.com> Reapply Daniel's patch to match up with llvm 63765.
Untested, Daniel or Nate please review.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63814 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
a6f80ef997f0363386749087b325607eaa5adcfc 05-Feb-2009 Dale Johannesen <dalej@apple.com> Reapply Daniel's patch to match up with llvm 63765.
Untested, Daniel or Nate please review.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63814 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
33b189afc8582cfa75d0a1d79ea67c2e218f6167 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86-32: Use Ignore to avoid passing empty structs (instead of Expand).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63813 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
3170c93d26bdc8b360c4ea3b1cedba50bbd818c1 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86-32: Use Ignore to avoid passing empty structs (instead of Expand).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63813 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
b3f651afd3a107734485f9199bd5e8f8c7241735 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Honor ByVal alignment. Patch by Nate Begeman!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63811 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ca008822e8ad5dd8b3ff598cf62e909966847a67 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Honor ByVal alignment. Patch by Nate Begeman!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63811 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
10d69eaf24f4e982402f975912e7203bb577e893 05-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> This patch generates messaging code for objc2's non-fragile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63810 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ef163782d227f064df5988d46487609324a0169e 05-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> This patch generates messaging code for objc2's non-fragile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63810 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
e6d233a5f820861fcad390206e60e0bd44f3103e 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Initialize alignment field for ByVal ABIInfo correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63809 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
497a85693e8d290c16bcdf5fb97b67bda206aa7d 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Initialize alignment field for ByVal ABIInfo correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63809 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
b944cc9ee0c85b490e48e6303f2a2d863d9185f7 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Unbreak CGFunctionInfo::Profile method and reenable caching of ABI
information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63799 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
35e67d4387bbe3e7e17ee6b17eaa42eebb0eb9f1 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Unbreak CGFunctionInfo::Profile method and reenable caching of ABI
information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63799 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
d63700dcd013dec1d83a8c98c4c8dce339b3c076 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Chase LLVM TOT in circles (i.e., revert r63773 to match revert of
r63765).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63795 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
a9b66347bec984d1fd0378f85f092e2330344747 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Chase LLVM TOT in circles (i.e., revert r63773 to match revert of
r63765).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63795 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
9f4874e4d9142f6e74f4bb3cc6587cf09d574df6 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add ABIArgInfo::dump()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63794 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
6f7279bf98e31356306386b2c200820a76b491cf 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add ABIArgInfo::dump()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63794 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
87f3edc2349dca43e168d19b5dc0565bec203493 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Use correct signature for calling enumeration mutation function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63782 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
90350b6f815eecd9441119b1412695d33fb2b98f 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Use correct signature for calling enumeration mutation function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63782 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
5991d31c9330de260afae98a38b4c0306a756a79 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Temporarily disable caching of ABI results; this is going horribly
wrong in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63780 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
747f06a264931107dc9e0a5abcb494a45853d1fe 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Temporarily disable caching of ABI results; this is going horribly
wrong in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63780 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
9bae865d5640b2b3c2e73126433e1aed27aa2965 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add -femit-all-decls codegen option.
- Emits all declarations, even unused (static) ones.
- Useful when doing minimization of codegen problems (otherwise
problems localized to a static function aren't minimized well).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63776 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d604c40e933c445ff33ac83d62cc6b1adcf7014c 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add -femit-all-decls codegen option.
- Emits all declarations, even unused (static) ones.
- Useful when doing minimization of codegen problems (otherwise
problems localized to a static function aren't minimized well).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63776 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
14c884ad08557eaefb6dc555500ec9e088bedc29 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add asserts that the function signature matches the other arguments provide
to CGCall functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63775 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
4b5f0a4bd6645e87e5feae4be4675ce87d97b4a5 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add asserts that the function signature matches the other arguments provide
to CGCall functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63775 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
221af8961065deec26e7a702d0d0b03e90865917 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> (llvm up) Update for intrinsic lookup changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63773 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
42c9ffd02ef3691f04c63c4869d1f0530d7e88ff 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> (llvm up) Update for intrinsic lookup changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63773 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
f52110fc4c312a97f08447d2f89721cbb1fb9210 04-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Some early code for objc2's nonfragile abi messaging.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63770 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
83a8a7534c6766c2df2745eca35effa3e6f9d092 04-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Some early code for objc2's nonfragile abi messaging.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63770 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
bb284742942ffba27c0af3353f847bee3fa97579 04-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Patch fixes messaging for GNU runtime.
Patch by David Chisnall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63769 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
b3716efb0966620f205c939b671b579ad331ca0d 04-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Patch fixes messaging for GNU runtime.
Patch by David Chisnall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63769 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
99473cda6b4cdf9b4c95894a7d2c0c5129b0034f 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Handle demotion of coerced arguments (as in void a(x) short x; { ... }).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63726 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
8b29a387788bbb7a7c3b64c37473bc46299d2132 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Handle demotion of coerced arguments (as in void a(x) short x; { ... }).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63726 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
2d89c564719b2f812cafbe0d4a39d914001ff21e 04-Feb-2009 Chris Lattner <sabre@nondot.org> lower the interface to getLineNumber like we did for
getColumnNumber. This fixes a FIXME in
SourceManager::getPresumedLoc because we now just decompose
the sloc once.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63701 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
30fc933e5fbbb5f0ea60c47976d435254e378536 04-Feb-2009 Chris Lattner <sabre@nondot.org> lower the interface to getLineNumber like we did for
getColumnNumber. This fixes a FIXME in
SourceManager::getPresumedLoc because we now just decompose
the sloc once.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63701 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d83141af9ec55b21ddb4818bb3bdf630d2d4bdd6 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Update passing of _Bool values to match what function was declared to take.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63697 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
be395f6b29762c37938637ffef5f59514e04751a 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Update passing of _Bool values to match what function was declared to take.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63697 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
dac2992233bec844de0b2e227bef2acc63d28113 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Change construction of common ObjC functions to use CGCall
infrastructure to construct function type.
- For consistencty, we should probably always use this to construct
function types, but these are absolutely necessary to ensure that
we can emit calls to these functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63695 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
34c94a2babcac200c8e0fd778e549afcc43e2df1 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Change construction of common ObjC functions to use CGCall
infrastructure to construct function type.
- For consistencty, we should probably always use this to construct
function types, but these are absolutely necessary to ensure that
we can emit calls to these functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63695 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7e88116a8b200e4ed49fbc7b9d98d051bad1f2ec 04-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Some function stub added for new abi messaging.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63691 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
4655112d1c64a098c5f7d665175063f4664a7cf6 04-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Some function stub added for new abi messaging.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63691 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
903041b17664f3ebf4ef7cb6c15e1f2f65613ce9 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Use CGCall infrastructure to call enumeration mutation function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63685 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
2b2105e92fc77016992dae3f117f526e73af5ea9 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Use CGCall infrastructure to call enumeration mutation function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63685 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
711e8dd3199c0ccf269c27ef97653bae71caeb43 04-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Several new declarations for objc2 nonfragile
abi messaging.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63684 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
2e4672b53107245deb998f55fb9dd77650d610dd 04-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Several new declarations for objc2 nonfragile
abi messaging.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63684 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
93ba373a53451d98471a5daf2fbebe4644364e69 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Fix return type for calls to objc_setProperty.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63683 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
e4be5a66072f7c7618071284c8d2a9c6d8e691cf 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Fix return type for calls to objc_setProperty.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63683 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
4ce351b60449993bf83e234652a727b4913dec80 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Use ConvertTypeForMem when creating alloca for scalar argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63681 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
5a1be6e16ba306c349a3c3f80e9dce800976bc24 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Use ConvertTypeForMem when creating alloca for scalar argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63681 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
706059fe9f9d8725d2d969a0474b243b8b43bb8a 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add CodeGenFunction::ConvertTypeForMem forwarding function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63678 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
8b1a343b6b360d63d5dc8a6beb841ce4414c1e00 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add CodeGenFunction::ConvertTypeForMem forwarding function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63678 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
b94f56c8a1a5945786814bab522181d2317f7ff0 03-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> GNUStep fast enumeration.
Patch by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63666 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
660af749c0ad54cf8f6db611f31f0fa4115e4fd8 03-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> GNUStep fast enumeration.
Patch by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63666 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
015bc8e1e8d76a0e4150c0da1d0c294ed71a2e8e 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Initial implementation of ABI compliant parameter passing.
- Now only 27/500 failures on ABITest single argument tests; from
350/500. :)
- As with return types, a large percentage of these are likely to be
gcc bugs, not yet reviewed.

Also, fix bug in handling of Ignore ABI type in argument lists.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63654 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
59e5a0e4f1b3a6f4ddcb0e902e98d8b3c9d10799 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Initial implementation of ABI compliant parameter passing.
- Now only 27/500 failures on ABITest single argument tests; from
350/500. :)
- As with return types, a large percentage of these are likely to be
gcc bugs, not yet reviewed.

Also, fix bug in handling of Ignore ABI type in argument lists.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63654 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
33fa58181c7b29560355c9f90425a4f1134b6815 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> ABI handling: Implement coercion for argument types (in addition to
return types).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63645 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
89c9d8e7f0700d27b1d93dc3832eb1af9b92c221 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> ABI handling: Implement coercion for argument types (in addition to
return types).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63645 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
c912eb7f8d1f556ca0ce15b14416a65e5db629a7 03-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for nonfragile ivar bitfield access (objc2 nonfragile abi).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63644 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
598d3f61b6ca854e9d3c2f3359e24468502a61aa 03-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> ir-gen for nonfragile ivar bitfield access (objc2 nonfragile abi).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63644 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
f7fd8e5563ec5f2d83215defafb2f2a64bd0e50e 03-Feb-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Targets that don't have stack use global address space for parameters.
Specify external linkage for such globals so that llvm optimizer do
not assume there values initialized as zero.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63636 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.h
45206ecf708bf03b04db07c2476b9f862127a8b1 03-Feb-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Targets that don't have stack use global address space for parameters.
Specify external linkage for such globals so that llvm optimizer do
not assume there values initialized as zero.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63636 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.h
e45fbcec65e221cbd49d52f24250b6bf61b91cea 03-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Minor objc2 bug fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63635 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
07da367ca230b88d4b056dd79fefa4f10ab88b7a 03-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Minor objc2 bug fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63635 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
e840ccd0267aea7681359ca66be9615f90d49002 03-Feb-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Fixed the typo in comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63634 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
ecb6b0e2c17c47ce06da601a78820940e7c6da73 03-Feb-2009 Sanjiv Gupta <sanjiv.gupta@microchip.com> Fixed the typo in comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63634 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
749e36b50f28dfc62aca1c54cb7c3087accf149a 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Change ABIInfo to compute information for a full signature at a time
(the main point of this restructing).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63619 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
6bad2658b48264629db595f944a3fbe07f61b4e9 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Change ABIInfo to compute information for a full signature at a time
(the main point of this restructing).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63619 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
eec02620540a94d01aef8ffea5644e3dbb4c4b11 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Remove ABIArgInfo::Default kind, ABI is now responsible for specifying
acceptable kind with more precise semantics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63617 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
0bcc52114e37a8d152d9a05095ee7f7687c9aa94 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Remove ABIArgInfo::Default kind, ABI is now responsible for specifying
acceptable kind with more precise semantics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63617 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
b1a60c01a9781803ce0da958e89d0eebe68e78fd 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add ABIArgInfo::Direct kind, which passes arguments using whatever the
native IRgen type is. This is like Default, but without any extra
semantics (like automatic tweaking of structures or void).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63615 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
46327aaf031529be2cf8bb21bc76d7a5ae0d43cd 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add ABIArgInfo::Direct kind, which passes arguments using whatever the
native IRgen type is. This is like Default, but without any extra
semantics (like automatic tweaking of structures or void).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63615 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
5b7ac656e45ed3965806093826d406b3b37eb44f 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add two FIXMEs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63613 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
5251afa21d3583f2740fd4f83659d008625a7260 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add two FIXMEs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63613 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
770719935a4a7ae62553ff6c1aefc0f7114d11ef 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Always use CGFunctionInfo to access ABI information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63612 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
b225be44aaab85a603e80dbe0eb3d81638b20d23 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Always use CGFunctionInfo to access ABI information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63612 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
e92e0ab747d8ba8a0fac8836fb24f8af5179aff0 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Move ABIArgInfo into CGFunctionInfo, computed on creation.
- Still have to convert some consumers over.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63610 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
GCall.h
88c2fa96be989571b4afb6229f0ef5a3ef4450cb 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Move ABIArgInfo into CGFunctionInfo, computed on creation.
- Still have to convert some consumers over.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63610 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
GCall.h
d283e63501ada1aab319f89f88746d62d30eaec8 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Move ABIInfo/ABIArgInfo classes into ABIInfo.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63586 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
9eb5c6d3242d85359b2d669564c5e2826efb1931 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Move ABIInfo/ABIArgInfo classes into ABIInfo.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63586 91177308-0d34-0410-b5e6-96231b3b80d8
BIInfo.h
GCall.cpp
55343926932f5a2c9512c18d3ef9c2e7d2948848 03-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> objc2's ir-gen for nonfragile ivar access.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63578 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
45012a7ef5abf1042c893f3f2fa5c23cb5485ea9 03-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> objc2's ir-gen for nonfragile ivar access.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63578 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
dcf19d1e48c5b3830d205c2a800f773d6c361650 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Memoize CGFunctionInfo construction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63576 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
odeGenTypes.h
40a6be686e5d5bb4198f1affda574e8a4b3a7710 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Memoize CGFunctionInfo construction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63576 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
odeGenTypes.h
0b37ca878f1c66a42400a46fdd97ca564f3c0ff9 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Change CGFunctionInfo args iterator to not include the return type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63571 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
a0a99e02f5b2de3817706071077298ef040634fe 03-Feb-2009 Daniel Dunbar <daniel@zuster.org> Change CGFunctionInfo args iterator to not include the return type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63571 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
34bda8898659e0dd1426a4bc34179982f07f5863 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
GCall.cpp
GCall.h
GExpr.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenTypes.cpp
odeGenTypes.h
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
GCall.cpp
GCall.h
GExpr.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenTypes.cpp
odeGenTypes.h
6ee022be3d128fa822e13e38d0a288acfe5b2aeb 02-Feb-2009 Daniel Dunbar <daniel@zuster.org> More ABI API cleanup.
- Lift CGFunctionInfo creation above ReturnTypeUsesSret and
EmitFunction{Epi,Pro}log.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63553 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
88b5396b0897f28d22ae3debf4a0d97b33b6c362 02-Feb-2009 Daniel Dunbar <daniel@zuster.org> More ABI API cleanup.
- Lift CGFunctionInfo creation above ReturnTypeUsesSret and
EmitFunction{Epi,Pro}log.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63553 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
9fc15a8282fa841a3b49ccc81154958cdc0407fd 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
GCall.cpp
GCall.h
GExpr.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.h
odeGenTypes.cpp
odeGenTypes.h
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
GCall.cpp
GCall.h
GExpr.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.h
odeGenTypes.cpp
odeGenTypes.h
4337afeaf5af64e65915ccb628e22344fbb263f7 02-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Refactored code gen for ivar access in preparation for
objc2 nonfragile ivar access code gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63541 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
0bb20361a321593887f067515dd04cf109f4c74a 02-Feb-2009 Fariborz Jahanian <fjahanian@apple.com> Refactored code gen for ivar access in preparation for
objc2 nonfragile ivar access code gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63541 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
84379914617c811ecedbc8162b6b124997a17612 02-Feb-2009 Daniel Dunbar <daniel@zuster.org> Shuffle some functions around, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63538 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
275e10d62af4a129a8559253958296d8659684c9 02-Feb-2009 Daniel Dunbar <daniel@zuster.org> Shuffle some functions around, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63538 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
36b378e53ee02d6e0d28b538ae371fe572cce042 02-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63531 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
9a82b52ae83fa1c09266b2fa5f0375392f7d127f 02-Feb-2009 Daniel Dunbar <daniel@zuster.org> Add FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63531 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
c021c7fa4d1edc3690036a0be1e10fa91c445373 01-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR3447: use padded sizes for computations on struct/union
constants.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63491 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
7f5221b023bca69a3f5fdbe03934edb74a25fa18 01-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR3447: use padded sizes for computations on struct/union
constants.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63491 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
5ec32e97d867c43cbead035a8ac6f01905059ae2 31-Jan-2009 Daniel Dunbar <daniel@zuster.org> Remove unused overload of GetFunctionType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63472 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenTypes.h
36b5f5ee026b6725bff9c5b8faba635d7dfeeb7d 31-Jan-2009 Daniel Dunbar <daniel@zuster.org> Remove unused overload of GetFunctionType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63472 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenTypes.h
1c8d1ba2037dd254f2f70d32ff0910afbae48212 31-Jan-2009 Daniel Dunbar <daniel@zuster.org> Initialize CGFunctionInfo isVariadic bit correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63471 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
6f6b0367ba358e4bc921a6b7b7438d829bcb778a 31-Jan-2009 Daniel Dunbar <daniel@zuster.org> Initialize CGFunctionInfo isVariadic bit correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63471 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
2d6ecb284a3a75232d4e1ca6ed5644858d8272ce 31-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Use target alignment API to set objc2's meta-data
alignment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63470 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
09796d6a23c683413470efd19dd5ad331d91af7d 31-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Use target alignment API to set objc2's meta-data
alignment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63470 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3a1add53bc832cbfc08b992031ccce18afb2a51e 31-Jan-2009 Daniel Dunbar <daniel@zuster.org> Err, unbreak my previous "no functionality change commit", will fix properly later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63467 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
21a4f62fa4403f273e8dbb8afcaf9812a2f525c9 31-Jan-2009 Daniel Dunbar <daniel@zuster.org> Err, unbreak my previous "no functionality change commit", will fix properly later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63467 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ebbb8f3f26244f10b2d5d19310e9bc12bfca16dc 31-Jan-2009 Daniel Dunbar <daniel@zuster.org> Kill off CGCallInfo, always use CGFunctionInfo for encapsulating
function/call info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63466 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
odeGenTypes.h
725ad31086e3d6c41afa10c43db44f2e7060a961 31-Jan-2009 Daniel Dunbar <daniel@zuster.org> Kill off CGCallInfo, always use CGFunctionInfo for encapsulating
function/call info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63466 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
odeGenTypes.h
7c89159b380938f51ad45d57a910a8877be741ed 31-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> class meta-data belong to __objc_data section (in objc2
nonfragile abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63461 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
dd0db2a60b65e7eaa852b77c8b9f607640eb50b9 31-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> class meta-data belong to __objc_data section (in objc2
nonfragile abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63461 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
51dcacbb617063c16059dd5aee2e210f444cad55 31-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Recognize class's visibility attribute and set its linkage
to private extern (in objc2 nonfragile abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63460 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
cf55516a2f8db4790e4f291fd94fe9e887d2464a 31-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Recognize class's visibility attribute and set its linkage
to private extern (in objc2 nonfragile abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63460 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
64b132fe59208679076861ccfe01fd386f719033 31-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Retool classification to compute lo & hi classifications
in terms of where the type resides in the containing object. This is a
more clear embodiement of the spec & fixes a merging issue with
unions. Down to 3/1000 failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63455 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
c450357c436c05aa02ef88d406de962d98ac50be 31-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Retool classification to compute lo & hi classifications
in terms of where the type resides in the containing object. This is a
more clear embodiement of the spec & fixes a merging issue with
unions. Down to 3/1000 failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63455 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
28617a0385ed96ba2448e00c02509bda5ad74487 31-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Missed another mis-alignment of an objc2 meta-data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63453 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
fdbe11db007c20222951dae6265a1c7ab4aaeb57 31-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Missed another mis-alignment of an objc2 meta-data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63453 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f00a1fabcc958955cc6a033086d9d8340e5f28ad 31-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Setting correct alignent for objc2 meta-data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63445 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
014858b69f063cbf7b6513eebe964a9f6224970d 31-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Setting correct alignent for objc2 meta-data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63445 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
2a2dce3941b0d256678654429488a40578a01b79 30-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Fix more thinkos, straddling computation for complex was
computing in bytes not bits. We are now down to 22/1000 failures on
the return types tests, and 18 of those are gcc bugs I believe.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63438 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
cdf920ed6c610e21fc899ada93370a68c900d180 30-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Fix more thinkos, straddling computation for complex was
computing in bytes not bits. We are now down to 22/1000 failures on
the return types tests, and 18 of those are gcc bugs I believe.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63438 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
5b2f5508ef6e4015bfeca23dbc2afab786dd9137 30-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> add imag_info section and data (for objc2 nonfragile abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63430 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0f6610e41701e7d7a9b65c52e1a0926530ac3ce1 30-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> add imag_info section and data (for objc2 nonfragile abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63430 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
acf7dbdfad1d68669371f07ede8b9156902942ee 30-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Fix thinko in prev commit, 64-bit vectors should have SSE
class, not integer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63426 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
71e62a92812eeb239926a2ce6cc371d8f50aa814 30-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Fix thinko in prev commit, 64-bit vectors should have SSE
class, not integer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63426 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
11c93ddcc4cc792ba417e9034a71a28f13c982e7 30-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Generate list of implemented classes and categories in their
own sections (related to objc2 nonfragile abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63418 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f87a0ccb05eb2aa095ea835fdcdf4a0363637b28 30-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Generate list of implemented classes and categories in their
own sections (related to objc2 nonfragile abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63418 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
cdf91e8cda00dca37951a2576754dd1f516311e1 30-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Pass <1 x double> in memory. This is arguably wrong, but
matches gcc 4.2 (not llvm-gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63413 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
d4cd1b07169c698bd003be102bd73a7da7e24b25 30-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Pass <1 x double> in memory. This is arguably wrong, but
matches gcc 4.2 (not llvm-gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63413 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
5d13ab1e4493486199518a08ead6f7a9540eaaa3 30-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen. for @protocol expression in the new nonfragile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63408 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
8cfd397d5f1dfb0a0242c428f7d9cb24dceb5760 30-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Code gen. for @protocol expression in the new nonfragile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63408 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
56555956936036dbdbacc5c8c4b9edf434450826 30-Jan-2009 Daniel Dunbar <daniel@zuster.org> Remove testing -use-x86_64-abi option; current implementation is
robust enough for general use.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63406 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
11a76ed8e34901f2b997896a8c0833c6c17bc586 30-Jan-2009 Daniel Dunbar <daniel@zuster.org> Remove testing -use-x86_64-abi option; current implementation is
robust enough for general use.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63406 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
e413f53f8a42f66e526f502b2947f181deb6b8bc 30-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Split small vectors which cross an eightbyte boundary. Down to 33/500 return type failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63404 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
e33edf150adc44a34c5f6c8ed6109f6dcd2f70c6 30-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Split small vectors which cross an eightbyte boundary. Down to 33/500 return type failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63404 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
d309f572fd83b5c9a2491df960b6a2032a4e9340 30-Jan-2009 Anders Carlsson <andersca@mac.com> Make sure to cast the VLA size of array to the type of size_t. Fixes PR3442.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63394 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
6cd586d2668653501ecd73d53e81cbc76db3a18c 30-Jan-2009 Anders Carlsson <andersca@mac.com> Make sure to cast the VLA size of array to the type of size_t. Fixes PR3442.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63394 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
11dc67781e8ecf540d0387cb0f8d36fd10f9723c 30-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Implement classification for arrays.
- This brings us down to an 8% failure rate on the first 500 return
types tests (from 12%).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63383 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
8562ae74ae0ff0a64b46ef5ebea8e7ce0f76fa00 30-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Implement classification for arrays.
- This brings us down to an 8% failure rate on the first 500 return
types tests (from 12%).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63383 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
1ddb85feb64b8e8a001fa1af259f10488ce714f7 30-Jan-2009 Anders Carlsson <andersca@mac.com> Implement constant generation of ImplicitValueInitExprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63379 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
7d801eae4db97c46e47c40d431d34225ce6f6143 30-Jan-2009 Anders Carlsson <andersca@mac.com> Implement constant generation of ImplicitValueInitExprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63379 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
1aa2be92179755988388726764ebf79cc55b2be2 30-Jan-2009 Daniel Dunbar <daniel@zuster.org> Use uint64_t not unsigned for type sizes/offsets.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63352 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
e620ecdd4104285e09fe585e90f720459b80259b 30-Jan-2009 Daniel Dunbar <daniel@zuster.org> Use uint64_t not unsigned for type sizes/offsets.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63352 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
151747b43bd9d80348496f61760a0bfd6430c1e7 30-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Bug fixing involving method-list in protocol meta-data
(objc2 nonfragile-abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63351 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3819a0bf47f43fc6e496c1d0257a1658424ab6a5 30-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Bug fixing involving method-list in protocol meta-data
(objc2 nonfragile-abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63351 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7531da6de20f02b2d7db6726529fdc22de6fc0b4 30-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Random bug fix related to protocl metadata in categories in
non-fragile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63343 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
eb732131505dd9710b35e32077143962dab52cab 30-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Random bug fix related to protocl metadata in categories in
non-fragile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63343 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
fd02a66039d2e6d4e48358eac4ce6243016a1a6b 29-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Set protocol linkage and visibility correctly and
build protocol translation table meta-data (objc2
non-fragile abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63329 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
8448c2cdab6e3d4b15725921735243c77b06623d 29-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Set protocol linkage and visibility correctly and
build protocol translation table meta-data (objc2
non-fragile abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63329 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9fdddeddf7db0becc807298410fa5da31063e525 29-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Make CodeGen produce an error if we come across a non-constant initializer list that involves the GNU array-range designator extension

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63327 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprScalar.cpp
a9c878086036de36482cc21e35a33cabe9699b0a 29-Jan-2009 Douglas Gregor <dgregor@apple.com> Make CodeGen produce an error if we come across a non-constant initializer list that involves the GNU array-range designator extension

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63327 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprScalar.cpp
5fedf4fb71a3ccc97389c55934ec80ddc4d1e5c5 29-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Protocol meta-data for objc2's non-fragile abi.
Lot more to do in this area.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63326 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
da3200986d9ec2ed0920e4d84ac210c889136946 29-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Protocol meta-data for objc2's non-fragile abi.
Lot more to do in this area.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63326 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c9e012a1d1737f355ff5cf65d691ee58c4143d5a 29-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce a new expression node, ImplicitValueInitExpr, that
represents an implicit value-initialization of a subobject of a
particular type. This replaces the (ab)use of CXXZeroValueInitExpr
within initializer lists for the "holes" that occur due to the use of
C99 designated initializers.

The new test case is currently XFAIL'd, because CodeGen's
ConstExprEmitter (in lib/CodeGen/CGExprConstant.cpp) needs to be
taught to value-initialize when it sees ImplicitValueInitExprs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63317 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
3498bdb9e9cb300de74c7b51c92608e2902b2348 29-Jan-2009 Douglas Gregor <dgregor@apple.com> Introduce a new expression node, ImplicitValueInitExpr, that
represents an implicit value-initialization of a subobject of a
particular type. This replaces the (ab)use of CXXZeroValueInitExpr
within initializer lists for the "holes" that occur due to the use of
C99 designated initializers.

The new test case is currently XFAIL'd, because CodeGen's
ConstExprEmitter (in lib/CodeGen/CGExprConstant.cpp) needs to be
taught to value-initialize when it sees ImplicitValueInitExprs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63317 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
82462767a344858f1ec4913cc5a1b974bbd92af0 29-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Clean up designated initialization of unions, so that CodeGen doesn't
have to try to guess which member is being initialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63315 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
0bb76897bedb8b747efc6523efb432fc24966118 29-Jan-2009 Douglas Gregor <dgregor@apple.com> Clean up designated initialization of unions, so that CodeGen doesn't
have to try to guess which member is being initialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63315 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
6a7f8b325a30dd4516e47a759f34c072ca6f4357 29-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Handle fields / complex components which straddle
eightbyte boundaries.
- Getting harder to test now that we handle cases gcc & llvm-gcc get
wrong ( { _Complex char; _Complex int; } is a good example). :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63305 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
f04d69bbb25eb681fff1a108f13f67c6ca70cf6a 29-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Handle fields / complex components which straddle
eightbyte boundaries.
- Getting harder to test now that we handle cases gcc & llvm-gcc get
wrong ( { _Complex char; _Complex int; } is a good example). :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63305 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
9fa8de53f50b448e5d49b4f881575673938bd963 29-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Tweak merging algorithm so that we always bail early when
we see a Memory classification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63295 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
7f102f8c815a38e7df72b7d032c31529b98047f7 29-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Tweak merging algorithm so that we always bail early when
we see a Memory classification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63295 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
5c9c7f09e00142192db91f704a0ee7463e868b9a 29-Jan-2009 Daniel Dunbar <daniel@zuster.org> ABI: When emitting calls which return an ignored argument, make sure
to still return an RValue of the correct type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63294 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
cc039fea2e985214e00387ce7404d358f56cf301 29-Jan-2009 Daniel Dunbar <daniel@zuster.org> ABI: When emitting calls which return an ignored argument, make sure
to still return an RValue of the correct type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63294 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
51a2d1941e308e1d7d6727aa6a9969161850ba5d 29-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Implement classification for records.
- This is my best initial guess at what the "spec" means, although it is not
particularly clear on a number of points. Will refine through testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63292 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
99037e5a2118bc194251a8033a0885810bf61c95 29-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Implement classification for records.
- This is my best initial guess at what the "spec" means, although it is not
particularly clear on a number of points. Will refine through testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63292 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
7e8a7022ba16fb38ac94d22012682f2cda7be32b 29-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64: Support cases which map to returning multiple values in LLVM
(e.g., _Complex double -> { double, double } return).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63285 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
b0e14f2a878c1a823341d34ca8f8fe60419fb9ef 29-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64: Support cases which map to returning multiple values in LLVM
(e.g., _Complex double -> { double, double } return).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63285 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
28770fc1868b13fc09c6a6b608d3fdd77d2de91e 29-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Classify _Complex ints as integer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63283 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
eac48dc189154eea5067310c5dd257dfe07c29aa 29-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64 ABI: Classify _Complex ints as integer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63283 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
293c22db4c8325464c6d515dcbd2f35f1e40fcf1 29-Jan-2009 Daniel Dunbar <daniel@zuster.org> Fix typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63281 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
56f0d16c1159d8bc585f583cfc440298e6dbd330 29-Jan-2009 Daniel Dunbar <daniel@zuster.org> Fix typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63281 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
36dd0c55546d02d19186caf889230755776d0601 29-Jan-2009 Douglas Gregor <doug.gregor@gmail.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
GExprAgg.cpp
GExprConstant.cpp
odeGenTypes.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
GExprAgg.cpp
GExprConstant.cpp
odeGenTypes.cpp
78355ec72b458e5cb70b7f858be58375536732e0 28-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Add setter/getter methods to the list of methods
of class's meta-data (related to objc2 nonfragile abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63251 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
939abced90071beb750041ee9c2cf57f827e024a 28-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Add setter/getter methods to the list of methods
of class's meta-data (related to objc2 nonfragile abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63251 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
af781bbd294189a4120125dcbc80dc9fd10143d4 28-Jan-2009 Daniel Dunbar <daniel@zuster.org> Implement basic _Complex integer constant folding.
- Merged into single ComplexEvaluator, these share too much logic to
be worth splitting for float/int (IMHO). Will split on request.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63248 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
a5fd07bbc5e4bae542c06643da3fbfe4967a9379 28-Jan-2009 Daniel Dunbar <daniel@zuster.org> Implement basic _Complex integer constant folding.
- Merged into single ComplexEvaluator, these share too much logic to
be worth splitting for float/int (IMHO). Will split on request.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63248 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
7b709bb1531c4180b608ca045e38b96dc825ff39 28-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> property metadata for objc2's nonfragile abi



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63246 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
5de14dc87966ab98730cfacffe0b7d3198a91a62 28-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> property metadata for objc2's nonfragile abi



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63246 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f603b47aec06841368ddb1a36925c57976794c24 28-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Code generation support for C99 designated initializers.

The approach I've taken in this patch is relatively straightforward,
although the code itself is non-trivial. Essentially, as we process
an initializer list we build up a fully-explicit representation of the
initializer list, where each of the subobject initializations occurs
in order. Designators serve to "fill in" subobject initializations in
a non-linear way. The fully-explicit representation makes initializer
lists (both with and without designators) easy to grok for codegen and
later semantic analyses. We keep the syntactic form of the initializer
list linked into the AST for those clients interested in exactly what
the user wrote.

Known limitations:
- Designating a member of a union that isn't the first member may
result in bogus initialization (we warn about this)
- GNU array-range designators are not supported (we warn about this)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63242 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
4c67834407ca6ab344dcf44fc599ad4938cfa96d 28-Jan-2009 Douglas Gregor <dgregor@apple.com> Code generation support for C99 designated initializers.

The approach I've taken in this patch is relatively straightforward,
although the code itself is non-trivial. Essentially, as we process
an initializer list we build up a fully-explicit representation of the
initializer list, where each of the subobject initializations occurs
in order. Designators serve to "fill in" subobject initializations in
a non-linear way. The fully-explicit representation makes initializer
lists (both with and without designators) easy to grok for codegen and
later semantic analyses. We keep the syntactic form of the initializer
list linked into the AST for those clients interested in exactly what
the user wrote.

Known limitations:
- Designating a member of a union that isn't the first member may
result in bogus initialization (we warn about this)
- GNU array-range designators are not supported (we warn about this)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63242 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
f2a94cdd4453db963dbd5404d094ddd230b8071c 28-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Some refactoring of common code. No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63218 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
46b86c610ede6d9abdec254f39663db86c9c88e0 28-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Some refactoring of common code. No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63218 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
150f773d117c06a7eb35e64ccb626cd82a02b2ec 28-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Set visibility of ivar offset symbols according to
accessibility of the ivar (related to objc2's
non-fragile abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63166 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
2fa5a27f38b2c4abc26e86895fdcef3ec84af39d 28-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Set visibility of ivar offset symbols according to
accessibility of the ivar (related to objc2's
non-fragile abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63166 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3175ddd3b21f7a78d4d035cab3216db928ad35a5 28-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Generation of ivar-offset symbols in objc2's non-fragile abi.
Changed section names for meta-data (to match current gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63163 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1bf0afbb08a23412d1607505c092a537f305d8c7 28-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Generation of ivar-offset symbols in objc2's non-fragile abi.
Changed section names for meta-data (to match current gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63163 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
15bc9c3dc4b04500b8b0658ca98ae9678f70f691 28-Jan-2009 Nuno Lopes <nunoplopes@sapo.pt> fix PR3427: fix debuginfo for incomplete array types

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63158 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
010d5143800f6dc986f90169a694ccfec3d52038 28-Jan-2009 Nuno Lopes <nunoplopes@sapo.pt> fix PR3427: fix debuginfo for incomplete array types

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63158 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
71bcf677ba39f886a727ce562f970ee09927e7ab 27-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> After talking to our runtime guru, I added a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63141 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
07236ba8d3cf1d2aa8cd173c440f3e7dc1249fd0 27-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> After talking to our runtime guru, I added a comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63141 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
dd3a4fe10568b3eb4f0f24b9a51b4d70b87a0d5f 27-Jan-2009 Anders Carlsson <andersca@mac.com> If an input constraint refers to an output constraint, it should have the same constraint info as the output constraint. Fixes PR3417

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63127 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
03eb543cf7ebee463b33b5802b83ac92c21770cf 27-Jan-2009 Anders Carlsson <andersca@mac.com> If an input constraint refers to an output constraint, it should have the same constraint info as the output constraint. Fixes PR3417

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63127 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
3f1cc56852a88fe7b956b30c5676b97ba9dc7c00 27-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> ivar meta-data generation for nonfragile-abi.
Still more work to do in this area.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63126 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
98abf4bd3526a00a0e5cf71a9462c181f97b1c81 27-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> ivar meta-data generation for nonfragile-abi.
Still more work to do in this area.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63126 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d031ba5fbf42d44d967f56a8f723816afe863ca8 27-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Support CodeGen for __extension__ operator on aggregates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63101 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
12444a24419fe88b42a16b46106db3c11ac5cd35 27-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Support CodeGen for __extension__ operator on aggregates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63101 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
431dc38a2f2eee86f7f7b6c8bbad2b9f0685518f 27-Jan-2009 Chris Lattner <sabre@nondot.org> improvements for GNU objc runtime support, patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63092 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
e160c9b09d2f5098dfdcca99b9c6485487e0c252 27-Jan-2009 Chris Lattner <sabre@nondot.org> improvements for GNU objc runtime support, patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63092 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
cf1f3be695aac56fcf93d1cdf48223cef3cb36a5 27-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64: Classify __m64 and __m128 "correctly".
- gcc appears to be classifying <1 x double> as INTEGER which is
odd. Will investigate later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63086 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
7a6605d8be0fc30f1846657ee8133387b1b85296 27-Jan-2009 Daniel Dunbar <daniel@zuster.org> x86_64: Classify __m64 and __m128 "correctly".
- gcc appears to be classifying <1 x double> as INTEGER which is
odd. Will investigate later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63086 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
708d8a855ddfc283a787a7458d3b40508df9209d 27-Jan-2009 Daniel Dunbar <daniel@zuster.org> Implement support for coercion to wider types during ABI handling.
- Code quality is poor, but simple.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63083 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
54d1ccbfcf19ddf39444f1b4018dd79487cc847b 27-Jan-2009 Daniel Dunbar <daniel@zuster.org> Implement support for coercion to wider types during ABI handling.
- Code quality is poor, but simple.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63083 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
c6f0c213fabc68b0687fa0ab38d205be651f5f8e 27-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Added a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63071 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
528473335419f072f6eff25a4af07925c1692121 27-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Added a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63071 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
924f4ea3b58b1d79483b46637fa225730e863e14 27-Jan-2009 Daniel Dunbar <daniel@zuster.org> Pull EmitReturnBlock out of FinishFunction and catch unified return
case correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63068 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
1c1d6074f5a0296dd273362655b1b8f9057289e3 27-Jan-2009 Daniel Dunbar <daniel@zuster.org> Pull EmitReturnBlock out of FinishFunction and catch unified return
case correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63068 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
c98c87be2415fea5b2d228bb612ca9a017d11e65 26-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Build method-description-list for category meta-data
as well (for nonfragile-abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63062 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f6317dd7da4a3de06a45cba3ed9d47e6877b4cca 26-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Build method-description-list for category meta-data
as well (for nonfragile-abi).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63062 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a9502ca5b1fe2dc84726ed7783dc4f4f999fee24 26-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Method decription meta-data and its setting in class_ro_t
meta-data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63043 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
493dab7fe59303d8bb2120bc2556f355344f65bd 26-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Method decription meta-data and its setting in class_ro_t
meta-data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63043 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1358b20712f802c6cd5df8971fb9f9b0480c2aab 26-Jan-2009 Daniel Dunbar <daniel@zuster.org> Add Ignore ABIArgInfo kind, for handling void & empty structures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63039 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
11434925bf81c932c6c8fe3533bc0ba900d50dc2 26-Jan-2009 Daniel Dunbar <daniel@zuster.org> Add Ignore ABIArgInfo kind, for handling void & empty structures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63039 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
f5874e5a4e8510aa1be77300d1aec768f633fee4 26-Jan-2009 Daniel Dunbar <daniel@zuster.org> Skip emission of final return block if possible (e.g., functions with
a unified return).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63038 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
d7d6e6abff8cb25d8b1223fbc8865f8f2ff795e3 26-Jan-2009 Daniel Dunbar <daniel@zuster.org> Skip emission of final return block if possible (e.g., functions with
a unified return).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63038 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
fe49a09be83c1eaa2c76fd380de718fdc3bb000e 26-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Meta-data for nonfragile-abi's categories


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63020 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
eb062d922f10f7e649c2a18fab6c65bc169c77d5 26-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Meta-data for nonfragile-abi's categories


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63020 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
3d6b14022288e1388bd0607f44e1ba7794d06786 26-Jan-2009 Daniel Dunbar <daniel@zuster.org> Comment fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63016 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
e12d8e321016c2cc9dfad07a78a74fe2f8d7e884 26-Jan-2009 Daniel Dunbar <daniel@zuster.org> Comment fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63016 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
41eee69d29542ec999b099cfc45962345807523f 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
odeGenTypes.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
odeGenTypes.cpp
dee41127decfb12910825d42a396b25eb25ac168 25-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Rename Expr::isConstantExpr to Expr::isConstantInitializer; this more
accurately states what the function is trying to do and how it is
different from Expr::isEvaluatable. Also get rid of a parameter that is both
unused and inaccurate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62951 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprAgg.cpp
c9e8f606787b0bc0c3b08e566b87cc1751694168 25-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Rename Expr::isConstantExpr to Expr::isConstantInitializer; this more
accurately states what the function is trying to do and how it is
different from Expr::isEvaluatable. Also get rid of a parameter that is both
unused and inaccurate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62951 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprAgg.cpp
85416d09fc8bb482e637938e647eda262ce118fd 25-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Get rid of some code that should be unnecessary.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62950 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
1ef0965bbd46a2915746ffe8067d411b18117415 25-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Get rid of some code that should be unnecessary.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62950 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
67f4ac50cb22a1fffeb6ac8e7fe4f6dacdf2d317 25-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Make the constant folder aware of
__builtin___CFStringMakeConstantString. (We get into trouble in
GenerateStaticBlockVarDecl if the constant folder isn't accurate.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62949 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprConstant.cpp
3941b18b8e441c8c466efecd557de60b9a32d10b 25-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Make the constant folder aware of
__builtin___CFStringMakeConstantString. (We get into trouble in
GenerateStaticBlockVarDecl if the constant folder isn't accurate.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62949 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprConstant.cpp
f194113f17e66a9867359bb323224e8eb7a62d2f 25-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Fix the address of a label to be properly considered and emitted as a
constant.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62948 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
f01158941ba4560c63150032073bb231ce38999e 25-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Fix the address of a label to be properly considered and emitted as a
constant.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62948 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
ddd2fddeca1968b6a6546c346f2a643b85693d4b 25-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Compute instaceStart/instanceSize fields of the class_ro_t meta-data
for objc2's non-fragile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62945 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f6a077edbbfc88d63b43d43f22db93017685c130 25-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Compute instaceStart/instanceSize fields of the class_ro_t meta-data
for objc2's non-fragile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62945 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ccffea97ccb935eb6ff61085ffaa9bf6ef4815d8 24-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR2910: implement CodeGen for non-constant offsetof.

Note that there are still other issues in this area; see PR3396.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62942 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
769e411b72465a63454cdd416ff26ff313d43505 24-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR2910: implement CodeGen for non-constant offsetof.

Note that there are still other issues in this area; see PR3396.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62942 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
5a2c38f1bd4c65233fef1ecf1b34fa67a34b868e 24-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Refactor sizeof handling to use constant folding logic for constant
sizeof expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62941 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
f2da9dfef96dc11b7b5effb1d02cb427b2d71599 24-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Refactor sizeof handling to use constant folding logic for constant
sizeof expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62941 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
067264662b3203a589856e5f7c6133af54ae0e53 24-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to build class meta-data for each implementation
of class in objc2's nonfragile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62935 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
84394a50e307e2f056e270e1eeadd4f26913cd1e 24-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to build class meta-data for each implementation
of class in objc2's nonfragile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62935 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
03bff8467b4d56b0684a95a53d0ee68ea7269557 24-Jan-2009 Chris Lattner <sabre@nondot.org> remove a bunch of alignment handling code out of CGExprScalar, since
alignment must always be a constant. Just let the constant folder
do it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62933 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
91daf4da934e10dcbf22697d59e2791420b1507a 24-Jan-2009 Chris Lattner <sabre@nondot.org> remove a bunch of alignment handling code out of CGExprScalar, since
alignment must always be a constant. Just let the constant folder
do it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62933 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
8b71fa2a4ecbe6294896f8b202fe584fd91d034d 24-Jan-2009 Chris Lattner <sabre@nondot.org> remove dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62930 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
9b6f4dec090faab0a78de669c037b563ac076e0b 24-Jan-2009 Chris Lattner <sabre@nondot.org> remove dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62930 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
4c1e461962f4a297bcf3f0d9b9aeebe9fa916f5b 24-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> This patch builds the meta-class object for each
implemented class in objc2's nonfrigile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62929 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
058a1b7f9d7d3498783f7d24e73235c4ba7ee851 24-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> This patch builds the meta-class object for each
implemented class in objc2's nonfrigile abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62929 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
e09a96901961d6ad114be63da254df563b026e95 24-Jan-2009 Daniel Dunbar <daniel@zuster.org> Start filling in x86_64 ABI implementation.
- No functionality change, moved behind -use-x86_64-abi option until
it becomes non-experimental.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62915 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
6f3e7fac422fb0c50e1579edf49a797797c821cc 24-Jan-2009 Daniel Dunbar <daniel@zuster.org> Start filling in x86_64 ABI implementation.
- No functionality change, moved behind -use-x86_64-abi option until
it becomes non-experimental.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62915 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
c2a1c3ed4463b06cf3edde59ea6ecb078af93b71 24-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Some very early work for new objc's
meta-data generation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62894 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
aa23b570b059e8d29c69a656bbdc42f652f7c308 24-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Some very early work for new objc's
meta-data generation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62894 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
4fd58ab865d3f56ca2051154d0a977b31cc5e383 23-Jan-2009 Daniel Dunbar <daniel@zuster.org> Handle pointer arithmetic on function pointers.
- <rdar://problem/6518844> Clang-generated bitcode crashes LLVM while compiling function pointer addition expression


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62857 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
b09fae74acfae7af8b3d31b9638a0aa0fdf7c7ac 23-Jan-2009 Daniel Dunbar <daniel@zuster.org> Handle pointer arithmetic on function pointers.
- <rdar://problem/6518844> Clang-generated bitcode crashes LLVM while compiling function pointer addition expression


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62857 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
a88189a0c7b6cb3059bb1dcaf09d3c612fdf40b3 23-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Checked in an oops!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62853 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f31c7293ff626c8f235c62991617084a100300c4 23-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Checked in an oops!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62853 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b9459b72786f37cee6d47fa329195da60dbaf855 23-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Another missing LLVM type for objc2's new abi defined.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62852 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
45c2ba0c13f353a8bab6cc01b30b3a13f3404c1e 23-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Another missing LLVM type for objc2's new abi defined.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62852 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
781f273fd5df3efbe8c20a9bb46b7e4133bab334 23-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Define LLVM types for nonfragile abi metadata.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62830 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d55b6fc5f3304e97621b4d5a2d9376ad63d74179 23-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Define LLVM types for nonfragile abi metadata.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62830 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d03748117b5ed1b627e6cc5095ab509a722671ec 23-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Use NonFragileABI as name of new Next abi. More comments
for the new meta-data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62806 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
30bc57187be7535c57ef1ca8ff3e765653e94332 23-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Use NonFragileABI as name of new Next abi. More comments
for the new meta-data.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62806 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
4b16170796ef7adfa2a653719dc4c8410b1ca574 22-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> More refactoring of common API to the common class for
the two Next's objc runtimes. More comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62735 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
db2868616b966c96a5014e58892c27cea377477c 22-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> More refactoring of common API to the common class for
the two Next's objc runtimes. More comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62735 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
67bb1fad419799836689232f8e7c15e2f78b2361 22-Jan-2009 Daniel Dunbar <daniel@zuster.org> Allow creation of "dummy" compile units for debug information.
- Although gross, this is needed currently to ensure that we produce
well formed debug information (to match pace with the assertions
being added to DebugInfo in LLVM).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62734 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
831570cc6f01ce04bb8e1d3a03944e5d864e5cdd 22-Jan-2009 Daniel Dunbar <daniel@zuster.org> Allow creation of "dummy" compile units for debug information.
- Although gross, this is needed currently to ensure that we produce
well formed debug information (to match pace with the assertions
being added to DebugInfo in LLVM).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62734 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
32b5ea2be5112f468775f1aa0f3ffa731af9aa0f 22-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Moved whole bunch of common APIs to the common class.
No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62729 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
56210f780b3d7e6533b3dd968ad9ba007cdbe7b4 22-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Moved whole bunch of common APIs to the common class.
No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62729 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
48543f59f28dafeff95a33e17539fc7936ee0334 21-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Refactoring ObjC Next's runtime classes in preparation for
the new ObjC's abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62721 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
ee0af74d1e0990c7b66d32657f3e4e54b8691552 21-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Refactoring ObjC Next's runtime classes in preparation for
the new ObjC's abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62721 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
4173b84f576ea2ceb64bfaf65f85a32d5fb713aa 21-Jan-2009 Chris Lattner <sabre@nondot.org> revert the gnu objc patches, they regress codegen-gnu.m


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62708 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
60ae0f1a47788ab1e8233a5a4411a58cee9ea918 21-Jan-2009 Chris Lattner <sabre@nondot.org> revert the gnu objc patches, they regress codegen-gnu.m


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62708 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
d72ad58c89779ae6807a7df7ed206c356ba5a6f4 21-Jan-2009 Chris Lattner <sabre@nondot.org> switch from getTypeAtIndex to getElementType. It is non-virtual
and more idiomatic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62705 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
3f33e0afa9ba35e5398a552a5a4fec42ff2aee52 21-Jan-2009 Chris Lattner <sabre@nondot.org> switch from getTypeAtIndex to getElementType. It is non-virtual
and more idiomatic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62705 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
3d9dcdd79b1b0e6879e0f8c35db6e0d13fdbf277 21-Jan-2009 Chris Lattner <sabre@nondot.org> Fix objc type conversion issues with the GNU runtime, patch by
David Chisnall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62703 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
2fe9e9a4909c03a4316adb5bd16bcc4c13cac632 21-Jan-2009 Chris Lattner <sabre@nondot.org> Fix objc type conversion issues with the GNU runtime, patch by
David Chisnall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62703 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
64e8d33246358a10fca9881ef7f678d7914d0c1a 21-Jan-2009 Chris Lattner <sabre@nondot.org> silence a couple unused variable 'result' warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62674 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
53637654287a2658fa0c9f67b305795743720936 21-Jan-2009 Chris Lattner <sabre@nondot.org> silence a couple unused variable 'result' warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62674 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
b5048aa79dcb46eb80c8c517d5c9b0774c91a274 21-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Commented objective-c's metadata types. Minor clean up.
No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62646 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
10a4231e73017e70231acebd55de2d2e48930a91 21-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Commented objective-c's metadata types. Minor clean up.
No change in functionality.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62646 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
8f5e878a8087bf8d8621f5791b7c4c5b090f7056 20-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Slight cleanup, and fix for va_arg on architectures where va_list is a
struct.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62585 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
4fd0aa5803357d8c72eeac2cae15e12649ea08fe 20-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Slight cleanup, and fix for va_arg on architectures where va_list is a
struct.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62585 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
0bb53b8f92fdf88e0567018f7950322850c4aca8 20-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Do codegen correctly for va_start/end/copy on architectures where
va_list is a struct, like x86-64.

If anyone has a better idea for how to do the check in the if
statements, suggestions are welcome.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62582 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
c96c0511501190b631664ca556c0bf85537095d3 20-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Do codegen correctly for va_start/end/copy on architectures where
va_list is a struct, like x86-64.

If anyone has a better idea for how to do the check in the if
statements, suggestions are welcome.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62582 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
1d411123bee0cc2e08394f32a24c986a93424e65 20-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR3350: add special-casing for "references" to va_lists in
builtins.

Also, a minor tweak to va_copy for consistency.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62574 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
6597f985156b3a24c0a9db1e01eeec85714c4a8d 20-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR3350: add special-casing for "references" to va_lists in
builtins.

Also, a minor tweak to va_copy for consistency.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62574 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
af8ad2b4dcc1d03fec720ab2c20d9eaf4754e496 20-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Remove ScopedDecl, collapsing all of its functionality into Decl, so
that every declaration lives inside a DeclContext.

Moved several things that don't have names but were ScopedDecls (and,
therefore, NamedDecls) to inherit from Decl rather than NamedDecl,
including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't
store empty DeclarationNames for these things, nor do we try to insert
them into DeclContext's lookup structure.

The serialization tests are temporarily disabled. We'll re-enable them
once we've sorted out the remaining ownership/serialiazation issues
between DeclContexts and TranslationUnion, DeclGroups, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62562 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
oduleBuilder.cpp
4afa39deaa245592977136d367251ee2c173dd8d 20-Jan-2009 Douglas Gregor <dgregor@apple.com> Remove ScopedDecl, collapsing all of its functionality into Decl, so
that every declaration lives inside a DeclContext.

Moved several things that don't have names but were ScopedDecls (and,
therefore, NamedDecls) to inherit from Decl rather than NamedDecl,
including ObjCImplementationDecl and LinkageSpecDecl. Now, we don't
store empty DeclarationNames for these things, nor do we try to insert
them into DeclContext's lookup structure.

The serialization tests are temporarily disabled. We'll re-enable them
once we've sorted out the remaining ownership/serialiazation issues
between DeclContexts and TranslationUnion, DeclGroups, etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62562 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
oduleBuilder.cpp
e426ed0e6ca6e93bc88f3197fb35361b5ef587fe 20-Jan-2009 Daniel Dunbar <daniel@zuster.org> Update for new SourceLocation API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62556 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f4f6f219423a67a969de7b3e0c28bcefdb3c0a10 20-Jan-2009 Daniel Dunbar <daniel@zuster.org> Update for new SourceLocation API.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62556 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
1737bd5b2ae87c2fe2d50868c2158f7f91516cf4 19-Jan-2009 Chris Lattner <sabre@nondot.org> Rename SourceManager::getCanonicalFileID -> getFileID. There is
no longer such thing as a non-canonical FileID.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62499 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a11d61793341fea195c29a0dab3fbd74f2b39a8c 19-Jan-2009 Chris Lattner <sabre@nondot.org> Rename SourceManager::getCanonicalFileID -> getFileID. There is
no longer such thing as a non-canonical FileID.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62499 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9b94e1bc3596363efdc356e70648efb92048f6ef 19-Jan-2009 Chris Lattner <sabre@nondot.org> remove the SourceManager:: and FullSourceLoc::getFileEntryForLoc methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62496 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
b21e5a0fdd9bd6e6c6885428798070f0a9f71295 19-Jan-2009 Chris Lattner <sabre@nondot.org> remove the SourceManager:: and FullSourceLoc::getFileEntryForLoc methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62496 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
7903d050d7f22e2a75cc950f30d0cc3df0c6b101 18-Jan-2009 Nate Begeman <natebegeman@mac.com> Vector codegen improvements


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62458 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprScalar.cpp
6fe7c8aa8c7546743ecd0ac0138c2cf5d8155386 18-Jan-2009 Nate Begeman <natebegeman@mac.com> Vector codegen improvements


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62458 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprScalar.cpp
9363d795fd5998c0ce9459ced76475528dadd646 18-Jan-2009 Anders Carlsson <andersca@mac.com> CG support for inline asm constraints with symbolic names. Fixes PR3345

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62444 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
300fb5d0ef7edc87f3fdba17fc8b1184013b35ae 18-Jan-2009 Anders Carlsson <andersca@mac.com> CG support for inline asm constraints with symbolic names. Fixes PR3345

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62444 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
b5c856952c206e629257552bc453cfa3975eb800 18-Jan-2009 Anders Carlsson <andersca@mac.com> Add sema support for symbolic names in inline asm statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62441 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
42e1ee0702d8267d632df0fdb5c479a582877c6f 18-Jan-2009 Anders Carlsson <andersca@mac.com> Add sema support for symbolic names in inline asm statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62441 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
c45d4e8bd9e99916f106b901a74f3c56c71b6c50 18-Jan-2009 Nate Begeman <natebegeman@mac.com> Add support for vectors to APValue. Vector constant evaluator and tests coming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62438 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
3d309f9d62a6f9f634b869937139d533ccd7265b 18-Jan-2009 Nate Begeman <natebegeman@mac.com> Add support for vectors to APValue. Vector constant evaluator and tests coming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62438 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
7b49cec50220b69d83616aea2d5da3ce049611a0 18-Jan-2009 Anders Carlsson <andersca@mac.com> Change TargetInfo::validateInputConstraint to take begin/end name iterators instead of the number of outputs. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62433 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
45b050e72d058131e6f169fe54888bb91a003fb5 18-Jan-2009 Anders Carlsson <andersca@mac.com> Change TargetInfo::validateInputConstraint to take begin/end name iterators instead of the number of outputs. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62433 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
c314a49bcf9be9fff8284caf1551898531cd2c6f 17-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to re-implement ivar-list meta-data generation to fix
cases of unnamed ivar bitfields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62429 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f54b19497cb832da78700a6c86473231f35fba65 17-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to re-implement ivar-list meta-data generation to fix
cases of unnamed ivar bitfields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62429 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1a835327238044220148b5b2a0a6050420e88d62 17-Jan-2009 Nuno Lopes <nunoplopes@sapo.pt> add support for usage of cast to union thing with static vars

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62387 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
81e51e2c5bf1e4edc3b70040e2083fa83d314e40 17-Jan-2009 Nuno Lopes <nunoplopes@sapo.pt> add support for usage of cast to union thing with static vars

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62387 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
8a00a8d2cb99b210084574c9862eec65d0209e0e 16-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Changed the API yet again.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62335 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1522bc80df0a10517bc667c733a918f88dea0b89 16-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Changed the API yet again.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62335 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
af29ebc74d284167f18719f6bd8cdd64170a32a3 16-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Used a more suitable api to get to the type of a record
in code gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62326 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
ab654afb2d49a9a7db2727b69708ac479728f2a1 16-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Used a more suitable api to get to the type of a record
in code gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62326 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
18c8dc0eedcdf7c81028c1e29d001fd331a99a4c 16-Jan-2009 Chris Lattner <sabre@nondot.org> more SourceLocation lexicon change: instead of referring to the
"logical" location, refer to the "instantiation" location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62316 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDecl.cpp
odeGenModule.cpp
f7cf85b330bedd2877e1371fb0a83e99751ae162 16-Jan-2009 Chris Lattner <sabre@nondot.org> more SourceLocation lexicon change: instead of referring to the
"logical" location, refer to the "instantiation" location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62316 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDecl.cpp
odeGenModule.cpp
b5b06b2eca2f5abb2202e400db4bd95a4ce4cd77 16-Jan-2009 Daniel Dunbar <daniel@zuster.org> Attempt to unbreak Windows build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62295 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
f479cea608dae347bc06c7a7279ab54fe34d47f6 16-Jan-2009 Daniel Dunbar <daniel@zuster.org> Attempt to unbreak Windows build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62295 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
56b6a1ea09e8bc22dc81610c3c8f3ecbad3ec37c 16-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Implemented code gen for sizeof(objc class interface).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62289 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
db751ebd3330bc9a64ce4d9d8f24e30669d91406 16-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Implemented code gen for sizeof(objc class interface).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62289 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
dff17917398ac8f3331cd70bb9fc48cf9a766458 15-Jan-2009 Nuno Lopes <nunoplopes@sapo.pt> add codegen support to union casts
init of static vars still not working. I'll get back to it tomorrow or so


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62278 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
7e91627301b05cd8f2324795e19d87a62f444c31 15-Jan-2009 Nuno Lopes <nunoplopes@sapo.pt> add codegen support to union casts
init of static vars still not working. I'll get back to it tomorrow or so


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62278 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
ddebecaa80b74dfd595f99627a45259cf54d6769 15-Jan-2009 Daniel Dunbar <daniel@zuster.org> Fix some unused variable, control reaches end of non-void function,
and uninitialized use options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62270 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
f185319f25efd6094870f287030270fad26085ba 15-Jan-2009 Daniel Dunbar <daniel@zuster.org> Fix some unused variable, control reaches end of non-void function,
and uninitialized use options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62270 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
b6d5c444ee4d881cd40b01b02b08f3030a23fd4e 15-Jan-2009 Daniel Dunbar <daniel@zuster.org> Add dummy X86_64 ABIInfo implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62268 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
d4edfe4746c66d2ac452c8a8d7cac17192283e75 15-Jan-2009 Daniel Dunbar <daniel@zuster.org> Add dummy X86_64 ABIInfo implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62268 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
3a80fc023e0699cf008ad54511a48d69d515300d 13-Jan-2009 Daniel Dunbar <daniel@zuster.org> Bug fix, __private_extern__ globals were always introducing a definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62139 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
49988884c1da4b2200bfe2298a1e41b3f044e8d4 13-Jan-2009 Daniel Dunbar <daniel@zuster.org> Bug fix, __private_extern__ globals were always introducing a definition.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62139 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4e88165c14ecfe4581e8215382b655dfe718910f 13-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to implement code gen for aggrgate-valued property used
to access a field of its type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62123 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
35c33293efae24750bccdb88798361c59618d97e 13-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Patch to implement code gen for aggrgate-valued property used
to access a field of its type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62123 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
03b2ad28d67ed14e2203eb1e92ce042f63182bcd 13-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Cleanup DeclContext::addDecl and DeclContext::insert interface, from Piotr Rak

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62122 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
482b77d1cb4ca08391d1f749436f092a4cc24427 13-Jan-2009 Douglas Gregor <dgregor@apple.com> Cleanup DeclContext::addDecl and DeclContext::insert interface, from Piotr Rak

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62122 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d8439f20a2e2c3c988c8a9866fa0ef86b06d68fc 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
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenTypes.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
GExprConstant.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenTypes.cpp
fc12cfe1bffa4847d032bb2179b82e1e125bd908 12-Jan-2009 Anders Carlsson <andersca@mac.com> Handle multi-value inputs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62069 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
ebaae2a3103b443d50444d335ab5ab0ff7680da2 12-Jan-2009 Anders Carlsson <andersca@mac.com> Handle multi-value inputs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62069 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
9257700370b2bf9ddba666c472a2ffe8bd376f77 12-Jan-2009 Nuno Lopes <nunoplopes@sapo.pt> make ScalarExprEmitter::EmitCompare() emit the expression with the correct type instead of always zext it to an int
this fixes codegen of simple exprs in C++ like 'if (x != 0)'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62060 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
32f6209ea9a5a88ad3f8d7ad5e5b160b403d12da 12-Jan-2009 Nuno Lopes <nunoplopes@sapo.pt> make ScalarExprEmitter::EmitCompare() emit the expression with the correct type instead of always zext it to an int
this fixes codegen of simple exprs in C++ like 'if (x != 0)'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62060 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
7ff605767dbeaa2d5127e572c16b6e98baf6360f 11-Jan-2009 Anders Carlsson <andersca@mac.com> More inline asm fixes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62049 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
9f2505b934745b18d580ade4dac7b8b16952a30c 11-Jan-2009 Anders Carlsson <andersca@mac.com> More inline asm fixes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62049 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
c180e8e3e6648583e5ca21262781c69a6f42d3e6 11-Jan-2009 Anders Carlsson <andersca@mac.com> Handle readwrite constraints correctly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62043 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
2763b3af0a527c3a63cb058b90c22db0b7bcf558 11-Jan-2009 Anders Carlsson <andersca@mac.com> Handle readwrite constraints correctly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62043 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
60bb4d49476d331c83e8f7937770a438642db878 11-Jan-2009 Anders Carlsson <andersca@mac.com> Forgot to commit this

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62042 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
c8c7b187adcd989e01a9fba1ebead6c2abd770c9 11-Jan-2009 Anders Carlsson <andersca@mac.com> Forgot to commit this

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62042 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
054f996051c441b3f5984dbdf735ba2e773b579d 11-Jan-2009 Anders Carlsson <andersca@mac.com> Use a common function for emitting asm inputs and remove a FIXME

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62041 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
634717238844cf3f51039411be1b27fe1fac622e 11-Jan-2009 Anders Carlsson <andersca@mac.com> Use a common function for emitting asm inputs and remove a FIXME

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62041 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
dcf1e8426517ad33f1f849708ae5c95d4040e4a7 11-Jan-2009 Steve Naroff <snaroff@apple.com> Convert property implementation to DeclContext::addDecl().
This completes the ObjCContainerDecl AST cleanup (for now).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62037 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
93983f8fa120330bf212bfde7e65da2709fb3be8 11-Jan-2009 Steve Naroff <snaroff@apple.com> Convert property implementation to DeclContext::addDecl().
This completes the ObjCContainerDecl AST cleanup (for now).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62037 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9336dbdb042c234ae50c563145301af36d3c4217 10-Jan-2009 Steve Naroff <snaroff@apple.com> Fix a misleading comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62031 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
489034cf8bde09360e0089f401b2929597b125d8 10-Jan-2009 Steve Naroff <snaroff@apple.com> Fix a misleading comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62031 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
0adaa8a0cfbc2e54fe7845d67eb59e214438fda1 10-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> This patch fixes the code gen failures which was a fallout from
not merging protocol properties into the classes which
use those protocols. With this patch, all my exceutable
test pass again.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62030 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
679a502d462ef819e6175b58e255ca3f3391e7cf 10-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> This patch fixes the code gen failures which was a fallout from
not merging protocol properties into the classes which
use those protocols. With this patch, all my exceutable
test pass again.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62030 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
17660d9160743444ffaec4819f24054e2709fc5e 10-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> assert if attempting to code gen. a property setter/getter
coming from a protocol.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62017 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
57966fc0077ed462f1ddc0011fe4762ca9942b8f 10-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> assert if attempting to code gen. a property setter/getter
coming from a protocol.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62017 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
79f36c924901a507fe6c9eaff402954e56f49250 09-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Prevent a segfault for vaarg expressions on unsupported architectures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62008 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
0262f02cbaa35cafb61b1b994e0adff7c422a235 09-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Prevent a segfault for vaarg expressions on unsupported architectures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62008 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
8cb73401f18e552e27dc1eef75bce7d78f6bcd62 09-Jan-2009 Daniel Dunbar <daniel@zuster.org> Implement EmitUnsupportedRValue to generate an appropriately typed RValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62004 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
8fa73ed04dfad53696813cbd68058478d6c0becf 09-Jan-2009 Daniel Dunbar <daniel@zuster.org> Implement EmitUnsupportedRValue to generate an appropriately typed RValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62004 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
5d7648449392dccee2deb7920c2e5facbe1a63f5 09-Jan-2009 Douglas Gregor <doug.gregor@gmail.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
GCXX.cpp
GCall.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenTypes.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
GCXX.cpp
GCall.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenTypes.cpp
bf5eb6c5a1b585fa8df37f7dde653b18401d0cb1 09-Jan-2009 Daniel Dunbar <daniel@zuster.org> Emit more refined "unsupported" error for block expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61993 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
088a52d8a94666f0264b656e05921b9c5b091f28 09-Jan-2009 Daniel Dunbar <daniel@zuster.org> Emit more refined "unsupported" error for block expressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61993 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
e3a6a688dd1305a4d9de0a7662c4c540e19823a2 09-Jan-2009 Daniel Dunbar <daniel@zuster.org> Give "unsupported" error on calls through block pointers instead of
crashes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61992 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
ce1d38b8163650e473d7084e0686ed5a7956057b 09-Jan-2009 Daniel Dunbar <daniel@zuster.org> Give "unsupported" error on calls through block pointers instead of
crashes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61992 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
451f83c3d689753abb1d7393816951b96d39bbb1 09-Jan-2009 Steve Naroff <snaroff@apple.com> Move property API's up to ObjCContainerDecl (removing a lot of duplicate code).
Add isa/cast/dyncast support for ObjCContainerDecl.
Renamed classprop_iterator/begin/end to prop_iterator/begin/end (the class prefix was confusing).
More simplifications to Sema::ActOnAtEnd()...
Added/changed some FIXME's as a result of the above work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61988 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
09c4719788a5cea09897525e528fa00420f1677b 09-Jan-2009 Steve Naroff <snaroff@apple.com> Move property API's up to ObjCContainerDecl (removing a lot of duplicate code).
Add isa/cast/dyncast support for ObjCContainerDecl.
Renamed classprop_iterator/begin/end to prop_iterator/begin/end (the class prefix was confusing).
More simplifications to Sema::ActOnAtEnd()...
Added/changed some FIXME's as a result of the above work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61988 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1298691cc51c9e357dc59739395e90c65f4cada3 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
odeGenTypes.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
odeGenTypes.cpp
96891245e56c4817e47e171b8b70aee77f45c8f8 09-Jan-2009 Daniel Dunbar <daniel@zuster.org> Block pointer types are not aggregate types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61973 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
a782ca76cc7dfdd69e331a4fa722fc23b18d5c34 09-Jan-2009 Daniel Dunbar <daniel@zuster.org> Block pointer types are not aggregate types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61973 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
438be771a8e7336d5e143d91debb419764cde8ef 08-Jan-2009 Steve Naroff <snaroff@apple.com> Remove redundant method context (now that ObjCMethodDecl isa ScopedDecl).
Convert clients to use the standard getDeclContext() API.

Doug, thanks for the review!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61935 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
3e0a540b6d846178857289ec0eb8470a278d11a3 08-Jan-2009 Steve Naroff <snaroff@apple.com> Remove redundant method context (now that ObjCMethodDecl isa ScopedDecl).
Convert clients to use the standard getDeclContext() API.

Doug, thanks for the review!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61935 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
ab63fd6f3dccb110f78f132fa81321bbd4a61b70 08-Jan-2009 Steve Naroff <snaroff@apple.com> This is a large/messy diff that unifies the ObjC AST's with DeclContext.

- ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts.
- ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext).
- ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-)
- Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective.
- Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch().
- Simplified Sema::ActOnAtEnd() considerably. Still more work to do.
- Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl.
- Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl.

This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61929 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
0701bbb228dfd87e1fe82a0a4b7b9facfecb43da 08-Jan-2009 Steve Naroff <snaroff@apple.com> This is a large/messy diff that unifies the ObjC AST's with DeclContext.

- ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts.
- ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext).
- ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-)
- Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective.
- Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch().
- Simplified Sema::ActOnAtEnd() considerably. Still more work to do.
- Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl.
- Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl.

This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61929 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
2ac4cd357dbaa659d3f8d3730251865cc1903efa 08-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Objc's compatibility-alias semantics and code
gen issue fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61901 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
305c658ebce84bb9833fc0e7675554656453b8e8 08-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Objc's compatibility-alias semantics and code
gen issue fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61901 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5fe09f7cd6efc8daf8d5b74e9533d39a77868e06 07-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Another nasty code gen. bug with trivial fix. Calling class
method on 'super' receiver in a category implementation.
Other simpler cases were working by accident.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61880 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b0d27943e133f099a39abc26a49d1130b5a8f5af 07-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Another nasty code gen. bug with trivial fix. Calling class
method on 'super' receiver in a category implementation.
Other simpler cases were working by accident.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61880 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6296cdab9cfb1e79535d461f237c85b026eaee7d 06-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Couple of code gen. fixes in ObjC's colection-statement. Hard
to track down, easy to fix. This is on going.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61817 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
f0906c4edb37b20141428ca77fa7dfd00b976eaf 06-Jan-2009 Fariborz Jahanian <fjahanian@apple.com> Couple of code gen. fixes in ObjC's colection-statement. Hard
to track down, easy to fix. This is on going.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61817 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
566782aea6d9805c4f703f8101f2dc452cf7286a 06-Jan-2009 Douglas Gregor <doug.gregor@gmail.com> Add QualifiedDeclRefExpr, which retains additional source-location
information for declarations that were referenced via a qualified-id,
e.g., N::C::value. We keep track of the location of the start of the
nested-name-specifier. Note that the difference between
QualifiedDeclRefExpr and DeclRefExpr does have an effect on the
semantics of function calls in two ways:
1) The use of a qualified-id instead of an unqualified-id suppresses
argument-dependent lookup
2) If the name refers to a virtual function, the qualified-id
version will call the function determined statically while the
unqualified-id version will call the function determined dynamically
(by looking up the appropriate function in the vtable).

Neither of these features is implemented yet, but we do print out
qualified names for QualifiedDeclRefExprs as part of the AST printing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61789 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
1a49af9681c350fef58e677f85ccb9a77e8e9d0a 06-Jan-2009 Douglas Gregor <dgregor@apple.com> Add QualifiedDeclRefExpr, which retains additional source-location
information for declarations that were referenced via a qualified-id,
e.g., N::C::value. We keep track of the location of the start of the
nested-name-specifier. Note that the difference between
QualifiedDeclRefExpr and DeclRefExpr does have an effect on the
semantics of function calls in two ways:
1) The use of a qualified-id instead of an unqualified-id suppresses
argument-dependent lookup
2) If the name refers to a virtual function, the qualified-id
version will call the function determined statically while the
unqualified-id version will call the function determined dynamically
(by looking up the appropriate function in the vtable).

Neither of these features is implemented yet, but we do print out
qualified names for QualifiedDeclRefExprs as part of the AST printing.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61789 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
e299eb49c2a830e91593e3faac87753e8952f0db 05-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Silence a GCC warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61747 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
3ef5db646a6f66bb23146c3e506c294f31adf018 05-Jan-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Silence a GCC warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61747 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
86b360eafe71e81800a6de89088113ac72e55031 05-Jan-2009 Anders Carlsson <andersca@mac.com> Generate debug info for VLA types

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61661 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
835c909696ecd1e1f128297089d1def8d1a6f7cd 05-Jan-2009 Anders Carlsson <andersca@mac.com> Generate debug info for VLA types

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61661 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2e427d56b2e58a0c6fedec007185a99c58e41b2a 04-Jan-2009 Anders Carlsson <andersca@mac.com> Fix the bug that would cause Python to crash at startup.

When emitting the static variables we need to make sure that the order is preserved.
Fix this by making StaticDecls a std::list which has O(1) random removal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61621 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
b723f7520bcce5f13ccaae557c16a1e7133b6908 04-Jan-2009 Anders Carlsson <andersca@mac.com> Fix the bug that would cause Python to crash at startup.

When emitting the static variables we need to make sure that the order is preserved.
Fix this by making StaticDecls a std::list which has O(1) random removal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61621 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
b27a8700761e1c1f955fc5cc3663289179c9e4d2 26-Dec-2008 Anton Korobeynikov <asl@math.spbu.ru> Add full dllimport / dllexport support: both sema checks and codegen.
Patch by Ilya Okonsky

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61437 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2f402708e62f89fb875442802e3d3f20fc909d33 26-Dec-2008 Anton Korobeynikov <asl@math.spbu.ru> Add full dllimport / dllexport support: both sema checks and codegen.
Patch by Ilya Okonsky

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61437 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b557d37cf6fd2c6b0ac0911196b0ddc845fbf6f4 22-Dec-2008 Anders Carlsson <andersca@mac.com> Generate code for __builtin_ia32_pshufw

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61324 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
4ee51b464fb0d452fb2a996dd2e86203eb70b0d7 22-Dec-2008 Anders Carlsson <andersca@mac.com> Generate code for __builtin_ia32_pshufw

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61324 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
774f9c7765d2c33aa662e1c9691357dc8b4e4006 21-Dec-2008 Anders Carlsson <andersca@mac.com> Add codegen support for __null

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61314 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
3f70456b8adb0405ef2a47d51f9fc2d5937ae8ae 21-Dec-2008 Anders Carlsson <andersca@mac.com> Add codegen support for __null

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61314 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1c48819bce6d483ffb36ca420b92d9db57e9bb16 21-Dec-2008 Anders Carlsson <andersca@mac.com> Implement alignof for vla types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61305 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
4a1424fd702299fbc354899b8c65bdf8491d8fe9 21-Dec-2008 Anders Carlsson <andersca@mac.com> Implement alignof for vla types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61305 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
76d19c8cce8b1b664a6e95bbf33e328227945fff 21-Dec-2008 Anders Carlsson <andersca@mac.com> Add ASTContext::getBaseElementType and use it in CodeGenFunction::EmitArraySubscriptExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61303 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
6183a99b064b397d98297904fbd6cf00fe1f453d 21-Dec-2008 Anders Carlsson <andersca@mac.com> Add ASTContext::getBaseElementType and use it in CodeGenFunction::EmitArraySubscriptExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61303 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
6cb99b7ed140cd2be2137ed73c24c2ab44ca5aae 21-Dec-2008 Anders Carlsson <andersca@mac.com> Make sure to emit the size expression for sizeof(type)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61301 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
b50525ba0e996bc072cdb76152fcfe0bc64bb72a 21-Dec-2008 Anders Carlsson <andersca@mac.com> Make sure to emit the size expression for sizeof(type)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61301 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
d5e9d1e0d8f8d8f4e2f8e02710f48301010c6a58 21-Dec-2008 Eli Friedman <eli.friedman@gmail.com> Fix for PR3246: an empty clobber list is the empty string, not a null
string.

That said, we should probably try and track down the correct clobber
lists for the targets that don't have them (PPC, ARM, and Sparc),
so that we can generate correct code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61298 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
ccf614c479ac93326a01e7b373b30759eed7807f 21-Dec-2008 Eli Friedman <eli.friedman@gmail.com> Fix for PR3246: an empty clobber list is the empty string, not a null
string.

That said, we should probably try and track down the correct clobber
lists for the targets that don't have them (PPC, ARM, and Sparc),
so that we can generate correct code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61298 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
3bb57e845cf801eec463777d796d1a3d0d75e266 21-Dec-2008 Anders Carlsson <andersca@mac.com> Handle VLA indexing

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61295 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
8b33c087fc6d97064b6620c96c732ebc5c003fb2 21-Dec-2008 Anders Carlsson <andersca@mac.com> Handle VLA indexing

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61295 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
82d44776fc817d80b1985d9d8e86453d4f15995c 21-Dec-2008 Douglas Gregor <doug.gregor@gmail.com> Add support for member references (E1.E2, E1->E2) with C++ semantics,
which can refer to static data members, enumerators, and member
functions as well as to non-static data members.

Implement correct lvalue computation for member references in C++.
Compute the result type of non-static data members of reference type properly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61294 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
86f194083504938df72135b5b66bf0c5cafd9498 21-Dec-2008 Douglas Gregor <dgregor@apple.com> Add support for member references (E1.E2, E1->E2) with C++ semantics,
which can refer to static data members, enumerators, and member
functions as well as to non-static data members.

Implement correct lvalue computation for member references in C++.
Compute the result type of non-static data members of reference type properly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61294 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
a97dc01ff6ff87366655527a3c21b31d47288659 21-Dec-2008 Eli Friedman <eli.friedman@gmail.com> Extend the unsupported error to include break and continue, and fix a
warning by using an unsigned index.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61292 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
20c802bf305ea44eb36b6fc6ef3c16a0bfca9b66 21-Dec-2008 Eli Friedman <eli.friedman@gmail.com> Extend the unsupported error to include break and continue, and fix a
warning by using an unsigned index.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61292 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
8fef47ecac8d6b726601e699b5e3681268322de9 21-Dec-2008 Eli Friedman <eli.friedman@gmail.com> Make VLAs usable, and make basic usage work correctly. Also, add a
simple test that actually does VLA codegen.

Note that despite the fact that the alloca isn't in the entry block, it
should dominate all uses; this is guaranteed by the restrictions on goto
into VLA scope in C99.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61291 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprScalar.cpp
8f39f5e96ce4a5f401f431f61db7df1cf05dce6f 21-Dec-2008 Eli Friedman <eli.friedman@gmail.com> Make VLAs usable, and make basic usage work correctly. Also, add a
simple test that actually does VLA codegen.

Note that despite the fact that the alloca isn't in the entry block, it
should dominate all uses; this is guaranteed by the restrictions on goto
into VLA scope in C99.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61291 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprScalar.cpp
ef2f7dfdda4b609c0ef9fe692ce3c0ad5de81490 20-Dec-2008 Anders Carlsson <andersca@mac.com> Handle typedefs to VLAs (Emit the size expr when we encounter the typedef

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61290 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.cpp
fcdbb93749ed69aa9022437052c390522355ec3d 20-Dec-2008 Anders Carlsson <andersca@mac.com> Handle typedefs to VLAs (Emit the size expr when we encounter the typedef

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61290 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.cpp
bdb0f921113d58b3f4a6e84356ad637e5b0ba933 20-Dec-2008 Anders Carlsson <andersca@mac.com> Check the entire StackSaveValues stack for VLAs when dealing with goto and return statements. Noticed by Eli Friedman.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61289 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
7e63b8527fa0b065802fc6cb8cb6124d7c23c4a2 20-Dec-2008 Anders Carlsson <andersca@mac.com> Check the entire StackSaveValues stack for VLAs when dealing with goto and return statements. Noticed by Eli Friedman.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61289 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
21cecd439c48ffeb203eedd0b76b3807bb72764d 20-Dec-2008 Anders Carlsson <andersca@mac.com> Make sure to generate code for arguments that have a variably modified type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61288 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
751358ff73b155f5384e151e1d18aa3f6e7b061c 20-Dec-2008 Anders Carlsson <andersca@mac.com> Make sure to generate code for arguments that have a variably modified type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61288 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
d976761070f3bda153c60b81f0d3438cd8fd39c3 20-Dec-2008 Anders Carlsson <andersca@mac.com> Change EmitVLASize to take a QualType that must be a variably modified type.

Emit the size even if the declared type is a variably modified type. This lets us handle

void f(int n) {
int (*a)[n];

printf("size: %d\n", sizeof(*a));
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61285 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.cpp
odeGenFunction.h
60d35413662ebdcd1d31e34a8a7c665eb6977f1e 20-Dec-2008 Anders Carlsson <andersca@mac.com> Change EmitVLASize to take a QualType that must be a variably modified type.

Emit the size even if the declared type is a variably modified type. This lets us handle

void f(int n) {
int (*a)[n];

printf("size: %d\n", sizeof(*a));
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61285 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.cpp
odeGenFunction.h
f860e028bd1b70cac706e877297ed416aa96222b 20-Dec-2008 Anders Carlsson <andersca@mac.com> Split up emitting of VLA sizes and getting the size of a VLA.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61284 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.cpp
odeGenFunction.h
f666b7780d04186521adcaedb0e15dfa4d5e6933 20-Dec-2008 Anders Carlsson <andersca@mac.com> Split up emitting of VLA sizes and getting the size of a VLA.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61284 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.cpp
odeGenFunction.h
842a36dd95e2c5ecf59b3b611e60a1bfd7527774 20-Dec-2008 Anders Carlsson <andersca@mac.com> Add some ErrorUnsupported calls and turn on VLA codegen again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61283 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GStmt.cpp
eb91f0ecb420f481811f8812ac4d39087e8dd754 20-Dec-2008 Anders Carlsson <andersca@mac.com> Add some ErrorUnsupported calls and turn on VLA codegen again.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61283 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GStmt.cpp
0cd547f8f4ee15e03c4b8ef47895e319437b27b2 20-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> More encoding support. This time for
@encode of classes and bitfields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61268 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
43822eaeddeaa419b90f23c68af6b23c46788a58 20-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> More encoding support. This time for
@encode of classes and bitfields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61268 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ea944844821d8e07b87937a8e9cb02a5a611cc11 18-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Removed a slot in ObjCMemRegExpr used in
code gen which did not belong there.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61203 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjC.cpp
efc4c4bdbd8fee90b93deb3b5cfaeb044ae22557 18-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Removed a slot in ObjCMemRegExpr used in
code gen which did not belong there.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61203 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjC.cpp
17d353774d50fb75e0323b61582c5cbc7bf2cba8 18-Dec-2008 Daniel Dunbar <daniel@zuster.org> Allow ABI to use StructRet even for scalar values.
- Update comment to reflect fact that StructRet is now supported for
any type (modulo LLVM support).

- No functionality change, no scalar types currently use this
feature.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61192 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
3aea8cac3ec9ad03b1d2b002f38a0d42a70483c8 18-Dec-2008 Daniel Dunbar <daniel@zuster.org> Allow ABI to use StructRet even for scalar values.
- Update comment to reflect fact that StructRet is now supported for
any type (modulo LLVM support).

- No functionality change, no scalar types currently use this
feature.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61192 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
0556b1563848eb53ac71b24d0ab6411bace87214 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
odeGenTypes.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
odeGenTypes.cpp
60f7df803ca227871aded4273a86689fc1bfc327 16-Dec-2008 Eli Friedman <eli.friedman@gmail.com> Warning fixes to operator precedence warnings.

Someone should double-check that I didn't somehow break ObjC
serialization; I think the change there actually changes the semantics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61098 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
e8e3205b22e388588396ef41fd4bbe437d325a57 16-Dec-2008 Eli Friedman <eli.friedman@gmail.com> Warning fixes to operator precedence warnings.

Someone should double-check that I didn't somehow break ObjC
serialization; I think the change there actually changes the semantics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61098 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
519648829f41da741c871c0ff8122dd956259a59 16-Dec-2008 Nate Begeman <natebegeman@mac.com> Remove tabs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61097 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCRuntime.h
GValue.h
fea8685bf3036b199c573e70b03affde2583fc44 16-Dec-2008 Nate Begeman <natebegeman@mac.com> Remove tabs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61097 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCRuntime.h
GValue.h
cb8e803696224e723e294d7e3ef79e5e393493eb 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
odeGenTypes.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
odeGenTypes.cpp
86008c06acdaccb4308c514a4d5c56e3023e72fb 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
GExpr.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.h
odeGenTypes.cpp
odeGenTypes.h
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
GExpr.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.h
odeGenTypes.cpp
odeGenTypes.h
c217619461b018067a72c91b1722ec3e3b708fd4 13-Dec-2008 Anders Carlsson <andersca@mac.com> Store the size of the EH stack inside each BreakContinue struct so we know when a break/continue won't cross a try block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60998 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GStmt.cpp
odeGenFunction.h
e21269bcb732afa70386fdd4c95d22bc2ed943b1 13-Dec-2008 Anders Carlsson <andersca@mac.com> Store the size of the EH stack inside each BreakContinue struct so we know when a break/continue won't cross a try block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60998 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GStmt.cpp
odeGenFunction.h
09772396cb7b6c47b05858ae74e78b113adf3821 13-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Patch for ObjCIvarRefExpr containing the field
matching the storage layout for this ivar


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60996 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
aaa63a761c6671a08e3f4f463435b72739fa194b 13-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Patch for ObjCIvarRefExpr containing the field
matching the storage layout for this ivar


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60996 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
b9d7c66629ad6d0a91065f326803df253702a1c3 13-Dec-2008 Chris Lattner <sabre@nondot.org> disable Anders' recent VLA patch, this fixes PR3209.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60989 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprScalar.cpp
71e38c48609b3502d24a47d39a21f1e73402a0e1 13-Dec-2008 Chris Lattner <sabre@nondot.org> disable Anders' recent VLA patch, this fixes PR3209.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60989 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprScalar.cpp
9be6aaf88fe677a1b46cb30a7e9a169e9f287d95 12-Dec-2008 Anders Carlsson <andersca@mac.com> Implement allocation and sizeof VLAs. This is very basic for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60943 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprScalar.cpp
5d46315ca3cbbfe0d0f5f65520b618fb05dd4446 12-Dec-2008 Anders Carlsson <andersca@mac.com> Implement allocation and sizeof VLAs. This is very basic for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60943 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprScalar.cpp
32aa0c2e44506388bc31a9cfbcc1b5de0bbfe632 12-Dec-2008 Anders Carlsson <andersca@mac.com> Add map of VLA types and their sizes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60939 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
dcc90d87e6430c643b4311ae5b0089535bca41f7 12-Dec-2008 Anders Carlsson <andersca@mac.com> Add map of VLA types and their sizes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60939 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenFunction.h
438ddd8be4827bf9f8c0fc6aedf657f78f6892e6 12-Dec-2008 Anders Carlsson <andersca@mac.com> Work in preparation for VLAs. Make sure to restore the stack if necessary (Saving the stack isn't implemented right now :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60925 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
17d28a3e0b0efaba14534d0e6d6a307283d96b9f 12-Dec-2008 Anders Carlsson <andersca@mac.com> Work in preparation for VLAs. Make sure to restore the stack if necessary (Saving the stack isn't implemented right now :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60925 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
a5f779dcfbc19b7387936032c6fccc39dc6ff690 12-Dec-2008 Chris Lattner <sabre@nondot.org> Fix rdar://6095061 - gcc allows __builtin_choose_expr as an lvalue



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60924 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
670a62cd1d51042ea076cda5e93f26a1d8327fb3 12-Dec-2008 Chris Lattner <sabre@nondot.org> Fix rdar://6095061 - gcc allows __builtin_choose_expr as an lvalue



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60924 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
fc37018146a5b01bfcf25cc0e762f89d73628a09 12-Dec-2008 Chris Lattner <sabre@nondot.org> add codegen support for __func__ and friends, producing the same
output that GCC does. rdar://6440297


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60922 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
35345640442594acbc29445fbde4874a6e4c860a 12-Dec-2008 Chris Lattner <sabre@nondot.org> add codegen support for __func__ and friends, producing the same
output that GCC does. rdar://6440297


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60922 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
3967762597e4c1f410a83493df22f38432557a61 11-Dec-2008 Douglas Gregor <doug.gregor@gmail.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
odeGenTypes.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
odeGenTypes.cpp
640a04ba33ae3fb9de6bed628cd70ee679f8d808 11-Dec-2008 Douglas Gregor <doug.gregor@gmail.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
GDebugInfo.cpp
odeGenTypes.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
GDebugInfo.cpp
odeGenTypes.cpp
8acb72795794649013477457cd06a0d3871a2374 11-Dec-2008 Douglas Gregor <doug.gregor@gmail.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
GDebugInfo.cpp
GExprAgg.cpp
GExprConstant.cpp
GObjCMac.cpp
odeGenModule.cpp
odeGenTypes.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
GDebugInfo.cpp
GExprAgg.cpp
GExprConstant.cpp
GObjCMac.cpp
odeGenModule.cpp
odeGenTypes.cpp
63f9835146a4fd20e701d70d10bea18703e52618 10-Dec-2008 Anders Carlsson <andersca@mac.com> Append an extra newline to the module inline asm if it's not empty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60827 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
565c99f45e758406f26404e92fadd15d8b84a8c4 10-Dec-2008 Anders Carlsson <andersca@mac.com> Append an extra newline to the module inline asm if it's not empty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60827 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
91dd9d3cabbe94e48dd24bfe318a9ee5a9b21617 09-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Support for implementation of property in the case where
the synthesis is in an implementation of s subclass of
a super class where the property has been declared.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60792 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.h
odeGenModule.cpp
fef30b55230064d334a669a065a1c9acdb87cdfe 09-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Support for implementation of property in the case where
the synthesis is in an implementation of s subclass of
a super class where the property has been declared.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60792 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenFunction.h
odeGenModule.cpp
b2176010962d8d45b1339895a7a494ba4a342694 09-Dec-2008 Chris Lattner <sabre@nondot.org> Fix a serious null termination bug found by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60778 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
c9f29c61856ffb5f643cedbe87ac076f21a1381a 09-Dec-2008 Chris Lattner <sabre@nondot.org> Fix a serious null termination bug found by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60778 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
32849789e89d48547388c50d95d76ad9ce21472b 09-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Change condition under which 'retain'/'copy' are directly evaluated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60729 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
447d7aeb9499d7ade42be7d63fa03b37b1d2fc09 09-Dec-2008 Fariborz Jahanian <fjahanian@apple.com> Change condition under which 'retain'/'copy' are directly evaluated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60729 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
1b21c7ffe5fac1711fea35e4830159004a835c1a 06-Dec-2008 Douglas Gregor <doug.gregor@gmail.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
odeGenTypes.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
odeGenTypes.cpp
dd861060e2e1f1e41f7b023d025fcd8eb183686d 05-Dec-2008 Douglas Gregor <doug.gregor@gmail.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
odeGenTypes.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
odeGenTypes.cpp
c84f42477b41a4cbdf0441f987a37d0b5e54c520 04-Dec-2008 Daniel Dunbar <daniel@zuster.org> Mention an optimization opportunity pointed out by Chris.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60535 91177308-0d34-0410-b5e6-96231b3b80d8
EADME.txt
86ccea05f6bab8956f5418cdc4df8e130d4422aa 04-Dec-2008 Daniel Dunbar <daniel@zuster.org> Mention an optimization opportunity pointed out by Chris.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60535 91177308-0d34-0410-b5e6-96231b3b80d8
EADME.txt
e9e21b3038aff7683ad5537a4d4962c285bb7632 04-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Correct CodeGen assumption that LongTy == Int32Ty in a few places. This makes several CodeGenObjC tests pass on 64-bit by fixing assertions. This doesn't mean that the result is actually what the GNU runtime expects, though.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60515 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
3a5013cab1162118bd5bcf00a36c52e19a319f87 04-Dec-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Correct CodeGen assumption that LongTy == Int32Ty in a few places. This makes several CodeGenObjC tests pass on 64-bit by fixing assertions. This doesn't mean that the result is actually what the GNU runtime expects, though.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60515 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
689bba8960fdbbf574261b2537d9ec6f41ef8445 03-Dec-2008 Anders Carlsson <andersca@mac.com> If a global var decl has an initializer, make sure to always set its linkage to external.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60462 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
98883e1e699457697fb8d5ac6d175dd3ee078774 03-Dec-2008 Anders Carlsson <andersca@mac.com> If a global var decl has an initializer, make sure to always set its linkage to external.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60462 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ea137cd241c56d9120a056994c7de8889d137d40 02-Dec-2008 Eli Friedman <eli.friedman@gmail.com> Fix for PR3150: obvious copy-paste bug in
ScalarExprEmitter::VisitBinLOr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60415 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
8de8d1d3f2e21e4a72ac294276930ad293a3a765 02-Dec-2008 Eli Friedman <eli.friedman@gmail.com> Fix for PR3150: obvious copy-paste bug in
ScalarExprEmitter::VisitBinLOr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60415 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
2a4f27cf33dcbe5b16e6b046ac30b9c76a2d19cb 02-Dec-2008 Eli Friedman <eli.friedman@gmail.com> Disabling this code due to regression on test/CodeGen/bitfield.c. See
PR3152.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60389 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
a385b3c9c442831fc6a9ec6e8823b2067bd65710 02-Dec-2008 Eli Friedman <eli.friedman@gmail.com> Disabling this code due to regression on test/CodeGen/bitfield.c. See
PR3152.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60389 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
90d85f3bd0621fb0bfd0a9dbc3fae415f7f88354 01-Dec-2008 Anders Carlsson <andersca@mac.com> Change more code over to using the new Expr::Evaluate

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60324 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
64712f196bffd41fb0552c2643b07a25c3e45082 01-Dec-2008 Anders Carlsson <andersca@mac.com> Change more code over to using the new Expr::Evaluate

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60324 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
d6e823b89375fb4ae28f00ebe4a079dde0a721fe 01-Dec-2008 Anders Carlsson <andersca@mac.com> Change more code over to using the new Expr::Evaluate

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60323 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
4b3f9c06d548d3de576441a91ef986c6840bd983 01-Dec-2008 Anders Carlsson <andersca@mac.com> Change more code over to using the new Expr::Evaluate

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60323 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
18dbfc7098d0af46a6bf1377b7752c8784f743b3 01-Dec-2008 Anders Carlsson <andersca@mac.com> Use the new Expr::Evaluate

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60321 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
f35d35a2316dcb65d078844696c2032b71a7f103 01-Dec-2008 Anders Carlsson <andersca@mac.com> Use the new Expr::Evaluate

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60321 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
e9b227d9218dedcad8e3c6cc07b4548f6da5dd44 30-Nov-2008 Eli Friedman <eli.friedman@gmail.com> Fix for PR2969: generate a memcpy from a constant for constant
initializers. llvm-gcc appears to be more aggressive, but incorrect,
for constructs like "const int a[] = {1,2,3};"; that said, current
optimizers will do the appropriate optimizations when safe.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60270 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
994ffef4353056363ba5915eeecf0e1b0678f286 30-Nov-2008 Eli Friedman <eli.friedman@gmail.com> Fix for PR2969: generate a memcpy from a constant for constant
initializers. llvm-gcc appears to be more aggressive, but incorrect,
for constructs like "const int a[] = {1,2,3};"; that said, current
optimizers will do the appropriate optimizations when safe.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60270 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
0b0fcd3f5e8740aa4c7b3a3d822d38a7e62f5564 27-Nov-2008 Daniel Dunbar <daniel@zuster.org> Test commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60147 91177308-0d34-0410-b5e6-96231b3b80d8
EADME.txt
4fe66aa20278b29bf0a3eb890fe0ccb1917b324c 27-Nov-2008 Daniel Dunbar <daniel@zuster.org> Test commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60147 91177308-0d34-0410-b5e6-96231b3b80d8
EADME.txt
d70b09cb98cb6200eb72d89c9d2d17ad7a8068ea 26-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Code gen for aggregate-valued properties and a test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60122 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
6010bca98a617a40951561c380a89afd261fb0ac 26-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Code gen for aggregate-valued properties and a test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60122 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
123485cee1a2e20d9c71fd7af8a6bc44e194efeb 26-Nov-2008 Anders Carlsson <andersca@mac.com> Convert incomplete array types before emitting debug info for them, fixes PR3134.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60109 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
4d6e8dd587f6ae0080b0d3acc9ac6a6a02b1ac3b 26-Nov-2008 Anders Carlsson <andersca@mac.com> Convert incomplete array types before emitting debug info for them, fixes PR3134.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60109 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
fccf74784f7589c3e86f3de4c3a10fc856da8db4 25-Nov-2008 Anders Carlsson <andersca@mac.com> Handle returning complex types that get coerced. Fixes PR3131

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60058 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
ad3d6917dabbdab3399ff8307240aad58247d2e3 25-Nov-2008 Anders Carlsson <andersca@mac.com> Handle returning complex types that get coerced. Fixes PR3131

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60058 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
d76c2ff11cf42bb42b0e54f084f3e52713eec688 25-Nov-2008 Daniel Dunbar <daniel@zuster.org> Fix 80-col violations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60051 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
71fcec9abf2ce66d5e17a24bd021680e94e42f0d 25-Nov-2008 Daniel Dunbar <daniel@zuster.org> Fix 80-col violations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60051 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
5e81ee0bc3477cb254777f1e59e2e7375bdbac29 25-Nov-2008 Anders Carlsson <andersca@mac.com> Remove the #ifdeffed out code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60032 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
704e4907ee0116e53f270d778c955da9f01fc2d8 25-Nov-2008 Anders Carlsson <andersca@mac.com> Remove the #ifdeffed out code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60032 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
271d4c2c75e2b6774cc017506d3b27e4fa1697ff 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
GDebugInfo.cpp
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
odeGenTypes.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
GDebugInfo.cpp
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
odeGenTypes.cpp
6c5ec6227d93a03794ee5b4435567c4b6a0cdbd3 24-Nov-2008 Chris Lattner <sabre@nondot.org> Migrate some stuff from NamedDecl::getName() to
NamedDecl::getNameAsString() to make it more explicit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59937 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDecl.cpp
39f34e97d6a468f0a7dfa5664c61217cffc65b74 24-Nov-2008 Chris Lattner <sabre@nondot.org> Migrate some stuff from NamedDecl::getName() to
NamedDecl::getNameAsString() to make it more explicit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59937 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDecl.cpp
d120b9ed1f54a3d2b284a6c683c3f6e646a31d26 24-Nov-2008 Chris Lattner <sabre@nondot.org> Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make it
assert if the name is not an identifier. Update callers to do the right
thing and avoid this method in unsafe cases. This also fixes an objc
warning that was missing a space, and migrates a couple more to taking
IdentifierInfo and QualTypes instead of std::strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59936 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDecl.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
8ec03f58c33c33a917f54bb7f2cd61b6d7ffe0ca 24-Nov-2008 Chris Lattner <sabre@nondot.org> Rename NamedDecl::getIdentifierName() to ::getNameAsCString() and make it
assert if the name is not an identifier. Update callers to do the right
thing and avoid this method in unsafe cases. This also fixes an objc
warning that was missing a space, and migrates a couple more to taking
IdentifierInfo and QualTypes instead of std::strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59936 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDecl.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
3a8f294d0c43fe0a3e1fc1612bc1a42d55172cae 24-Nov-2008 Chris Lattner <sabre@nondot.org> Rename Selector::getName() to Selector::getAsString(), and add
a new NamedDecl::getAsString() method.

Change uses of Selector::getName() to just pass in a Selector
where possible (e.g. to diagnostics) instead of going through
an std::string.

This also adds new formatters for objcinstance and objcclass
as described in the dox.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59933 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GObjCGNU.cpp
GObjCMac.cpp
077bf5e2f48acfa9e7d69429b6e4ba86ea14896d 24-Nov-2008 Chris Lattner <sabre@nondot.org> Rename Selector::getName() to Selector::getAsString(), and add
a new NamedDecl::getAsString() method.

Change uses of Selector::getName() to just pass in a Selector
where possible (e.g. to diagnostics) instead of going through
an std::string.

This also adds new formatters for objcinstance and objcclass
as described in the dox.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59933 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GObjCGNU.cpp
GObjCMac.cpp
ea3c6ab8a661844e07ba0567f8e17f64b491e1d9 22-Nov-2008 Anders Carlsson <andersca@mac.com> An expression is not foldable if it can't be fully evaluated. Fixes PR3060

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59887 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
ef5a66d8171eb95e948107f8ee7707b360aaff25 22-Nov-2008 Anders Carlsson <andersca@mac.com> An expression is not foldable if it can't be fully evaluated. Fixes PR3060

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59887 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
b0973dad070701ab1235e8a4c707f8de3a56a74d 22-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Implemented ir-gen for 'implicit' properties using the new AST nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59886 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
GObjC.cpp
GValue.h
odeGenFunction.h
43f447098d5e6162fbfb97ed38365284207a7fbe 22-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Implemented ir-gen for 'implicit' properties using the new AST nodes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59886 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
GObjC.cpp
GValue.h
odeGenFunction.h
e8bd9f2ddf3eee09c36f1d5d8a61fbf5993612f2 22-Nov-2008 Anders Carlsson <andersca@mac.com> Use Expr::Evaluate for case statements. Fixes PR2525

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59881 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
51fe996231b1d7199f76e4005ff4c943d5deeecd 22-Nov-2008 Anders Carlsson <andersca@mac.com> Use Expr::Evaluate for case statements. Fixes PR2525

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59881 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
f18d4c8326553440fb01bfeb368b2bc60996cfc2 22-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> New AST node to access "implicit" setter/getter using property dor syntax.
Issuing diagnostics when assigning to read-only properties.
This is work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59874 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GObjC.cpp
odeGenFunction.h
5daf570d0ce027e18ed5f9d66e6b2a14a40b720d 22-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> New AST node to access "implicit" setter/getter using property dor syntax.
Issuing diagnostics when assigning to read-only properties.
This is work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59874 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GObjC.cpp
odeGenFunction.h
2502a385a6153eb433179717eb7ae0f67cbbc5cf 22-Nov-2008 Anders Carlsson <andersca@mac.com> Use tryEvaluate for constant exprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59857 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
bcf6225ad69ea388e287f952981fd076636991b2 22-Nov-2008 Anders Carlsson <andersca@mac.com> Use tryEvaluate for constant exprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59857 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
3895d927cf544ceb03a75efd6fcbdd75ddd6ee2e 21-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Fixed bugzilla bug# 3095 related to code gen. for @synchronized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59838 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f2878e5dffd20bf0a97fb0b30a376f2d60963593 21-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Fixed bugzilla bug# 3095 related to code gen. for @synchronized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59838 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
08c06f44835ffb5984118e7620e595b12412b31d 21-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Fields of ivars of struct types are considered ivars
themselves for gc API generation purposes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59828 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
2ab1968eb400331ffe47c560583326e4034aed4a 21-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Fields of ivars of struct types are considered ivars
themselves for gc API generation purposes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59828 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
e73302f263678e2654cb9d2afc598f5adec161ae 21-Nov-2008 Chris Lattner <sabre@nondot.org> reapply the (corrected) patch to use the new llvm intrinsics for memcpy/memmove etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59824 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenModule.cpp
4e8a9e8640a6717120394ee2ee5f27989757754d 21-Nov-2008 Chris Lattner <sabre@nondot.org> reapply the (corrected) patch to use the new llvm intrinsics for memcpy/memmove etc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59824 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenModule.cpp
39f22ce6b33da6ea09afa31d7a21dece8a7834d1 21-Nov-2008 Chris Lattner <sabre@nondot.org> temporarily revert Sangiv's patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59821 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenModule.cpp
d67777662b7aac5a007513ba1fe25cb60e13fc3d 21-Nov-2008 Chris Lattner <sabre@nondot.org> temporarily revert Sangiv's patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59821 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenModule.cpp
5936516f2c8dbf8addfbbad098cd4909a193d78a 21-Nov-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> mem[cpy,set,move] intrinsics are now overloaded.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59806 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenModule.cpp
8d668a467ab782bd57c54a639a03f2e74382af84 21-Nov-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> mem[cpy,set,move] intrinsics are now overloaded.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59806 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenModule.cpp
fbeda7b73899e6e687f1e4f65478cacb3ad744fb 21-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Consolidated @try and @synchronize into a single
code gen. method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59767 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
bd71be4683c195260d5245118b1e13e6b2e20504 21-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Consolidated @try and @synchronize into a single
code gen. method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59767 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
7052266069a1396d2cbd58ff1ead12d5fe8aa5dc 20-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Support generation of objc_assign_ivar for ivar
write-barriers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59748 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
d1cc8040ea57775e52d23765a9a6c1fa4b75526f 20-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Support generation of objc_assign_ivar for ivar
write-barriers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59748 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
f310b59193700f518a2012001575d8f7fa39739e 20-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Introducing objc_assign_ivar to clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59740 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
7eda8367cf63caee8acf907356b1d199ccaa6e89 20-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Introducing objc_assign_ivar to clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59740 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
6f19a0aca46f710b95e6863c6778cd2090f4acb3 20-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Added a test case for __weak field decls. Change SetVarDeclObjCAttribute
to static function. Added comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59738 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
80b0b42a09c3de8392f9ba1e24ffcc35355a8dea 20-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Added a test case for __weak field decls. Change SetVarDeclObjCAttribute
to static function. Added comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59738 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
05fb7c8668938447ffdd36d5e15ea697e88db0ba 20-Nov-2008 Chris Lattner <sabre@nondot.org> Rename IdentifierInfo::isName to ::isStr. Use a nifty trick
from Sebastian to enforce that a literal string is passed in,
and use this to avoid having to call strlen on it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59706 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
92e62b02226410bcad8584541b8f1ff4d35ebab9 20-Nov-2008 Chris Lattner <sabre@nondot.org> Rename IdentifierInfo::isName to ::isStr. Use a nifty trick
from Sebastian to enforce that a literal string is passed in,
and use this to avoid having to call strlen on it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59706 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
f0ca65f501c7e7d8c286e04bca0d805c12a5ad1b 20-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> More objc gc stuff. Read/Write barriers for local static/extern,
diagnostics on use of __weak attribute on fields,
Early support for read/write barriers for objc fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59682 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
2682d8b3a0415d521d5ca11afb13a8bc5c559a31 20-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> More objc gc stuff. Read/Write barriers for local static/extern,
diagnostics on use of __weak attribute on fields,
Early support for read/write barriers for objc fields.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59682 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
551865d44e0239d47d75cedf4da949a97d1328ca 19-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> More of objective-c's gc code-gen. Treat objective-c
objects as __strong when attribute unspecified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59654 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
0c43f2681b13e32171f883b6e874da1a6ae340e9 19-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> More of objective-c's gc code-gen. Treat objective-c
objects as __strong when attribute unspecified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59654 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GValue.h
d2f661aca009f4c9728b24e249ab06a604e9e99f 19-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Few more changes due to Daniel's feedback.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59645 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
GValue.h
dbd32c20c529430fe1d22d87317f039849b8b0bb 19-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Few more changes due to Daniel's feedback.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59645 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
GValue.h
2710fc9ed16bfb49db4103a96565e7f5618ded84 19-Nov-2008 Daniel Dunbar <daniel@zuster.org> Add spec ref to comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59622 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
371d16f45aeec61c1d07687f763d92137e133642 19-Nov-2008 Daniel Dunbar <daniel@zuster.org> Add spec ref to comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59622 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
2668dd1ba0f67f69ea6ece1c66b6289d09ad1d5a 19-Nov-2008 Daniel Dunbar <daniel@zuster.org> Fix redundant load of bit-fields on assignment (to get the updated
value).
- Use extra argument to EmitStoreThroughLValue to provide place to
write update bit-field value if caller requires it.
- This fixes several FIXMEs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59615 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
EADME.txt
ed3849b456d64d124bddc7ac044f3ce590bd9d69 19-Nov-2008 Daniel Dunbar <daniel@zuster.org> Fix redundant load of bit-fields on assignment (to get the updated
value).
- Use extra argument to EmitStoreThroughLValue to provide place to
write update bit-field value if caller requires it.
- This fixes several FIXMEs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59615 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
EADME.txt
e6b85310b696848fdfbdd18bdf82c63713e360eb 19-Nov-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Pointer width for PIC16 is 16 bits. Modify getMemCpy, getMemMove and getMemSet accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59613 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
8fbc1540966901a0b2b033c92f4c4257c08621f8 19-Nov-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Pointer width for PIC16 is 16 bits. Modify getMemCpy, getMemMove and getMemSet accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59613 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
76a06726c1c68f559562441ba65f596f76d2b0b6 19-Nov-2008 Chris Lattner <sabre@nondot.org> fix save-o


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59611 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
f0895515427f658838ddc65a60de8cc30301b51a 19-Nov-2008 Chris Lattner <sabre@nondot.org> fix save-o


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59611 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
6de6ff10907184ceda712ddebc0db8d115baadd1 19-Nov-2008 Chris Lattner <sabre@nondot.org> simplify


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59610 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
865732239acf5d2b75c7d34f4fa5c09ca2deb588 19-Nov-2008 Chris Lattner <sabre@nondot.org> simplify


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59610 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
fc1543e0c69edbbec75ed3351f7a9fc83880b544 19-Nov-2008 Daniel Dunbar <daniel@zuster.org> Discard unused runtime function declarations (for readability).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59594 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
0293d540baafbe070c1035611787a81001a4118e 19-Nov-2008 Daniel Dunbar <daniel@zuster.org> Discard unused runtime function declarations (for readability).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59594 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
1795890e361bcd66bd2730fe3bfcbb7aeb8322c0 19-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Generate strong write barriers for __strong objects.
Also, took care of Daniel's commments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59575 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GValue.h
58626500527695865683d1d65053743de8770b60 19-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Generate strong write barriers for __strong objects.
Also, took care of Daniel's commments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59575 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GValue.h
252d87f066124248b7e606fd921cb527b56f3e4e 18-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Patch for generation of weak write barriers for objc
__weak objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59560 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
3e283e344595e0bd499b13b30a92b7d9c10a2140 18-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Patch for generation of weak write barriers for objc
__weak objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59560 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
3305ad3f4dbc567b7fa46acf2ee527a352469f23 18-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Generate objc_read_weak for __weak objc loads.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59553 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GValue.h
6dc2317b59cb1180a59f6c283d96b7a5dfeb5307 18-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Generate objc_read_weak for __weak objc loads.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59553 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GValue.h
c192d4d22a17598020dd8d7e5aeec23c07e40988 18-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Some basic support toward objective-c's GC code gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59543 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
GValue.h
6d657c4809d9128be88705d32768de007b988212 18-Nov-2008 Fariborz Jahanian <fjahanian@apple.com> Some basic support toward objective-c's GC code gen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59543 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
GValue.h
6948ae68efb71fc0ef50fbf240c3cc2ce8b97b2d 18-Nov-2008 Chris Lattner <sabre@nondot.org> This reworks some of the Diagnostic interfaces a bit to change how diagnostics
are formed. In particular, a diagnostic with all its strings and ranges is now
packaged up and sent to DiagnosticClients as a DiagnosticInfo instead of as a
ton of random stuff. This has the benefit of simplifying the interface, making
it more extensible, and allowing us to do more checking for things like access
past the end of the various arrays passed in.

In addition to introducing DiagnosticInfo, this also substantially changes how
Diagnostic::Report works. Instead of being passed in all of the info required
to issue a diagnostic, Report now takes only the required info (a location and
ID) and returns a fresh DiagnosticInfo *by value*. The caller is then free to
stuff strings and ranges into the DiagnosticInfo with the << operator. When
the dtor runs on the DiagnosticInfo object (which should happen at the end of
the statement), the diagnostic is actually emitted with all of the accumulated
information. This is a somewhat tricky dance, but it means that the
accumulated DiagnosticInfo is allowed to keep pointers to other expression
temporaries without those pointers getting invalidated.

This is just the minimal change to get this stuff working, but this will allow
us to eliminate the zillions of variant "Diag" methods scattered throughout
(e.g.) sema. For example, instead of calling:

Diag(BuiltinLoc, diag::err_overload_no_match, typeNames,
SourceRange(BuiltinLoc, RParenLoc));

We will soon be able to just do:

Diag(BuiltinLoc, diag::err_overload_no_match)
<< typeNames << SourceRange(BuiltinLoc, RParenLoc));

This scales better to support arbitrary types being passed in (not just
strings) in a type-safe way. Go operator overloading?!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59502 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenModule.cpp
0a14eee528a901c16f0e288fbc10a3abc1660d87 18-Nov-2008 Chris Lattner <sabre@nondot.org> This reworks some of the Diagnostic interfaces a bit to change how diagnostics
are formed. In particular, a diagnostic with all its strings and ranges is now
packaged up and sent to DiagnosticClients as a DiagnosticInfo instead of as a
ton of random stuff. This has the benefit of simplifying the interface, making
it more extensible, and allowing us to do more checking for things like access
past the end of the various arrays passed in.

In addition to introducing DiagnosticInfo, this also substantially changes how
Diagnostic::Report works. Instead of being passed in all of the info required
to issue a diagnostic, Report now takes only the required info (a location and
ID) and returns a fresh DiagnosticInfo *by value*. The caller is then free to
stuff strings and ranges into the DiagnosticInfo with the << operator. When
the dtor runs on the DiagnosticInfo object (which should happen at the end of
the statement), the diagnostic is actually emitted with all of the accumulated
information. This is a somewhat tricky dance, but it means that the
accumulated DiagnosticInfo is allowed to keep pointers to other expression
temporaries without those pointers getting invalidated.

This is just the minimal change to get this stuff working, but this will allow
us to eliminate the zillions of variant "Diag" methods scattered throughout
(e.g.) sema. For example, instead of calling:

Diag(BuiltinLoc, diag::err_overload_no_match, typeNames,
SourceRange(BuiltinLoc, RParenLoc));

We will soon be able to just do:

Diag(BuiltinLoc, diag::err_overload_no_match)
<< typeNames << SourceRange(BuiltinLoc, RParenLoc));

This scales better to support arbitrary types being passed in (not just
strings) in a type-safe way. Go operator overloading?!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59502 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenModule.cpp
b034e281af9d2cb52c2606764de229c1fb825307 18-Nov-2008 Chris Lattner <sabre@nondot.org> Change the diagnostics interface to take an array of pointers to
strings instead of array of strings. This reduces string copying
in some not-very-important cases, but paves the way for future
improvements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59494 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
2383b7f6aea2cb2bf2b5bfc0ec730f9354fecbbf 18-Nov-2008 Chris Lattner <sabre@nondot.org> Change the diagnostics interface to take an array of pointers to
strings instead of array of strings. This reduces string copying
in some not-very-important cases, but paves the way for future
improvements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59494 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
24afd4accaf5499312f05f1252463c6e0febf16d 17-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Introduction the DeclarationName class, as a single, general method of
representing the names of declarations in the C family of
languages. DeclarationName is used in NamedDecl to store the name of
the declaration (naturally), and ObjCMethodDecl is now a NamedDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59441 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDecl.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
2e1cd4264d363ca869bf37ef160902f211d21b8c 17-Nov-2008 Douglas Gregor <dgregor@apple.com> Introduction the DeclarationName class, as a single, general method of
representing the names of declarations in the C family of
languages. DeclarationName is used in NamedDecl to store the name of
the declaration (naturally), and ObjCMethodDecl is now a NamedDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59441 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDecl.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.cpp
62301c0d28c318d009298c8e8e9cae72017cc643 17-Nov-2008 Eli Friedman <eli.friedman@gmail.com> A few corrections to the expr constant work. Not enabled at the
moment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59435 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
7b30b1c866deb37fabe2b25684b7d238258d46ad 17-Nov-2008 Eli Friedman <eli.friedman@gmail.com> A few corrections to the expr constant work. Not enabled at the
moment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59435 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
806e993f2bb7e7e0603965c5b36d9e26d6b52855 17-Nov-2008 Anders Carlsson <andersca@mac.com> More expr constant work. (Off by default).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59433 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
aa432560efb1ff10aec504a68fe909cd9ae7c1a2 17-Nov-2008 Anders Carlsson <andersca@mac.com> More expr constant work. (Off by default).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59433 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
ef0696643975b7f5db9c9b333cffae2c6a469a5c 16-Nov-2008 Chris Lattner <sabre@nondot.org> rename Expr::tryEvaluate to Expr::Evaluate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59426 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprConstant.cpp
odeGenFunction.cpp
6ee7aa154e8bbb21a21254293410b944f78b0bfe 16-Nov-2008 Chris Lattner <sabre@nondot.org> rename Expr::tryEvaluate to Expr::Evaluate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59426 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprConstant.cpp
odeGenFunction.cpp
85b43810c368bfcf6a19eb8b5d9cb0ed171da6bc 16-Nov-2008 Anders Carlsson <andersca@mac.com> More constant expr work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59405 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
5ea7d07ea7d9f2b679c85df7cc45fcc6e157e396 16-Nov-2008 Anders Carlsson <andersca@mac.com> More constant expr work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59405 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
1f11af2c4bc3245e253562c066323a1e5d51a420 16-Nov-2008 Chris Lattner <sabre@nondot.org> daniel prefers completed thoughts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59404 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
531a550531c144a58438f187816abbf1879e1c4e 16-Nov-2008 Chris Lattner <sabre@nondot.org> daniel prefers completed thoughts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59404 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
dd97870b27bdf167b9818ed081acfc72a5f1040b 15-Nov-2008 Chris Lattner <sabre@nondot.org> Start implementing support for @synchonized with the darwin ObjC API.

Patch by Fariborz!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59377 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GStmt.cpp
odeGenFunction.h
10cac6f7115b59a466bb8d2d51cdddeb38aadc37 15-Nov-2008 Chris Lattner <sabre@nondot.org> Start implementing support for @synchonized with the darwin ObjC API.

Patch by Fariborz!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59377 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GStmt.cpp
odeGenFunction.h
5448390d4c8ccd63a236ef4630dd114f45547bdf 15-Nov-2008 Anders Carlsson <andersca@mac.com> Check in code that uses tryEvaluate for emitting constant exprs (not used yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59375 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
5a9a457ecf66343ae8b64baa7909007837b2a2cd 15-Nov-2008 Anders Carlsson <andersca@mac.com> Check in code that uses tryEvaluate for emitting constant exprs (not used yet).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59375 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
0c0d8957a3d2eb1df6f988ca396e74c7118d6e32 15-Nov-2008 Anders Carlsson <andersca@mac.com> Handle padding in the constant CFString struct. Fixes PR3046.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59372 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
e3daa761061982f2267f7c8fb847ea02abad0aa9 15-Nov-2008 Anders Carlsson <andersca@mac.com> Handle padding in the constant CFString struct. Fixes PR3046.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59372 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
21f35e30c2a27c607fd87b519caefa05309e7bae 15-Nov-2008 Anders Carlsson <andersca@mac.com> Use IgnoreParenCasts. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59371 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
d114ade7f12e388c685e293ae94356c6b0b221f7 15-Nov-2008 Anders Carlsson <andersca@mac.com> Use IgnoreParenCasts. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59371 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
ae85dd67f50695a5889260bc9502bece17118e0f 15-Nov-2008 Anders Carlsson <andersca@mac.com> Fix silly bug spotted by Daniel Dunbar

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59358 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
1385f8e826bf9b65a81888888de82cd6b82a7768 15-Nov-2008 Anders Carlsson <andersca@mac.com> Fix silly bug spotted by Daniel Dunbar

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59358 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
2157dddeb8423ea4d3978d723d1156b2e9f2a503 15-Nov-2008 Anders Carlsson <andersca@mac.com> Handle complex return values.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59345 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
0b685a5e4a473b180b7d2f433aaf09b91d3a0f78 15-Nov-2008 Anders Carlsson <andersca@mac.com> Handle complex return values.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59345 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
65fedaf9bd026cf8863e24eeecade7b2a65e0030 14-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Add a new expression node, CXXOperatorCallExpr, which expresses a
function call created in response to the use of operator syntax that
resolves to an overloaded operator in C++, e.g., "str1 +
str2" that resolves to std::operator+(str1, str2)". We now build a
CXXOperatorCallExpr in C++ when we pick an overloaded operator. (But
only for binary operators, where we actually implement overloading)

I decided *not* to refactor the current CallExpr to make it abstract
(with FunctionCallExpr and CXXOperatorCallExpr as derived
classes). Doing so would allow us to make CXXOperatorCallExpr a little
bit smaller, at the cost of making the argument and callee accessors
virtual. We won't know if this is going to be a win until we can parse
lots of C++ code to determine how much memory we'll save by making
this change vs. the performance penalty due to the extra virtual
calls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59306 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
b4609806e9232593ece09ce08b630836e825865c 14-Nov-2008 Douglas Gregor <dgregor@apple.com> Add a new expression node, CXXOperatorCallExpr, which expresses a
function call created in response to the use of operator syntax that
resolves to an overloaded operator in C++, e.g., "str1 +
str2" that resolves to std::operator+(str1, str2)". We now build a
CXXOperatorCallExpr in C++ when we pick an overloaded operator. (But
only for binary operators, where we actually implement overloading)

I decided *not* to refactor the current CallExpr to make it abstract
(with FunctionCallExpr and CXXOperatorCallExpr as derived
classes). Doing so would allow us to make CXXOperatorCallExpr a little
bit smaller, at the cost of making the argument and callee accessors
virtual. We won't know if this is going to be a win until we can parse
lots of C++ code to determine how much memory we'll save by making
this change vs. the performance penalty due to the extra virtual
calls.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59306 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
198edd544c90dc3b6e1efcc1075530db14d75ee7 13-Nov-2008 Daniel Dunbar <daniel@zuster.org> Easy IRgen improvement for bitfields, don't emit x >> 0.
- Logic such as this quite possibly should be optional builder
behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59213 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
f3edc2fa81b71c32fbc3546be6c0012ff77ec07c 13-Nov-2008 Daniel Dunbar <daniel@zuster.org> Easy IRgen improvement for bitfields, don't emit x >> 0.
- Logic such as this quite possibly should be optional builder
behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59213 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
f9f38e603d3d826b206ab070bab9da59824cee62 13-Nov-2008 Daniel Dunbar <daniel@zuster.org> Supply finished flag to EmitBlock for common statements which use
landing pads.
- Primarily a cleanliness issue instead of a performance issue (this
eliminates all blocks w/o predecessors on 176.gcc/expr.c), but this
also allows subsequent code to recognize it is unreachable and
potentially avoid IRgen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59211 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
c22d665ede76f70228055d638a087f4bd438292d 13-Nov-2008 Daniel Dunbar <daniel@zuster.org> Supply finished flag to EmitBlock for common statements which use
landing pads.
- Primarily a cleanliness issue instead of a performance issue (this
eliminates all blocks w/o predecessors on 176.gcc/expr.c), but this
also allows subsequent code to recognize it is unreachable and
potentially avoid IRgen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59211 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
6e3a10ca0989348ed8441e5c6f380e1b0d7b5741 13-Nov-2008 Daniel Dunbar <daniel@zuster.org> Normalize many BasicBlock names.
- Use dotted notation for blocks related to a particular statement
type.
- Use .end for landing pads.

No functionality change in NDEBUG mode. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59210 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GStmt.cpp
odeGenFunction.cpp
9615ecb44f549ae9fa2b4db6ff46bc78befbf62c 13-Nov-2008 Daniel Dunbar <daniel@zuster.org> Normalize many BasicBlock names.
- Use dotted notation for blocks related to a particular statement
type.
- Use .end for landing pads.

No functionality change in NDEBUG mode. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59210 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GStmt.cpp
odeGenFunction.cpp
e220261b34d83d255b4ebf6b7b40ef75220fca0f 13-Nov-2008 Daniel Dunbar <daniel@zuster.org> Add IsFinished arg to EmitBlock.
- Indicates that caller is done with the block and it can be dropped
if it has no predecessors. Useful for callers who need to make
landing pads but which may not be reached.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59207 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
a0c21a8faa79e88ac432d116eca58f7a7217195d 13-Nov-2008 Daniel Dunbar <daniel@zuster.org> Add IsFinished arg to EmitBlock.
- Indicates that caller is done with the block and it can be dropped
if it has no predecessors. Useful for callers who need to make
landing pads but which may not be reached.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59207 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
c70a5df90d5d0ea87ed82e8e5dc5ebe0f8350620 13-Nov-2008 Daniel Dunbar <daniel@zuster.org> For if blocks with no else, name the join block ifend instead of the
more confusing ifelse.

Use dotted names for if blocks (if.then vs ifthen).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59201 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
781d7ca9b2fd626ef34bdc3fe06765eeff7ab2bc 13-Nov-2008 Daniel Dunbar <daniel@zuster.org> For if blocks with no else, name the join block ifend instead of the
more confusing ifelse.

Use dotted names for if blocks (if.then vs ifthen).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59201 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
14937029c452a9370734ab006d6a0b0e780919b7 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Quick fix for crash in IRgen when we can tryEvaluate a condition to
something that is not an int.

- Ignore these cases for now, added FIXME that we should also boolize
them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59184 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
36bc14c3a1cf63ee306df5687ac8e85f924f8639 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Quick fix for crash in IRgen when we can tryEvaluate a condition to
something that is not an int.

- Ignore these cases for now, added FIXME that we should also boolize
them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59184 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
bae383b7ea912c841b1745688546505c203b0be3 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Start a README.txt of possible optimizations to do in IRgen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59130 91177308-0d34-0410-b5e6-96231b3b80d8
EADME.txt
8787530df554f1ff5643b342b03de95a108fe97c 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Start a README.txt of possible optimizations to do in IRgen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59130 91177308-0d34-0410-b5e6-96231b3b80d8
EADME.txt
ab81c6362283660aa021c2b2ca8ea4ce75d45b92 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Handle ?: in EmitBranchOnBoolExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59129 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
09b14899039d828094c06ac25d60de62608e57b7 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Handle ?: in EmitBranchOnBoolExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59129 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
b23e992edf50afc66c8616b6f11501afe347577f 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Rename ?: operator blocks to cond.true and cond.false (I don't know
what "cond.?" means, and this avoids quoting).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59128 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
be65abc8e41213ecb951f2f507fb2e13a151d30c 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Rename ?: operator blocks to cond.true and cond.false (I don't know
what "cond.?" means, and this avoids quoting).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59128 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
45e3867efff2318453311217dcc3d5badf5810e1 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Comment/indentation fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59127 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
4bc0455d826e9634b7a68c0d06146edd633c9453 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Comment/indentation fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59127 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
504a528c5cf167d61e62e82e099b5c6e615c7d4b 12-Nov-2008 Chris Lattner <sabre@nondot.org> Lower ?: into select when the selected values are cheap and side-effect-free.
This cuts another 200 lines off expr.ll, forming 23 selects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59124 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
9802a5173ffd403d9ede2d4b6b6107fa2e220544 12-Nov-2008 Chris Lattner <sabre@nondot.org> Lower ?: into select when the selected values are cheap and side-effect-free.
This cuts another 200 lines off expr.ll, forming 23 selects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59124 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
7f80bb34c9865a6462e59dec2e5b14449bb77fcf 12-Nov-2008 Chris Lattner <sabre@nondot.org> emit better codegen for ||/&&, shrinking expr.ll by another 240 lines.
This happens for stuff like this:

x = cond1 || cond2 || cond3 || cond4;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59123 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
f7b5ea9de3d043fa900ab8a8976a4c0eefc233b7 12-Nov-2008 Chris Lattner <sabre@nondot.org> emit better codegen for ||/&&, shrinking expr.ll by another 240 lines.
This happens for stuff like this:

x = cond1 || cond2 || cond3 || cond4;



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59123 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
715c2a7c6ec89dcea44a58a1bd4b1c54efe4323e 12-Nov-2008 Chris Lattner <sabre@nondot.org> use ConstantFoldsToSimpleInteger instead of code emission to do
constant folding.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59121 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
20eb09d562b80420a3328be789547af354bf3e36 12-Nov-2008 Chris Lattner <sabre@nondot.org> use ConstantFoldsToSimpleInteger instead of code emission to do
constant folding.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59121 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
6c81e56e7c3cfe48ca298181eece47035a1f950c 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> IRgen improvements on unreachable code:
- Split out "simple" statements which can easily handle IR generation
when there is no insert point. These are generally statements which
start by emitting a new block or are only containers for other
statements.

- This fixes a regression in emitting dummy blocks, notably for case
statements.

- This also fixes spurious emission of a number of debug stoppoint
intrinsic instructions.

Remove unneeded sw.body block, just clear the insertion point.

Lift out CodeGenFunction::EmitStopPoint which calls into the
CGDebugInfo class when generating debug info.

Normalize definitions of Emit{Break,Continue}Stmt and usage of
ErrorUnsupported.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59118 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
0912425f79418a215c2fbd2d8fc9511244a4aa46 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> IRgen improvements on unreachable code:
- Split out "simple" statements which can easily handle IR generation
when there is no insert point. These are generally statements which
start by emitting a new block or are only containers for other
statements.

- This fixes a regression in emitting dummy blocks, notably for case
statements.

- This also fixes spurious emission of a number of debug stoppoint
intrinsic instructions.

Remove unneeded sw.body block, just clear the insertion point.

Lift out CodeGenFunction::EmitStopPoint which calls into the
CGDebugInfo class when generating debug info.

Normalize definitions of Emit{Break,Continue}Stmt and usage of
ErrorUnsupported.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59118 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
cfbfe91509789503eb597bbe7347d61c14f8fb2b 12-Nov-2008 Chris Lattner <sabre@nondot.org> Handle Unary ! in EmitBranchOnBoolExpr, so that we can efficiently
codegen stuff like "if (!(X && Y))"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59115 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
552f4c45ba4f4a01f86d585edabd871a27829867 12-Nov-2008 Chris Lattner <sabre@nondot.org> Handle Unary ! in EmitBranchOnBoolExpr, so that we can efficiently
codegen stuff like "if (!(X && Y))"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59115 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
67e22466b6db5925036a306c2324bafd29b25339 12-Nov-2008 Chris Lattner <sabre@nondot.org> Use EmitBranchOnBoolExpr in VisitConditionalOperator. This
shrinks code yet again by a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59114 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
035cf4294319271ad19ddcc5ba327c8365f3575e 12-Nov-2008 Chris Lattner <sabre@nondot.org> Use EmitBranchOnBoolExpr in VisitConditionalOperator. This
shrinks code yet again by a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59114 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
3d6606b2193c051f01c5928d6d464e81cfe65501 12-Nov-2008 Chris Lattner <sabre@nondot.org> Move EmitBranchOnBoolExpr and ConstantFoldsToSimpleInteger to
CodeGenFunction.cpp. Change VisitConditionalOperator to use
constant fold instead of codegen'ing a constant conditional.

Change ForStmt to use EmitBranchOnBoolExpr, this shrinks
expr.c very slightly to 40239 lines.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59113 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
31a0984b5cb4af99d2407c0f25bf5af68df681c6 12-Nov-2008 Chris Lattner <sabre@nondot.org> Move EmitBranchOnBoolExpr and ConstantFoldsToSimpleInteger to
CodeGenFunction.cpp. Change VisitConditionalOperator to use
constant fold instead of codegen'ing a constant conditional.

Change ForStmt to use EmitBranchOnBoolExpr, this shrinks
expr.c very slightly to 40239 lines.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59113 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
1875ba29609583ab819971b9959e97aa5e450723 12-Nov-2008 Chris Lattner <sabre@nondot.org> Make emission of 'if' conditions much more sophisticated when we
have a condition that is an &&/||. Before we used to compile things like this:

int test() {
if (x && y) foo(); else bar();
}

into:

%0 = load i32* @x ; <i32> [#uses=1]
%1 = icmp ne i32 %0, 0 ; <i1> [#uses=1]
br i1 %1, label %land_rhs, label %land_cont

land_rhs: ; preds = %entry
%2 = load i32* @y ; <i32> [#uses=1]
%3 = icmp ne i32 %2, 0 ; <i1> [#uses=1]
br label %land_cont

land_cont: ; preds = %land_rhs, %entry
%4 = phi i1 [ false, %entry ], [ %3, %land_rhs ] ; <i1> [#uses=1]
br i1 %4, label %ifthen, label %ifelse

ifthen: ; preds = %land_cont
%call = call i32 (...)* @foo() ; <i32> [#uses=0]
br label %ifend

ifelse: ; preds = %land_cont
%call1 = call i32 (...)* @bar() ; <i32> [#uses=0]
br label %ifend

ifend: ; preds = %ifelse, %ifthen


Now we turn it into the much more svelte code:

%0 = load i32* @x ; <i32> [#uses=1]
%1 = icmp ne i32 %0, 0 ; <i1> [#uses=1]
br i1 %1, label %land_lhs_true, label %ifelse

land_lhs_true: ; preds = %entry
%2 = load i32* @y ; <i32> [#uses=1]
%3 = icmp ne i32 %2, 0 ; <i1> [#uses=1]
br i1 %3, label %ifthen, label %ifelse

ifthen: ; preds = %land_lhs_true
%call = call i32 (...)* @foo() ; <i32> [#uses=0]
br label %ifend

ifelse: ; preds = %land_lhs_true, %entry
%call1 = call i32 (...)* @bar() ; <i32> [#uses=0]
br label %ifend

ifend: ; preds = %ifelse, %ifthen

Note the lack of a phi node.

This shrinks the -O0 .ll file for 176.gcc/expr.c from 43176 to 40267 lines.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59111 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
9bc47e29dce8f095be7a6d07dbb02a5a7a112949 12-Nov-2008 Chris Lattner <sabre@nondot.org> Make emission of 'if' conditions much more sophisticated when we
have a condition that is an &&/||. Before we used to compile things like this:

int test() {
if (x && y) foo(); else bar();
}

into:

%0 = load i32* @x ; <i32> [#uses=1]
%1 = icmp ne i32 %0, 0 ; <i1> [#uses=1]
br i1 %1, label %land_rhs, label %land_cont

land_rhs: ; preds = %entry
%2 = load i32* @y ; <i32> [#uses=1]
%3 = icmp ne i32 %2, 0 ; <i1> [#uses=1]
br label %land_cont

land_cont: ; preds = %land_rhs, %entry
%4 = phi i1 [ false, %entry ], [ %3, %land_rhs ] ; <i1> [#uses=1]
br i1 %4, label %ifthen, label %ifelse

ifthen: ; preds = %land_cont
%call = call i32 (...)* @foo() ; <i32> [#uses=0]
br label %ifend

ifelse: ; preds = %land_cont
%call1 = call i32 (...)* @bar() ; <i32> [#uses=0]
br label %ifend

ifend: ; preds = %ifelse, %ifthen


Now we turn it into the much more svelte code:

%0 = load i32* @x ; <i32> [#uses=1]
%1 = icmp ne i32 %0, 0 ; <i1> [#uses=1]
br i1 %1, label %land_lhs_true, label %ifelse

land_lhs_true: ; preds = %entry
%2 = load i32* @y ; <i32> [#uses=1]
%3 = icmp ne i32 %2, 0 ; <i1> [#uses=1]
br i1 %3, label %ifthen, label %ifelse

ifthen: ; preds = %land_lhs_true
%call = call i32 (...)* @foo() ; <i32> [#uses=0]
br label %ifend

ifelse: ; preds = %land_lhs_true, %entry
%call1 = call i32 (...)* @bar() ; <i32> [#uses=0]
br label %ifend

ifend: ; preds = %ifelse, %ifthen

Note the lack of a phi node.

This shrinks the -O0 .ll file for 176.gcc/expr.c from 43176 to 40267 lines.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59111 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
41f729269b97ab42afb5fa1e8d92b1193f56944f 12-Nov-2008 Chris Lattner <sabre@nondot.org> Clean up some code to use isZero instead of calling getZExtValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59103 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GStmt.cpp
746e03ed511664a1c781b209faaa3a66d4593480 12-Nov-2008 Chris Lattner <sabre@nondot.org> Clean up some code to use isZero instead of calling getZExtValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59103 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GStmt.cpp
b419dcb0249f1e340ce414d21bba97bff01c1eea 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Use createBasicBlock here too.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59095 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1fef965b8ec106c36a2e53907ef84458fcd0a4ec 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Use createBasicBlock here too.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59095 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
4dcabf32a489c1e197795530f34505cf29380f12 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Disable generation of basic block names in NDEBUG mode.

Revert to enabling generation of instruction names when not in NDEBUG
mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59094 91177308-0d34-0410-b5e6-96231b3b80d8
GBuilder.h
odeGenFunction.h
29ea6729155c759836be4b5453bee9ef8e1e97ee 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Disable generation of basic block names in NDEBUG mode.

Revert to enabling generation of instruction names when not in NDEBUG
mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59094 91177308-0d34-0410-b5e6-96231b3b80d8
GBuilder.h
odeGenFunction.h
5aa22bce98a0606fb20348e988ebb8e65e67e2a1 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Rework IRgen invariant w.r.t. current insert point.
- EmitStmt is no longer required to finish with a current insertion
point defined (i.e. it does not need to make dummy
blocks). Instead, it can clear the insertion point in the builder
which indicates that the current insertion point is unreachable.
- CodeGenFunction provides HaveInsertPoint and EnsureInsertPoint
which respectively test if there is an insert point and ensure an
insertion point exists (by making a dummy block).
- Clearly mark functions in CodeGenFunction which can be called with
no insertion point defined. Currently this is a limited set, and
EmitStmt simply EnsureInsertPoint()s before emitting subsequent IR.

Remove EmitDummyBlock, which is no longer needed. Clients who haven't
already cleared the insertion point (typically via EmitBranch) can do
so by hand.

Remove isDummyBlock, which has effectively been renamed to
HaveInsertPoint.

The main thrust of this change is that we no longer have create dummy
blocks just to destroy them a short time later in EmitBlock in the
common case that there is no unreachable code following something like
a goto.

Additionally, this means that we are not using the hokey condition in
isDummyBlock that a block without a name is a dummy block. Guess how
well that works when we never emit block names!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59089 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
a448fb2da03ece39978784793eea68760e8205a1 12-Nov-2008 Daniel Dunbar <daniel@zuster.org> Rework IRgen invariant w.r.t. current insert point.
- EmitStmt is no longer required to finish with a current insertion
point defined (i.e. it does not need to make dummy
blocks). Instead, it can clear the insertion point in the builder
which indicates that the current insertion point is unreachable.
- CodeGenFunction provides HaveInsertPoint and EnsureInsertPoint
which respectively test if there is an insert point and ensure an
insertion point exists (by making a dummy block).
- Clearly mark functions in CodeGenFunction which can be called with
no insertion point defined. Currently this is a limited set, and
EmitStmt simply EnsureInsertPoint()s before emitting subsequent IR.

Remove EmitDummyBlock, which is no longer needed. Clients who haven't
already cleared the insertion point (typically via EmitBranch) can do
so by hand.

Remove isDummyBlock, which has effectively been renamed to
HaveInsertPoint.

The main thrust of this change is that we no longer have create dummy
blocks just to destroy them a short time later in EmitBlock in the
common case that there is no unreachable code following something like
a goto.

Additionally, this means that we are not using the hokey condition in
isDummyBlock that a block without a name is a dummy block. Guess how
well that works when we never emit block names!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59089 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
c55b7c5293e2faa89daad79d29ab2706fa90b4e4 11-Nov-2008 Daniel Dunbar <daniel@zuster.org> Change EmitBranch to always clear the insert point to clarify irgen
invariants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59085 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
5e08ad3cc62ab94649959ae227a9a411a729bf49 11-Nov-2008 Daniel Dunbar <daniel@zuster.org> Change EmitBranch to always clear the insert point to clarify irgen
invariants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59085 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.h
03f7ae1bac43713720ae11546dc731e57d60c232 11-Nov-2008 Daniel Dunbar <daniel@zuster.org> Emit debug region end in unified return block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59081 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
f5bd45c8e6fa7519cdc17ec3ff4917e279c6a041 11-Nov-2008 Daniel Dunbar <daniel@zuster.org> Emit debug region end in unified return block.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59081 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
0ef7c38b66bf76756261f9a1a6247588d5263fc1 11-Nov-2008 Anton Korobeynikov <asl@math.spbu.ru> Codegen support for fastcall & stdcall CC.
Patch by Ilya Okonsky!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59080 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f1c9c09e2e2220e4bbfb7e9d8adf9bf2c2406b80 11-Nov-2008 Anton Korobeynikov <asl@math.spbu.ru> Codegen support for fastcall & stdcall CC.
Patch by Ilya Okonsky!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59080 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
044bffcc40fa4915afed28dbfac81754ab0b4f00 11-Nov-2008 Chris Lattner <sabre@nondot.org> Try to not emit the dead side of ?: if the condition is a constant.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59061 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
c657e92d7b44568fe39ae018a69b18cbcc4ea3b0 11-Nov-2008 Chris Lattner <sabre@nondot.org> Try to not emit the dead side of ?: if the condition is a constant.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59061 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
0cb7c87eb879a2a3f79426d34c678b07c04c1d8c 11-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof expressions, both of values and types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59057 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
0518999d3adcc289997bd974dce90cc97f5c1c44 11-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof expressions, both of values and types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59057 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
5276caa0afd7b2247265e757a9916fc112bc0897 11-Nov-2008 Daniel Dunbar <daniel@zuster.org> Add CodeGenFunction::EmitBranch.
- Emits an unconditional branch, with extra logic to avoid generating
spurious branches out of dummy blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59037 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.h
d57a871339c7c98d58d93108b806f59bdf4e13e2 11-Nov-2008 Daniel Dunbar <daniel@zuster.org> Add CodeGenFunction::EmitBranch.
- Emits an unconditional branch, with extra logic to avoid generating
spurious branches out of dummy blocks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59037 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.h
3f73d0dee4f585cc7081f24da77d03f43ee8a08d 11-Nov-2008 Chris Lattner <sabre@nondot.org> short circuit && and || when possible. This substantially reduces
the size of the -O0 output on some cases. For example, on expr.c from
176.gcc, it shrinks the .ll file from 43164 to 42835 lines, and removed
references to two external symbols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59034 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
0946ccd1e58c1f1da31ddbca67c5b6301ac8b255 11-Nov-2008 Chris Lattner <sabre@nondot.org> short circuit && and || when possible. This substantially reduces
the size of the -O0 output on some cases. For example, on expr.c from
176.gcc, it shrinks the .ll file from 43164 to 42835 lines, and removed
references to two external symbols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59034 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
c72a6a3f73d49ae3d0217b2c5d6a0b3c82c8bd87 11-Nov-2008 Chris Lattner <sabre@nondot.org> Make codegen smart enough to not emit the dead side of an if whose
condition is a constant. This shrinks -O0 codegen by quite a bit
on some cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59033 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
62b72f642207ba2ba433d686df924dc9594e9897 11-Nov-2008 Chris Lattner <sabre@nondot.org> Make codegen smart enough to not emit the dead side of an if whose
condition is a constant. This shrinks -O0 codegen by quite a bit
on some cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59033 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
e3afa4680fa780268221487a9782b4d205650774 11-Nov-2008 Chris Lattner <sabre@nondot.org> implement debug info for typeof()



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59032 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3cc5c406c436a90c8dd61f545552b844391ebf5b 11-Nov-2008 Chris Lattner <sabre@nondot.org> implement debug info for typeof()



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59032 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
a2209a6c3d2f299d6d9fe7f17dd3ca3ea6bfb8b8 11-Nov-2008 Daniel Dunbar <daniel@zuster.org> Add CodeGenFunction::EmitDummyBlock for marking places where we make
"dummy" blocks (blocks just used to make sure we have a place to dump
code to).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59022 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GStmt.cpp
odeGenFunction.h
824e3bd76b2e32db2ec6e4d2d113413e518d1c63 11-Nov-2008 Daniel Dunbar <daniel@zuster.org> Add CodeGenFunction::EmitDummyBlock for marking places where we make
"dummy" blocks (blocks just used to make sure we have a place to dump
code to).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59022 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GStmt.cpp
odeGenFunction.h
42bd06a88736f693267dcde8c8fcd6212f34089d 11-Nov-2008 Daniel Dunbar <daniel@zuster.org> Remove CodeGenFunction::StartBlock.
- Was confusing and only used in one small part of the code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59020 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.cpp
f84dcda7e2ab2f6d5be5a8c52d22ef4c442dd762 11-Nov-2008 Daniel Dunbar <daniel@zuster.org> Remove CodeGenFunction::StartBlock.
- Was confusing and only used in one small part of the code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59020 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
odeGenFunction.cpp
72f9655a72b1a21d1431dd47a7b3b23151ef1c03 11-Nov-2008 Daniel Dunbar <daniel@zuster.org> Centralize basic block creation in CodeGenFunction::createBasicBlock.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59017 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
55e874299f2ad827646a4ca9ea38c402aaeb38c9 11-Nov-2008 Daniel Dunbar <daniel@zuster.org> Centralize basic block creation in CodeGenFunction::createBasicBlock.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59017 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjC.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
107f12403b7c89dc0688d0567b80b2d554fd8b2c 10-Nov-2008 Chris Lattner <sabre@nondot.org> don't preserve names on IR instructions. This matches llvm-gcc's behavior and
speeds up the compiler by ~8% at -emit-llvm -O0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58977 91177308-0d34-0410-b5e6-96231b3b80d8
GBuilder.h
526d9271ad059071d24d59efeae17ecb03e91418 10-Nov-2008 Chris Lattner <sabre@nondot.org> don't preserve names on IR instructions. This matches llvm-gcc's behavior and
speeds up the compiler by ~8% at -emit-llvm -O0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58977 91177308-0d34-0410-b5e6-96231b3b80d8
GBuilder.h
f8cf8fbbf4fa3fc7201ddde963ea7cc43afc6005 10-Nov-2008 Chris Lattner <sabre@nondot.org> Fix even more bugs in debug info support:
1. emit proper debug info for forward decls of structs.
2. emit DW_TAG_member nodes around members of a field like llvm-gcc does.

This slows down debug info generation, but is required for correctness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58973 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
f2528e045c12dd743a83b5141eba36d6aa947cbb 10-Nov-2008 Chris Lattner <sabre@nondot.org> Fix even more bugs in debug info support:
1. emit proper debug info for forward decls of structs.
2. emit DW_TAG_member nodes around members of a field like llvm-gcc does.

This slows down debug info generation, but is required for correctness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58973 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
562ce0aef90ca9915ec8c725ee2ac3c896ee5e76 10-Nov-2008 Chris Lattner <sabre@nondot.org> reimplement debug info generation in terms of DebugInfo.h instead of
using MachineModuleInfo. This runs at about the same speed as the old
code, but fixes a bunch of bugs and is simpler and shorter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58971 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
9c85ba33ac85bbf5915f300a4b228bad7c693ee7 10-Nov-2008 Chris Lattner <sabre@nondot.org> reimplement debug info generation in terms of DebugInfo.h instead of
using MachineModuleInfo. This runs at about the same speed as the old
code, but fixes a bunch of bugs and is simpler and shorter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58971 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
df8f304b9b179edfacdc6ddee729c74cf785fc37 09-Nov-2008 Anders Carlsson <andersca@mac.com> Support named operands in inline asm statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58940 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
ce179ab4358c152164899c032302d8b0e81982b6 09-Nov-2008 Anders Carlsson <andersca@mac.com> Support named operands in inline asm statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58940 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
644407852a2aa297f44f00c02e014e662d263850 08-Nov-2008 Daniel Dunbar <daniel@zuster.org> Avoid redundant cast<>s / simplify type dispatch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58892 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
960627da5a98e788045b81cb32a7db7290c76c35 08-Nov-2008 Daniel Dunbar <daniel@zuster.org> Avoid redundant cast<>s / simplify type dispatch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58892 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
536e4ae07cc8c302ca191598a7dec289a7b8e568 08-Nov-2008 Daniel Dunbar <daniel@zuster.org> "Fix" PR3021, don't crash on generating record types when we can't
generate the type of a member.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58889 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
d7f6050113598797078f2718bc9f76c3ae35f0df 08-Nov-2008 Daniel Dunbar <daniel@zuster.org> "Fix" PR3021, don't crash on generating record types when we can't
generate the type of a member.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58889 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
825f6ea730de198743bbefdfa270bf65834ced27 04-Nov-2008 Chris Lattner <sabre@nondot.org> LinkageSpecDecl is c++ specific, move it to DeclCXX


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58704 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
21ef7ae45c8b91f23cf5eab2263421bb398a644b 04-Nov-2008 Chris Lattner <sabre@nondot.org> LinkageSpecDecl is c++ specific, move it to DeclCXX


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58704 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
d860663a58f234b3936571178855e52f41377ba0 04-Nov-2008 Douglas Gregor <doug.gregor@gmail.com> Add a new expression class, ObjCSuperExpr, to handle the Objective-C 'super'. Remove ObjCThis from PredefinedExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58698 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjC.cpp
odeGenFunction.h
cd9b46e5442a3ef17f83f75177d8545cb5b3e2b9 04-Nov-2008 Douglas Gregor <dgregor@apple.com> Add a new expression class, ObjCSuperExpr, to handle the Objective-C 'super'. Remove ObjCThis from PredefinedExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58698 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjC.cpp
odeGenFunction.h
285611ee35b40adf1c899b3f20678d6c3d1e2f00 04-Nov-2008 Anders Carlsson <andersca@mac.com> Implement lowering of va_arg in clang directly. (This is 32-bit X86 only for now).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58681 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
ddf7cac45d85b73127adbbd91a2b28fc7291c57e 04-Nov-2008 Anders Carlsson <andersca@mac.com> Implement lowering of va_arg in clang directly. (This is 32-bit X86 only for now).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58681 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
1758e26483143e29a4328292e56c4ebff681e15f 04-Nov-2008 Anders Carlsson <andersca@mac.com> Fix bug in va_copy

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58680 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
d9641f8dad2eb11ad5f035a41f88c4259b80cd90 04-Nov-2008 Anders Carlsson <andersca@mac.com> Fix bug in va_copy

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58680 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
26cd09ab0010d2e168404541434ba7f79dee955e 03-Nov-2008 Chris Lattner <sabre@nondot.org> privatize some methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58602 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.h
86cd8afb03dea4c2e5011bd1866fa9eebf3c001f 03-Nov-2008 Chris Lattner <sabre@nondot.org> privatize some methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58602 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.h
d916e6e52ca2f56cac70a1bcc88e86ffcf86a977 01-Nov-2008 Daniel Dunbar <daniel@zuster.org> Move IRBuilder type definition to common file.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58546 91177308-0d34-0410-b5e6-96231b3b80d8
GBuilder.h
GDebugInfo.cpp
GDebugInfo.h
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
45d196b8387dcefc4df26cda114fa34c6528e928 01-Nov-2008 Daniel Dunbar <daniel@zuster.org> Move IRBuilder type definition to common file.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58546 91177308-0d34-0410-b5e6-96231b3b80d8
GBuilder.h
GDebugInfo.cpp
GDebugInfo.h
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
fa45143d9b070b5e0e76031dbba1fca99ecd06ab 31-Oct-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Made the mechanism of defining preprocessor defs for maxint, ptrdiff_t, wchar
etc more generic. For some targets, long may not be equal to pointer size. For
example: PIC16 has int as i16, ptr as i16 but long as i32.

Also fixed a few build warnings in assert() functions in CFRefCount.cpp,
CGDecl.cpp, SemaDeclCXX.cpp and ParseDeclCXX.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58501 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
31fc07df7f0fc89ebf83ca05a20b29de45a7598d 31-Oct-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Made the mechanism of defining preprocessor defs for maxint, ptrdiff_t, wchar
etc more generic. For some targets, long may not be equal to pointer size. For
example: PIC16 has int as i16, ptr as i16 but long as i32.

Also fixed a few build warnings in assert() functions in CFRefCount.cpp,
CGDecl.cpp, SemaDeclCXX.cpp and ParseDeclCXX.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58501 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
65b69a8e96dc5a437c779d3dc9c7086b609b3d1d 31-Oct-2008 Daniel Dunbar <daniel@zuster.org> Debug info: Bug fix, function types should always include the return
type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58497 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9881cf0f09aeada2894b203c854bd12b1babfd5d 31-Oct-2008 Daniel Dunbar <daniel@zuster.org> Debug info: Bug fix, function types should always include the return
type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58497 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
8b4aa905ef33fec1630b64f93321cd01c1476fd1 31-Oct-2008 Daniel Dunbar <daniel@zuster.org> Quick fix for PR2950, infinite loop generating debug info for
recursive types.
- Style will be clean up in further patches.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58490 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
bea06e4adb9fb7c2372058ee078c18db451b5a07 31-Oct-2008 Daniel Dunbar <daniel@zuster.org> Quick fix for PR2950, infinite loop generating debug info for
recursive types.
- Style will be clean up in further patches.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58490 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
44252b46db9c9d1406fec3725ad0af70336c8e2c 31-Oct-2008 Daniel Dunbar <daniel@zuster.org> Formatting tweaks.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58488 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
3845f86d05e151ebb89a4d4e110c5cd12ececde9 31-Oct-2008 Daniel Dunbar <daniel@zuster.org> Formatting tweaks.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58488 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
35b777f08c8aa94f6c84ab1bdd1efc508eb7a62b 29-Oct-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit protocol objects lazily.
- That is, the metadata for a protocol is only emitted if that
protocol is actually used in the translation unit. This is
important because Objective-C headers frequently contain a large
number of protocol definitions, only a few of which will be used in
any given file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58400 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0c0e7a65214d0b4af68336d6d2fdce525695146a 29-Oct-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit protocol objects lazily.
- That is, the metadata for a protocol is only emitted if that
protocol is actually used in the translation unit. This is
important because Objective-C headers frequently contain a large
number of protocol definitions, only a few of which will be used in
any given file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58400 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
04340baa99f5e1147597f3befbc3674e245b8f02 29-Oct-2008 Eli Friedman <eli.friedman@gmail.com> Fix for PR2966: va_start/va_end use the *address* of the
va_list, not the value. Patch fixes an assert on
x86-64 and a wrong-code bug on x86. I'm not completely sure,
but I think it's a regression from r58306.

Does anyone run regression tests regularly on x86-64? The crash should
have been picked up there.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58366 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
6a0b9846e60e321b1e295072e3d2d01d8411cc60 29-Oct-2008 Eli Friedman <eli.friedman@gmail.com> Fix for PR2966: va_start/va_end use the *address* of the
va_list, not the value. Patch fixes an assert on
x86-64 and a wrong-code bug on x86. I'm not completely sure,
but I think it's a regression from r58306.

Does anyone run regression tests regularly on x86-64? The crash should
have been picked up there.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58366 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
09d411e3e70fab397a64faf3cb8a5449a06be0e3 28-Oct-2008 Daniel Dunbar <daniel@zuster.org> Don't run the verifier as part of IRgen, this is now down (per module)
in the driver (this means we no longer run the verifier per function, however).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58307 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenModule.cpp
2149470b6aca57e9ca2b7fb80416932ca75bbff7 28-Oct-2008 Daniel Dunbar <daniel@zuster.org> Don't run the verifier as part of IRgen, this is now down (per module)
in the driver (this means we no longer run the verifier per function, however).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58307 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenModule.cpp
0a2da71034fea55ee786387314eae704b91e2f9b 28-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add attribute always_inline support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58304 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
af668b0e7d3581dea3b4f29a9262686e83887e5b 28-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add attribute always_inline support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58304 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a91779856a91fbf663a69164a583fdf0e6d73c0e 27-Oct-2008 Chris Lattner <sabre@nondot.org> make codegen reject initializes with designators, like this:

t.c:1:13: error: cannot codegen this designators yet
int a[10] = {2, 4, [8]=9, 10};
^~~~~~~~~~~~~~~~~



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58220 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
be20bb558cae5352898e6a913e29d24d20134841 27-Oct-2008 Chris Lattner <sabre@nondot.org> make codegen reject initializes with designators, like this:

t.c:1:13: error: cannot codegen this designators yet
int a[10] = {2, 4, [8]=9, 10};
^~~~~~~~~~~~~~~~~



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58220 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprConstant.cpp
GExprScalar.cpp
c03d2ca68a37b5a33fffd5d1a30c28337bfce31f 26-Oct-2008 Oscar Fuentes <ofv@wanadoo.es> CMake: Builds and installs clang binary and libs (no docs yet). It
must be under the `tools' subdirectory of the LLVM *source* tree.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58180 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
d2f4e5ea6e980e48c292f5ca250e99377e3ee111 26-Oct-2008 Oscar Fuentes <ofv@wanadoo.es> CMake: Builds and installs clang binary and libs (no docs yet). It
must be under the `tools' subdirectory of the LLVM *source* tree.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58180 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
4a66ef15f3d178f3950292d3822db3f5427cf23a 24-Oct-2008 Daniel Dunbar <daniel@zuster.org> Don't crash on invalid source locations in
CGDebugInfo::getOrCreateCompileUnit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58081 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
25f51dda883d8b08d99e30fcec3b274599264712 24-Oct-2008 Daniel Dunbar <daniel@zuster.org> Don't crash on invalid source locations in
CGDebugInfo::getOrCreateCompileUnit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58081 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9865e6f3f4e989dd2a89a0449a31b72840310ea1 24-Oct-2008 Daniel Dunbar <daniel@zuster.org> Map compilation units using FileEntry pointers instead of
FileIDs. This seems better conceptually and lets the SourceManager
handle details of mapping the location to a file ID.
- In practice, fixes an assert because this code wasn't using
getPhysicalLoc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58055 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
2104bf96271cb1b57e2af817acbdf4db63b4b171 24-Oct-2008 Daniel Dunbar <daniel@zuster.org> Map compilation units using FileEntry pointers instead of
FileIDs. This seems better conceptually and lets the SourceManager
handle details of mapping the location to a file ID.
- In practice, fixes an assert because this code wasn't using
getPhysicalLoc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58055 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
984c240798d5b6df02aedb4524c27670752f3264 21-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add GetModule accessor to ModuleBuilder


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57924 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
d8c0ea1a80f27045c5371f6f97eadb38e8ca4279 21-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add GetModule accessor to ModuleBuilder


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57924 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
d2baafd07bc5c7679a6f1f10e5587a95842ffa15 21-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> Preliminary support for function overloading

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57909 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
8e9bebdea69c590dedfbf27374114cb76fe12fbd 21-Oct-2008 Douglas Gregor <dgregor@apple.com> Preliminary support for function overloading

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57909 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
54968bf9195bf1ef7194054e735b9268b2ceaf86 18-Oct-2008 Daniel Dunbar <daniel@zuster.org> Debug info bug fix, function start wasn't getting generated correctly
for Obj-C methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57769 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
2284ac9ec80299fcdefae9a2787cf85105a0f203 18-Oct-2008 Daniel Dunbar <daniel@zuster.org> Debug info bug fix, function start wasn't getting generated correctly
for Obj-C methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57769 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
902ed6903358c4fe96534730df78114fceb8cdc4 18-Oct-2008 Daniel Dunbar <daniel@zuster.org> Emit more descriptive unsupported error message on dot-syntax use of super.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57745 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
961b03c95dfbfb055143a25e714144976f74d2a1 18-Oct-2008 Daniel Dunbar <daniel@zuster.org> Emit more descriptive unsupported error message on dot-syntax use of super.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57745 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
42f9533da237e5b35c0b279d54f742f6fdfeeeb7 18-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add FIXME about potential problem in how property ref lvalues are handled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57743 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
f951719f81a8eebd1fa6c80ccde843888dfd5d64 18-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add FIXME about potential problem in how property ref lvalues are handled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57743 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
a9f0be24014f4519fbdb5baf56d9c4625fc1b20c 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> Lift CodeGenFunction::EmitPredefinedFunctioName out of EmitPredefinedLValue.
- Shouldn't assume predefined expr is a function printing one.
- Uses CGM functionality to cache function names per module.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57737 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
662b71ee82339c67f2c3689196e716c6560cf925 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> Lift CodeGenFunction::EmitPredefinedFunctioName out of EmitPredefinedLValue.
- Shouldn't assume predefined expr is a function printing one.
- Uses CGM functionality to cache function names per module.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57737 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
a70e1d72640e38c1b2f8caf63f567e2698e1ebdb 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add option argument to GetAddrOfConstantString to use for name of
(first) global holding the string.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57736 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
5fabf9dbee29464bcd06cd09f8e569d1b850f948 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add option argument to GetAddrOfConstantString to use for name of
(first) global holding the string.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57736 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
33cd0ffbca85ae672c6923b3c5032331b5a49525 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> Emit error unsupported when asm string conversion fails instead of
assert.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57721 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
281f55c8c6aed79f1ac1c6ee848bd94ebd7f936f 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> Emit error unsupported when asm string conversion fails instead of
assert.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57721 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
c9197cd41f5bf5a11f9346a8d7118d4267941e98 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> Remove unneeded EncodingRecordTypes argument to getObjCEncodingForType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57716 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
0d504c1da852e58ff802545c823ecff3b6c654b8 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> Remove unneeded EncodingRecordTypes argument to getObjCEncodingForType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57716 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
aa913104830f5f2d384ca13dedcc81d76fd195d1 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> More Obj-C type encoding improvements.
- Encode unions and bit-fields correctly.
- Accept option to name record fields (used for NeXT runtime).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57685 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d96b35bc6becf8db00d140c11e3d0e53f27567a1 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> More Obj-C type encoding improvements.
- Encode unions and bit-fields correctly.
- Accept option to name record fields (used for NeXT runtime).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57685 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6fc1f978c13d1c69c9d311e25e356673bebcc147 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> Change CGDebugInfo::setLocation to just ignore invalid locations. This
simplifies clients.

Also, add assert that RegionStack is empty when the CGDebugInfo is
destroyed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57684 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenModule.cpp
66031a5594bc9a7dc0dc5137c3e7955f835e4639 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> Change CGDebugInfo::setLocation to just ignore invalid locations. This
simplifies clients.

Also, add assert that RegionStack is empty when the CGDebugInfo is
destroyed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57684 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenModule.cpp
aecef4c77762fc95f4141d2b2b790032c4bb9a01 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Use objc_msgSend_fpret for calling functions which return
floating point. This is only correct for x86-32 at the moment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57667 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
5669e57b4a74d26e9e2fb70d778141d0d849388b 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Use objc_msgSend_fpret for calling functions which return
floating point. This is only correct for x86-32 at the moment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57667 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1257f8cf31b4aa625523bd5457cf001fd3073318 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> Quick patch for PR2784, assert genereting debug info for opaque
structure.
- I'm not sure yet about the behavior, but this at least prevents the
crash.

Add some asserts on RegionStack usage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57661 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
5273f514a1e8dd5f5ebd0f94d2c59f7e0e88a674 17-Oct-2008 Daniel Dunbar <daniel@zuster.org> Quick patch for PR2784, assert genereting debug info for opaque
structure.
- I'm not sure yet about the behavior, but this at least prevents the
crash.

Add some asserts on RegionStack usage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57661 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9e43be159355338a5eba1d251a961af58ed77da1 15-Oct-2008 Mon P Wang <wangmp@apple.com> Added pinsrd, pinsrq, and some other vector intrinsics


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57563 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
bc4f4030e245e36642f894d848f6a8bf94426cc2 15-Oct-2008 Mon P Wang <wangmp@apple.com> Added pinsrd, pinsrq, and some other vector intrinsics


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57563 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
2538a8c428063cdaa8780040de96b93a68690528 15-Oct-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Simplify handling of struct/union/class tags.
Instead of using two sets of Decl kinds (Struct/Union/Class and CXXStruct/CXXUnion/CXXClass), use one 'Record' and one 'CXXRecord' Decl kind and make tag kind a property of TagDecl.
Cleans up the code a bit and better reflects that Decl class structure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57541 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
35bc0821c4f80041724cd4c5c4889b2581546a41 15-Oct-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Simplify handling of struct/union/class tags.
Instead of using two sets of Decl kinds (Struct/Union/Class and CXXStruct/CXXUnion/CXXClass), use one 'Record' and one 'CXXRecord' Decl kind and make tag kind a property of TagDecl.
Cleans up the code a bit and better reflects that Decl class structure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57541 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
f98eeff0128aa63eaba458ac8f01be9da48ebc89 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
GCall.cpp
odeGenTypes.cpp
odeGenTypes.h
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
GCall.cpp
odeGenTypes.cpp
odeGenTypes.h
94c4b2d4878a46638bfd065937f0700599e5eb3d 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
GExprConstant.cpp
GObjC.cpp
GStmt.cpp
odeGenTypes.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
GExprConstant.cpp
GObjC.cpp
GStmt.cpp
odeGenTypes.cpp
1cdfe142e529a24766ee61a7bf8857bd8f5fa967 10-Oct-2008 Daniel Dunbar <daniel@zuster.org> Lift EmitTargetBuiltinExpr out of EmitBuiltinExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57335 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
f02e9ddf5efc75917af712b3c7f909581205f0a5 10-Oct-2008 Daniel Dunbar <daniel@zuster.org> Lift EmitTargetBuiltinExpr out of EmitBuiltinExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57335 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
odeGenFunction.h
2461f619288c1f37a4cab7da6af0b75c6e0acd79 10-Oct-2008 Dale Johannesen <dalej@apple.com> Adjust calls to APFloat conversion for new interface.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57332 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
ee5a700af3fe9ae1a639c271f093f40677dddc04 10-Oct-2008 Dale Johannesen <dalej@apple.com> Adjust calls to APFloat conversion for new interface.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57332 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
2ac10d0ec8a12606441f69e22d8a3c66bde5ac03 06-Oct-2008 Ted Kremenek <kremenek@apple.com> Use DeclStmt::getSolitaryDecl() instead of DeclStmt::getDecl() when processing the Decl of an Objective-C foreach statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57209 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
39741cecde917affbcbdfb2942ff1a9eae8f3488 06-Oct-2008 Ted Kremenek <kremenek@apple.com> Use DeclStmt::getSolitaryDecl() instead of DeclStmt::getDecl() when processing the Decl of an Objective-C foreach statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57209 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
f41e9f73a31769004a0b44dac8eae2ec2765930b 06-Oct-2008 Ted Kremenek <kremenek@apple.com> Use DeclStmt::getSolitaryDecl() instead of DeclStmt::getDecl() when processing the Decl of a @catch statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57208 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
de3b8fb02bd86a592fe5073020e6bdaf97902ffc 06-Oct-2008 Ted Kremenek <kremenek@apple.com> Use DeclStmt::getSolitaryDecl() instead of DeclStmt::getDecl() when processing the Decl of a @catch statement.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57208 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a6b2b279df27dc8ae55586f81735892590f7ed8d 06-Oct-2008 Ted Kremenek <kremenek@apple.com> In EmitDeclStmt: use DeclStmt::const_decl_iterator instead of walking the scoped decl chain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57192 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
e4ea1f42c97a436df3e0ae8e129e6bc624ee6790 06-Oct-2008 Ted Kremenek <kremenek@apple.com> In EmitDeclStmt: use DeclStmt::const_decl_iterator instead of walking the scoped decl chain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57192 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
0903cba80a0f86fd8e9b50c3683643788ce1b7b8 06-Oct-2008 Chris Lattner <sabre@nondot.org> Make sema and codegen allow __builtin___CFStringMakeConstantString as a valid
constant lvalue. Implement this in codegen by moving the code out of CGBuiltin
into EmitConstantExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57163 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprConstant.cpp
506ff88f44562df267b6a06608ab841b76df2a2b 06-Oct-2008 Chris Lattner <sabre@nondot.org> Make sema and codegen allow __builtin___CFStringMakeConstantString as a valid
constant lvalue. Implement this in codegen by moving the code out of CGBuiltin
into EmitConstantExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57163 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprConstant.cpp
0ba78650d91861523b606c303501d0dbfa46866d 06-Oct-2008 Chris Lattner <sabre@nondot.org> always try to fold a builtin before emitting it. In the future
it is possible that a builtin could sometimes be folded (e.g. __builtin_clz)
if it's operand is a constant.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57161 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
564ea2a99b3afeac9ded332730a56db1f6358a58 06-Oct-2008 Chris Lattner <sabre@nondot.org> always try to fold a builtin before emitting it. In the future
it is possible that a builtin could sometimes be folded (e.g. __builtin_clz)
if it's operand is a constant.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57161 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
667e1eebaa0c4c4bb1bd5fd75066025cfbce18b0 06-Oct-2008 Chris Lattner <sabre@nondot.org> Move handling of __builtin_nan("") out of CGBuiltin.cpp into ExprConstant.cpp



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57157 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
9e62171a25e3a08fb5c49fb370f83faf5ae786f5 06-Oct-2008 Chris Lattner <sabre@nondot.org> Move handling of __builtin_nan("") out of CGBuiltin.cpp into ExprConstant.cpp



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57157 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
0a79205ff219e2755df8be8ca14abdd781ee22e8 06-Oct-2008 Chris Lattner <sabre@nondot.org> remove some code where CGBuiltin folds constants, and use tryEvaluate to
do it instead. We should still handle __builtin_nan etc, but don't yet.
This fixes incorrect evaluation of __builtin_constant_p, a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57156 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
1f32999ec79a980576e100d64d5f3267eb19ea49 06-Oct-2008 Chris Lattner <sabre@nondot.org> remove some code where CGBuiltin folds constants, and use tryEvaluate to
do it instead. We should still handle __builtin_nan etc, but don't yet.
This fixes incorrect evaluation of __builtin_constant_p, a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57156 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
8ce618c82e6bc62d6979c35585700dc1f66f9525 06-Oct-2008 Chris Lattner <sabre@nondot.org> instead of making codegen try to know about all of the builtins to generate
constants for them, just use the constant evaluator to do the job. This
also fixes crashes on 'unknown constant builtins'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57155 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
f6b24ea67b5898295e2fc645327837037462a0fd 06-Oct-2008 Chris Lattner <sabre@nondot.org> instead of making codegen try to know about all of the builtins to generate
constants for them, just use the constant evaluator to do the job. This
also fixes crashes on 'unknown constant builtins'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57155 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
dd6791c806f39b878486285c7725ba09844bf8ed 06-Oct-2008 Anders Carlsson <andersca@mac.com> Implement support for the const and pure attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57142 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
232eb7d33b96ad8f99de3b5ae840421b3a7c6cb7 06-Oct-2008 Anders Carlsson <andersca@mac.com> Implement support for the const and pure attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57142 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
66e021e2e2dcfaacf0cb37723d9f1afa1efb4136 02-Oct-2008 Daniel Dunbar <daniel@zuster.org> Emit error unsupported for break/continue/goto inside Obj-C exception
handling blocks.
- This has false positives, but at least prevents miscompiles.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56958 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
a4275d194b656867bdcdb725b2a7ba3251a1a638 02-Oct-2008 Daniel Dunbar <daniel@zuster.org> Emit error unsupported for break/continue/goto inside Obj-C exception
handling blocks.
- This has false positives, but at least prevents miscompiles.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56958 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
be56f01bf9863eeb565e6d988cb281423a9fc44d 02-Oct-2008 Daniel Dunbar <daniel@zuster.org> (LLVM up) Rename IRBuilder::IsNonNull -> IsNotNull.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56954 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
91cd320ea2b7da98227869b0dd803a4953c076d0 02-Oct-2008 Daniel Dunbar <daniel@zuster.org> (LLVM up) Rename IRBuilder::IsNonNull -> IsNotNull.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56954 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
4e19f4e7cd72bdfde91e35a765a7de4cfdf7fd49 01-Oct-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Update to use CreateRuntimeFunction for the routines it imports.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56902 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ad2dc71a6f40e94331e72c18b2cffa0320b18eb3 01-Oct-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Update to use CreateRuntimeFunction for the routines it imports.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56902 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
18c2ec664cdde7eae68b71ea3ea4b1308857b6fe 01-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add simple interface for protecting runtime functions from name
collisions.
- Provide CodeGenModule::CreateRuntimeFunction which guarantees that
the function it creates will have the provided name in the final
module. This allows the runtime to have its functions protected
from declarations of the same name in the source code.

- One could argue that this is a reason to abuse the llvm::Module
namespace for dealing with function redeclarations. However, that
approach seems conceptually flawed to me. This one also happens to
be somewhat more efficient.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56899 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
f1968f28869f4e0675450ae39c478a37c5b9abd6 01-Oct-2008 Daniel Dunbar <daniel@zuster.org> Add simple interface for protecting runtime functions from name
collisions.
- Provide CodeGenModule::CreateRuntimeFunction which guarantees that
the function it creates will have the provided name in the final
module. This allows the runtime to have its functions protected
from declarations of the same name in the source code.

- One could argue that this is a reason to abuse the llvm::Module
namespace for dealing with function redeclarations. However, that
approach seems conceptually flawed to me. This one also happens to
be somewhat more efficient.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56899 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
1473f5255cb08085bb5476543a7dfee0da8933be 30-Sep-2008 Mon P Wang <wangmp@apple.com> Added support for sse intrinsics loadlpd, loadhpd, muldq128, and mulld128


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56830 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
7f57b000f232bc596dca627c976ace250c8171e3 30-Sep-2008 Mon P Wang <wangmp@apple.com> Added support for sse intrinsics loadlpd, loadhpd, muldq128, and mulld128


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56830 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
e9900ebfdb97eebdc514187d2a6b140a4226f705 30-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add infrastructure for proper @finally support.
- Provides a basic primitive to jump to an arbitrary basic block,
through the finally code.

- Only used for return statements and rethrow currently. Still need
to handle break, continue and goto.

- Code still needs to be shuffled around to live elsewhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56827 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GStmt.cpp
odeGenFunction.h
898d508d4c9e9d45914952473e39196b20830a9f 30-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add infrastructure for proper @finally support.
- Provides a basic primitive to jump to an arbitrary basic block,
through the finally code.

- Only used for return statements and rethrow currently. Still need
to handle break, continue and goto.

- Code still needs to be shuffled around to live elsewhere.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56827 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
GStmt.cpp
odeGenFunction.h
8354484c5430c6bc7a7dc1a96b1ddfa7b28d71df 28-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add support for implicit rethrows in @catch blocks.

Comment exception-handling code generation strategy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56763 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenFunction.h
18ccc7776ad6288c5f630dc7967fb99d099c9cd9 28-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add support for implicit rethrows in @catch blocks.

Comment exception-handling code generation strategy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56763 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenFunction.h
8ca61b2aa9a0c35ba2f5d56eadc3b0cc3747e30e 28-Sep-2008 Daniel Dunbar <daniel@zuster.org> Skip redundant if.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56762 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
ad12b6d643aba6c36f5cec4c9beb4977a12eace4 28-Sep-2008 Daniel Dunbar <daniel@zuster.org> Skip redundant if.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56762 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
0ac66f78a7a74e2b93be8188979dfd29556839bd 28-Sep-2008 Daniel Dunbar <daniel@zuster.org> (Update LLVM) Clean up obj-c exception generation to be a bit more
readable and to generate more readable IR.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56758 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
e4b5ee06153777c6899d20797dce1d4d236eb4bc 28-Sep-2008 Daniel Dunbar <daniel@zuster.org> (Update LLVM) Clean up obj-c exception generation to be a bit more
readable and to generate more readable IR.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56758 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d04c935ad4be349830e985be4e595ce73b2a2cd8 28-Sep-2008 Daniel Dunbar <daniel@zuster.org> Bug fix, codegen @catch(id<X> ...) acceptably.
- This should be rejected by sema (IMHO) but that needs some
investigation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56756 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
97f61d14c89c26b9ae8e8f1faa8e8fcc6ec00b77 28-Sep-2008 Daniel Dunbar <daniel@zuster.org> Bug fix, codegen @catch(id<X> ...) acceptably.
- This should be rejected by sema (IMHO) but that needs some
investigation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56756 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
7a68b45d3585b1f553ae0c4449d07976722f2cec 27-Sep-2008 Daniel Dunbar <daniel@zuster.org> Simplify generate code for exceptions:
- There is no need to branch on the rethrow variable to determine if
we need to call objc_exception_try_exit. We know whether an
exception was thrown, so just branch to a different target if we
want to skip the try_exit.

This is a slight semantic departure from gcc, but only for throwing
nil, which is undefined (and for which gcc emits broken code).

- Also fixes a bug in current code which was calling try_exit too
many times when an exception was uncaught (but there were some
handlers).

Fix bug introduced in prev. commit, the type of the @catch parameter
was uninitialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56754 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
129271a42975f8b9d42adc707be9883db91c8a5d 27-Sep-2008 Daniel Dunbar <daniel@zuster.org> Simplify generate code for exceptions:
- There is no need to branch on the rethrow variable to determine if
we need to call objc_exception_try_exit. We know whether an
exception was thrown, so just branch to a different target if we
want to skip the try_exit.

This is a slight semantic departure from gcc, but only for throwing
nil, which is undefined (and for which gcc emits broken code).

- Also fixes a bug in current code which was calling try_exit too
many times when an exception was uncaught (but there were some
handlers).

Fix bug introduced in prev. commit, the type of the @catch parameter
was uninitialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56754 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9575eb342f79053ed421a8eec2963e41a5044838 27-Sep-2008 Daniel Dunbar <daniel@zuster.org> Prefer llvm::Function::addFnAttr(...) to F->addAttribute(~0, ...).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56753 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f93349f3ec4d69eafba42436c33aaa91bfca7e70 27-Sep-2008 Daniel Dunbar <daniel@zuster.org> Prefer llvm::Function::addFnAttr(...) to F->addAttribute(~0, ...).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56753 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7a57b8de5f5f1c6d6d6775906656e835f4921774 27-Sep-2008 Daniel Dunbar <daniel@zuster.org> Simplify code to emit the unified return block and move it to the end
of the function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56752 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
b01d191a25f92884855117ee7113a1bd3b59cdbc 27-Sep-2008 Daniel Dunbar <daniel@zuster.org> Simplify code to emit the unified return block and move it to the end
of the function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56752 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
4655e2e81342570e9ae09fb6bf93ced89d8951d5 27-Sep-2008 Daniel Dunbar <daniel@zuster.org> Bug fix, make sure to initialize exception object (to rethrow) even
when there are no @catch blocks.

Also, eliminated unneeded alloca for the rethrow object.

Also, avoid generating code to rethrow exception if the exception will
trivially always be caught.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56751 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
55e40721e7c27611174e52378f50435c9ded27db 27-Sep-2008 Daniel Dunbar <daniel@zuster.org> Bug fix, make sure to initialize exception object (to rethrow) even
when there are no @catch blocks.

Also, eliminated unneeded alloca for the rethrow object.

Also, avoid generating code to rethrow exception if the exception will
trivially always be caught.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56751 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
1c5e463bb243d825e7e65ffabdfb46f0ecca6469 27-Sep-2008 Daniel Dunbar <daniel@zuster.org> Easy fix for nasty bug, exception data buffer had wrong type == wrong
(smaller) size == garbage on stack == heisenbugs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56750 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
10004916dbda1f6f5d3d0dbea8c1e70b6466ab63 27-Sep-2008 Daniel Dunbar <daniel@zuster.org> Easy fix for nasty bug, exception data buffer had wrong type == wrong
(smaller) size == garbage on stack == heisenbugs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56750 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
2bb6eb89ea08a14f33ce54cb6cdf9e397ae66471 27-Sep-2008 Devang Patel <dpatel@apple.com> Now Attributes are divided in three groups
- return attributes - inreg, zext and sext
- parameter attributes
- function attributes - nounwind, readonly, readnone, noreturn

Return attributes use 0 as the index.
Function attributes use ~0U as the index.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56705 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenModule.cpp
a2c6912c416c2d9f79d18f3a88ab0ae2609286c3 27-Sep-2008 Devang Patel <dpatel@apple.com> Now Attributes are divided in three groups
- return attributes - inreg, zext and sext
- parameter attributes
- function attributes - nounwind, readonly, readnone, noreturn

Return attributes use 0 as the index.
Function attributes use ~0U as the index.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56705 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
odeGenModule.cpp
a85a9ef670e3038b4679f7a492ca3da6cf884e77 25-Sep-2008 Devang Patel <dpatel@apple.com> Large mechanical patch.

s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g

This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56623 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
odeGenModule.cpp
odeGenModule.h
761d7f78e2dac7ea5f35828c2271e60d91e106ce 25-Sep-2008 Devang Patel <dpatel@apple.com> Large mechanical patch.

s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g

This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56623 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
odeGenModule.cpp
odeGenModule.h
f7f6c7bf25342c38eccdcbc5a983810cc06c9def 24-Sep-2008 Daniel Dunbar <daniel@zuster.org> Implement Obj-C synthesized setters for copy / retain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56547 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
86957eb200492e95a09bce1b2c76f66345468f84 24-Sep-2008 Daniel Dunbar <daniel@zuster.org> Implement Obj-C synthesized setters for copy / retain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56547 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
d82223f2b87d591864e0d7db44c16a4ee23b9003 24-Sep-2008 Daniel Dunbar <daniel@zuster.org> Implement Obj-C getter synthesis for copy and retain.

Also, "simple" getter synthesis no longer uses temporary AST objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56544 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
c1cf4a579f8a0a77719deedc1b8f850b77d36ecf 24-Sep-2008 Daniel Dunbar <daniel@zuster.org> Implement Obj-C getter synthesis for copy and retain.

Also, "simple" getter synthesis no longer uses temporary AST objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56544 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
e856ac29c003f254324d1f9cc171ad43322c2912 24-Sep-2008 Daniel Dunbar <daniel@zuster.org> Refactor some CodeGen functionality:
- Add CodeGenFunction::{EmitReturnOfRValue, EmitIvarOffset}
- Factor EmitLValueForIvar out of EmitObjCIvarRefLValue.

No non-error functionality change (some unsupported errors are
degraded to asserts for the time being).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56543 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GStmt.cpp
odeGenFunction.h
29e0bccf2bcce22b877f8b2ed173f564c116b97e 24-Sep-2008 Daniel Dunbar <daniel@zuster.org> Refactor some CodeGen functionality:
- Add CodeGenFunction::{EmitReturnOfRValue, EmitIvarOffset}
- Factor EmitLValueForIvar out of EmitObjCIvarRefLValue.

No non-error functionality change (some unsupported errors are
degraded to asserts for the time being).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56543 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GStmt.cpp
odeGenFunction.h
f71037275cfce6116d71180d62be69eefbd1951d 24-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add Obj-C runtime methods to get runtime specific functions for
implementing property access.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56542 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
49f6602707887eea1a558a1dffe0213102f887f2 24-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add Obj-C runtime methods to get runtime specific functions for
implementing property access.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56542 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
6203cb790afef31c754b3c5f0a14b03d708b5145 24-Sep-2008 Devang Patel <dpatel@apple.com> Adjust whitespaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56538 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
0fb1d15c37ed26dc24e477fd80df4b0f7872b4ed 24-Sep-2008 Devang Patel <dpatel@apple.com> Adjust whitespaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56538 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
98bfe50f97529e91b8827507263a1d2d84fa31a4 24-Sep-2008 Devang Patel <dpatel@apple.com> s/ParamAttrsWithIndex/FnAttributeWithIndex/g

Rename to match changes done on llvm side.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56537 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
d0646bd7c11c12b34971b55e5c1bdd8439401b4c 24-Sep-2008 Devang Patel <dpatel@apple.com> s/ParamAttrsWithIndex/FnAttributeWithIndex/g

Rename to match changes done on llvm side.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56537 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
99eebc6466aa113215b914a8cf3df67b908ef297 17-Sep-2008 Daniel Dunbar <daniel@zuster.org> Improve x86 ABI compatibility.
- Enables use of ABIArgInfo::Expand when needed. This greatly
improves our x86 ABI compatibility.

- As the infrastructure for target specific ABI handling isn't built
yet, this change means ABI compatibility on other platforms is once
again broken in a different way than before.

- Upcoming: Figure out how to refactor ABI handling into
targets. More documentation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56293 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
834af456588587194337bb32671fb9329e73a7f7 17-Sep-2008 Daniel Dunbar <daniel@zuster.org> Improve x86 ABI compatibility.
- Enables use of ABIArgInfo::Expand when needed. This greatly
improves our x86 ABI compatibility.

- As the infrastructure for target specific ABI handling isn't built
yet, this change means ABI compatibility on other platforms is once
again broken in a different way than before.

- Upcoming: Figure out how to refactor ABI handling into
targets. More documentation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56293 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
55dd2bb1faa191f51268a12e88145b92ad8965ed 17-Sep-2008 Daniel Dunbar <daniel@zuster.org> Print current function on verification failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56291 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
b43f3925e335102d292ed6657e64a1471389627f 17-Sep-2008 Daniel Dunbar <daniel@zuster.org> Print current function on verification failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56291 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
3158c59d4cee8c9166947e4bf535d06a4a158eb5 17-Sep-2008 Daniel Dunbar <daniel@zuster.org> Drop CodeGenTypes parameter to classifyArgumentType.

Ensure that ABIArgInfo::Default implementation for aggregrate types
is sensible (StructRet on return and ByVal on arguments).

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56289 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
f035738e346da0a82538ab236aef218a27373635 17-Sep-2008 Daniel Dunbar <daniel@zuster.org> Drop CodeGenTypes parameter to classifyArgumentType.

Ensure that ABIArgInfo::Default implementation for aggregrate types
is sensible (StructRet on return and ByVal on arguments).

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56289 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
04d357879ae46997556fabf19960b64785c25a81 17-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add support for ABIArgInfo::Expand
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56269 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDecl.cpp
odeGenFunction.h
odeGenTypes.h
5627377df5439a1d3d46a4e4cef4ae44f84a322b 17-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add support for ABIArgInfo::Expand
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56269 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GDecl.cpp
odeGenFunction.h
odeGenTypes.h
75d86736f523d17a2cd0c2f89c2dcc9533259f39 11-Sep-2008 Anders Carlsson <andersca@mac.com> Make sure to store the exception in the catch parameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56102 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
dde0a94120915fa925d1ffcdb997c7b44dc9fa21 11-Sep-2008 Anders Carlsson <andersca@mac.com> Make sure to store the exception in the catch parameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56102 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
1f4acc31ff889be9f1d2fe6be99950f78cda4abb 11-Sep-2008 Anders Carlsson <andersca@mac.com> Make sure to emit the catch parameter as well as the catch body.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56101 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.h
1452f5599d4de1d97a71ad61786126b91da9da69 11-Sep-2008 Anders Carlsson <andersca@mac.com> Make sure to emit the catch parameter as well as the catch body.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56101 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.h
a4519174f57074be42d8f511f900e82211036af5 11-Sep-2008 Anders Carlsson <andersca@mac.com> Fix stupid mistake I made in the exception handling code

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56100 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
4b7ff6ebd7879ebf86cf6d0108d35d817135d513 11-Sep-2008 Anders Carlsson <andersca@mac.com> Fix stupid mistake I made in the exception handling code

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56100 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
22e3005a3fcef1858c24124a5efeeca44f135b3e 11-Sep-2008 Daniel Dunbar <daniel@zuster.org> Use ABIArgInfo for decisions about function arguments (not just return
value).
- Added ABIArgInfo::ByVal (mostly supported) and ABIArgInfo::Expand
(asserted out).

- Added classifyArgumentType which currently just uses
ABIArgInfo::Default or ByVal. This nearly matches old behavior, but
we now set ByVal in a few situations we may have left it off before
(on complex, for example).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56086 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
8951dbd225580173193ec9db503d9d9844ff97d6 11-Sep-2008 Daniel Dunbar <daniel@zuster.org> Use ABIArgInfo for decisions about function arguments (not just return
value).
- Added ABIArgInfo::ByVal (mostly supported) and ABIArgInfo::Expand
(asserted out).

- Added classifyArgumentType which currently just uses
ABIArgInfo::Default or ByVal. This nearly matches old behavior, but
we now set ByVal in a few situations we may have left it off before
(on complex, for example).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56086 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
753d1102c0c436171779fa6b8f77d236769de0fb 11-Sep-2008 Daniel Dunbar <daniel@zuster.org> Bug fix, apply default argument promotion in message sends for which
no method declaration was found.
- This was allowing arrays to pass "by value" among other things.

Add assert in CodeGen that arguments cannot have array type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56080 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
6660c8a4cc2115929d92be83bbc54c307002a321 11-Sep-2008 Daniel Dunbar <daniel@zuster.org> Bug fix, apply default argument promotion in message sends for which
no method declaration was found.
- This was allowing arrays to pass "by value" among other things.

Add assert in CodeGen that arguments cannot have array type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56080 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
73d6660a9db107ea9975aa67efb54c94af09a772 10-Sep-2008 Daniel Dunbar <daniel@zuster.org> Implement ABIArgType::Coerce support.
- As a test, enable basic usage for some common x86-32 cases. This
increases our x86-32 compliance (on other targets our compliance
will just be broken in a different way).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56051 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
639ffe47097d01249b98b7acd102aaad6697b43a 10-Sep-2008 Daniel Dunbar <daniel@zuster.org> Implement ABIArgType::Coerce support.
- As a test, enable basic usage for some common x86-32 cases. This
increases our x86-32 compliance (on other targets our compliance
will just be broken in a different way).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56051 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
a9976a21fe44dd75421726b5625be5cde06a548e 10-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add CodeGenTypes::GetFunctionType overload for getting the effective
type of a call.

Change NeXT runtime to use this instead of trying to bitcasting
internally (which doesn't respect the ABI).

Fix subtle bug, use of ConvertTypeRecursive instead of ConvertType is
bad inside GetFunctionType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56050 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GObjCMac.cpp
odeGenTypes.h
62d5c1b5038cdaa4a887a03c37fe1e8d00166ea0 10-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add CodeGenTypes::GetFunctionType overload for getting the effective
type of a call.

Change NeXT runtime to use this instead of trying to bitcasting
internally (which doesn't respect the ABI).

Fix subtle bug, use of ConvertTypeRecursive instead of ConvertType is
bad inside GetFunctionType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56050 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GObjCMac.cpp
odeGenTypes.h
3ad1f076eadd4d266a7d6df79e36a68211e8bc14 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
GCall.cpp
GCall.h
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
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
GCall.cpp
GCall.h
GObjCGNU.cpp
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
e126ab1ff6c85c2b0db590fc4c85adb076713ba7 10-Sep-2008 Daniel Dunbar <daniel@zuster.org> 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@56046 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
2c8e0f32b9c33686be23c70add0b97490903de9f 10-Sep-2008 Daniel Dunbar <daniel@zuster.org> 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@56046 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
bf615b0ffc7986e9e27c6e755c97d5e047907fc3 10-Sep-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Implement CodeGen support for the 'CXXConditionDeclExpr' expression node, which represents a 'condition' declaration, e.g: "if (int x=0) {...}".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56045 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
e3a09e6ad09f8d1387ecaa008aaf85527909da0a 10-Sep-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement CodeGen support for the 'CXXConditionDeclExpr' expression node, which represents a 'condition' declaration, e.g: "if (int x=0) {...}".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56045 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
3ef2e8531aa6238ab110384ba94f3388dbeca226 10-Sep-2008 Daniel Dunbar <daniel@zuster.org> Tweak CGCall functions again:
- Realized these functions will eventually need access to more data,
moved to CodeGenModule. Eventually they should probably live
together in some other helper class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56039 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GObjCMac.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
b768807c49a1c7085def099b848631856af766fa 10-Sep-2008 Daniel Dunbar <daniel@zuster.org> Tweak CGCall functions again:
- Realized these functions will eventually need access to more data,
moved to CodeGenModule. Eventually they should probably live
together in some other helper class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56039 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GObjCMac.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
bccb06885ccd44e47f7229ebea40dd747fc17ce0 10-Sep-2008 Daniel Dunbar <daniel@zuster.org> Tweak CGCall functions:
- Move actual param attr list creation to
CodeGenFunction::ConstructParamAttrList.
- Make ReturnTypeUsesSret static.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56038 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
odeGenFunction.h
odeGenModule.cpp
5323a4b0a1c248fa2ffdf886bb41a5d8fba71d2d 10-Sep-2008 Daniel Dunbar <daniel@zuster.org> Tweak CGCall functions:
- Move actual param attr list creation to
CodeGenFunction::ConstructParamAttrList.
- Make ReturnTypeUsesSret static.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56038 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
odeGenFunction.h
odeGenModule.cpp
49f5a0d7c02c7c0ab29873d9a69bf227ff1ad152 10-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add CodeGenFunction::ReturnTypeUsesSret
- Hook so NeXT runtime doesn't depend on ABI.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56034 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GObjCMac.cpp
odeGenFunction.h
3913f184c84135fb4612743f1faa6c1edd2dd055 10-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add CodeGenFunction::ReturnTypeUsesSret
- Hook so NeXT runtime doesn't depend on ABI.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56034 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GObjCMac.cpp
odeGenFunction.h
fc1a9c4453214edc3f55e68c38a1d7e055d0acfd 10-Sep-2008 Daniel Dunbar <daniel@zuster.org> Move ABI specific code for functions / calls to CGCall.cpp:
- Factor out EmitFunction{Pro,Epi}log


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56031 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
odeGenFunction.cpp
odeGenFunction.h
17b708d61827cd86278e9580b041dd6cbadf07d3 10-Sep-2008 Daniel Dunbar <daniel@zuster.org> Move ABI specific code for functions / calls to CGCall.cpp:
- Factor out EmitFunction{Pro,Epi}log


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56031 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GExpr.cpp
odeGenFunction.cpp
odeGenFunction.h
96816835ea37afb6697e4cc5672b19f37b8d0db5 10-Sep-2008 Daniel Dunbar <daniel@zuster.org> Factor CodeGenFunction::StartFunction out of GenerateCode and
StartObjCMethod.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56030 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.h
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
7c086516f3cc9fba2733b1919973206c6ba4b171 10-Sep-2008 Daniel Dunbar <daniel@zuster.org> Factor CodeGenFunction::StartFunction out of GenerateCode and
StartObjCMethod.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56030 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.h
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
9fb751fcadcdeb4d0966c119157d5961eb7f61fe 09-Sep-2008 Daniel Dunbar <daniel@zuster.org> Use a unified return block.
- For the time being this means our emitted code is somewhat worse,
especially for aggregates. This will be fixed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56013 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
5ca2084cf9b529563209429857f01fdae9dcdfa5 09-Sep-2008 Daniel Dunbar <daniel@zuster.org> Use a unified return block.
- For the time being this means our emitted code is somewhat worse,
especially for aggregates. This will be fixed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56013 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
bde0c9d38c93f880f2191c5455aa8719e6adf10c 09-Sep-2008 Daniel Dunbar <daniel@zuster.org> Move EmitAggregate{Copy,Clear} into CodeGenFunction.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56010 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenFunction.h
7482d12c345c6391f8956850545e2d4aa7701ce6 09-Sep-2008 Daniel Dunbar <daniel@zuster.org> Move EmitAggregate{Copy,Clear} into CodeGenFunction.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56010 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenFunction.h
fca6c29cd41c505e3f8b18f14a0719bf14d0eb9e 09-Sep-2008 Anders Carlsson <andersca@mac.com> Check in half-assed implementation of @try/@catch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55994 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
80f2567e30959b4428c14b3cb872a91be10b69f9 09-Sep-2008 Anders Carlsson <andersca@mac.com> Check in half-assed implementation of @try/@catch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55994 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
05d7be7f99a14ec27427ab046841a7663f4f0c5a 09-Sep-2008 Anders Carlsson <andersca@mac.com> Simple @throw support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55991 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
2b1e311009cf682b7b5adb8ba97a0816f727bfb7 09-Sep-2008 Anders Carlsson <andersca@mac.com> Simple @throw support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55991 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
9acb0a4edfc60fbf81d2e9334725879850a9f793 09-Sep-2008 Anders Carlsson <andersca@mac.com> Add types and functions related to exceptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55984 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
124526b72f35978e4c9d5e1af8ee125a65c1b917 09-Sep-2008 Anders Carlsson <andersca@mac.com> Add types and functions related to exceptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55984 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b01a211d5e77c8f1eaaa82f82162957d423b04e3 09-Sep-2008 Anders Carlsson <andersca@mac.com> Move handling of @try and @throw to the runtime class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55983 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GStmt.cpp
odeGenFunction.h
64d5d6c5903157c521af496479d06dc26032d718 09-Sep-2008 Anders Carlsson <andersca@mac.com> Move handling of @try and @throw to the runtime class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55983 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GStmt.cpp
odeGenFunction.h
0a2da0f436a1dddcb1308565613e1bb38cedfd66 09-Sep-2008 Daniel Dunbar <daniel@zuster.org> Change CodeGen to emit calls using (RValue,Type) list:
- Add CodeGenFunction::EmitAnyExprToTemp
o Like EmitAnyExpr, but emits aggregates to a temporary location if
none is available. Seems like this should be simpler (even aside
from using first class aggregates).

- Killed CodeGenFunction::EmitCallArg (just append the pair)

- Conversion of RValues to actual call arguments is now isolated in
CodeGenFunction::EmitCall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55970 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
GExpr.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GValue.h
odeGenFunction.h
46f45b9bec4a265ad8400a538e5ec3a5683617f1 09-Sep-2008 Daniel Dunbar <daniel@zuster.org> Change CodeGen to emit calls using (RValue,Type) list:
- Add CodeGenFunction::EmitAnyExprToTemp
o Like EmitAnyExpr, but emits aggregates to a temporary location if
none is available. Seems like this should be simpler (even aside
from using first class aggregates).

- Killed CodeGenFunction::EmitCallArg (just append the pair)

- Conversion of RValues to actual call arguments is now isolated in
CodeGenFunction::EmitCall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55970 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
GExpr.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
GValue.h
odeGenFunction.h
566a65012ee4b58706fc2b2563d62d1d888f0a27 09-Sep-2008 Daniel Dunbar <daniel@zuster.org> Fix a number of issues w.r.t. emission of global for functions and
aliases.
- Attributes specific to a definition are only set when the
definition is seen.
- Alias generation is delayed until the end of the module; necessary
since the alias may reference forward.
- Fixes: PR2743, <rdr://6140807&6094512>
- Improves: <rdr://6095112> (added XFAIL)

Also, print module on verification failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55966 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
219df6644e2338ff067471ab0d85f27b88544ac2 09-Sep-2008 Daniel Dunbar <daniel@zuster.org> Fix a number of issues w.r.t. emission of global for functions and
aliases.
- Attributes specific to a definition are only set when the
definition is seen.
- Alias generation is delayed until the end of the module; necessary
since the alias may reference forward.
- Fixes: PR2743, <rdr://6140807&6094512>
- Improves: <rdr://6095112> (added XFAIL)

Also, print module on verification failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55966 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
a8f020531c19c9a0c0a485d3be83b176196975f5 08-Sep-2008 Daniel Dunbar <daniel@zuster.org> Refactor parameter attribute handling:
- Add CGCall.h for dealing with ABI issues related to calls.
- Add CGFunctionInfo and CGCallInfo for capturing ABI relevant
information about functions and calls.
- Isolate LLVM parameter attribute handling inside CGCall.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55963 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
GExpr.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
0dbe227feccf6a8dbadfff8ca3f80416b7bf2f28 08-Sep-2008 Daniel Dunbar <daniel@zuster.org> Refactor parameter attribute handling:
- Add CGCall.h for dealing with ABI issues related to calls.
- Add CGFunctionInfo and CGCallInfo for capturing ABI relevant
information about functions and calls.
- Isolate LLVM parameter attribute handling inside CGCall.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55963 91177308-0d34-0410-b5e6-96231b3b80d8
GCall.cpp
GCall.h
GExpr.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
2170bef28b848ffbde70a7ae1e6f99c8af6148b3 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
odeGenTypes.cpp
odeGenTypes.h
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
odeGenTypes.cpp
odeGenTypes.h
46a837c7ced306c55d1686cea5f77cb7a2f3b908 05-Sep-2008 Ted Kremenek <kremenek@apple.com> Change struct forward declarations and definitions to use unique RecordDecls, as opposed to creating a single RecordDecl and reusing it.

This change effects both RecordDecls and CXXRecordDecls, but does not effect EnumDecls (yet).

The motivation of this patch is as follows:
- Capture more source information, necessary for refactoring/rewriting clients.

- Pave the way to resolve ownership issues with RecordDecls with the forthcoming
addition of DeclGroups.

Current caveats:
- Until DeclGroups are in place, we will leak RecordDecls not explicitly
referenced by the AST. For example:

typedef struct { ... } x;

The RecordDecl for the struct will be leaked because the TypedefDecl doesn't
refer to it. This will be solved with DeclGroups.

- This patch also (temporarily) breaks CodeGen. More below.

High-level changes:
- As before, TagType still refers to a TagDecl, but it doesn't own it. When
a struct/union/class is first referenced, a RecordType and RecordDecl are
created for it, and the RecordType refers to that RecordDecl. Later, if
a new RecordDecl is created, the pointer to a RecordDecl in RecordType is
updated to point to the RecordDecl that defines the struct/union/class.

- TagDecl and RecordDecl now how a method 'getDefinition()' to return the
TagDecl*/RecordDecl* that refers to the TagDecl* that defines a particular
enum/struct/class/union. This is useful from going from a RecordDecl* that
defines a forward declaration to the RecordDecl* that provides the actual
definition. Note that this also works for EnumDecls, except that in this case
there is no distinction between forward declarations and definitions (yet).

- Clients should no longer assume that 'isDefinition()' returns true from a
RecordDecl if the corresponding struct/union/class has been defined.
isDefinition() only returns true if a particular RecordDecl is the defining
Decl. Use 'getDefinition()' instead to determine if a struct has been defined.

- The main changes to Sema happen in ActOnTag. To make the changes more
incremental, I split off the processing of enums and structs et al into two
code paths. Enums use the original code path (which is in ActOnTag) and
structs use the ActOnTagStruct. Eventually the two code paths will be merged,
but the idea was to preserve the original logic both for comparison and not to
change the logic for both enums and structs all at once.

- There is NO CHAINING of RecordDecls for the same RecordType. All RecordDecls
that correspond to the same type simply have a pointer to that type. If we
need to figure out what are all the RecordDecls for a given type we can build
a backmap.

- The diff in CXXRecordDecl.[cpp,h] is actually very small; it just mimics the
changes to RecordDecl. For some reason 'svn' marks the entire file as changed.

Why is CodeGen broken:
- Codegen assumes that there is an equivalence between RecordDecl* and
RecordType*. This was true before because we only created one RecordDecl* for
a given RecordType*, but it is no longer true. I believe this shouldn't be too
hard to change, but the patch was big enough as it is.

I have tested this patch on both the clang test suite, and by running the static analyzer over Postgresql and a large Apple-internal project (mix of Objective-C and C).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55839 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
4b7c98378ae0c1a3635f0b7756848b4a9923f8bc 05-Sep-2008 Ted Kremenek <kremenek@apple.com> Change struct forward declarations and definitions to use unique RecordDecls, as opposed to creating a single RecordDecl and reusing it.

This change effects both RecordDecls and CXXRecordDecls, but does not effect EnumDecls (yet).

The motivation of this patch is as follows:
- Capture more source information, necessary for refactoring/rewriting clients.

- Pave the way to resolve ownership issues with RecordDecls with the forthcoming
addition of DeclGroups.

Current caveats:
- Until DeclGroups are in place, we will leak RecordDecls not explicitly
referenced by the AST. For example:

typedef struct { ... } x;

The RecordDecl for the struct will be leaked because the TypedefDecl doesn't
refer to it. This will be solved with DeclGroups.

- This patch also (temporarily) breaks CodeGen. More below.

High-level changes:
- As before, TagType still refers to a TagDecl, but it doesn't own it. When
a struct/union/class is first referenced, a RecordType and RecordDecl are
created for it, and the RecordType refers to that RecordDecl. Later, if
a new RecordDecl is created, the pointer to a RecordDecl in RecordType is
updated to point to the RecordDecl that defines the struct/union/class.

- TagDecl and RecordDecl now how a method 'getDefinition()' to return the
TagDecl*/RecordDecl* that refers to the TagDecl* that defines a particular
enum/struct/class/union. This is useful from going from a RecordDecl* that
defines a forward declaration to the RecordDecl* that provides the actual
definition. Note that this also works for EnumDecls, except that in this case
there is no distinction between forward declarations and definitions (yet).

- Clients should no longer assume that 'isDefinition()' returns true from a
RecordDecl if the corresponding struct/union/class has been defined.
isDefinition() only returns true if a particular RecordDecl is the defining
Decl. Use 'getDefinition()' instead to determine if a struct has been defined.

- The main changes to Sema happen in ActOnTag. To make the changes more
incremental, I split off the processing of enums and structs et al into two
code paths. Enums use the original code path (which is in ActOnTag) and
structs use the ActOnTagStruct. Eventually the two code paths will be merged,
but the idea was to preserve the original logic both for comparison and not to
change the logic for both enums and structs all at once.

- There is NO CHAINING of RecordDecls for the same RecordType. All RecordDecls
that correspond to the same type simply have a pointer to that type. If we
need to figure out what are all the RecordDecls for a given type we can build
a backmap.

- The diff in CXXRecordDecl.[cpp,h] is actually very small; it just mimics the
changes to RecordDecl. For some reason 'svn' marks the entire file as changed.

Why is CodeGen broken:
- Codegen assumes that there is an equivalence between RecordDecl* and
RecordType*. This was true before because we only created one RecordDecl* for
a given RecordType*, but it is no longer true. I believe this shouldn't be too
hard to change, but the patch was big enough as it is.

I have tested this patch on both the clang test suite, and by running the static analyzer over Postgresql and a large Apple-internal project (mix of Objective-C and C).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55839 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
2c9840470bd025cc60b88fa86dff1122d48b6a3a 05-Sep-2008 Ted Kremenek <kremenek@apple.com> Remove "NextDecl" from RecordDecl. This change touches many files that where RecordDecl or CXXRecordDecl was constructed, always with an argument of 'NULL' for the previous declaration.

The motivation behind this change is that chaining the RecordDecls is simply unnecessary. Once we create multiple RecordDecls for the same struct/union/class, clients that care about all the declarations of the same struct can build a back map by seeing which Decls refer to the same RecordType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55821 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
df042e6c2bf06b2d9ed53c52469599ac1bd93a3f 05-Sep-2008 Ted Kremenek <kremenek@apple.com> Remove "NextDecl" from RecordDecl. This change touches many files that where RecordDecl or CXXRecordDecl was constructed, always with an argument of 'NULL' for the previous declaration.

The motivation behind this change is that chaining the RecordDecls is simply unnecessary. Once we create multiple RecordDecls for the same struct/union/class, clients that care about all the declarations of the same struct can build a back map by seeing which Decls refer to the same RecordType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55821 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
896d1e2f1fdf4579411f91e3775f2a7160f9b7dd 05-Sep-2008 Daniel Dunbar <daniel@zuster.org> Set sext/zext on function result.
- <rdar://problem/6156739>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55815 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
3a9a3e112ac02f8a261293cbe605db2e5d8732d3 05-Sep-2008 Daniel Dunbar <daniel@zuster.org> Set sext/zext on function result.
- <rdar://problem/6156739>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55815 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
f278700de49c1056c92c2af29f84575289ae060d 05-Sep-2008 Daniel Dunbar <daniel@zuster.org> Set function attributes (sext, zext, etc.) on Objective-C methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55812 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenModule.cpp
odeGenModule.h
f80519b919a348db004fba18530706314d1ebfb5 05-Sep-2008 Daniel Dunbar <daniel@zuster.org> Set function attributes (sext, zext, etc.) on Objective-C methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55812 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
odeGenModule.cpp
odeGenModule.h
35bd619150dfb99d0bb48488fe682cb435f79b71 04-Sep-2008 Daniel Dunbar <daniel@zuster.org> Fix infinite loop in for ... in code generation.
- Patch via Thomas Clement, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55804 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
fe2b2c08984f861f82339138302689480c658ecd 04-Sep-2008 Daniel Dunbar <daniel@zuster.org> Fix infinite loop in for ... in code generation.
- Patch via Thomas Clement, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55804 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
b351815e34ec056463c61477673acb92ec2f78ae 04-Sep-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit lazy reference to Protocol class for forward protocol
references (to match gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55760 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c67876d6886219983881e1304a761b113ae1aec0 04-Sep-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit lazy reference to Protocol class for forward protocol
references (to match gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55760 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
49bddf706c4d7991ca421eb3b27cdd16d0252d6c 04-Sep-2008 Daniel Dunbar <daniel@zuster.org> Avoid superfluous errors regarding variable-length arrays (casts).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55759 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
90df4b6661968a84bf64baee489bb2f6d948fcc1 04-Sep-2008 Daniel Dunbar <daniel@zuster.org> Avoid superfluous errors regarding variable-length arrays (casts).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55759 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
ef0d4c714da49eac706953e866adbfc158474097 04-Sep-2008 Daniel Dunbar <daniel@zuster.org> Implement codegen of aggregates as lvalues in binary expressions,
e.g. "(a = b).somefield".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55758 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
80e62c29fe21cd06c93eba6e72b7e32dca06fcf9 04-Sep-2008 Daniel Dunbar <daniel@zuster.org> Implement codegen of aggregates as lvalues in binary expressions,
e.g. "(a = b).somefield".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55758 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
30ad42d076bf0b3804f641ef2a006cc1486a9a5e 03-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add __builtin_object_size support.
- Currently CodeGen always returns a conservative value for this (-1
or 0 depending on the context).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55735 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
d5f8a4fd4d6dfb0415b93bb7ab721bba5cab1332 03-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add __builtin_object_size support.
- Currently CodeGen always returns a conservative value for this (-1
or 0 depending on the context).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55735 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
cc37ac5424171a333153f8c480a562072132b948 03-Sep-2008 Daniel Dunbar <daniel@zuster.org> Fix ObjCPropertRefExpr to be able to encode all the information for
uses which refer to methods not properties.
- Not yet wired in Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55681 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
e66f4e3e3ae9d7d11b0c302211066fad69228aba 03-Sep-2008 Daniel Dunbar <daniel@zuster.org> Fix ObjCPropertRefExpr to be able to encode all the information for
uses which refer to methods not properties.
- Not yet wired in Sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55681 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
a7bbf567dac9dfd58f12c9ff14584d64104694f3 01-Sep-2008 Nuno Lopes <nunoplopes@sapo.pt> codegen constant data as such. add QualType::isConstant()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55603 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b381aac9bae6d608c72267dd0ed08ec6369e94e4 01-Sep-2008 Nuno Lopes <nunoplopes@sapo.pt> codegen constant data as such. add QualType::isConstant()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55603 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
58d16248147a74eda40096492e67c42057dd73ad 31-Aug-2008 Anders Carlsson <andersca@mac.com> Handle mutation while enumerating correctly. Fix some bugs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55583 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
2abd89c039e835e84519a4cd8a7495899a70153d 31-Aug-2008 Anders Carlsson <andersca@mac.com> Handle mutation while enumerating correctly. Fix some bugs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55583 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
6bdf32d5b9e51e7a2b4b2bf97da8acd7e0883656 31-Aug-2008 Anders Carlsson <andersca@mac.com> Initial support for CodeGen of for ... in statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55580 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
f484c31f4d6934f56070c2942d4dfdf3fee84074 31-Aug-2008 Anders Carlsson <andersca@mac.com> Initial support for CodeGen of for ... in statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55580 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
82b0d0c97968520ef0052597900971cc99e60971 30-Aug-2008 Anders Carlsson <andersca@mac.com> Stub out CodeGenFunction::EmitObjCForCollectionStmt.

Add CodeGenFunction::EmitMemSetToZero and make AggExprEmitter::EmitAggregateClear use it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55573 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GObjC.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
3d8400d9a61aa4b63ff35e5cede405b32a41425e 30-Aug-2008 Anders Carlsson <andersca@mac.com> Stub out CodeGenFunction::EmitObjCForCollectionStmt.

Add CodeGenFunction::EmitMemSetToZero and make AggExprEmitter::EmitAggregateClear use it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55573 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GObjC.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
014a20ebd9914aab794b7ded08f44495db392ca5 30-Aug-2008 Anders Carlsson <andersca@mac.com> Simplify some calls to Builder.CreateCall

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55567 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprAgg.cpp
958444659c5287a81a43188bfaa2a4902752b947 30-Aug-2008 Anders Carlsson <andersca@mac.com> Simplify some calls to Builder.CreateCall

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55567 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprAgg.cpp
dd85128cf057a296b3704141d250f8bc0ce421d6 30-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add Objective-C property setter support.
- Change Obj-C runtime message API, drop the ObjCMessageExpr arg in
favor of just result type and selector. Necessary so it can be
reused in situations where we don't want to cons up an
ObjCMessageExpr.
- Update aggregate binary assignment to know about special property
ref lvalues.
- Add CodeGenFunction::EmitCallArg overload which takes an already
emitted rvalue.

Add CodeGenFunction::StoreComplexIntoAddr.

Disabled logic in Sema for parsing Objective-C dot-syntax that
accesses methods. This code does not search in the correct order and
the AST node has no way of properly representing its results.

Updated StmtDumper to print a bit more information about
ObjCPropertyRefExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55561 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
7f8ea5c5b3a6a4332a841eefdd86b0726722ea7b 30-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add Objective-C property setter support.
- Change Obj-C runtime message API, drop the ObjCMessageExpr arg in
favor of just result type and selector. Necessary so it can be
reused in situations where we don't want to cons up an
ObjCMessageExpr.
- Update aggregate binary assignment to know about special property
ref lvalues.
- Add CodeGenFunction::EmitCallArg overload which takes an already
emitted rvalue.

Add CodeGenFunction::StoreComplexIntoAddr.

Disabled logic in Sema for parsing Objective-C dot-syntax that
accesses methods. This code does not search in the correct order and
the AST node has no way of properly representing its results.

Updated StmtDumper to print a bit more information about
ObjCPropertyRefExprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55561 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
0ed60b0fd88cbff2615df7e01e3c05ee22cdd6ec 30-Aug-2008 Daniel Dunbar <daniel@zuster.org> Refactor handling of calls:
- Added CodeGenFunction::EmitCall which just takes the callee, return
type, and a list of (Value*,QualType) pairs.
- Added CodeGenFunction::EmitCallArg which handles emitting code for
a call argument and turning it into an appropriate
(Value*,QualType) pair.
- Changed Objective-C runtime interface so that the actual emission
of arguments for message sends is (once again) done in the code to
emit a message send.

No intended functionality change, this is prep work for better ABI
support and for Objective-C property setter support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55560 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
19cd87eb5fb3c197e631ce08fd52c446c4d4e8f1 30-Aug-2008 Daniel Dunbar <daniel@zuster.org> Refactor handling of calls:
- Added CodeGenFunction::EmitCall which just takes the callee, return
type, and a list of (Value*,QualType) pairs.
- Added CodeGenFunction::EmitCallArg which handles emitting code for
a call argument and turning it into an appropriate
(Value*,QualType) pair.
- Changed Objective-C runtime interface so that the actual emission
of arguments for message sends is (once again) done in the code to
emit a message send.

No intended functionality change, this is prep work for better ABI
support and for Objective-C property setter support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55560 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
952f4734066ad7b043a79b1cd176652d0b4148a1 29-Aug-2008 Daniel Dunbar <daniel@zuster.org> Downgrade a number of FIXME asserts to ErrorUnsupported.
- Notably VLAs


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55544 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprScalar.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.h
odeGenModule.cpp
662174c82ef46b19a2329c7d37208e1d12dfb7b3 29-Aug-2008 Daniel Dunbar <daniel@zuster.org> Downgrade a number of FIXME asserts to ErrorUnsupported.
- Notably VLAs


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55544 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExprScalar.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.h
odeGenModule.cpp
e6c31752cb6cb1c8f65ca0a11572f9783c552d09 29-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add special "property reference" CodeGen::LValue type for emitting
Objective-C property references.
- This handles property references "more correctly" but setters still
don't work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55534 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
GObjC.cpp
GValue.h
odeGenFunction.h
85c59edda02df48fae8dc85049743319bc6e7e89 29-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add special "property reference" CodeGen::LValue type for emitting
Objective-C property references.
- This handles property references "more correctly" but setters still
don't work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55534 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
GObjC.cpp
GValue.h
odeGenFunction.h
7cfb85b8d1b17cd6e162f74762c58f95562db1e5 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
odeGenTypes.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
odeGenTypes.cpp
698d6f390d47eff6d4317c9d8423009bb816f3fb 28-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit mostly-correct property type encoding.
- Added ASTContext::getObjCEncodingForPropertyDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55461 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c56f34a1c1779de15330bdb3eec39b3418802d47 28-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit mostly-correct property type encoding.
- Added ASTContext::getObjCEncodingForPropertyDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55461 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
91cc402a3be35ce488f5fc05a8cffd4c395f5b93 27-Aug-2008 Daniel Dunbar <daniel@zuster.org> Initial support for Obj-C dot-syntax for getters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55410 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprScalar.cpp
GObjC.cpp
odeGenFunction.h
9c3fc703b29a31d40bcf5027dbb4784dd393804e 27-Aug-2008 Daniel Dunbar <daniel@zuster.org> Initial support for Obj-C dot-syntax for getters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55410 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprScalar.cpp
GObjC.cpp
odeGenFunction.h
fe131f0b5cbb7051d01ea18dcdb0c29f3d267e19 27-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Refactor protocol method metadata emission.

Also, fix category protocol list metadata.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55405 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
ae226fa1141e22d1b997f19bd92c7223079d03f4 27-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Refactor protocol method metadata emission.

Also, fix category protocol list metadata.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55405 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
0cd49036ac6981e626174de931ac9ab326626e2e 27-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit correct properties for category.
- Was emitting duplicates of class properties instead of the category
properties.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55395 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
86e2f40071ca8c29284a3294fe2f20a01ec88971 27-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit correct properties for category.
- Was emitting duplicates of class properties instead of the category
properties.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55395 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
12996f5ebc5aebd47e08d4e9d8208296046baddd 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit metadata for synthetsized properties.

Also, fix method lookup to not use LLVM module symbol table.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55390 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c45ef600ed6f1544e8dfca2a3fa554eb7d6a9908 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit metadata for synthetsized properties.

Also, fix method lookup to not use LLVM module symbol table.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55390 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6b57d43f67bb4f9bfec53e65ce4787ccf9f4445d 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> Objective-C @synthesize support.
- Only supports simple assignment and atomic semantics are ignored.
- Not quite usable yet because the methods do not actually get added
to the class metadata.
- Added ObjCPropertyDecl::getSetterKind (one of Assign, Copy, Retain).
- Rearrange CodeGenFunction so synthesis can reuse function prolog /
epilog code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55365 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
af05bb9073319d8381b71c4325188853fd4b8ed6 26-Aug-2008 Daniel Dunbar <daniel@zuster.org> Objective-C @synthesize support.
- Only supports simple assignment and atomic semantics are ignored.
- Not quite usable yet because the methods do not actually get added
to the class metadata.
- Added ObjCPropertyDecl::getSetterKind (one of Assign, Copy, Retain).
- Rearrange CodeGenFunction so synthesis can reuse function prolog /
epilog code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55365 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCMac.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
769e730a8333b9486e70c949873eb28af39f8fcb 25-Aug-2008 Eli Friedman <eli.friedman@gmail.com> Do typechecking and codegen for K&R-style function declarations
correctly. Not a regression, but made more obvious by my recent fix
which made function type compatibility checking a bit more strict.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55339 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
eb4b7051a596560ef4a1846e3714707f44e9dc30 25-Aug-2008 Eli Friedman <eli.friedman@gmail.com> Do typechecking and codegen for K&R-style function declarations
correctly. Not a regression, but made more obvious by my recent fix
which made function type compatibility checking a bit more strict.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55339 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
de1bd94f8dcad87ee2a2408a8bc5b38aae97a84d 25-Aug-2008 Daniel Dunbar <daniel@zuster.org> Support __PRETTY_FUNCTION__ and friends in Obj-C methods.

Add CodeGenFunction::EmitUnsupportedLValue
- Gives error and returns undef value.

Swap some asserts() over to using EmitUnsupportedLValue
- Rumor has it users (and even some developers) prefer carat
diagnostics to backtraces.
- Works better in Release-Asserts to boot.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55328 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
6ba82a4a4b295e54cf192c3e98b28f39990c6194 25-Aug-2008 Daniel Dunbar <daniel@zuster.org> Support __PRETTY_FUNCTION__ and friends in Obj-C methods.

Add CodeGenFunction::EmitUnsupportedLValue
- Gives error and returns undef value.

Swap some asserts() over to using EmitUnsupportedLValue
- Rumor has it users (and even some developers) prefer carat
diagnostics to backtraces.
- Works better in Release-Asserts to boot.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55328 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
5d54eed85c63025916113bc095287443c1000e98 25-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change another is-a-pointer check to check in terms of LLVM type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55312 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
d1d66bcd6914ff82abdfa88dd25bb0b74cde3b99 25-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change another is-a-pointer check to check in terms of LLVM type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55312 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
238335f7e9552a39a07b9d7235004fa6190c4ad1 25-Aug-2008 Daniel Dunbar <daniel@zuster.org> Do is-a-pointer checks in terms of LLVM types in
EmitScalarConversion().
- Important for allowing Obj-C void * to id<X> casts and so on.
- Not sure about this fix however, perhaps Type should understand
that id is effectively a pointer type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55311 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
270cc66683b22d6bb0b4644f5a40f84d45edf119 25-Aug-2008 Daniel Dunbar <daniel@zuster.org> Do is-a-pointer checks in terms of LLVM types in
EmitScalarConversion().
- Important for allowing Obj-C void * to id<X> casts and so on.
- Not sure about this fix however, perhaps Type should understand
that id is effectively a pointer type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55311 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
b1ee5d63421715edb7cd5bf3f95e3a8b3b8000c4 25-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix Obj-C super sends inside class methods.
- NeXT loads the super class at runtime; this required changing the
runtime interface to pass more information down.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55307 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
f56f1913e91ad32bed52dd3f6afc26735d336584 25-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix Obj-C super sends inside class methods.
- NeXT loads the super class at runtime; this required changing the
runtime interface to pass more information down.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55307 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
5c182f20968521585927261bda8806c6739ec0ac 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
odeGenTypes.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
odeGenTypes.cpp
ad30be4c14198fe55d8c1ef465f574e26235fc85 25-Aug-2008 Daniel Dunbar <daniel@zuster.org> Use DenseMap on IdentifierInfo instead of StringMap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55303 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
90db88249ac92e6ed515065048a4ead4467e6639 25-Aug-2008 Daniel Dunbar <daniel@zuster.org> Use DenseMap on IdentifierInfo instead of StringMap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55303 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
8ede005adfb45c57ffa9b56ae99a5c5ffe5b1844 25-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit symbols used to manage linking of Obj-C classes.
- This ensures that references to undefined classes cause link
errors.
- NOTE: This relies on platform specific asm directives currently,
this should be factored out.

Also, don't emit a SYMBOLS metadata entry if there are no symbols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55302 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
242d4dce3ab9a649866066b44c5a32cd2c09b6b8 25-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit symbols used to manage linking of Obj-C classes.
- This ensures that references to undefined classes cause link
errors.
- NOTE: This relies on platform specific asm directives currently,
this should be factored out.

Also, don't emit a SYMBOLS metadata entry if there are no symbols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55302 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
40b9077d04b8dc18a1c5f1ab92aabc44fbeba785 25-Aug-2008 Anders Carlsson <andersca@mac.com> Handle emitting __builtin_huge_valf as a constant expr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55299 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
2ea2b5e2b044739f4f5840bc1271abfa15a3101d 25-Aug-2008 Anders Carlsson <andersca@mac.com> Handle emitting __builtin_huge_valf as a constant expr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55299 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
ae61b00977df55f5bb1b7cf37e5ecf4f5e7a1d14 25-Aug-2008 Anders Carlsson <andersca@mac.com> Make code generation of ivar ref exprs more like member exprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55298 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
29b7e5071c4ac0979ba907d0db78f5bd7ff83fe8 25-Aug-2008 Anders Carlsson <andersca@mac.com> Make code generation of ivar ref exprs more like member exprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55298 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
b10bac78b3ad33f11af8f815a10af2dbcca673d7 25-Aug-2008 Anders Carlsson <andersca@mac.com> Handle static variables inside obj-c methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55297 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
19567ee4314ad1bb5144efbb23442f6bc54cd16c 25-Aug-2008 Anders Carlsson <andersca@mac.com> Handle static variables inside obj-c methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55297 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
8280e11f3093fba9fac4e9e60b7c7d40bef6dcba 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
odeGenTypes.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
odeGenTypes.cpp
4715ebb3594ac0b369bde5ba4beb6cee14fc9c31 23-Aug-2008 Anders Carlsson <andersca@mac.com> Handle static initializers in Objective-C++ methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55250 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
86e9644199d91a33d0090395395bc718bd3a4981 23-Aug-2008 Anders Carlsson <andersca@mac.com> Handle static initializers in Objective-C++ methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55250 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
750eb97ec57043f4ee2ee652bf6f6ae282c1487b 23-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Add CodeGen support for CXXZeroInitValueExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55249 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
7267f7832e5f0c7f951765e201c5a2650eb1637b 23-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add CodeGen support for CXXZeroInitValueExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55249 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
182418c657644357b75c655834e50f568fc9ef02 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> Drop a dead call to isConstantExpr()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55244 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
be38d0274d0836f31ddeaee6789433b99a5a0c9c 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> Drop a dead call to isConstantExpr()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55244 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
dbdb951511172df0cac86d7d3368c777639206cb 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Clean up constant CFString handling.
- Use CodeGenModule::GetAddrOfConstantCFString

Some tweaks of CodeGenModule::GetAddrOfConstantCFString


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55243 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
3e9df9920db8de8ec93a424b0c1784f9bff301ea 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Clean up constant CFString handling.
- Use CodeGenModule::GetAddrOfConstantCFString

Some tweaks of CodeGenModule::GetAddrOfConstantCFString


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55243 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
5e1058957a137234673ecbe31b4ae527a1bc0469 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> Implement Obj-C ivar references to aggregates.

Implement Obj-C lvalue message sends (aggregate returns).

Update several places to emit more precise ErrorUnsupported warnings
for currently unimplemented Obj-C features (main missing chunks are
property references, Obj-C exception handling, and the for ... in
syntax).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55234 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
GStmt.cpp
odeGenFunction.h
0a04d77bde7e3a661c2b41b60630d125d09ed6ef 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> Implement Obj-C ivar references to aggregates.

Implement Obj-C lvalue message sends (aggregate returns).

Update several places to emit more precise ErrorUnsupported warnings
for currently unimplemented Obj-C features (main missing chunks are
property references, Obj-C exception handling, and the for ... in
syntax).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55234 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
GStmt.cpp
odeGenFunction.h
87062ff2d280fcdb106024c413d72571889c631e 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Fix message sends which return structures.
- Simplify the sending code a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55232 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
14c80b7ed64e0eddfbe81adf5113d5be5f9964bf 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Fix message sends which return structures.
- Simplify the sending code a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55232 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GObjCMac.cpp
15245e5ca6219e072925f08470c774f203e384be 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Implement super message sends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55225 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
e8b470d40c4d44b77c2efab3cb977beb23344ff6 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Implement super message sends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55225 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
a04840b49ad9fbbefd99a5ca727555206be07f27 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> Trim CGObjCRuntime::GenerateMessageSend[Super]
- Returns an RValue.
- Reduced to only taking the CodeGenFunction, Expr, and Receiver.
- Becomes responsible for emitting the arguments.

Add CodeGenFunction::EmitCallExprExt
- Takes optional extra arguments to insert at the head of the call.
- This allows the Obj-C runtimes to call into this and isolates the
argument and call instruction generation code to one place. Upshot
is that we now pass structures (more) correctly.

Also, fix one aspect of generating methods which take structure
arguments (for NeXT). This probably needs to be merged with the
SetFunctionAttributes code in CodeGenModule.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55223 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
8f2926b73ed635afecd020da787af6a837601a2b 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> Trim CGObjCRuntime::GenerateMessageSend[Super]
- Returns an RValue.
- Reduced to only taking the CodeGenFunction, Expr, and Receiver.
- Becomes responsible for emitting the arguments.

Add CodeGenFunction::EmitCallExprExt
- Takes optional extra arguments to insert at the head of the call.
- This allows the Obj-C runtimes to call into this and isolates the
argument and call instruction generation code to one place. Upshot
is that we now pass structures (more) correctly.

Also, fix one aspect of generating methods which take structure
arguments (for NeXT). This probably needs to be merged with the
SetFunctionAttributes code in CodeGenModule.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55223 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenFunction.h
68ae10e8271798d55fad479ade4d6cd97590f5ad 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> Move [LR]Value into CGValue.h
- No (intended) functional change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55221 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
odeGenFunction.h
2eecaab0fa5f569c3de82a7f04c5dc39298f472d 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> Move [LR]Value into CGValue.h
- No (intended) functional change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55221 91177308-0d34-0410-b5e6-96231b3b80d8
GValue.h
odeGenFunction.h
a6eb6b70c6fadb908d75a0751ad17b7bdfc702f0 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit property metadata (classes, protocols, categories).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55209 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c8ef551615e7c7e4aae7c2e845f998be42daef4f 23-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit property metadata (classes, protocols, categories).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55209 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
4246a8bc1c5339181d566adc2628c22789e26d04 22-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit category metadata.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55197 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
86e253a0cb438b118eb598abb0225d431c8798d2 22-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit category metadata.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55197 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
c9f8ccd5c7e6b6686113440bc11e1bf341681cc0 22-Aug-2008 Anders Carlsson <andersca@mac.com> Add preliminary (and probably broken) codegen support for C++ static initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55180 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDecl.cpp
odeGenFunction.h
e1b29efab32d02e114046d33cca242a88585bf8a 22-Aug-2008 Anders Carlsson <andersca@mac.com> Add preliminary (and probably broken) codegen support for C++ static initializers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55180 91177308-0d34-0410-b5e6-96231b3b80d8
GCXX.cpp
GDecl.cpp
odeGenFunction.h
67e778b69acc0d657966c50e9df7118ecfdc1b7f 21-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit [meta]class protocol references.

Updated ObjCProtocolDecl::protocol_iterator to match that of
ObjCInterfaceDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55143 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
dbc933701d20918add13b6a3c9d47ff8c75419cf 21-Aug-2008 Daniel Dunbar <daniel@zuster.org> NeXT: Emit [meta]class protocol references.

Updated ObjCProtocolDecl::protocol_iterator to match that of
ObjCInterfaceDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55143 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
b050fa6cf74e003dfcab865ff7209ee8a278caa0 21-Aug-2008 Daniel Dunbar <daniel@zuster.org> Preliminary support for Obj-C classes in NeXT runtime.
- Functional for simple cases but there are some glaring omissions
(protocols, properties, and other language extensions).
- The code needs a fair bit of cleaning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55108 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
27f9d77b61b377b21ccda536122f2be6fa715751 21-Aug-2008 Daniel Dunbar <daniel@zuster.org> Preliminary support for Obj-C classes in NeXT runtime.
- Functional for simple cases but there are some glaring omissions
(protocols, properties, and other language extensions).
- The code needs a fair bit of cleaning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55108 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
f1f7f199626744f79974fed60506855c78f14b2b 20-Aug-2008 Daniel Dunbar <daniel@zuster.org> Move all Obj-C runtime interaction into CodeGenFunction.
- Drop duplicate (and broken) code for sending messages.
- Add EmitObjCProtocolExpr to CodeGenFunction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55024 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjC.cpp
odeGenFunction.h
ed7c618f849e2541b1d0288c43154937652c5b15 20-Aug-2008 Daniel Dunbar <daniel@zuster.org> Move all Obj-C runtime interaction into CodeGenFunction.
- Drop duplicate (and broken) code for sending messages.
- Add EmitObjCProtocolExpr to CodeGenFunction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55024 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjC.cpp
odeGenFunction.h
c45e2fb32e93cda8c423c721fae52b7321e2ee04 19-Aug-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Add ExplicitCastExpr to replace the current CastExpr, and have ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr):

Expr
-> CastExpr
-> ExplicitCastExpr
-> ImplicitCastExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54955 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
0835a3cdeefe714b4959d31127ea155e56393125 19-Aug-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add ExplicitCastExpr to replace the current CastExpr, and have ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr):

Expr
-> CastExpr
-> ExplicitCastExpr
-> ImplicitCastExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54955 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
ace332944c7583d4746d63ef2314a3f1bc0f2e25 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add NeXT runtime support for generating methods.

Change CodeGenFunction::EmitParmDecl to take either a ParmVarDecl or an
ImplicitParamDecl.

Drop hasAggregateLLVMType from CodeGenModule.cpp (use version in
CodeGenFunction).

Change the Objective-C method generation to use EmitParmDecl for
implicit parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54838 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.h
odeGenModule.cpp
b7ec246872b412f0e7bb9e93eacfd78cfa6adfb3 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add NeXT runtime support for generating methods.

Change CodeGenFunction::EmitParmDecl to take either a ParmVarDecl or an
ImplicitParamDecl.

Drop hasAggregateLLVMType from CodeGenModule.cpp (use version in
CodeGenFunction).

Change the Objective-C method generation to use EmitParmDecl for
implicit parameters.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54838 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
odeGenFunction.h
odeGenModule.cpp
b5fda0cac2b9f9857d91b33b6bb3f95156c4f0e6 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add CodeGen support for AddrLabelExpr in initializers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54837 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GExprScalar.cpp
54d19091a809d30a5e6e352fda53377d69ebda66 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add CodeGen support for AddrLabelExpr in initializers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54837 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GExprScalar.cpp
9503b783f197844304a86c7525e2f05f31493cd1 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change WarnUnsupported to ErrorUnsupported (in name and in practice).
- We are beyond the point where this shows up often and when it does
generating miscompiled files is bad.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54836 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
488e993a135ce700b982bf099c3d6b856301d642 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change WarnUnsupported to ErrorUnsupported (in name and in practice).
- We are beyond the point where this shows up often and when it does
generating miscompiled files is bad.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54836 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
434627a87cb4436c112ffd94a04914b750619bfe 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change ObjCRuntime::LookupClass -> GetClass, and now takes the
ObjCInterfaceDecl.

Change ObjCRuntime::GenerateMessageSendSuper to take the
ObjCInterfaceDecl for the super class, instead of just its name.

Change EmitObjCMessageExpr to make the right runtime calls for super
sends in class methods (i.e. a super send with the class object as
the receiver).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54833 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
ddb2a3d55a24a1dbdf9152621642d9a4b4fc2f61 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change ObjCRuntime::LookupClass -> GetClass, and now takes the
ObjCInterfaceDecl.

Change ObjCRuntime::GenerateMessageSendSuper to take the
ObjCInterfaceDecl for the super class, instead of just its name.

Change EmitObjCMessageExpr to make the right runtime calls for super
sends in class methods (i.e. a super send with the class object as
the receiver).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54833 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
27250d39e2095188886ebed4d567f8e7e5f9aa1f 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Clean up CodeGenModule interface.
- Add CodeGenModule::EmitTopLevelDecl which uses switch on kind
instead of ugly & slow dyn_cast chains.

- Drop some simple forwarding methods into the ObjC runtime.

- Privatize appropriate methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54827 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
41071debe9b8887449c3f2ee0dd7124ed47bdda8 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Clean up CodeGenModule interface.
- Add CodeGenModule::EmitTopLevelDecl which uses switch on kind
instead of ugly & slow dyn_cast chains.

- Drop some simple forwarding methods into the ObjC runtime.

- Privatize appropriate methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54827 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
ac93e473a0d2ab108e3fca3b45898f47c2bf39b3 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change CGObjCRuntime methods to take appropriate clang Decls.
- This is in prep for implementation class support for the NeXT
runtime, for which the existing methods don't provide enough
information (and additionally make too many assumptions about how
things should be emitted).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54824 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
7ded7f4983dc4a20561db7a8d02c6b2435030961 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change CGObjCRuntime methods to take appropriate clang Decls.
- This is in prep for implementation class support for the NeXT
runtime, for which the existing methods don't provide enough
information (and additionally make too many assumptions about how
things should be emitted).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54824 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
b427822ca29ae090f5cc4ebaa210824fbaa5ecfd 15-Aug-2008 Daniel Dunbar <daniel@zuster.org> Infinite loops considered harmful.
- Thanks Thomas


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54818 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
9d9b09c86a8c69e8f69364f610563cdb86f2b8b7 15-Aug-2008 Daniel Dunbar <daniel@zuster.org> Infinite loops considered harmful.
- Thanks Thomas


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54818 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
7cbcbf42f86982eb686e00bbe28432a51f683102 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
odeGenTypes.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
odeGenTypes.cpp
31fe9c3531f8c22c09e3796766960235bef7bf31 14-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add GetAddrOfConstantCString method
- Returns addr of constant for argument + '\0'.
- I couldn't think of a better name.
- Move appropriate users of GetAddrOfConstantString to this.

Rename getStringForStringLiteral to GetStringForStringLiteral.

Add GetAddrOfConstantStringFromLiteral
- This combines GetAddrOfConstantString and
GetStringForStringLiteral. This method can be, but is not yet, more
efficient.

Change GetAddrOfConstantString to not add terminating '\0'
- <rdar://problem/6140956>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54768 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
GObjC.cpp
GObjCGNU.cpp
odeGenModule.cpp
odeGenModule.h
6143293fa4366ee95d7e47e61bd030a34bf68b55 14-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add GetAddrOfConstantCString method
- Returns addr of constant for argument + '\0'.
- I couldn't think of a better name.
- Move appropriate users of GetAddrOfConstantString to this.

Rename getStringForStringLiteral to GetStringForStringLiteral.

Add GetAddrOfConstantStringFromLiteral
- This combines GetAddrOfConstantString and
GetStringForStringLiteral. This method can be, but is not yet, more
efficient.

Change GetAddrOfConstantString to not add terminating '\0'
- <rdar://problem/6140956>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54768 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
GObjC.cpp
GObjCGNU.cpp
odeGenModule.cpp
odeGenModule.h
cffcdacf688e23e227f4583d7cbd1ff6a0088896 13-Aug-2008 Daniel Dunbar <daniel@zuster.org> Implement Obj-C protocol metadata generation for NeXT.
- Near complete, only properties are missing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54715 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
6efc0c559b5f9861d4bbd4aef5b4897c02b2ae74 13-Aug-2008 Daniel Dunbar <daniel@zuster.org> Implement Obj-C protocol metadata generation for NeXT.
- Near complete, only properties are missing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54715 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
84bb85f9066ee75e113b76ca183e6fc61caffce4 13-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change ObjCRuntime GenerateProtocol[Ref] methods to take
ObjCProtocolDecl directly.

Implement CodeGen support for forward protocol decls (no-ops are so
nice to implement).

Also moved CGObjCRuntime.h out of CodeGenModule.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54709 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
af2f62ce32e462f256855cd24b06dec4755d2827 13-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change ObjCRuntime GenerateProtocol[Ref] methods to take
ObjCProtocolDecl directly.

Implement CodeGen support for forward protocol decls (no-ops are so
nice to implement).

Also moved CGObjCRuntime.h out of CodeGenModule.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54709 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
b8fe21bb28c954e249d6d0cccb6f96b8394c27ee 12-Aug-2008 Daniel Dunbar <daniel@zuster.org> Emit OBJC_MODULE_INFO and OBJC_SYMBOLS metadata
- Matches llvm-gcc and seem to be expected by otool.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54669 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
4e2d7d03b2e07ad5f4eb56be67f066ed1427b3a5 12-Aug-2008 Daniel Dunbar <daniel@zuster.org> Emit OBJC_MODULE_INFO and OBJC_SYMBOLS metadata
- Matches llvm-gcc and seem to be expected by otool.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54669 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
d7a25205bc2a190b02a9f6c356b0bbc4fbe42dc6 12-Aug-2008 Daniel Dunbar <daniel@zuster.org> Drop Sender from GenerateMessageSend*
- Was unused and generated a unnecessary load of self
(missed file)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54668 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
22711185f2368bea6325504b58cac021857eb0d7 12-Aug-2008 Daniel Dunbar <daniel@zuster.org> Drop Sender from GenerateMessageSend*
- Was unused and generated a unnecessary load of self
(missed file)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54668 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
6fa3dafb4e387adf45440bf8b47bc1f91495bb31 12-Aug-2008 Daniel Dunbar <daniel@zuster.org> Drop Sender from GenerateMessageSend*
- Was unused and generated a unnecessary load of self

Update NeXT runtime to get proper object & selector types from
ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54667 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
2bedbf8549bb33293c6a53e5da6cbd8de290d014 12-Aug-2008 Daniel Dunbar <daniel@zuster.org> Drop Sender from GenerateMessageSend*
- Was unused and generated a unnecessary load of self

Update NeXT runtime to get proper object & selector types from
ASTContext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54667 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
fa456240a43479cc0511cf725df1965250b7b9f4 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
GExprScalar.cpp
GObjCRuntime.h
odeGenTypes.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
GExprScalar.cpp
GObjCRuntime.h
odeGenTypes.cpp
a5a0cdbd2d8e8bb9dbb7160f3245c17d753ff063 12-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add @selector(...) codegen support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54665 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
a008db15ee50455ff98db1e4251cdda5c89a90ee 12-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add @selector(...) codegen support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54665 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
5eec614870fddf53e93cf2f867f4b168e4b91dd6 12-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add NeXT support for (simple) message sends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54664 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
259d93d1e1f820d5ee7251e875fdb7c883102f16 12-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add NeXT support for (simple) message sends.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54664 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
daf4ad446cd8074b6859071b632a4a502ab0d91f 12-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add ObjC constant string support for NeXT.

Changed CGObjCRuntime::GenerateConstantString interface to take
std::string instead of char* and size.

Change ObjC functions which call on GenerateConstantString to bitcast
result to appropriate type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54659 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
bbce49b9e5c6d7f05926b89f8e6fd235ae01c250 12-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add ObjC constant string support for NeXT.

Changed CGObjCRuntime::GenerateConstantString interface to take
std::string instead of char* and size.

Change ObjC functions which call on GenerateConstantString to bitcast
result to appropriate type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54659 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
5f98285110726db3572261a148cfaab7c3e88f33 12-Aug-2008 Mike Stump <mrs@apple.com> Fix compilation warning with help from David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54654 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
0d8a13d823b644d94ae5f8db275be3592b9bbbfc 12-Aug-2008 Mike Stump <mrs@apple.com> Fix compilation warning with help from David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54654 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
1be1df38bc96c806d045260cd25e96f09b041c51 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add LangOptions::NeXTRuntime.
- Wired to -fnext-runtime and -fgnu-runtime options.
- Defaults to GNU, no autoselection for NeXT.

Emit NeXT OBJC_IMAGE_INFO marker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54651 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
f77ac86f4eca528a04b817d7ad7f045a47d52712 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add LangOptions::NeXTRuntime.
- Wired to -fnext-runtime and -fgnu-runtime options.
- Defaults to GNU, no autoselection for NeXT.

Emit NeXT OBJC_IMAGE_INFO marker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54651 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCMac.cpp
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
fc69bde1e640aac3e06943a5a23a09fe8ff71871 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change CodeGenModule to only create ObjC runtime for ObjC files
- Changed CodeGenModule::getObjCRuntime to return reference.
- Added CodeGenModule::hasObjCRuntime predicate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54645 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
odeGenModule.cpp
odeGenModule.h
208ff5e8a073de2a5d15cbe03cab8a4c0d935e28 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change CodeGenModule to only create ObjC runtime for ObjC files
- Changed CodeGenModule::getObjCRuntime to return reference.
- Added CodeGenModule::hasObjCRuntime predicate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54645 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
odeGenModule.cpp
odeGenModule.h
91692d902021997bf99836c1b8f7421204be8cf5 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add -fexceptions to Driver
- Maps to LangOptions.Exceptions
- Currently always off, should autoselect based on language.

Update CodeGen to set unwind attribute on functions definitions based
on LangOptions.Exceptions.
- Still need to set attributes appropriately on calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54643 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6379a7a15335e0af543a942efe9cfd514a83dab8 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add -fexceptions to Driver
- Maps to LangOptions.Exceptions
- Currently always off, should autoselect based on language.

Update CodeGen to set unwind attribute on functions definitions based
on LangOptions.Exceptions.
- Still need to set attributes appropriately on calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54643 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
fd2ff6ca0d6127068e8d52107e0e0a5183bf927a 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> Update for IRBuilder template change (update LLVM!)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54642 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.h
GObjCRuntime.h
58bf6101062867ca4b3028f9e77e4ae642f09b44 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> Update for IRBuilder template change (update LLVM!)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54642 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.h
GObjCRuntime.h
e0ad215b709fba79b3a1ead9af31a6f8bd3ee77a 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
GBuiltin.cpp
GExpr.cpp
GObjC.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenTypes.cpp
oduleBuilder.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
GBuiltin.cpp
GExpr.cpp
GObjC.cpp
GObjCMac.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenTypes.cpp
oduleBuilder.cpp
64789f8496d9bd3ff5ba3686feca0de1a25d5a32 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
GBuiltin.cpp
GDecl.cpp
GExpr.cpp
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenTypes.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
GBuiltin.cpp
GDecl.cpp
GExpr.cpp
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenTypes.cpp
eee5cd13ac4afe567c5066eaaf0e812aafb14067 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
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenTypes.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
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenTypes.cpp
de30073d24ef186212a70e2a21f488767e45b7fb 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
GDebugInfo.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenTypes.cpp
oduleBuilder.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
GDebugInfo.cpp
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenTypes.cpp
oduleBuilder.cpp
8c85fac090534f7b41b9148c524adb65d3ab05f1 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add dummy Mac Objective-C runtime interface.
- Not currently accessible and completely non-functional.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54624 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
c17a4d3b16a2624a76de5d7508805534545bd3bf 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add dummy Mac Objective-C runtime interface.
- Not currently accessible and completely non-functional.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54624 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCMac.cpp
GObjCRuntime.h
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
3c670e1705c78f740cde5a27a70950fc608e0eb6 10-Aug-2008 Daniel Dunbar <daniel@zuster.org> Back out r54608 (inline string literals were getting an extra '\0')
temporarily, I assumed GetAddrForConstantString literal was being
used consistently but it doesn't look like it is.

Factored out a CodeGenModule::getStringForStringLiteral which handles
extracting a std::string for the bytes of a StringLiteral, padded to
match the type.

Update EmitLValue to use getStringForStringLiteral, this was
previously not padding strings correctly. Good thing we only emit
strings in 4 different places!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54621 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
odeGenModule.cpp
odeGenModule.h
1e04976fc2611d8cc06986a81deed4c42183b870 10-Aug-2008 Daniel Dunbar <daniel@zuster.org> Back out r54608 (inline string literals were getting an extra '\0')
temporarily, I assumed GetAddrForConstantString literal was being
used consistently but it doesn't look like it is.

Factored out a CodeGenModule::getStringForStringLiteral which handles
extracting a std::string for the bytes of a StringLiteral, padded to
match the type.

Update EmitLValue to use getStringForStringLiteral, this was
previously not padding strings correctly. Good thing we only emit
strings in 4 different places!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54621 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
odeGenModule.cpp
odeGenModule.h
8324cb69b10852d2121efc6652c7b4912c7c8cea 10-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix crash during initialization of a bitfield which followed a zero
length element.

Fix some 80-col violations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54610 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
9ca8bb0996bbb8b9dbf69c51cb3d1523559e47e3 10-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix crash during initialization of a bitfield which followed a zero
length element.

Fix some 80-col violations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54610 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
84985f816ea2596dcfa5b43c40ea182d92babf2e 10-Aug-2008 Daniel Dunbar <daniel@zuster.org> Bug fix, inline string literals were getting an extra '\0'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54608 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
ec5c2a7646e4e23a4bed77443415938b140d7aa7 10-Aug-2008 Daniel Dunbar <daniel@zuster.org> Bug fix, inline string literals were getting an extra '\0'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54608 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
69909293d4d0bdffef36121651906f7d2e767d85 10-Aug-2008 Chris Lattner <sabre@nondot.org> rename PreDefinedExpr -> PredefinedExpr



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54605 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
GObjC.cpp
odeGenFunction.h
d9f6910f4ef37c0e8eeee2a01287d9572c3176ef 10-Aug-2008 Chris Lattner <sabre@nondot.org> rename PreDefinedExpr -> PredefinedExpr



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54605 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
GObjC.cpp
odeGenFunction.h
91e5f896b184d3ae76d0239e6be739fae0d3749d 10-Aug-2008 Nico Weber <nicolasweber@gmx.de> 80 cols

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54599 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
d7549e7c051fdcc0f06f8353e6cf9e630400722e 10-Aug-2008 Nico Weber <nicolasweber@gmx.de> 80 cols

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54599 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
8cae86e2505034e8d0e4a88743494b97d57f023a 10-Aug-2008 Argiris Kirtzidis <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
odeGenTypes.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
odeGenTypes.cpp
faf23dbcc1afe5ab22080e61b0f4afa88ccae15f 08-Aug-2008 Chris Lattner <sabre@nondot.org> update to make IRBuilder API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54548 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCRuntime.h
odeGenFunction.h
85e356825b291f86c6e926638914222b834b71a3 08-Aug-2008 Chris Lattner <sabre@nondot.org> update to make IRBuilder API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54548 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjCGNU.cpp
GObjCRuntime.h
odeGenFunction.h
2866ea403a80f514798c50f5d2d49479a1c0cf4c 07-Aug-2008 Ted Kremenek <kremenek@apple.com> ParseAST now conditionally deletes the passed ASTConsumer.
ModuleBuilder now performs llvmgen in HandleTranslationUnit.

This patch follows from the discussion on the following thread on cfe-commits:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080804/006849.html



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54486 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
159346a82bfa5063ead81af903a2bc5e5a9e5b36 07-Aug-2008 Ted Kremenek <kremenek@apple.com> ParseAST now conditionally deletes the passed ASTConsumer.
ModuleBuilder now performs llvmgen in HandleTranslationUnit.

This patch follows from the discussion on the following thread on cfe-commits:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080804/006849.html



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54486 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
de813316c6f8d69212837bdfcda1b94216a5c0a3 06-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix EmitNullInitializationToLValue for bitfield lvalues.
- PR2643


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54397 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
82397139c47a41675ab337290f6dca7644e541d5 06-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix EmitNullInitializationToLValue for bitfield lvalues.
- PR2643


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54397 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
833b03b7dc3e4a6251e1aaf68fcb758e68d0543b 06-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix bitfield accesses which straddle the boundary of the underlying
type.

- This generates somewhat less optimal code than before but this is
not hard to rectify once stable (at the cost of slightly more
complex code).

- This currently always uses little-endian ordering of the bitfield.

- This breaks the CodeGen/bitfield.c test because it was grepping for
hard-coded assembly instructions. Will fix once a better test case
is constructed (hard to do without execution).

- This fixes SingleSource/UnitTests/2006-01-23-InitializedBitField.c
and Regression/C/PR1386.c from the test suite.

- <rdar://problem/6085090>, <rdar://problem/6094169>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54395 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
10e3dedb6f6bf999e23700f876f7e19e650ef642 06-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix bitfield accesses which straddle the boundary of the underlying
type.

- This generates somewhat less optimal code than before but this is
not hard to rectify once stable (at the cost of slightly more
complex code).

- This currently always uses little-endian ordering of the bitfield.

- This breaks the CodeGen/bitfield.c test because it was grepping for
hard-coded assembly instructions. Will fix once a better test case
is constructed (hard to do without execution).

- This fixes SingleSource/UnitTests/2006-01-23-InitializedBitField.c
and Regression/C/PR1386.c from the test suite.

- <rdar://problem/6085090>, <rdar://problem/6094169>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54395 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
5d7d0387803d8314211dd71c4bf785f66f429e09 06-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix CodeGen of pointer arithmetic in compound assignment statements.

- Changed EmitSub to work on all cases (arithmetic, ptr - int, ptr -
ptr) so that implementation matches that of other operators.

- Modify EmitCompoundAssign to compute and perform the appropriate
casts of left, right, and result types for the assorted pointer
arithmetic cases.

- Fix EmitSub (ptr - int) case to negate the rhs *after*
extension. This is critical when the rhs is unsigned (and needs
extension).

- This fixes cfrac.

- <rdr://6115726>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54392 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
8c6f57c38b1451bb28945876b0d147fd2f26e6d3 06-Aug-2008 Daniel Dunbar <daniel@zuster.org> Fix CodeGen of pointer arithmetic in compound assignment statements.

- Changed EmitSub to work on all cases (arithmetic, ptr - int, ptr -
ptr) so that implementation matches that of other operators.

- Modify EmitCompoundAssign to compute and perform the appropriate
casts of left, right, and result types for the assorted pointer
arithmetic cases.

- Fix EmitSub (ptr - int) case to negate the rhs *after*
extension. This is critical when the rhs is unsigned (and needs
extension).

- This fixes cfrac.

- <rdr://6115726>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54392 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
ced8914ca8747b12b1c9e311a30629b62cbb6ffb 06-Aug-2008 Daniel Dunbar <daniel@zuster.org> Implement GNU asm-label extension support in CodeGen. This fixes
scimark2 on Darwin.

- Added Sema support for asm-label on variables, which I forgot before.

- Update CodeGen to use GlobalDeclMap to determine if static Decls
require emission (instead of LLVM module name lookup). Important
since the Decl name and the LLVM module name can differ.

- <rdar://problem/6116729>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54388 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a735ad8be5536a1cd3e9817ec27dfeb2a0c1d5ca 06-Aug-2008 Daniel Dunbar <daniel@zuster.org> Implement GNU asm-label extension support in CodeGen. This fixes
scimark2 on Darwin.

- Added Sema support for asm-label on variables, which I forgot before.

- Update CodeGen to use GlobalDeclMap to determine if static Decls
require emission (instead of LLVM module name lookup). Important
since the Decl name and the LLVM module name can differ.

- <rdar://problem/6116729>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54388 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a31eaf745aa3fcefe6f1ca6c7aab743ec9c0931f 06-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change CodeGen of global decls to key off of the name (instead of
having multiple bindings from all the possible decls which
conceptually map to the same global).

- This eliminates CodeGen depending on the LLVM module for name
lookup.

- This also eliminates the need for ReplaceMapValuesWith (hurrah).

- This handles lookups for FunctionDecls correctly in the presence of
aliases, this was previously broken.

- WIP: Can still clean up & unify variable and function emission.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54382 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
3c827a79cb7d04c255db8080e682ee2c6912373d 06-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change CodeGen of global decls to key off of the name (instead of
having multiple bindings from all the possible decls which
conceptually map to the same global).

- This eliminates CodeGen depending on the LLVM module for name
lookup.

- This also eliminates the need for ReplaceMapValuesWith (hurrah).

- This handles lookups for FunctionDecls correctly in the presence of
aliases, this was previously broken.

- WIP: Can still clean up & unify variable and function emission.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54382 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
479fc69da8d437ac93977dea69e7ad0f69e03f4f 05-Aug-2008 Ted Kremenek <kremenek@apple.com> Remove excess #include.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54366 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
588b1f0a754da053b77cb16bcfb76007ebd60830 05-Aug-2008 Ted Kremenek <kremenek@apple.com> Remove excess #include.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54366 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.h
7c65b6cfdb764c9887085206f033f63c73d1b335 05-Aug-2008 Ted Kremenek <kremenek@apple.com> Refactored driver logic for CodeGen into LLVMCodeGenWriter. This ASTConsumer layers on top of LLVMCodeGen (another existing ASTConsumer) to emit bitcode files to disk. This layering takes this logic out of clang.cpp and puts it directly into the ASTConsumer interface. The benefit is that now --emit-llvm works with both serialized ASTs and regular source files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54364 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
815c78fd9ab8bd5dfe8e8a91b8c6a413e2b8c889 05-Aug-2008 Ted Kremenek <kremenek@apple.com> Refactored driver logic for CodeGen into LLVMCodeGenWriter. This ASTConsumer layers on top of LLVMCodeGen (another existing ASTConsumer) to emit bitcode files to disk. This layering takes this logic out of clang.cpp and puts it directly into the ASTConsumer interface. The benefit is that now --emit-llvm works with both serialized ASTs and regular source files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54364 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
0aac9f62bafdb004505b56c7806cc9355e1170d8 05-Aug-2008 Daniel Dunbar <daniel@zuster.org> Bug fix, CodeGen of (void*) - (void*) was broken.
- <rdar://problem/6122967>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54338 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
820b03398fdcc8f1f6c60ace55b708e311fa8ce4 05-Aug-2008 Daniel Dunbar <daniel@zuster.org> Bug fix, CodeGen of (void*) - (void*) was broken.
- <rdar://problem/6122967>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54338 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
8ccfa804a9575105cc5068815078f12520bc9ad3 04-Aug-2008 Daniel Dunbar <daniel@zuster.org> Avoid creating dummy block when no indirect gotos are present.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54322 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
76526a5245ec2283b0c85fcef507d4c2dec90715 04-Aug-2008 Daniel Dunbar <daniel@zuster.org> Avoid creating dummy block when no indirect gotos are present.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54322 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
879788d52c9793b36c428e81c5d72bf6efb4e788 04-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add CodeGen support for indirect goto.
- Follows emission scheme used by llvm-gcc, i.e. invent an id for
each label whose address is taken and replace each indirect goto by
a switch to each possible target.
- Currently we emit a switch for each indirect goto instead of
merging them as llvm-gcc does.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54318 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
0ffb125996336fc7602b162c0a9e392f1a93060f 04-Aug-2008 Daniel Dunbar <daniel@zuster.org> Add CodeGen support for indirect goto.
- Follows emission scheme used by llvm-gcc, i.e. invent an id for
each label whose address is taken and replace each indirect goto by
a switch to each possible target.
- Currently we emit a switch for each indirect goto instead of
merging them as llvm-gcc does.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54318 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
a1923f6d95601582f4a5c3924b8e1c5ac3f658b3 04-Aug-2008 Chris Lattner <sabre@nondot.org> Finally fix PR2189. This makes a fairly invasive but important change to
move getAsArrayType into ASTContext instead of being a method on type.
This is required because getAsArrayType(const AT), where AT is a typedef
for "int[10]" needs to return ArrayType(const int, 10).

Fixing this greatly simplifies getArrayDecayedType, which is a good sign.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54317 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
odeGenModule.cpp
c63a1f276f7b324fd9a4be82098b1c8f7bf30733 04-Aug-2008 Chris Lattner <sabre@nondot.org> Finally fix PR2189. This makes a fairly invasive but important change to
move getAsArrayType into ASTContext instead of being a method on type.
This is required because getAsArrayType(const AT), where AT is a typedef
for "int[10]" needs to return ArrayType(const int, 10).

Fixing this greatly simplifies getArrayDecayedType, which is a good sign.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54317 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GExpr.cpp
GExprAgg.cpp
GExprConstant.cpp
odeGenModule.cpp
dd2e9ca75a376d862d2141747e3057b03f42fe93 01-Aug-2008 Daniel Dunbar <daniel@zuster.org> Support constructor and destructor attributes in CodeGen

- There is an miscompilation issue remaining due to a poor
interaction between the delayed emission of static functions and
the emission of constructors, but that already existed prior to
this change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54258 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
6bfed7e411adc46eaf616371f85f68305c6e6257 01-Aug-2008 Daniel Dunbar <daniel@zuster.org> Support constructor and destructor attributes in CodeGen

- There is an miscompilation issue remaining due to a poor
interaction between the delayed emission of static functions and
the emission of constructors, but that already existed prior to
this change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54258 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
69cc2f90c0716d7c1a38688c66ca9ee31fd20432 31-Jul-2008 Chris Lattner <sabre@nondot.org> Fix a regression I introduced in r54107:
http://llvm.org/viewvc/llvm-project?view=rev&revision=54107


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54242 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
05d2fb40859bbfc081ab08379452db876545bff6 31-Jul-2008 Chris Lattner <sabre@nondot.org> Fix a regression I introduced in r54107:
http://llvm.org/viewvc/llvm-project?view=rev&revision=54107


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54242 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
02cd5d3be6df84c61a03cea309a5e654bc0240ce 31-Jul-2008 Mon P Wang <wangmp@apple.com> Updated to match new atomic names (to enable overloading for pointers to
different address spaces) for llvm r54195.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54241 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
c5004516489c931cf839bdbdde5a76e4074cc888 31-Jul-2008 Mon P Wang <wangmp@apple.com> Updated to match new atomic names (to enable overloading for pointers to
different address spaces) for llvm r54195.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54241 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
5c8963d223c0a2113ca963dad41cc928be2b0943 30-Jul-2008 Daniel Dunbar <daniel@zuster.org> Fix implicit initialization of structures.

<rdar://problem/6113085>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54237 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
f9eede163826dd55a56c479330ef041eaa856417 30-Jul-2008 Daniel Dunbar <daniel@zuster.org> Fix implicit initialization of structures.

<rdar://problem/6113085>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54237 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
2188c531bb29c0aff5f7767a11c55b39e4b7fc08 30-Jul-2008 Daniel Dunbar <daniel@zuster.org> Change CodeGenModule GlobalDeclMap to directly reference globals
instead of mapping the decl to a bitcast of the global to the correct
type.

- GetAddrOf{Function,GlobalVar} introduce the bitcast on every use now.

- This solves a problem where a dangling pointer could be introduced
by the RAUW done when replacing a forward or tentative
definition. See testcase for more details.

- Fixes <rdar://problem/6108358>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54211 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
9986eabd4423d867262c358ca62f94a60ac58412 30-Jul-2008 Daniel Dunbar <daniel@zuster.org> Change CodeGenModule GlobalDeclMap to directly reference globals
instead of mapping the decl to a bitcast of the global to the correct
type.

- GetAddrOf{Function,GlobalVar} introduce the bitcast on every use now.

- This solves a problem where a dangling pointer could be introduced
by the RAUW done when replacing a forward or tentative
definition. See testcase for more details.

- Fixes <rdar://problem/6108358>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54211 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
7bf5b3d7e85afade7606eb356f0c014242a5fc58 30-Jul-2008 Daniel Dunbar <daniel@zuster.org> Rework codegen emission of globals
- No (intended) functionality change.

- Primary purpose is to clearly separate (lazy) construction of
globals that are a forward declaration or tentative definition from
those that are the final definition.

- Lazy construction is now encapsulated in
GetAddrOf{Function,GlobalVar} while final definitions are
constructed in EmitGlobal{Function,Var}Definition.

- External interface for dealing with globals is now limited to
EmitGlobal and GetAddrOf{Function,GlobalVar}.

- Also updated helper functions dealing with statics, annotations,
and ctors to be private.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54179 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
bd012ff1fa088181646a784f385b28867372d434 30-Jul-2008 Daniel Dunbar <daniel@zuster.org> Rework codegen emission of globals
- No (intended) functionality change.

- Primary purpose is to clearly separate (lazy) construction of
globals that are a forward declaration or tentative definition from
those that are the final definition.

- Lazy construction is now encapsulated in
GetAddrOf{Function,GlobalVar} while final definitions are
constructed in EmitGlobal{Function,Var}Definition.

- External interface for dealing with globals is now limited to
EmitGlobal and GetAddrOf{Function,GlobalVar}.

- Also updated helper functions dealing with statics, annotations,
and ctors to be private.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54179 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprConstant.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
f7bacd3843fa85cf16f89ee747f649e19db52772 29-Jul-2008 Daniel Dunbar <daniel@zuster.org> Fix codegen of chained declarations
- Killed useless CodeGenModule::EmitGlobalVarDeclarator, instead just
recurse on any ScopedDecl.
- Fix for <rdar://problem/6093838>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54162 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
58a7a265cf9203795e718d12c074f103e6b27e73 29-Jul-2008 Daniel Dunbar <daniel@zuster.org> Fix codegen of chained declarations
- Killed useless CodeGenModule::EmitGlobalVarDeclarator, instead just
recurse on any ScopedDecl.
- Fix for <rdar://problem/6093838>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54162 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
1793d983720afcbb4bb6db8ee345fe9d6f3278e3 27-Jul-2008 Chris Lattner <sabre@nondot.org> Fix a bug in my previous patch, CGF is not valid for constants outside a function


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54108 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
d394cc6f0fca198ec8def0f1cfaf16b5df0d52fa 27-Jul-2008 Chris Lattner <sabre@nondot.org> Fix a bug in my previous patch, CGF is not valid for constants outside a function


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54108 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
c154ac1d36d2e31443729a4724fd0cae4d551983 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
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenTypes.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
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
odeGenTypes.cpp
d5a56aae166344e13f1f8c845530beee0868db49 27-Jul-2008 Chris Lattner <sabre@nondot.org> change more instances of QualType::getCanonicalType to call
ASTContext::getCanonicalType instead (PR2189)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54105 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
b77792eabf5882cf9af8cc810599b20432fda6c2 27-Jul-2008 Chris Lattner <sabre@nondot.org> change more instances of QualType::getCanonicalType to call
ASTContext::getCanonicalType instead (PR2189)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54105 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
09cee85c0ef9c35a6102c94f8f858c21b0e16d10 26-Jul-2008 Chris Lattner <sabre@nondot.org> implement codegen support for labels at the end of stmtexprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54100 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GStmt.cpp
odeGenFunction.h
91d723da7b68be5245c3ac58aa2a36d04658cfb8 26-Jul-2008 Chris Lattner <sabre@nondot.org> implement codegen support for labels at the end of stmtexprs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54100 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GStmt.cpp
odeGenFunction.h
a23eb7bd8e79a5509b8fcfcd5c4cda945428d36a 26-Jul-2008 Chris Lattner <sabre@nondot.org> minor tidying, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54099 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GStmt.cpp
345f7209692b116ca433a3196c1e3c998e0ffcde 26-Jul-2008 Chris Lattner <sabre@nondot.org> minor tidying, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54099 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GStmt.cpp
dad8551737f73a810c4e123a8ed7f03b48244d60 26-Jul-2008 Chris Lattner <sabre@nondot.org> Fix rdar://6103124, the only dummy blocks are ones without names. Named blocks
are important part of control flow structures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54078 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
1e9660e1fb11efb7e65799bc145c0e2b6f3562be 26-Jul-2008 Chris Lattner <sabre@nondot.org> Fix rdar://6103124, the only dummy blocks are ones without names. Named blocks
are important part of control flow structures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54078 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
03e2a51c7ab4d41307a27b861dcf175e20d96639 25-Jul-2008 Nate Begeman <natebegeman@mac.com> X86 builtin fixes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54049 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
abfaf9984eee3d076ded8770bf9fce156f10c185 25-Jul-2008 Nate Begeman <natebegeman@mac.com> X86 builtin fixes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54049 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
1591bc575950842f586fb1aa65e8df89c859d91e 25-Jul-2008 Nate Begeman <natebegeman@mac.com> Generate vector compares in codegen


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54048 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
7a66d7b6c0d84f8c9c74c687a338cf3cf6b9c808 25-Jul-2008 Nate Begeman <natebegeman@mac.com> Generate vector compares in codegen


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54048 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
a3554e791307e346c16cc811082e2b43565eefd2 25-Jul-2008 Nate Begeman <natebegeman@mac.com> Move comment to match style


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54047 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
69ce1dff4a1f86d5bd7135c0491fd628d2d76cc7 25-Jul-2008 Nate Begeman <natebegeman@mac.com> Move comment to match style


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54047 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
7a7458ceeedc4d55bf0b6ceb33ac83b447fdcc10 25-Jul-2008 Daniel Dunbar <daniel@zuster.org> Rework codegen of case ranges
- Fix multiple issues with the way case ranges were emitted, see test
cases details about the specific issues.

- The root issue was not being careful about how basic blocks were
emitted which led to them being chained together incorrectly,
resulting in improper control flow.

- Fixes <rdar://problem/6098585>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54006 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
16f23570999cac1fa13597386938450843003840 25-Jul-2008 Daniel Dunbar <daniel@zuster.org> Rework codegen of case ranges
- Fix multiple issues with the way case ranges were emitted, see test
cases details about the specific issues.

- The root issue was not being careful about how basic blocks were
emitted which led to them being chained together incorrectly,
resulting in improper control flow.

- Fixes <rdar://problem/6098585>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54006 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
5c9ee14637fef715097bbc73cf26b782a91481ce 24-Jul-2008 Daniel Dunbar <daniel@zuster.org> Fix EmitCaseStmtRange to ignore empty ranges
- Also cleaned up emission slightly
- Inspection of the code revealed several other bugs, however. Case
ranges are not properly wired and can result in switch cases being
dropped or even infinite loops. See: <rdar://problem/6098585>

Completes: <rdar://problem/6094119>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53975 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
4efde8d2c10b091bc9588de18c2c71dca2979e49 24-Jul-2008 Daniel Dunbar <daniel@zuster.org> Fix EmitCaseStmtRange to ignore empty ranges
- Also cleaned up emission slightly
- Inspection of the code revealed several other bugs, however. Case
ranges are not properly wired and can result in switch cases being
dropped or even infinite loops. See: <rdar://problem/6098585>

Completes: <rdar://problem/6094119>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53975 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
c7ec531bfc20a38ec4d12c91178fbd7fb52f0668 23-Jul-2008 Chris Lattner <sabre@nondot.org> don't depend on the result of CreateNeg to be a binop


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53948 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
9a847f598c4907a72b8593b364b9e6b94b086e75 23-Jul-2008 Chris Lattner <sabre@nondot.org> don't depend on the result of CreateNeg to be a binop


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53948 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
3b8f5c6a2bef328a6c7e827b72162c0536385f0b 23-Jul-2008 Chris Lattner <sabre@nondot.org> Fix a codegen crash on:

int foo(void) {
float x[2];
return x;
}

rdar://6093986


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53946 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
f31627f676374812d0355d7e34fd2e940b400757 23-Jul-2008 Chris Lattner <sabre@nondot.org> Fix a codegen crash on:

int foo(void) {
float x[2];
return x;
}

rdar://6093986


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53946 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1c73aa2ba92ebad763ee7d4241c901f594677e0b 22-Jul-2008 Daniel Dunbar <daniel@zuster.org> Add note to check what __alignof__ a function type should be.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53928 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
8ee6a63ba1cc2455f4b3e9111091908d50796818 22-Jul-2008 Daniel Dunbar <daniel@zuster.org> Add note to check what __alignof__ a function type should be.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53928 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
fdb7acde072645cdfc8ef7937e1def1350b9c101 22-Jul-2008 Daniel Dunbar <daniel@zuster.org> Prevent codegen crash on sizeof(<function type>), a gcc extension.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53899 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
9140845f95d7dedd410d93c3390dd00104c76b0a 22-Jul-2008 Daniel Dunbar <daniel@zuster.org> Prevent codegen crash on sizeof(<function type>), a gcc extension.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53899 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
33844332fc5300488e92aaa683f434f902b0f854 22-Jul-2008 Daniel Dunbar <daniel@zuster.org> Implement bzero, memset, memmove builtins.

This subsumes Nico Weber's patch and implements bzero in terms
of llvm.memset to match llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53888 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
1caae959017b355e9bb61250d5a0d04edbf468b0 22-Jul-2008 Daniel Dunbar <daniel@zuster.org> Implement bzero, memset, memmove builtins.

This subsumes Nico Weber's patch and implements bzero in terms
of llvm.memset to match llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53888 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
5b0de85aa9a53b70f57e4560cb8e3f509973df39 22-Jul-2008 Daniel Dunbar <daniel@zuster.org> Implement nans, prefetch, and trap builtins.

This closes <rdar://problem/6080720>, support for __builtin_constant_p
has been filed separately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53885 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
4493f79fce48cd9cbd9f55fa9d452cde736747a0 22-Jul-2008 Daniel Dunbar <daniel@zuster.org> Implement nans, prefetch, and trap builtins.

This closes <rdar://problem/6080720>, support for __builtin_constant_p
has been filed separately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53885 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
fea941b613a1e2c3158875508d9e547ce6571da7 21-Jul-2008 Daniel Dunbar <daniel@zuster.org> Kill an unused variable warning


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53878 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
14ecaefc289b9ddc00e16232ba5348260250fd5f 21-Jul-2008 Daniel Dunbar <daniel@zuster.org> Kill an unused variable warning


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53878 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
0be088230e4bce150cbad1d49423efb5d7ab124d 21-Jul-2008 Chris Lattner <sabre@nondot.org> move two more lists of protocols over to use ObjCList<ObjCProtocolDecl>,
simplifying code along the way and fixing a problem and memory leak or two.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53876 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
780f329cb011bff0da5763e2e9744eec093d0509 21-Jul-2008 Chris Lattner <sabre@nondot.org> move two more lists of protocols over to use ObjCList<ObjCProtocolDecl>,
simplifying code along the way and fixing a problem and memory leak or two.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53876 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
29921c4cbef086cb0dadba22f082c96148f69609 21-Jul-2008 Daniel Dunbar <daniel@zuster.org> Add __builtin_powi[fl] support


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53866 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
a933c3c052bbd87b01cc6fc7a7745e1c4b1757fb 21-Jul-2008 Daniel Dunbar <daniel@zuster.org> Add __builtin_powi[fl] support


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53866 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
8bcb52573fad79e8cff88fad9112484b125942ea 21-Jul-2008 Chris Lattner <sabre@nondot.org> introduce a new ObjCList templated class and start moving
various objc lists over to it. First up, the protocol list
on ObjCInterfaceDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53856 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
3db6cae19c236fe2cef343c90105ce7cca7de965 21-Jul-2008 Chris Lattner <sabre@nondot.org> introduce a new ObjCList templated class and start moving
various objc lists over to it. First up, the protocol list
on ObjCInterfaceDecl.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53856 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
726f4d4cbe766813f3f355be24899d699b7872a0 21-Jul-2008 Daniel Dunbar <daniel@zuster.org> Implement ffs, parity, and popcount builtins.
+ test case


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53851 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
04b290030eee33295600728450f348989d1a627e 21-Jul-2008 Daniel Dunbar <daniel@zuster.org> Implement ffs, parity, and popcount builtins.
+ test case


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53851 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
4d0185486637c956f2df1330076e4981b0665004 21-Jul-2008 Chris Lattner <sabre@nondot.org> don't pass in null as the Name for GenerateClassStructure,
it goes and makes std::strings out of them, which is not
defined.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53843 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
1565e0364b05d163640dd2b6feed43bae67df4fd 21-Jul-2008 Chris Lattner <sabre@nondot.org> don't pass in null as the Name for GenerateClassStructure,
it goes and makes std::strings out of them, which is not
defined.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53843 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
eae56133ca985e10e21d5178a6994c53192a032f 18-Jul-2008 Mon P Wang <wangmp@apple.com> Add support shufpd


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53747 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
6c5df7f54f40090df6032a74e650b8e4d1c96207 18-Jul-2008 Mon P Wang <wangmp@apple.com> Add support shufpd


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53747 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
3b9a77e61a2e60f2d41720791eeae774311eca74 17-Jul-2008 Daniel Dunbar <daniel@zuster.org> Fix for codegen crash on multibit bool bitfield initialization
<rdar://problem/6078606>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53737 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
1f3846e3013a3b6679aeaa2e4c61de37a5c320ee 17-Jul-2008 Daniel Dunbar <daniel@zuster.org> Fix for codegen crash on multibit bool bitfield initialization
<rdar://problem/6078606>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53737 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
96b14163501106cc68d38d3bfa96fc4f10676633 14-Jul-2008 Chris Lattner <sabre@nondot.org> remove CGObjCEtoile until it compiles.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53552 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCEtoile.cpp
ca33f79346547cf1865c47b53ee99a6cdef07c72 14-Jul-2008 Chris Lattner <sabre@nondot.org> remove CGObjCEtoile until it compiles.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53552 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCEtoile.cpp
0886232257c90bd6260bfa3f8ab4b59341a80739 09-Jul-2008 Chris Lattner <sabre@nondot.org> Codegen support for __builtin_stdarg_start


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53329 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
6a705f0443f8398ece14d80e71d8e8c9e71aa84a 09-Jul-2008 Chris Lattner <sabre@nondot.org> Codegen support for __builtin_stdarg_start


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53329 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
1d340eb4ff50be483a058445755a0b5f38e4204d 04-Jul-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Fixed bugzilla bug# 2489.
This was broken when the GenerateCode function was splitted to use GenerateFunction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53136 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
af99417156c652a6f04dff643925036dc3241d60 04-Jul-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Fixed bugzilla bug# 2489.
This was broken when the GenerateCode function was splitted to use GenerateFunction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53136 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
9652585e7178aad7e1f58746cf896d313ffd1054 04-Jul-2008 Bill Wendling <isanbard@gmail.com> Remove removed header.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53121 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
21cb712be47ec21ffa314d7c9856160fa4de440a 04-Jul-2008 Bill Wendling <isanbard@gmail.com> Remove removed header.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53121 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
2a674dca3ed88e58c536026c51a4ed9cbc32d4a8 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
GBuiltin.cpp
GExprScalar.cpp
odeGenTypes.cpp
odeGenTypes.h
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
GBuiltin.cpp
GExprScalar.cpp
odeGenTypes.cpp
odeGenTypes.h
0d3899e3f327dc6f3b08607eae9d175289f35b49 27-Jun-2008 Cédric Venet <cedric.venet@laposte.net> Add missing include file (due to a file splitting in llvm).
Add new file to Sema Project for VS.
this unbreak the build for VS2005 (with the associated patch on llvm).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52830 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
58cbd06887c94d98fe4138d15c64db19d36a4af9 27-Jun-2008 Cedric Venet <cedric.venet@laposte.net> Add missing include file (due to a file splitting in llvm).
Add new file to Sema Project for VS.
this unbreak the build for VS2005 (with the associated patch on llvm).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52830 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
578279dc375fdbf017dbe19ed7d7f602e7cdfbac 26-Jun-2008 Chris Lattner <sabre@nondot.org> refactor more objc codegen interfaces to pass around selectors so
we don't push strings into LLVM IR and then have to read them back out.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52765 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCRuntime.h
odeGenModule.cpp
a4210076fc1d7ac0a20b8b4a79e18a8ae33b9c69 26-Jun-2008 Chris Lattner <sabre@nondot.org> refactor more objc codegen interfaces to pass around selectors so
we don't push strings into LLVM IR and then have to read them back out.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52765 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCRuntime.h
odeGenModule.cpp
bcb3e866b826a2105102c4a36c65ee1b603a7379 26-Jun-2008 Chris Lattner <sabre@nondot.org> indenting and other minor things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52764 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
odeGenModule.cpp
fba676396703e87a5034e5f308aa30a633468f66 26-Jun-2008 Chris Lattner <sabre@nondot.org> indenting and other minor things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52764 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
odeGenModule.cpp
ad9c3f3ea5b8b2196638bdd7aa50c3a2f2cf5e94 26-Jun-2008 Chris Lattner <sabre@nondot.org> refactor interface to GenerateClassStructure to avoid converting a
string to LLVM IR and then regenerating the string from IR.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52762 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
d002cc6fc5b72bf00e3b7b4571ccf0f23c789b4b 26-Jun-2008 Chris Lattner <sabre@nondot.org> refactor interface to GenerateClassStructure to avoid converting a
string to LLVM IR and then regenerating the string from IR.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52762 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
a5b188884a01e26f8c62867044ff50a79ea6dc0f 26-Jun-2008 Chris Lattner <sabre@nondot.org> remove the old getSelector implementation, which removes some
calls to getStringValue


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52761 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCRuntime.h
5e7dcc62e4637591959f9c372f6c5258d0d263e0 26-Jun-2008 Chris Lattner <sabre@nondot.org> remove the old getSelector implementation, which removes some
calls to getStringValue


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52761 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCRuntime.h
8384c140407cc2a419b29934cb751c0c2d7c18b7 26-Jun-2008 Chris Lattner <sabre@nondot.org> avoid a lot of unneeded selector processing work by passing around
selectors instead of Value*'s.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52760 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCRuntime.h
9384c768e93f270118a30ce96546083a666da284 26-Jun-2008 Chris Lattner <sabre@nondot.org> avoid a lot of unneeded selector processing work by passing around
selectors instead of Value*'s.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52760 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCRuntime.h
469cb3e340903f54dcc9dabbac09205d9cdea1bb 26-Jun-2008 Chris Lattner <sabre@nondot.org> use cheaper/simpler getselector call for @selector exprs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52759 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCRuntime.h
42ba3e7ba1d4f3fad4871af77ab68ae3514b8c7e 26-Jun-2008 Chris Lattner <sabre@nondot.org> use cheaper/simpler getselector call for @selector exprs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52759 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCRuntime.h
d71288e6885bef4d26ea63dab04492736a13879a 26-Jun-2008 Chris Lattner <sabre@nondot.org> start avoid doing lots of unneeded work handling selectors


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52758 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCRuntime.h
8e67b63530b4f39a48bc12d97376f373a6901279 26-Jun-2008 Chris Lattner <sabre@nondot.org> start avoid doing lots of unneeded work handling selectors


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52758 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
GObjCRuntime.h
769c55f45901ba2aa551a891871e80579fd6e9ef 26-Jun-2008 Chris Lattner <sabre@nondot.org> improve indentation, avoid thrashing on maps and recalculating strings as much.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52757 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCRuntime.h
3aba07c84f12f244283ebfa94095a49810e00c2f 26-Jun-2008 Chris Lattner <sabre@nondot.org> improve indentation, avoid thrashing on maps and recalculating strings as much.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52757 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
GObjCRuntime.h
547907cd6b3c538fd078101a8c0c92695b7d130a 26-Jun-2008 Chris Lattner <sabre@nondot.org> give CreateObjCRuntime a full CGM so it can get whatever state it needs,
instead of passing in just a couple random things it currently
happens to use.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52756 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCEtoile.cpp
GObjCGNU.cpp
GObjCRuntime.h
odeGenModule.cpp
dce1406f1c1f572cfd61c494546572d63461c741 26-Jun-2008 Chris Lattner <sabre@nondot.org> give CreateObjCRuntime a full CGM so it can get whatever state it needs,
instead of passing in just a couple random things it currently
happens to use.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52756 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCEtoile.cpp
GObjCGNU.cpp
GObjCRuntime.h
odeGenModule.cpp
ef843041cf213ad8f11276dce17f080c83cfc79f 26-Jun-2008 Chris Lattner <sabre@nondot.org> Fix 80 col violations, assert on assumptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52755 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
630404b16e886238ed68a1abbfe2e548f43aa664 26-Jun-2008 Chris Lattner <sabre@nondot.org> Fix 80 col violations, assert on assumptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52755 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCGNU.cpp
e758109b607ea11bff8bc1827465e21ff3a0652f 26-Jun-2008 Chris Lattner <sabre@nondot.org> a temporary minimal hack to get clang building after the getStringValue changes in llvm mainline.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52753 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
550b8db03c0bb1b006d2ff63d4febda3db16002f 26-Jun-2008 Chris Lattner <sabre@nondot.org> a temporary minimal hack to get clang building after the getStringValue changes in llvm mainline.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52753 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
444244ec1cdb34a2da29736ab7495f9ae7a6faa3 25-Jun-2008 Mon P Wang <wangmp@apple.com> Updated atomic intrinsic name from llvm r52706. Fixed dropped bit in shufps.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52707 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
09b6bf5bfa2ba9cbbd353cbd7846af8f49b020e7 25-Jun-2008 Mon P Wang <wangmp@apple.com> Updated atomic intrinsic name from llvm r52706. Fixed dropped bit in shufps.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52707 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
6ee20e389f5cfbeec661c6b94a156f21fb0b95bb 24-Jun-2008 Chris Lattner <sabre@nondot.org> "Support for Objective-C message sends which return structures. Also includes a small fix for constant string handling that should have been in the last patch (sorry!) and a hook for generating selectors (rest of this implementation to follow in the next patch)."

Patch by David Chisnall!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52681 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GObjC.cpp
GObjCGNU.cpp
odeGenFunction.h
8fdf32822be2238aa7db62d40e75b168b637ab7d 24-Jun-2008 Chris Lattner <sabre@nondot.org> "Support for Objective-C message sends which return structures. Also includes a small fix for constant string handling that should have been in the last patch (sorry!) and a hook for generating selectors (rest of this implementation to follow in the next patch)."

Patch by David Chisnall!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52681 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GObjC.cpp
GObjCGNU.cpp
odeGenFunction.h
60eaae8931ae3f28f5bf26f830c38aca0bc0e373 24-Jun-2008 Chris Lattner <sabre@nondot.org> "This is a small fix for a bug where static object instances were being incorrectly generated. The bug was caused by my inability to read the GNU libobjc source and is only apparent when JITing code (static compilation does not expose the bug due to the data layout of other globals)."

Patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52680 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
4e0b2641d8aa8da8eb001b959940a9ec68f45f0d 24-Jun-2008 Chris Lattner <sabre@nondot.org> "This is a small fix for a bug where static object instances were being incorrectly generated. The bug was caused by my inability to read the GNU libobjc source and is only apparent when JITing code (static compilation does not expose the bug due to the data layout of other globals)."

Patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52680 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
bac12450da5e01b91bb6fb110980b27ad89433ec 21-Jun-2008 Chris Lattner <sabre@nondot.org> "this patch adds code generation hooks for Objective-C constant strings. It also modifies Sema so that Objective-C constant strings are treated as untyped objects if the interface for the constant string class can not be found. This is consistent with Apple GCC. I thought it was consistent with GNU GCC, since this was causing failures when trying to compile GNUstep with (GNU) GCC, but it appears that this is not the case when attempting to produce a simple test case to demonstrate it. Possibly there is a way of making the error go away, but I haven't found out what it is yet."

Patch by David Chisnall!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52599 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjCGNU.cpp
13fd7e5111032f54b538dd66d035b0ccc1f82467 21-Jun-2008 Chris Lattner <sabre@nondot.org> "this patch adds code generation hooks for Objective-C constant strings. It also modifies Sema so that Objective-C constant strings are treated as untyped objects if the interface for the constant string class can not be found. This is consistent with Apple GCC. I thought it was consistent with GNU GCC, since this was causing failures when trying to compile GNUstep with (GNU) GCC, but it appears that this is not the case when attempting to produce a simple test case to demonstrate it. Possibly there is a way of making the error go away, but I haven't found out what it is yet."

Patch by David Chisnall!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52599 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GObjCGNU.cpp
c97665eba226c30e6b6525a5200b546138239e53 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
odeGenTypes.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
odeGenTypes.cpp
a3e509ec8f23ac608f8b6b554e126b054f845e57 19-Jun-2008 Mike Stump <mrs@apple.com> Remove tabs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52507 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
9ea5884420683d51446c964a6166704a62e40e56 19-Jun-2008 Mike Stump <mrs@apple.com> Remove tabs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52507 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
8c7c6a18ccb1d4a9e6b4673eccf2ed7a77e5dba4 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
GExpr.cpp
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenTypes.cpp
odeGenTypes.h
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
GExpr.cpp
GObjC.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenTypes.cpp
odeGenTypes.h
2719e9894e3e62bdfb9ee8ac2a520549dc4d5360 17-Jun-2008 Ted Kremenek <kremenek@apple.com> This patch is motivated by numerous strict-aliasing warnings when compiling
clang as a Release build.

The big change is that all AST nodes (subclasses of Stmt) whose children are
Expr* store their children as Stmt* or arrays of Stmt*. This is to remove
strict-aliasing warnings when using StmtIterator. None of the interfaces of any
of the classes have changed (except those with arg_iterators, see below), as the
accessor methods introduce the needed casts (via cast<>). While this extra
casting may seem cumbersome, it actually adds some important sanity checks
throughout the codebase, as clients using StmtIterator can potentially overwrite
children that are expected to be Expr* with Stmt* (that aren't Expr*). The casts
provide extra sanity checks that are operational in debug builds to catch
invariant violations such as these.

For classes that have arg_iterators (e.g., CallExpr), the definition of
arg_iterator has been replaced. Instead of it being Expr**, it is an actual
class (called ExprIterator) that wraps a Stmt**, and provides the necessary
operators for iteration. The nice thing about this class is that it also uses
cast<> to type-checking, which introduces extra sanity checks throughout the
codebase that are useful for debugging.

A few of the CodeGen functions that use arg_iterator (especially from
OverloadExpr) have been modified to take begin and end iterators instead of a
base Expr** and the number of arguments. This matches more with the abstraction
of iteration. This still needs to be cleaned up a little bit, as clients expect
that ExprIterator is a RandomAccessIterator (which we may or may not wish to
allow for efficiency of representation).

This is a fairly large patch. It passes the tests (except CodeGen/bitfield.c,
which was already broken) on both a Debug and Release build, but it should
obviously be reviewed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52378 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
5549976193e34417d4474a5f4a514268ef6666c7 17-Jun-2008 Ted Kremenek <kremenek@apple.com> This patch is motivated by numerous strict-aliasing warnings when compiling
clang as a Release build.

The big change is that all AST nodes (subclasses of Stmt) whose children are
Expr* store their children as Stmt* or arrays of Stmt*. This is to remove
strict-aliasing warnings when using StmtIterator. None of the interfaces of any
of the classes have changed (except those with arg_iterators, see below), as the
accessor methods introduce the needed casts (via cast<>). While this extra
casting may seem cumbersome, it actually adds some important sanity checks
throughout the codebase, as clients using StmtIterator can potentially overwrite
children that are expected to be Expr* with Stmt* (that aren't Expr*). The casts
provide extra sanity checks that are operational in debug builds to catch
invariant violations such as these.

For classes that have arg_iterators (e.g., CallExpr), the definition of
arg_iterator has been replaced. Instead of it being Expr**, it is an actual
class (called ExprIterator) that wraps a Stmt**, and provides the necessary
operators for iteration. The nice thing about this class is that it also uses
cast<> to type-checking, which introduces extra sanity checks throughout the
codebase that are useful for debugging.

A few of the CodeGen functions that use arg_iterator (especially from
OverloadExpr) have been modified to take begin and end iterators instead of a
base Expr** and the number of arguments. This matches more with the abstraction
of iteration. This still needs to be cleaned up a little bit, as clients expect
that ExprIterator is a RandomAccessIterator (which we may or may not wish to
allow for efficiency of representation).

This is a fairly large patch. It passes the tests (except CodeGen/bitfield.c,
which was already broken) on both a Debug and Release build, but it should
obviously be reviewed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52378 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
odeGenFunction.h
e0c190ade0611cd8a6b4f537e943d7a7c66ea26e 16-Jun-2008 Chris Lattner <sabre@nondot.org> force size of alloca to i32, which is currently required by LLVM IR.
This fixes use of alloca on 64-bit systems.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52334 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
9e800e3dd80d77f6c47054738177bf824089f55a 16-Jun-2008 Chris Lattner <sabre@nondot.org> force size of alloca to i32, which is currently required by LLVM IR.
This fixes use of alloca on 64-bit systems.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52334 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
2e630541c19988aa2d05639e37bf46080dedc944 14-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Basic support for volatile loads and stores. Stores the volatile
qualifier in the lvalue, and changes lvalue loads/stores to honor
the volatile flag. Places which need some further attention are marked
with FIXMEs.

Patch by Cédric Venet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52264 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GObjCGNU.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
1e692ace08959399794363e77499b73da5494af9 14-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Basic support for volatile loads and stores. Stores the volatile
qualifier in the lvalue, and changes lvalue loads/stores to honor
the volatile flag. Places which need some further attention are marked
with FIXMEs.

Patch by Cédric Venet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52264 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GObjCGNU.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
3f25f04a9f8af614b0db4b620576163166ecd16d 10-Jun-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Make CodeGenFunction::EmitDecl() recognise CXXClass/CXXStruct/CXXUnion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52162 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
a7a6dc01b769283c46cba2812dc078c0b20a0f14 10-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Make CodeGenFunction::EmitDecl() recognise CXXClass/CXXStruct/CXXUnion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52162 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
c6cc7d5a60b59381f1c9880ed8fdb9b2316c3a85 10-Jun-2008 Argiris Kirtzidis <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
odeGenTypes.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
odeGenTypes.cpp
b1e662e09a18eb88cac643754698b7afa89a4f6c 09-Jun-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Generate debug descriptors for array types while generating the debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52140 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
507de85bc1cee904123ef99c58159c97df40a3ae 09-Jun-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Generate debug descriptors for array types while generating the debug info.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52140 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
7853438716ca87cd811b17e1d7800da38e815638 08-Jun-2008 Nuno Lopes <nunoplopes@sapo.pt> implement the alias attirbute (in both Sema and Codegen)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52092 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
d4cbda6292b321c2e7dce7f039d92918fee99b3a 08-Jun-2008 Nuno Lopes <nunoplopes@sapo.pt> implement the alias attirbute (in both Sema and Codegen)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52092 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
a250b896e6e3ac600a81daa69377b345428d5e61 08-Jun-2008 Nuno Lopes <nunoplopes@sapo.pt> fix compiler warnings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52089 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
3cd1a2dc07014aa6b675030823690cf06619a745 08-Jun-2008 Nuno Lopes <nunoplopes@sapo.pt> fix compiler warnings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52089 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
168cf2afbf7bb8a95d07c7fe0f20b221aaf2a26a 08-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Don't crash emitting an initializer for a static local with union type.
This fix just makes sure to construct the global with the appropriate
type, and fixes up the one user this affects to compensate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52084 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
2659052c5d32deea3994d14f3c7d330666174a6f 08-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Don't crash emitting an initializer for a static local with union type.
This fix just makes sure to construct the global with the appropriate
type, and fixes up the one user this affects to compensate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52084 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
9f4c8a39c1b619b8ae61b9d2f00ebe79b55480be 07-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Fix crash with conversion to an address-space-qualified pointer. Bug
reported on cfe-dev by Cédric Venet.

Note that I seriously doubt that this perticular construct is useful,
though: it's a pointer in an alternate address space pointing into
unqualified address space.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52076 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
c53296eb6d97f37fc1326f3ab38c3c811390b838 07-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Fix crash with conversion to an address-space-qualified pointer. Bug
reported on cfe-dev by Cédric Venet.

Note that I seriously doubt that this perticular construct is useful,
though: it's a pointer in an alternate address space pointing into
unqualified address space.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52076 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
0f805bd93119525d162a5cacc42ff23f9b601166 07-Jun-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Create debug type descriptors for aggregate/enum types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52070 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
f58c27a64de75b152b54b88a7aee07867aaeda17 07-Jun-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Create debug type descriptors for aggregate/enum types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52070 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
31e984debf93b35519d5ae9a5d19e33277ae8346 06-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Reorganize this loop a bit so it doesn't crash for empty unions. Fixes
PR2419.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52060 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
c55f98dbdffb73894a8dbe7b0ce176604fe42127 06-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Reorganize this loop a bit so it doesn't crash for empty unions. Fixes
PR2419.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52060 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
a5d60fcafb91ab199a0dd133fb29d8326d5377ec 06-Jun-2008 Nuno Lopes <nunoplopes@sapo.pt> implement constant expr. sub ptr ptr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52049 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
77e1dfcffe9ed0078b015418182784b56532998c 06-Jun-2008 Nuno Lopes <nunoplopes@sapo.pt> implement constant expr. sub ptr ptr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52049 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
54d9754227f82983b9d37abd9dd8c33258195d7a 05-Jun-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Emit debug information for global and static variables when -g is specified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51993 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
odeGenModule.cpp
686226b538e72c5059ab7c9a8f87eb883193b645 05-Jun-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Emit debug information for global and static variables when -g is specified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51993 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
odeGenModule.cpp
fa94dff2190b156192869976e7dc8d27e7dfa6f0 04-Jun-2008 Eli Friedman <eli.friedman@gmail.com> For setting attributes, don't assume there are ParamVarDecls available,
because trying to access non-existent ParamVarDecls can crash.
Testcase from the original source for PR2414.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51960 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
c134fcb0d7989fe6937e47e6216637647e074aef 04-Jun-2008 Eli Friedman <eli.friedman@gmail.com> For setting attributes, don't assume there are ParamVarDecls available,
because trying to access non-existent ParamVarDecls can crash.
Testcase from the original source for PR2414.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51960 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b62ff2473fdcef6c47e048e7af79c07ea4299236 04-Jun-2008 Nuno Lopes <nunoplopes@sapo.pt> fix crash when codegening 'cond ? lhs : call-to-void-func()'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51958 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
108f55d6fd9a1c0e753eb8e046cb1f1b81d77a76 04-Jun-2008 Nuno Lopes <nunoplopes@sapo.pt> fix crash when codegening 'cond ? lhs : call-to-void-func()'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51958 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
04f6a0800a277742950aeb72d950ed48b4496570 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
odeGenTypes.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
odeGenTypes.cpp
0560bcf25d627fbd38f2d54309341560713a8aaa 01-Jun-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Include <string> header to allow compiling for MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51847 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCRuntime.h
8ef07c0a81727aae37c820a816dac019f5fe1d43 01-Jun-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Include <string> header to allow compiling for MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51847 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCRuntime.h
7719bc889c53c519f2afdb02494607501773fd93 01-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Don't name the ObjC types if there aren't any ObjC objects in the file.
Patch by David Chisnall.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51840 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
1b8956e1ce4c5770982d6e59edb16979b500677a 01-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Don't name the ObjC types if there aren't any ObjC objects in the file.
Patch by David Chisnall.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51840 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
9be4221a35feab2e05109fcaab36a19701b2ec3f 01-Jun-2008 Eli Friedman <eli.friedman@gmail.com> First cut at setting attributes for functions and calls; this puts us
much closer to passing the gcc struct layout tests.

It might be possible to refactor this a bit, but I'm not sure there's
actually enough common code for that to be useful.

To get the calling convention completely correct, a bit of
platform-specific code is necessary even for x86-Linux. On x86-Linux, the
alignment of function parameters is extremely strange; as far as I can tell,
it's always 4 except for SSE vectors or structs containing SSE vectors. I'm
continuing to investigate this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51839 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
ff4a2d9e2c1ddbf87e00e2a36ae341faf03eafb3 01-Jun-2008 Eli Friedman <eli.friedman@gmail.com> First cut at setting attributes for functions and calls; this puts us
much closer to passing the gcc struct layout tests.

It might be possible to refactor this a bit, but I'm not sure there's
actually enough common code for that to be useful.

To get the calling convention completely correct, a bit of
platform-specific code is necessary even for x86-Linux. On x86-Linux, the
alignment of function parameters is extremely strange; as far as I can tell,
it's always 4 except for SSE vectors or structs containing SSE vectors. I'm
continuing to investigate this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51839 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
e263663470616f67cc0f18be596b86516beb80b0 01-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Make sure _Bool globals have the correct type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51838 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
7dfa639e9274b9f40c8f207e35c0fcbfe75d04f8 01-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Make sure _Bool globals have the correct type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51838 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
070fee4c77f7cc04f6e5da4d5ef1679835bb7d38 01-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Minor cleanup to use the ConvertTypeForMem helper.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51837 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
bfe08e093babca58d905ffe4ebbdc44647781f42 01-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Minor cleanup to use the ConvertTypeForMem helper.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51837 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
b41e4973c435b82a10ef03736247296ca25f3bbc 01-Jun-2008 Anton Korobeynikov <asl@math.spbu.ru> Remove spurious == 0


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51836 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
5f58b911304f7d114f929d1726a09cd1c828a5dd 01-Jun-2008 Anton Korobeynikov <asl@math.spbu.ru> Remove spurious == 0


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51836 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCGNU.cpp
cd5d08d50aaa561aa8ee8bb38c861384554c84d2 01-Jun-2008 Anton Korobeynikov <asl@math.spbu.ru> Support for code generation of Objective-C top-level language constructs.
Implemented by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51835 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjCEtoile.cpp
GObjCGNU.cpp
GObjCRuntime.h
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
20ff3108fcd2c3bd734dc79efc22ebaa090abd41 01-Jun-2008 Anton Korobeynikov <asl@math.spbu.ru> Support for code generation of Objective-C top-level language constructs.
Implemented by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51835 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
GObjCEtoile.cpp
GObjCGNU.cpp
GObjCRuntime.h
odeGenFunction.cpp
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
696758ff535aa7bff66c98a0bccec9c3657e5f9a 31-May-2008 Eli Friedman <eli.friedman@gmail.com> Calculate alignment for local variables.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51826 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
77eedd6fcea7b090cb0368d26ec65305a84dbc6c 31-May-2008 Eli Friedman <eli.friedman@gmail.com> Calculate alignment for local variables.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51826 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
7008e9a13e4427cf927eeec08db67f97015be01b 30-May-2008 Eli Friedman <eli.friedman@gmail.com> PR1893: Fix up the type of tentative definitions of incomplete array
types so that they end up the correct size.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51787 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
cd5f4aaf0c219189878126d556f35e38fdb8afa1 30-May-2008 Eli Friedman <eli.friedman@gmail.com> PR1893: Fix up the type of tentative definitions of incomplete array
types so that they end up the correct size.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51787 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
42fab009e3c0d522ebdf1f2b6794c8c13b57b790 30-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix and enable generating general union initializers. Essentially, what
this does is reconstruct the type for structs and arrays if the type
wouldn't be compatible otherwise.

The assertion about packing in the struct type reconstruction code
sucks, but I don't see any obvious way to fix it. Maybe we need a general
utility method to take a list of types and alignments and try to construct an
unpacked type if possible?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51785 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
a04a1538ee5e286e94e3374caf51ba1094d289b0 30-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix and enable generating general union initializers. Essentially, what
this does is reconstruct the type for structs and arrays if the type
wouldn't be compatible otherwise.

The assertion about packing in the struct type reconstruction code
sucks, but I don't see any obvious way to fix it. Maybe we need a general
utility method to take a list of types and alignments and try to construct an
unpacked type if possible?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51785 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
43a0ce89fd584059c3942794ac6b45ebe85bffb9 30-May-2008 Eli Friedman <eli.friedman@gmail.com> Allow the type of a global to be different from the type of its
associated declaration. This is a prerequisite to handling
general union initializations; for example, an array of unions involving
pointers has to be turned into a struct because the elements can have
incompatible types.

I refactored the code a bit to make it more readable; now, the logic for
definitions is all in EmitGlobalVarInit.

The second parameter for GetAddrOfGlobalVar is now dead; I'll remove it
separately.

By itself, this patch should not cause any visible changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51783 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
77ba708819285931932ecd33691a672bb59d221a 30-May-2008 Eli Friedman <eli.friedman@gmail.com> Allow the type of a global to be different from the type of its
associated declaration. This is a prerequisite to handling
general union initializations; for example, an array of unions involving
pointers has to be turned into a struct because the elements can have
incompatible types.

I refactored the code a bit to make it more readable; now, the logic for
definitions is all in EmitGlobalVarInit.

The second parameter for GetAddrOfGlobalVar is now dead; I'll remove it
separately.

By itself, this patch should not cause any visible changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51783 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6c221719d59d56883451cb0d9b202f36ab900b6c 30-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix constant vector init for initializer lists with an incomplete list
of elements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51769 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
cfb313bd56fb935c54544489d71d77364fd312db 30-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix constant vector init for initializer lists with an incomplete list
of elements.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51769 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
5dcae520df60f0de644da2bc8fdb6b05d2bbbda7 30-May-2008 Eli Friedman <eli.friedman@gmail.com> Always check that the definition of a function has the correct type.
This fixes a crash on the included testcase (found in NetHack).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51767 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
109603de14dfe69f3eb9b264a273b38e5684c8de 30-May-2008 Eli Friedman <eli.friedman@gmail.com> Always check that the definition of a function has the correct type.
This fixes a crash on the included testcase (found in NetHack).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51767 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
b2a10455d68c2d490d227182fa85c4703e383825 30-May-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Emit parameter and local variable debug information with -g.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51765 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
cc9b16394fe6c9245dc4f8661a63d0c3937b62f0 30-May-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Emit parameter and local variable debug information with -g.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51765 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GDecl.cpp
fac8197b9b718e57476233449fe73f28e9e7703c 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
odeGenTypes.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
odeGenTypes.cpp
7529fd6a4c1abb4490e63e56d7eafee55a08483d 30-May-2008 Eli Friedman <eli.friedman@gmail.com> Some additions to constant initializer generation code. Adds
bit-field initialization; ugly code, X86-only, but it works, at least
for basic stuff. Separates/adds union initialization; currently disabled,
though, because the struct/array code needs modifications to support
elements of the wrong type.

Fixes PR2381 and PR2309 with the bit-field initialization. And NetHack
compiles and appears to work with a few tweaks (to work around the lack
of transparent_union support, and clang being a bit strict about
conflicting declarations).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51763 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
a823400df727968fda4b2df23abab0d8ecff7a75 30-May-2008 Eli Friedman <eli.friedman@gmail.com> Some additions to constant initializer generation code. Adds
bit-field initialization; ugly code, X86-only, but it works, at least
for basic stuff. Separates/adds union initialization; currently disabled,
though, because the struct/array code needs modifications to support
elements of the wrong type.

Fixes PR2381 and PR2309 with the bit-field initialization. And NetHack
compiles and appears to work with a few tweaks (to work around the lack
of transparent_union support, and clang being a bit strict about
conflicting declarations).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51763 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
9ed3e7794b4c45ba3856f5997191d16e234df958 29-May-2008 Steve Naroff <snaroff@apple.com> - Move ObjC Expresssion AST's from Expr.h => ExprObjC.h
- #include ExprObjC.h in many places


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51703 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
f494b579b22f9950f5af021f0bf9879a91bb8b41 29-May-2008 Steve Naroff <snaroff@apple.com> - Move ObjC Expresssion AST's from Expr.h => ExprObjC.h
- #include ExprObjC.h in many places


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51703 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
8710b937878f89904b2f9c7a0ff6cf64ca2993cf 29-May-2008 Eli Friedman <eli.friedman@gmail.com> More complete/correct implementation of the comparison operators for
constant expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51682 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
b896596a94315485e1d5cfabfbc3f82fd7f96393 29-May-2008 Eli Friedman <eli.friedman@gmail.com> More complete/correct implementation of the comparison operators for
constant expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51682 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
850ea37928209c6e2439d7273a6652d144b55cf5 29-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix an extremely subtle bug with pointer comparisons: they have to be
unsigned because it's possible (at least in theory) to have
have both positive and negative pointers pointing to the same object.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51681 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
ec2c12646aee07bf6bb1b4092d538d5860fd0661 29-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix an extremely subtle bug with pointer comparisons: they have to be
unsigned because it's possible (at least in theory) to have
have both positive and negative pointers pointing to the same object.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51681 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
6681374976c53c4ecd902d4e34b614fb2be47731 29-May-2008 Eli Friedman <eli.friedman@gmail.com> Rearrange EmitLValueForField a bit to work properly for _Bool bitfields
in unions (we don't want to do the union-specific bitcast for
bit-fields).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51678 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
1e86b34f15f0502c13750ee1d6cf338def6e2242 29-May-2008 Eli Friedman <eli.friedman@gmail.com> Rearrange EmitLValueForField a bit to work properly for _Bool bitfields
in unions (we don't want to do the union-specific bitcast for
bit-fields).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51678 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
a36799c7eff267a391534103cd7f4e7f98171868 29-May-2008 Eli Friedman <eli.friedman@gmail.com> Add codegen support for a few more kinds of initializer constant
expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51677 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
bc5ed6ef52d43b5a3c924421aac3c1f0f829dcc8 29-May-2008 Eli Friedman <eli.friedman@gmail.com> Add codegen support for a few more kinds of initializer constant
expressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51677 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
b232e99017aacbd009f1ee1dc762f813f04fdacf 29-May-2008 Eli Friedman <eli.friedman@gmail.com> Add CodeGen support for alignment on globals, both for unusual natural
alignment and alignment attributes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51676 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
08d7802a406ee4a7cc18e8fce0c137b8c410ea7c 29-May-2008 Eli Friedman <eli.friedman@gmail.com> Add CodeGen support for alignment on globals, both for unusual natural
alignment and alignment attributes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51676 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6a03c26f2c7214d7a2a065593e45b4d38ac46b34 29-May-2008 Eli Friedman <eli.friedman@gmail.com> A couple minor fixes to make debug info usable for arbitrary code: don't
emit incomplete types, because they crash llc, and always use the
logical location as the current location so we don't crash doing invalid
queries on CurLoc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51675 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
32ea35fee916ed73fe343bad2de9a609eb2cca38 29-May-2008 Eli Friedman <eli.friedman@gmail.com> A couple minor fixes to make debug info usable for arbitrary code: don't
emit incomplete types, because they crash llc, and always use the
logical location as the current location so we don't crash doing invalid
queries on CurLoc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51675 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
a7f46335004802b8c7dd2972ace8afa3e8c63770 29-May-2008 Eli Friedman <eli.friedman@gmail.com> Tentative declarations are supposed to have common linkage, not weak.
This change makes clang generate the same thing as llvm-gcc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51674 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a07b76419a03f126c22949dce2e546ba4df0e415 29-May-2008 Eli Friedman <eli.friedman@gmail.com> Tentative declarations are supposed to have common linkage, not weak.
This change makes clang generate the same thing as llvm-gcc.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51674 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
4c8b0acaaa28a1e3695b19dd36f35273f266b0b2 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
odeGenTypes.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
odeGenTypes.cpp
96781fa8f62819a9bc79fa9a5f12119c4aef9baa 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
odeGenTypes.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
odeGenTypes.cpp
42af397d2b679c736bad908205140aa0071f326e 27-May-2008 Eli Friedman <eli.friedman@gmail.com> A few more cases for aggregate values.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51596 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
b1851249d787f573b9e1312fff8ca4bbcf351f10 27-May-2008 Eli Friedman <eli.friedman@gmail.com> A few more cases for aggregate values.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51596 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
ecd1516e987f9f410412ba3abba8eebab19d6897 27-May-2008 Eli Friedman <eli.friedman@gmail.com> Implementation of __builtin_ctlz.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51595 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
f4e853340590d5c32e58379e8c379ea1777d3101 27-May-2008 Eli Friedman <eli.friedman@gmail.com> Implementation of __builtin_ctlz.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51595 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
34d46aadae281c544f587c2c098207383a63bbe6 27-May-2008 Eli Friedman <eli.friedman@gmail.com> The cache is working again; re-enable it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51587 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a1d642db810e317da011569309ee0693d51b7dff 27-May-2008 Eli Friedman <eli.friedman@gmail.com> The cache is working again; re-enable it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51587 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a4d4e2f975e53027ef16f51c125db9c4261f1774 27-May-2008 Eli Friedman <eli.friedman@gmail.com> Add a more reliable check for whether a static declaration has already
been used. In preparation for the fix to PR2360, but also a minor bug
in its own right.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51583 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
6f7e2eee917a136ffc36834f020782b3f15d8fa6 27-May-2008 Eli Friedman <eli.friedman@gmail.com> Add a more reliable check for whether a static declaration has already
been used. In preparation for the fix to PR2360, but also a minor bug
in its own right.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51583 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
9f5a6a98131c35d86643f50f4949ef6df03bd0e4 27-May-2008 Eli Friedman <eli.friedman@gmail.com> Stop leaking the target data. (Leak found with valgrind.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51579 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
3b6c493f29c2617196ab6d035312ff83c4166b4b 27-May-2008 Eli Friedman <eli.friedman@gmail.com> Stop leaking the target data. (Leak found with valgrind.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51579 91177308-0d34-0410-b5e6-96231b3b80d8
oduleBuilder.cpp
e5596cfeebfabbebdd6b8215a9afaaebf617a95a 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
odeGenTypes.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
odeGenTypes.cpp
eab92a5145be69427157e8dc223a36a6450f260a 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
odeGenTypes.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
odeGenTypes.cpp
8f08a25da69153ab1cdaa689b9e74a1064318348 26-May-2008 Eli Friedman <eli.friedman@gmail.com> Emit memmove, not memcpy, for structure copies; this is unfortunately
required for correctness in cases of copying a struct to itself or to
an overlapping struct (itself for cases like *a = *a, and overlapping
is possible with unions).

Hopefully, this won't end up being a perf issue; LLVM *should* be able
to optimize memmove to memcpy in a lot of cases, and for small copies
the generated code *should* be mostly comparable. (In reality, LLVM
is currently horrible at optimizing memmove, but that's a bug, not a
fundamental issue.)

gcc currently generates wrong code; that's
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32667.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51566 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenModule.cpp
odeGenModule.h
0c99509927a0c7a48490486b9fec287b63e5c09c 26-May-2008 Eli Friedman <eli.friedman@gmail.com> Emit memmove, not memcpy, for structure copies; this is unfortunately
required for correctness in cases of copying a struct to itself or to
an overlapping struct (itself for cases like *a = *a, and overlapping
is possible with unions).

Hopefully, this won't end up being a perf issue; LLVM *should* be able
to optimize memmove to memcpy in a lot of cases, and for small copies
the generated code *should* be mostly comparable. (In reality, LLVM
is currently horrible at optimizing memmove, but that's a bug, not a
fundamental issue.)

gcc currently generates wrong code; that's
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32667.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51566 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
odeGenModule.cpp
odeGenModule.h
f9b930c18e0f2d822fcb1523b51a406c555ee112 25-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix for PR2001. I'm not really fond of it, but it is correct (unless
someone tries to make a bitfield volatile?).

Not sure how to write a test; any suggestions?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51558 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
1849128c7d88247d914f05efe4c03907f0932174 25-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix for PR2001. I'm not really fond of it, but it is correct (unless
someone tries to make a bitfield volatile?).

Not sure how to write a test; any suggestions?



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51558 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
93eb82549eec82d75ce5dd3afbeeaf6fdb0e2a27 25-May-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Generate subprogram debug info with -g.
Also take care of freeing memory at the right places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51553 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GStmt.cpp
odeGenFunction.cpp
1c6a38bcea17801e9a4738753aee845381af2b6c 25-May-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Generate subprogram debug info with -g.
Also take care of freeing memory at the right places.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51553 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GStmt.cpp
odeGenFunction.cpp
377ba9f74201d7e013902a9ef7c86f03a5f4f54a 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
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GStmt.cpp
odeGenTypes.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
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GStmt.cpp
odeGenTypes.cpp
9bc7c8d497b087d2483cb138f2205bd0ccecf873 22-May-2008 Eli Friedman <eli.friedman@gmail.com> Make debugging information usable. This is barebones, but it makes -g
actually work (instead of crashing llc), and there's enough info emitted
to get line number information in gdb. This should hopefully be helpful
for debugging non-working programs.

I got rid of the begin/endregion calls because the implementation wasn't
working; someone who knows the debugging info a bit better might try to
add it. I really have no clue how a compiler is supposed to emit them.

This commit shouldn't have any effect without -g.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51404 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GStmt.cpp
odeGenFunction.cpp
3f2af1002249c8acc9ce17f1fc50324864feb8e1 22-May-2008 Eli Friedman <eli.friedman@gmail.com> Make debugging information usable. This is barebones, but it makes -g
actually work (instead of crashing llc), and there's enough info emitted
to get line number information in gdb. This should hopefully be helpful
for debugging non-working programs.

I got rid of the begin/endregion calls because the implementation wasn't
working; someone who knows the debugging info a bit better might try to
add it. I really have no clue how a compiler is supposed to emit them.

This commit shouldn't have any effect without -g.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51404 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GStmt.cpp
odeGenFunction.cpp
56977311eb22a38b89e78ce8a865d67047356efc 22-May-2008 Eli Friedman <eli.friedman@gmail.com> Minor refactoring: compute the return value separately from emitting the
ret.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51403 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
144ac61f9005a0da4327d4e62a4c453923b7bc0c 22-May-2008 Eli Friedman <eli.friedman@gmail.com> Minor refactoring: compute the return value separately from emitting the
ret.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51403 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
bb0b9a51725cb6dfb702081a565d6cf19a94a2cf 22-May-2008 Eli Friedman <eli.friedman@gmail.com> Make CurFuncDecl more specific; I have some code I'm going to land in a
bit that wants to use CurFuncDecl as a FunctionDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51402 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
963fcb0737aebe929e58967e60b1c9e7cf9d330e 22-May-2008 Eli Friedman <eli.friedman@gmail.com> Make CurFuncDecl more specific; I have some code I'm going to land in a
bit that wants to use CurFuncDecl as a FunctionDecl.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51402 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.h
4751a3add4986e6d68423d084289c70cb67e094a 22-May-2008 Dan Gohman <gohman@apple.com> Move getAccessedFieldNo out of lib/AST/Expr.cpp into
lib/CodeGen/CGExpr.cpp and to change include/clang/AST/Attr.h to
use its own enum for visibility types instead of using
llvm::GlobalValue::VisibilityTypes. These changes eliminate
dependencies in the AST library on LLVM's VMCore library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51398 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
4f8d123e3e2c260de3377208106ddba87cee28b4 22-May-2008 Dan Gohman <gohman@apple.com> Move getAccessedFieldNo out of lib/AST/Expr.cpp into
lib/CodeGen/CGExpr.cpp and to change include/clang/AST/Attr.h to
use its own enum for visibility types instead of using
llvm::GlobalValue::VisibilityTypes. These changes eliminate
dependencies in the AST library on LLVM's VMCore library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51398 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
cecdc6b688a6b1cca11d17cfab6952cda2c11a8f 21-May-2008 Eli Friedman <eli.friedman@gmail.com> Remove an unnecessary/buggy if check. Ran into this with some other
changes in my tree, so I don't have a testcase which affects trunk.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51371 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
788d571f4de788403d669d373e5c17b8da07b1ad 21-May-2008 Eli Friedman <eli.friedman@gmail.com> Remove an unnecessary/buggy if check. Ran into this with some other
changes in my tree, so I don't have a testcase which affects trunk.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51371 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
725d2be94f4df5b4f12715eeb43fa876573085e9 20-May-2008 Eli Friedman <eli.friedman@gmail.com> Disable the function address cache; this doesn't have any ill effects,
as far as I can tell, and it fixes code like test/CodeGen/functions.c.

(Whatever performance effect it might have, crashing on a
construct like this isn't really acceptable; I've run into this
multiple times.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51312 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
be14c5c6e29af948f6f809c499f83d844e755af9 20-May-2008 Eli Friedman <eli.friedman@gmail.com> Disable the function address cache; this doesn't have any ill effects,
as far as I can tell, and it fixes code like test/CodeGen/functions.c.

(Whatever performance effect it might have, crashing on a
construct like this isn't really acceptable; I've run into this
multiple times.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51312 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
60b016329fd2c26d1dc2aaa4abfbd32948247d35 20-May-2008 Eli Friedman <eli.friedman@gmail.com> Add codegen support for stack address intrinsics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51309 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
256f77e431bc6b920ec94cf0bb4ad339ca21b8c9 20-May-2008 Eli Friedman <eli.friedman@gmail.com> Add codegen support for stack address intrinsics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51309 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
91fc7808c9d3baa0258b353ffb1d74938ecbc4ab 20-May-2008 Eli Friedman <eli.friedman@gmail.com> Implement codegen for comma operator for structs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51304 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
07fa52ab33a75d7a5736ea5bd0d4e3134fb10c7e 20-May-2008 Eli Friedman <eli.friedman@gmail.com> Implement codegen for comma operator for structs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51304 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
0242cd28a8ef2e9a70f6e9748288881c54986aed 20-May-2008 Eli Friedman <eli.friedman@gmail.com> Restructure constant structure init codegen so that it's possible to
implement bitfield codegen (although I don't envy the person who
implements it). This also prevents a crash on code like that from PR2309
(it's still broken, but it fails more gracefully).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51285 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
017cbdfd5417d4d31ae6406421276f90269f75e2 20-May-2008 Eli Friedman <eli.friedman@gmail.com> Restructure constant structure init codegen so that it's possible to
implement bitfield codegen (although I don't envy the person who
implements it). This also prevents a crash on code like that from PR2309
(it's still broken, but it fails more gracefully).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51285 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
f2e1d5dbf40acfe1b51a075ed35af7d078fb9054 20-May-2008 Eli Friedman <eli.friedman@gmail.com> Remove code that shouldn't have any effect anymore.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51284 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
ef648c76745ee5e4105eec22dbc97fac18145bd6 20-May-2008 Eli Friedman <eli.friedman@gmail.com> Remove code that shouldn't have any effect anymore.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51284 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
18bb39ebd299a2e65bad0ef08f5d24b667ec99bf 20-May-2008 Eli Friedman <eli.friedman@gmail.com> Implement CodeGen for __builtin_memcpy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51282 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
d4b32e46517358f34e8cfbea35010adfcc3786e0 20-May-2008 Eli Friedman <eli.friedman@gmail.com> Implement CodeGen for __builtin_memcpy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51282 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
48ec562170871c181495a5abf410be0b154ffcbf 19-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix the emission of expressions like char a[10] = "asdf"; previously,
they were causing bad code to be emitted. There are two fixes here: one
makes sure we emit a string that is long enough, and one makes sure we
properly handle string initialization in init lists.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51259 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
922696f03ec9637449e2cba260493808b4977cd3 19-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix the emission of expressions like char a[10] = "asdf"; previously,
they were causing bad code to be emitted. There are two fixes here: one
makes sure we emit a string that is long enough, and one makes sure we
properly handle string initialization in init lists.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51259 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
a04e70dde5fe5b9473cf601301a4dd839f19fa50 17-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix support for _Bool bitfields. The issue is that the bitfield width
used for _Bool is not the same as the primitive width (which for _Bool
is 1 bit). The load and store changes add some casts to make the
types consistent. The EmitLValue changes make sure that the pointer is
of an appropriate type for loading the bitfield.

This isn't perfect, but it's an improvement, and getting everything
right depends on actually laying out structs in an ABI-compliant way.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51224 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
316bb1b9eb9dc3da60e930f50c9b7578411d4966 17-May-2008 Eli Friedman <eli.friedman@gmail.com> Fix support for _Bool bitfields. The issue is that the bitfield width
used for _Bool is not the same as the primitive width (which for _Bool
is 1 bit). The load and store changes add some casts to make the
types consistent. The EmitLValue changes make sure that the pointer is
of an appropriate type for loading the bitfield.

This isn't perfect, but it's an improvement, and getting everything
right depends on actually laying out structs in an ABI-compliant way.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51224 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
ce8d7037482f98ad8b2c031ed85bfd64ea7e126e 16-May-2008 Eli Friedman <eli.friedman@gmail.com> Backout of codegen-based fix to PR2334; this has been fixed differently
at the Sema layer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51203 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
856226c37ff10955c7f3f07ce6fa9522da23a3a5 16-May-2008 Eli Friedman <eli.friedman@gmail.com> Backout of codegen-based fix to PR2334; this has been fixed differently
at the Sema layer.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51203 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
300ada5c29750d0b709777a4b8bfd177e6e58800 16-May-2008 Nate Begeman <natebegeman@mac.com> Fix some prototypes, and implement some builtins until we have our header files completed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51199 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
24512501319aa6d7f70b1bd79470df0197b832c8 16-May-2008 Nate Begeman <natebegeman@mac.com> Fix some prototypes, and implement some builtins until we have our header files completed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51199 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
86bd5f52711b45b87aeac7113e0a276a699537eb 16-May-2008 Eli Friedman <eli.friedman@gmail.com> Patch for PR2334, and a similar ObjC bug.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51193 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
145c08360a8ef90392bb0482c94f47e632e78f8c 16-May-2008 Eli Friedman <eli.friedman@gmail.com> Patch for PR2334, and a similar ObjC bug.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51193 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
827a4f9aec24f1cbfaae96667d80785cb60e4a15 15-May-2008 Nate Begeman <natebegeman@mac.com> Handle a couple missing builtins that will go away eventually when the various
intrin.h files are finished


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51137 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
7ea2e3f6aae9b7511686d3d26dee690fee81c3aa 15-May-2008 Nate Begeman <natebegeman@mac.com> Handle a couple missing builtins that will go away eventually when the various
intrin.h files are finished


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51137 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
d0e9d095335fb20806f25e41af789ffd46920ea9 14-May-2008 Eli Friedman <eli.friedman@gmail.com> Implementation of __builtin_shufflevector, a portable builtin capable of
expressing the full flexibility of the LLVM shufflevector instruction.
The expected immediate usage is in *mmintrin.h, so that they don't
depend on the mess of gcc-inherited (and not completely implemented)
shuffle builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51113 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
d38617c8a50f9729c254ab76cd359af797c6739b 14-May-2008 Eli Friedman <eli.friedman@gmail.com> Implementation of __builtin_shufflevector, a portable builtin capable of
expressing the full flexibility of the LLVM shufflevector instruction.
The expected immediate usage is in *mmintrin.h, so that they don't
depend on the mess of gcc-inherited (and not completely implemented)
shuffle builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51113 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
f3c2cb4382ab12e0182e520e0f7145439028d080 14-May-2008 Eli Friedman <eli.friedman@gmail.com> Add codegen support for block-level compound literals.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51081 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
06e863f2902b8ba55b056308875c19f7ba3dab25 14-May-2008 Eli Friedman <eli.friedman@gmail.com> Add codegen support for block-level compound literals.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51081 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
60e14c158808f9fbf7e6580bd705ee52580f13d7 14-May-2008 Eli Friedman <eli.friedman@gmail.com> Add support for init lists for complex variables.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51080 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
c4777f1928913423234d8d534898f22e9792ae52 14-May-2008 Eli Friedman <eli.friedman@gmail.com> Add support for init lists for complex variables.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51080 91177308-0d34-0410-b5e6-96231b3b80d8
GExprComplex.cpp
a1ae7442826c90beb66d6f314db8065c6cb3bafc 13-May-2008 Nate Begeman <natebegeman@mac.com> Remove AST dependency on VMCore by switching ExtVectorElementExpr off Constant.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51068 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
3b8d116703db8018f855cbb4733ace426422623b 13-May-2008 Nate Begeman <natebegeman@mac.com> Remove AST dependency on VMCore by switching ExtVectorElementExpr off Constant.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51068 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
6fb115c74dd9553d950189fc432ef63843e5af92 13-May-2008 Eli Friedman <eli.friedman@gmail.com> Detabify.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51042 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
86eb3116f9eb1ded8a834207aafde3413f7ed884 13-May-2008 Eli Friedman <eli.friedman@gmail.com> Detabify.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51042 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
51eaf1b59c75756466b07958ca8e0eeb796df023 12-May-2008 Eli Friedman <eli.friedman@gmail.com> Emit basic block for switch body; fixes PR2307.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50968 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
d28a80d64616b66c91d28bb4c08ca2d8c594de4e 12-May-2008 Eli Friedman <eli.friedman@gmail.com> Emit basic block for switch body; fixes PR2307.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50968 91177308-0d34-0410-b5e6-96231b3b80d8
GStmt.cpp
bb822fbce32f92635ea7f20b76e6e86e397552ef 12-May-2008 Eli Friedman <eli.friedman@gmail.com> Don't try to take the address of a bitfield; fixes PR2310.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50966 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
c8ba9614ca5469c3ae259e3ec09792f4b8969397 12-May-2008 Eli Friedman <eli.friedman@gmail.com> Don't try to take the address of a bitfield; fixes PR2310.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50966 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
bf020f3c9649ec3665d10636e5f8f48ea3a0ad17 10-May-2008 Mon P Wang <wangmp@apple.com> Added support to generate some atomic operators (add, sub, and, or etc..)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50919 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
1ffe281890f3cd7728316b45a1f3dd4d3120af7b 10-May-2008 Mon P Wang <wangmp@apple.com> Added support to generate some atomic operators (add, sub, and, or etc..)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50919 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
c8e51f89effc4003fc54aa4dc5a34127e793c7f4 09-May-2008 Nate Begeman <natebegeman@mac.com> Extend vector member references to include {.hi, .lo, .e, .o} which return a
vector of the same element type and half the width, with the high, low, even,
and odd elements respectively.

Allow member references to member references, so that .hi.hi gives you the high
quarter of a vector. This is fairly convenient syntax for some insert/extract
operations.

Remove some unnecessary methods/types in the ExtVectorElementExpr class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50892 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
8a99764f9b778a54e7440b1ee06a1e48f25d76d8 09-May-2008 Nate Begeman <natebegeman@mac.com> Extend vector member references to include {.hi, .lo, .e, .o} which return a
vector of the same element type and half the width, with the high, low, even,
and odd elements respectively.

Allow member references to member references, so that .hi.hi gives you the high
quarter of a vector. This is fairly convenient syntax for some insert/extract
operations.

Remove some unnecessary methods/types in the ExtVectorElementExpr class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50892 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
odeGenFunction.h
40e56a18be09a45bfd315ab3c425d1ecbdca769e 08-May-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Added -g command line options to clang for generating source level debug information. This patch currently enables generation of line number debug information (stoppoints) and region begin/end debug information. The new files CGDebugInfo.h and CGDebugInfo.cpp implements the debug info manager class CGDebugInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50848 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GStmt.cpp
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
e8b9f5b8ea60983c4a74cb8b63879616b914b65a 08-May-2008 Sanjiv Gupta <sanjiv.gupta@microchip.com> Added -g command line options to clang for generating source level debug information. This patch currently enables generation of line number debug information (stoppoints) and region begin/end debug information. The new files CGDebugInfo.h and CGDebugInfo.cpp implements the debug info manager class CGDebugInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50848 91177308-0d34-0410-b5e6-96231b3b80d8
GDebugInfo.cpp
GDebugInfo.h
GStmt.cpp
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
85970f3f71b583df8ad9cbb66bc117728f797d7c 08-May-2008 Chris Lattner <sabre@nondot.org> Add basic support for the pic-* target triples and add support for
targets that do not support recursion (and thus codegen stack variables
as globals).

Patch contributed by Alireza Moshtaghi!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50844 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.h
2621fd1d6d3c5eadcae246859f62738645df7540 08-May-2008 Chris Lattner <sabre@nondot.org> Add basic support for the pic-* target triples and add support for
targets that do not support recursion (and thus codegen stack variables
as globals).

Patch contributed by Alireza Moshtaghi!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50844 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenFunction.h
e9faf279e9ac8a79450ca0962d1d616406f81078 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
odeGenTypes.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
odeGenTypes.cpp
e5628293fb1010573fc0921743eda99a92a63d0a 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
odeGenTypes.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
odeGenTypes.cpp
7db5e94a3f9f1118665a733c99e553b739911449 06-May-2008 Chris Lattner <sabre@nondot.org> simplify some builder calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50694 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprAgg.cpp
GObjCEtoile.cpp
GObjCGNU.cpp
3eae03e7d165f20a863a9a4d7122ba2a691ab16d 06-May-2008 Chris Lattner <sabre@nondot.org> simplify some builder calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50694 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprAgg.cpp
GObjCEtoile.cpp
GObjCGNU.cpp
7a190677095ebd546b3af7a6a17ee6a168468688 06-May-2008 Chris Lattner <sabre@nondot.org> remove a stray printout


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50691 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
72cefca3e196ba4e6b4f2c3a46c1a9fbf6d0894a 06-May-2008 Chris Lattner <sabre@nondot.org> remove a stray printout


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50691 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
588c4db3db1177f8403f0532f0301b0bc23b4146 04-May-2008 Chris Lattner <sabre@nondot.org> use simplified API for making fp constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50623 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprComplex.cpp
2c62a1aa398d5582db00d2bad6b2d999ee50ec14 04-May-2008 Chris Lattner <sabre@nondot.org> use simplified API for making fp constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50623 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
GExprComplex.cpp
74bf555d259f60449b8f2f47d532d1a1ec3bca10 04-May-2008 Chris Lattner <sabre@nondot.org> Simplify FunctionDecl::AddRedeclaration a bit by using std::swap.
Fix 'swapping' of attributes to not insert null values into the
DeclAttrs map.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50612 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenModule.cpp
a212c56e9b7533bcc2d6be90efd52ad241bf894e 04-May-2008 Chris Lattner <sabre@nondot.org> Simplify FunctionDecl::AddRedeclaration a bit by using std::swap.
Fix 'swapping' of attributes to not insert null values into the
DeclAttrs map.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50612 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenModule.cpp
25094a4997607264e9b0193d8a84128e95033ba7 04-May-2008 Chris Lattner <sabre@nondot.org> if a decl is both 'static' and weak or static and inline, its linkage
type should be internal, not weak/linkonce.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50611 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenModule.cpp
8fabd78f1976243cb223fb3e969c6f317d1ae44d 04-May-2008 Chris Lattner <sabre@nondot.org> if a decl is both 'static' and weak or static and inline, its linkage
type should be internal, not weak/linkonce.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50611 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
odeGenModule.cpp
b033c4a3209c947313c8a6b5b074f242d3241ce4 30-Apr-2008 Chris Lattner <sabre@nondot.org> Verify the whole module after codegen to catch silly IR bugs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50485 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
a1945fa74d04098d7e22d7c31585342555eca928 30-Apr-2008 Chris Lattner <sabre@nondot.org> Verify the whole module after codegen to catch silly IR bugs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50485 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
c56ff1642b305fbe04070eff5b4d776522131a30 25-Apr-2008 Chris Lattner <sabre@nondot.org> remove the 'unused static' diagnostic from codegen. This should be
reimplemented in Sema someday. This is tracked in PR2236. Until then
disabling it removes some bogus diagnostics (see 2236).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50263 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
5827754da1773a7288480ce34bdf1f0a909fff21 25-Apr-2008 Chris Lattner <sabre@nondot.org> remove the 'unused static' diagnostic from codegen. This should be
reimplemented in Sema someday. This is tracked in PR2236. Until then
disabling it removes some bogus diagnostics (see 2236).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50263 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
91f5201a47cb9b458d1aa6e84fd728293c07dc14 20-Apr-2008 Nate Begeman <natebegeman@mac.com> Fix PR2236
Add test
Implement feedback from Chris re: PR1998


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50001 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
1a1d92ac5e1354634af08c62a1d72e263d13be0c 20-Apr-2008 Nate Begeman <natebegeman@mac.com> Fix PR2236
Add test
Implement feedback from Chris re: PR1998


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50001 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
ad320b6365221806c92d3046becac0243e588f9e 20-Apr-2008 Nate Begeman <natebegeman@mac.com> Only generate code for static functions and global variables that are actually used.
Warn about unused static functions and variables.
This fixes PR1998.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49987 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
4c13b7a3973d2d263d9682d7b68fbfeb76334af5 20-Apr-2008 Nate Begeman <natebegeman@mac.com> Only generate code for static functions and global variables that are actually used.
Warn about unused static functions and variables.
This fixes PR1998.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49987 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
d54d1f273c4c4664892577ec7062f417c218b984 20-Apr-2008 Chris Lattner <sabre@nondot.org> implement a fixme, add support for ++/-- on long double.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49980 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
25ddea7f7835c4b1804e458a5c866cde0097430a 20-Apr-2008 Chris Lattner <sabre@nondot.org> implement a fixme, add support for ++/-- on long double.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49980 91177308-0d34-0410-b5e6-96231b3b80d8
GExprScalar.cpp
70c3867bb833b4be82a63ad07fc650b9737fa9b2 20-Apr-2008 Chris Lattner <sabre@nondot.org> use simplified ConstantFP:get method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49979 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GExprScalar.cpp
59138ba7ce960888433546639deb45e2e03f8857 20-Apr-2008 Chris Lattner <sabre@nondot.org> use simplified ConstantFP:get method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49979 91177308-0d34-0410-b5e6-96231b3b80d8
GExprConstant.cpp
GExprScalar.cpp
8a70417585f7b2bb8fc16371621becd1029d6347 19-Apr-2008 Nate Begeman <natebegeman@mac.com> Generate code for annotation attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49951 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
odeGenModule.h
8bd4afeb876fd0015bb808eb2f3de1fe709658a7 19-Apr-2008 Nate Begeman <natebegeman@mac.com> Generate code for annotation attributes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49951 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
odeGenModule.cpp
odeGenModule.h
52da5c7c4027df50d80e06e4a0c50d5af8734171 19-Apr-2008 Nate Begeman <natebegeman@mac.com> Add support to module codegen for adding and emitting annotations


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49944 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
532485cc6c078d9e51b517c6bbd8984deb17f0fe 19-Apr-2008 Nate Begeman <natebegeman@mac.com> Add support to module codegen for adding and emitting annotations


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49944 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenModule.cpp
odeGenModule.h
af6ed504d90dc3b813c573bfbee8bc0e92e7fdc0 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
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
odeGenTypes.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
GExpr.cpp
GExprScalar.cpp
odeGenFunction.h
odeGenTypes.cpp
64c0a0f6c68a951a55767a107120778a68559b59 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
odeGenTypes.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
odeGenTypes.cpp
72a6ebcd14aa787c516d683a0efa1550440ad346 16-Apr-2008 Steve Naroff <snaroff@apple.com> Remove FileVarDecl and BlockVarDecl. They are replaced by VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl().

This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49748 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
GExprConstant.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
248a753f6b670692523c99afaeb8fe98f7ae3ca7 16-Apr-2008 Steve Naroff <snaroff@apple.com> Remove FileVarDecl and BlockVarDecl. They are replaced by VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl().

This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49748 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
GExprConstant.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
oduleBuilder.cpp
bccadaf33f24a86b1e6208d804f02f9050e2edfc 14-Apr-2008 Nate Begeman <natebegeman@mac.com> Enable clang to codegen emmintrin.h until we have our own emmintrin.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49633 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
e7722103abc4583366c914374d6aa8560e145fa1 14-Apr-2008 Nate Begeman <natebegeman@mac.com> Enable clang to codegen emmintrin.h until we have our own emmintrin.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49633 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
676bf212ce0d22ca878600d957548d3d92697458 13-Apr-2008 Chris Lattner <sabre@nondot.org> update to follow mainline llvm API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49607 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjCEtoile.cpp
GObjCGNU.cpp
GObjCRuntime.h
odeGenFunction.h
50b36741673258aaebcd3c7fe1260031901cae57 13-Apr-2008 Chris Lattner <sabre@nondot.org> update to follow mainline llvm API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49607 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjCEtoile.cpp
GObjCGNU.cpp
GObjCRuntime.h
odeGenFunction.h
fa4ebabf45e1073396aecbd3770e3a5d56957754 09-Apr-2008 Ted Kremenek <kremenek@apple.com> The dtor CGObjCRuntime::~CGObjCRuntime() was implemented twice, once
in CGObjCGNU.cpp and once in CGObjCEtoile.cpp. Moved its definition to
CGObjC.cpp. This resolves a build error in Xcode, and also cleans things up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49429 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCEtoile.cpp
GObjCGNU.cpp
2979ec73b4f974d85f2ce84167712177a44c6f09 09-Apr-2008 Ted Kremenek <kremenek@apple.com> The dtor CGObjCRuntime::~CGObjCRuntime() was implemented twice, once
in CGObjCGNU.cpp and once in CGObjCEtoile.cpp. Moved its definition to
CGObjC.cpp. This resolves a build error in Xcode, and also cleans things up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49429 91177308-0d34-0410-b5e6-96231b3b80d8
GObjC.cpp
GObjCEtoile.cpp
GObjCGNU.cpp
3e254fbafd851bc9d6872cf52ee5740c79b3e627 08-Apr-2008 Chris Lattner <sabre@nondot.org> Add support for C++ default arguments, and rework Parse-Sema
interaction for function parameters, fixing PR2046.

Patch by Doug Gregor!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49369 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
04421087832a031c90bd58f128c7c0e741db8dd2 08-Apr-2008 Chris Lattner <sabre@nondot.org> Add support for C++ default arguments, and rework Parse-Sema
interaction for function parameters, fixing PR2046.

Patch by Doug Gregor!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49369 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
42a2174a9824760c915bb815c877b664dd37d97d 07-Apr-2008 Chris Lattner <sabre@nondot.org> remove the Decl::getCanonicalType() method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49295 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
8bcfc5bef434d7052e28d0ce45182855659ebd3d 07-Apr-2008 Chris Lattner <sabre@nondot.org> remove the Decl::getCanonicalType() method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49295 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
815e2c1c5378bf3d4d48a0349c99eecbec97279c 06-Apr-2008 Gabor Greif <ggreif@gmail.com> tracking API changes arising from r49277

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49279 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjCEtoile.cpp
GObjCGNU.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenModule.cpp
984d0b414bc76d3530b9bc55a5a55834ba76c607 06-Apr-2008 Gabor Greif <ggreif@gmail.com> tracking API changes arising from r49277

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49279 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GObjCEtoile.cpp
GObjCGNU.cpp
GStmt.cpp
odeGenFunction.cpp
odeGenModule.cpp
6ee6ab097eca74e2d63693c1b811abc9818e03a6 04-Apr-2008 Chris Lattner <sabre@nondot.org> Fix PR2049, updating Eli's patch that fixes to mainline. This produces incorrect
code, but the codegen doesn't crash. I'll file a bugzilla for the AST being wrong.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49226 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
f81557cb719dd0d1ce3713f050fb76b0a0cb729a 04-Apr-2008 Chris Lattner <sabre@nondot.org> Fix PR2049, updating Eli's patch that fixes to mainline. This produces incorrect
code, but the codegen doesn't crash. I'll file a bugzilla for the AST being wrong.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49226 91177308-0d34-0410-b5e6-96231b3b80d8
GExprAgg.cpp
de0908b4dd43c61be5bffedddf1293918d4a4425 04-Apr-2008 Chris Lattner <sabre@nondot.org> Since isComplexType() no longer returns true for _Complex integers, the code
generator needs to call isAnyComplexType(). This fixes PR1960.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49220 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GStmt.cpp
9b2dc287177394a8f73833e2ad4f7ca8cd6f22bb 04-Apr-2008 Chris Lattner <sabre@nondot.org> Since isComplexType() no longer returns true for _Complex integers, the code
generator needs to call isAnyComplexType(). This fixes PR1960.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49220 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
GStmt.cpp
d6b6d5afe622e84536096263cbdfa4b02d8adc6b 04-Apr-2008 Chris Lattner <sabre@nondot.org> updates from David.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49217 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCEtoile.cpp
72858c94f132caf02c1f91219fce537a58b0907c 04-Apr-2008 Chris Lattner <sabre@nondot.org> updates from David.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49217 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCEtoile.cpp
1a3fb3f51671533b865fcd7006252e7edb5ad877 04-Apr-2008 Chris Lattner <sabre@nondot.org> various bug fixes, add to xcode project.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49216 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCEtoile.cpp
be09ededdba7b15a81dd57fb939b21432ce383a7 04-Apr-2008 Chris Lattner <sabre@nondot.org> various bug fixes, add to xcode project.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49216 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCEtoile.cpp
688c06c65f021af65041a2fa25408b58e5720dd3 04-Apr-2008 Chris Lattner <sabre@nondot.org> initial checkin of Étoilé runtime support, patch by David Chisnall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49215 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCEtoile.cpp
7ba9c60ddfdc114e75fd01018581953d00401993 04-Apr-2008 Chris Lattner <sabre@nondot.org> initial checkin of Étoilé runtime support, patch by David Chisnall


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49215 91177308-0d34-0410-b5e6-96231b3b80d8
GObjCEtoile.cpp
3b846b1e15ad0cf602644337af5b9e3e5cc4b256 04-Apr-2008 Edwin Török <edwintorok@gmail.com> fix build error: add missing braces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49209 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
730f2c13e8ff0a2a3cc54fce9913add68107cb51 04-Apr-2008 Torok Edwin <edwintorok@gmail.com> fix build error: add missing braces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49209 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
6e6a5973a75c2492d6b62b493bca2f70c4792ed0 04-Apr-2008 Chris Lattner <sabre@nondot.org> Codegen assignment to self correctly, patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49201 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
c8aa5f1f264fb230c38182adab944232bb160c2b 04-Apr-2008 Chris Lattner <sabre@nondot.org> Codegen assignment to self correctly, patch by David Chisnall!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49201 91177308-0d34-0410-b5e6-96231b3b80d8
GDecl.cpp
GExpr.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenFunction.h
0822c19aea69df3845d112f4b13132b95d0a4796 03-Apr-2008 Nate Begeman <natebegeman@mac.com> Teach clang how to codegen punpcklbw and punpcklwd


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49186 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
dbebb73b86d9fe56c2227bf75c13ea3a49248261 03-Apr-2008 Nate Begeman <natebegeman@mac.com> Teach clang how to codegen punpcklbw and punpcklwd


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49186 91177308-0d34-0410-b5e6-96231b3b80d8
GBuiltin.cpp
35ca50c421517666fd3aedec654b7154d6d58160 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
odeGenTypes.cpp
odeGenTypes.h
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
odeGenTypes.cpp
odeGenTypes.h
a05f7d22201af6cccc06d9258daed7b9651fda04 02-Apr-2008 Chris Lattner <sabre@nondot.org> simplify some code by using PointerLikeType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49101 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
423a3c9c2719fb75133673e72ac881719df45daf 02-Apr-2008 Chris Lattner <sabre@nondot.org> simplify some code by using PointerLikeType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49101 91177308-0d34-0410-b5e6-96231b3b80d8
odeGenFunction.cpp
cfac88de7de7d970a2436af939ea87c0e5a9cf9f 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
GExprScalar.cpp
odeGenTypes.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
GExprScalar.cpp
odeGenTypes.cpp
c61e9f8605be307c2c60bac4c4f3722dfac2c26a 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
GExpr.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenTypes.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
GExpr.cpp
GExprScalar.cpp
odeGenFunction.cpp
odeGenModule.cpp
odeGenTypes.cpp
b326b1789aab423635325c753e700189513ee1ed 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
GExpr.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCRuntime.h
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
oduleBuilder.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
GExpr.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCRuntime.h
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
oduleBuilder.cpp
a18c12ef2448fcabed9516cc0dbd72957207489d 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
GObjCGNU.cpp
odeGenModule.cpp
odeGenTypes.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
GObjCGNU.cpp
odeGenModule.cpp
odeGenTypes.cpp
073075635d168c76fccc65dcbf5dcad279335fa3 19-Mar-2008 Chris Lattner <sabre@nondot.org> simplify the clang codegen by using the new Builder.CreateStructGEP method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48534 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
36b6a0a63e87803a85080c639ad8b61e8bb5f9ee 19-Mar-2008 Chris Lattner <sabre@nondot.org> simplify the clang codegen by using the new Builder.CreateStructGEP method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48534 91177308-0d34-0410-b5e6-96231b3b80d8
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprScalar.cpp
be1a7a0f1f78bf5f919ff1e4b4ae6e8649255f26 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
GBuiltin.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCRuntime.h
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
akefile
oduleBuilder.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
GBuiltin.cpp
GDecl.cpp
GExpr.cpp
GExprAgg.cpp
GExprComplex.cpp
GExprConstant.cpp
GExprScalar.cpp
GObjC.cpp
GObjCGNU.cpp
GObjCRuntime.h
GStmt.cpp
odeGenFunction.cpp
odeGenFunction.h
odeGenModule.cpp
odeGenModule.h
odeGenTypes.cpp
odeGenTypes.h
akefile
oduleBuilder.cpp