Anders Carlsson
087bc13d96
More asm cleanup.
...
llvm-svn: 94920
2010-01-30 20:05:21 +00:00
Anders Carlsson
c7c5baa482
Yay for more StringRefs.
...
llvm-svn: 94917
2010-01-30 19:12:25 +00:00
Devang Patel
bb4820dc8e
Use appropriate context for typedefs.
...
llvm-svn: 94849
2010-01-29 22:29:31 +00:00
Devang Patel
92e2541599
Maintain a map of regions (lexical scopes) and use it to find context for a global variable.
...
llvm-svn: 94817
2010-01-29 18:11:03 +00:00
Douglas Gregor
16810ca647
Name mangling for cast expressions, from Matthias Schiffer! Fixes PR5876.
...
llvm-svn: 94811
2010-01-29 16:37:09 +00:00
Anders Carlsson
42c876dff2
Use EmitLValueForFieldInitialization when synthesizing the copy ctor as well.
...
llvm-svn: 94800
2010-01-29 05:41:25 +00:00
Anders Carlsson
db78f0ad04
Add a new EmitLValueForFieldInitialization that will be used for initializing fields (and reference type fields in particular).
...
llvm-svn: 94799
2010-01-29 05:24:29 +00:00
Anders Carlsson
5d8645b150
Simplify EmitLValueForField - we can get whether the field is part of a union or not from the FieldDecl (through its DeclContext).
...
llvm-svn: 94798
2010-01-29 05:05:36 +00:00
Daniel Dunbar
45c7ff1d79
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.
llvm-svn: 94796
2010-01-29 03:22:29 +00:00
Anders Carlsson
ba6c437d52
Add an CXXBindReferenceExpr (not used just yet).
...
llvm-svn: 94791
2010-01-29 02:39:32 +00:00
Devang Patel
7bfc596fcf
s/CGDebugInfo::getContext/CGDebugInfo::getContextDescriptor/g to avoid confusion.
...
llvm-svn: 94760
2010-01-28 23:15:27 +00:00
Devang Patel
128aa9d176
Fix indentation.
...
llvm-svn: 94758
2010-01-28 21:54:15 +00:00
Devang Patel
4c3e7e99ca
Static methods do not need "this" pointer argument.
...
llvm-svn: 94756
2010-01-28 21:43:50 +00:00
Devang Patel
946edc1aa6
Emit base classes info first, as expected by the debugger.
...
llvm-svn: 94755
2010-01-28 21:41:35 +00:00
Anders Carlsson
b1ef991097
Fix an incorrect union layout assert. Fixes PR6164.
...
llvm-svn: 94754
2010-01-28 18:22:03 +00:00
Devang Patel
0d61eebd81
s/FunctionNames/DebugInfoNames/g
...
llvm-svn: 94753
2010-01-28 18:21:00 +00:00
Devang Patel
84033fb240
Emit vtable info.
...
llvm-svn: 94751
2010-01-28 18:11:52 +00:00
Devang Patel
abb4413728
While emitting debugging infor for a C++ class, identify the holder of class's vtable, if any.
...
llvm-svn: 94712
2010-01-28 00:54:21 +00:00
Devang Patel
3d4e6d9dd0
Include "this" pointer argument while emitting debug info for a C++ method.
...
llvm-svn: 94710
2010-01-28 00:28:01 +00:00
Ken Dyck
160146eba2
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().
llvm-svn: 94681
2010-01-27 17:10:57 +00:00
David Chisnall
358e751a7b
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.
...
llvm-svn: 94676
2010-01-27 12:49:23 +00:00
Anders Carlsson
40446e8a0a
Structs and classes with non-trivial destructors or copy constructors should be passed indirectly in the 32-bit ABI. Fixes PR6094.
...
llvm-svn: 94656
2010-01-27 03:25:19 +00:00
Mike Stump
ded0a406b4
Refine the non-virtual this adjustments for thunks by using the offset
...
to the declaring class from the nearest virtual base class. WIP.
llvm-svn: 94606
2010-01-26 22:44:01 +00:00
Mike Stump
a04ecfb701
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.
llvm-svn: 94592
2010-01-26 21:35:27 +00:00
Ken Dyck
7df3cbeb01
Convert one last size variable to CharUnits (follow-on to 94577).
...
llvm-svn: 94579
2010-01-26 19:59:28 +00:00
Ken Dyck
3eb55cfe8a
Use CharUnits for sizes, offsets, alignments, and padding amounts for values
...
that are in character units.
llvm-svn: 94577
2010-01-26 19:44:24 +00:00
Ken Dyck
5262b11962
Use CharUnits for alignments in character units.
...
llvm-svn: 94571
2010-01-26 19:13:33 +00:00
Ken Dyck
a0f99ff230
Use CharUnits for alignment of UTF16 string in GetAddrOfConstantCFString().
...
llvm-svn: 94564
2010-01-26 18:46:23 +00:00
Ken Dyck
e5402e4749
Use CharUnits for alignment in EmitNullInitializationLValue().
...
llvm-svn: 94563
2010-01-26 18:35:11 +00:00
Anders Carlsson
ca4a5459d8
Use the right definition when emitting a global variable. Fixes PR5564.
...
llvm-svn: 94555
2010-01-26 17:43:42 +00:00
Anders Carlsson
7228117108
Change getUnique to return a GlobalDecl. Fixes PR6147.
...
llvm-svn: 94554
2010-01-26 17:36:47 +00:00
Ken Dyck
98ca79435a
Introduce CodeGenModule::GetTargetTypeStoreSize() to calculate the store size
...
of LLVM types in character units.
llvm-svn: 94542
2010-01-26 13:48:07 +00:00
Anders Carlsson
d6b21e4842
If a global variable has an initializer with side effects, it can never be deferred (even if it's in an anonymous namespace).
...
llvm-svn: 94525
2010-01-26 06:15:16 +00:00
Anders Carlsson
0b5f1ddf0a
Fix another debug info crash with virtual bases.
...
llvm-svn: 94520
2010-01-26 05:26:39 +00:00
Anders Carlsson
17ed0496c5
Fix the test I broke, and also fix a crash when declaring a virtual destructor. Add debug info support for pure virtual member functions.
...
llvm-svn: 94519
2010-01-26 05:19:50 +00:00
Anders Carlsson
b85f0ab976
Factor creating the DISubprogram for a member function out into a separate function.
...
llvm-svn: 94513
2010-01-26 04:49:33 +00:00
Anders Carlsson
c1821155bf
Simplify CGDebugInfo::CollectCXXMemberFunctions a little. More to come.
...
llvm-svn: 94511
2010-01-26 04:40:11 +00:00
Anders Carlsson
20bbbd489b
Make sure to always mark a global variable as not being constant if it has a C++ initializer.
...
llvm-svn: 94504
2010-01-26 04:02:23 +00:00
Mike Stump
77537b136e
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.
llvm-svn: 94499
2010-01-26 03:42:22 +00:00
Mike Stump
90181eb294
Fixup a missing vcall entry. WIP.
...
llvm-svn: 94478
2010-01-26 00:05:04 +00:00
Devang Patel
c54353d935
First cut at emitting inheritance info.
...
llvm-svn: 94473
2010-01-25 23:32:18 +00:00
Devang Patel
7af03fb4f0
Emit debug info for virtual functions.
...
llvm-svn: 94467
2010-01-25 23:17:15 +00:00
Fariborz Jahanian
5cda92820f
global variable that binds reference to a non-lvalue reproted
...
as NYI now.
llvm-svn: 94453
2010-01-25 21:40:39 +00:00
Fariborz Jahanian
210031b79c
Fix a code gen. bug involving compiling global references.
...
(fixes radar 7574896).
llvm-svn: 94434
2010-01-25 18:30:26 +00:00
Chris Lattner
83b0dd16c3
fix rdar://7556129 a crash in blocks debug info codegen.
...
llvm-svn: 94402
2010-01-25 03:34:56 +00:00
Chris Lattner
bf78478d35
simplify code.
...
llvm-svn: 94401
2010-01-25 03:29:35 +00:00
Chris Lattner
0bcc858a2b
-fno-rtti is now the default.
...
llvm-svn: 94379
2010-01-24 20:43:31 +00:00
Alexis Hunt
aecc45cb3c
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.
llvm-svn: 94352
2010-01-24 03:04:27 +00:00
Anders Carlsson
60ddba67a8
Fix a nasty bug where temporaries weren't marked as being conditional in some cases.
...
llvm-svn: 94341
2010-01-24 00:20:05 +00:00
Eli Friedman
d6ef69a7db
Add bzero builtin; this should help codegen quality for code using this
...
function.
llvm-svn: 94320
2010-01-23 19:00:10 +00:00