Eric Christopher
b2db8e47e2
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
llvm-svn: 150040
2012-02-08 01:53:14 +00:00
Eric Christopher
75b90c4a86
Use the new forward declaration scheme for records. Also add more
...
caching of results after we create them.
Fixes rdar://10809898
llvm-svn: 150025
2012-02-08 00:23:18 +00:00
Devang Patel
00fca3a106
Remove tabs.
...
llvm-svn: 150021
2012-02-08 00:10:20 +00:00
Benjamin Kramer
7ec12c928a
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.
llvm-svn: 150006
2012-02-07 22:29:24 +00:00
Devang Patel
56a321df0b
Remove tabs.
...
llvm-svn: 149996
2012-02-07 18:55:08 +00:00
Devang Patel
37a5c9564d
Emit debug info for properites that are not backed by an ivar.
...
llvm-svn: 149995
2012-02-07 18:40:30 +00:00
Chris Lattner
ece0409a1a
simplify a bunch of code to use the well-known LLVM IR types computed by CodeGenModule.
...
llvm-svn: 149943
2012-02-07 00:39:47 +00:00
Devang Patel
f93d0b8b28
Relax valid location check. This fixes a clang crash while emitting debug info for properties that are synthesized by the compiler by default.
...
llvm-svn: 149929
2012-02-06 23:24:13 +00:00
Devang Patel
60fc242545
Let an ivar directly refer property TAG.
...
llvm-svn: 149881
2012-02-06 18:20:02 +00:00
Dylan Noblesmith
2c1dd2716a
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.)
llvm-svn: 149799
2012-02-05 02:13:05 +00:00
Benjamin Kramer
3307c508c9
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.
llvm-svn: 149781
2012-02-04 12:31:12 +00:00
Devang Patel
a21bbb2423
Create new tag for the property. This is a work in progress.
...
llvm-svn: 149734
2012-02-04 01:15:04 +00:00
Andrew Trick
877d5a712d
unnecessary include of TargetMachine.h?
...
llvm-svn: 149638
2012-02-02 22:36:19 +00:00
Eric Christopher
c9e6924fb2
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.
llvm-svn: 149560
2012-02-01 23:39:00 +00:00
Eric Christopher
25a11e6dbd
Remove duplicated comment.
...
llvm-svn: 149544
2012-02-01 21:48:10 +00:00
Eric Christopher
ee4ab93906
For pass-by-value record arguments to functions emit a forward decl
...
instead of the entire class definition.
llvm-svn: 149474
2012-02-01 06:07:23 +00:00
Eric Christopher
f59218e5d9
Use createRecordFwdDecl here since that's what we're doing.
...
llvm-svn: 149051
2012-01-26 07:11:58 +00:00
Eric Christopher
8913bd6c63
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.
llvm-svn: 149049
2012-01-26 07:01:04 +00:00
Eric Christopher
5720033cc1
Remove another duplicated variable.
...
llvm-svn: 149047
2012-01-26 06:20:57 +00:00
Eric Christopher
9f94fa368a
Tidy and remove some unused variables.
...
llvm-svn: 149015
2012-01-26 02:05:28 +00:00
Eric Christopher
5bfde1aa42
Collect this information together. No reason to have it split.
...
llvm-svn: 149013
2012-01-26 01:57:29 +00:00
Eric Christopher
a15e6352fe
Refactor into its own function.
...
llvm-svn: 149012
2012-01-26 01:57:13 +00:00
Eric Christopher
bfecca3331
Clean up comment.
...
llvm-svn: 148982
2012-01-25 21:47:09 +00:00
Eric Christopher
000b14e796
Refactor the record decl forward declaration code a bit.
...
llvm-svn: 148904
2012-01-25 02:06:59 +00:00
Eric Christopher
45c4d47b8a
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
llvm-svn: 148584
2012-01-20 22:10:15 +00:00
David Blaikie
e4d798f078
More dead code removal (using -Wunreachable-code)
...
llvm-svn: 148577
2012-01-20 21:50:17 +00:00
Richard Smith
dafff94759
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.
llvm-svn: 148178
2012-01-14 04:30:29 +00:00
Eric Christopher
8c363622d3
Formatting.
...
llvm-svn: 147989
2012-01-12 01:26:58 +00:00
Eric Christopher
ffbc4d0b68
Formatting.
...
llvm-svn: 147988
2012-01-12 01:26:51 +00:00
Richard Smith
5fab0c9e1a
Small refactoring and simplification of constant evaluation and some of its
...
clients. No functionality change.
llvm-svn: 147318
2011-12-28 19:48:30 +00:00
Eric Christopher
cd88813dbf
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.
llvm-svn: 146779
2011-12-16 23:40:18 +00:00
Eric Christopher
ea225fb412
Start down the path of getting clang to internally agree on structs versus
...
classes.
Part of rdar://10520586 and a couple others.
llvm-svn: 146778
2011-12-16 23:40:14 +00:00
Douglas Gregor
c8b0c9d8fd
When generating debug info for an ObjCInterfaceDecl, try to dig out the definition.
...
llvm-svn: 146705
2011-12-15 23:32:29 +00:00
Douglas Gregor
dc9166c8e1
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?"
llvm-svn: 146679
2011-12-15 20:29:51 +00:00
Eric Christopher
607fb70750
Make sure that forward declarations are marked as such in the debug info
...
for the structure type.
rdar://10499337
llvm-svn: 145461
2011-11-29 23:57:40 +00:00
Eric Christopher
459532e1d5
Use the canonical decl to index so that we can really find it later.
...
Fixes rdar://10433202
llvm-svn: 144938
2011-11-17 23:45:00 +00:00
Eric Christopher
04832b9210
Fixup comment.
...
llvm-svn: 144548
2011-11-14 18:55:02 +00:00
Nick Lewycky
1679035122
Reflow lines, remove else-if after returns, rename variable "TydefContext" to
...
"TypedefContext". No functionality change.
llvm-svn: 144248
2011-11-10 00:34:02 +00:00
Nick Lewycky
6aad6df4d1
Reflow one line I missed in previous cleanup commit. No functionality change.
...
llvm-svn: 144168
2011-11-09 04:27:23 +00:00
Nick Lewycky
2219ef0b68
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.
llvm-svn: 144167
2011-11-09 04:25:21 +00:00
Richard Smith
7b553f1b19
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.
llvm-svn: 143263
2011-10-29 00:50:52 +00:00
Devang Patel
fa59ac363e
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.
...
llvm-svn: 143227
2011-10-28 21:12:13 +00:00
Devang Patel
242ce91ecc
Do not drop type qualifiers in -flimit-debug-info mode.
...
llvm-svn: 142873
2011-10-24 23:15:17 +00:00
Nick Lewycky
ba743b75cb
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.
llvm-svn: 142633
2011-10-21 02:32:14 +00:00
John McCall
e314e27c58
Macro metaprogramming for builtin types.
...
llvm-svn: 142420
2011-10-18 21:02:43 +00:00
John McCall
8a6b59ad97
Add a new placeholder type to represent "unbridged"
...
casts in ARC.
No semantic analysis yet.
llvm-svn: 142208
2011-10-17 18:09:15 +00:00
Anton Korobeynikov
f0c267e6e0
Provide half floating point support as a storage only type.
...
Lack of half FP was a regression compared to llvm-gcc.
llvm-svn: 142016
2011-10-14 23:23:15 +00:00
Benjamin Kramer
47b5b31e61
Simplify code to avoid a useless string copy.
...
llvm-svn: 141970
2011-10-14 18:45:16 +00:00
Benjamin Kramer
fd0b05f341
Upgrade to PathV2.
...
llvm-svn: 141969
2011-10-14 18:45:11 +00:00
Benjamin Kramer
13481e27cb
Add parens to pacify GCC.
...
llvm-svn: 141968
2011-10-14 18:45:06 +00:00