| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
Adjust to LLVM DIBuilder API changes in r243764, using
`createAutoVariable()` and `createParameterVariable()` in place of
`createLocalVariable()`. No real functionality change here.
llvm-svn: 243765
|
|
|
|
|
|
|
|
|
| |
Change `getOrCreateLimitedType()` to return a `DICompositeType` and
remove the casts from its callers. Inside, I've strengthened a `cast`
from `DICompositeTypeBase`, but the casts in the callers already prove
that this is safe. There should be no functionality change here.
llvm-svn: 243155
|
|
|
|
|
|
|
| |
Change `StaticDataMemberCache` to store references to `DIDerivedType`
directly, and remove now-unnecessary casts from the accessors.
llvm-svn: 243129
|
|
|
|
|
|
|
| |
standards. Remove several hilariously out-of-date and redundant comments
and move the non-redundant ones into the header file.
llvm-svn: 241733
|
|
|
|
|
|
|
|
|
|
| |
different function signatures. (Previously clang would emit all block
pointer types with the type of the first block pointer in the compile
unit.)
rdar://problem/21602473
llvm-svn: 241534
|
|
|
|
|
|
|
|
|
|
|
| |
(__block_literal_generic).
The arbitrary nature of the location confuses lldb and prevents type
uniquing.
rdar://problem/21602473
llvm-svn: 241511
|
|
|
|
|
|
|
|
|
|
| |
typedefs, and records"
Caused PR24008.
This reverts commit r241154.
llvm-svn: 241177
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
typedefs, and records
Function static variables, typedefs and records (class, struct or union) declared inside
a lexical scope were associated with the function as their parent scope, rather than the
lexical scope they are defined or declared in.
This fixes PR19238
Patch by: amjad.aboud@intel.com
Differential Revision: http://reviews.llvm.org/D9760
llvm-svn: 241154
|
|
|
|
| |
llvm-svn: 241088
|
|
|
|
|
|
|
|
|
| |
This allows a module-aware debugger such as LLDB to import the currently
visible modules before dropping into the expression evaluator.
rdar://problem/20965932
llvm-svn: 241084
|
|
|
|
| |
llvm-svn: 240664
|
|
|
|
| |
llvm-svn: 240382
|
|
|
|
|
|
| |
rdar://problem/20571359
llvm-svn: 239781
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The representation of a pointer-to-member in the MS ABI is governed by
the layout of the relevant class or if a model has been explicitly
specified. If no model is specified, then an appropriate
"worst-case-scenario" model is implicitly chosen if, and only, if the
pointer-to-member type's representation was needed.
Debug info cannot force a pointer-to-member type to have a
representation so do not try to query the size of such a type unless we
know it is safe to do so.
llvm-svn: 238259
|
|
|
|
| |
llvm-svn: 237948
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and as artificial local variables in the debug info.
This is a follow-up to r236059. We can't get rid of the local variables
entirely because the gdb buildbot depends on them, but we can mark them
as artificial while still emitting the correct debug info. As I learned
from review comments other compilers also follow this model.
A paired commit in LLVM temporarily relaxes the debug info verifier to
not check the integrity of DW_OP_bit_pieces of artificial variables.
rdar://problem/20730771
llvm-svn: 236125
|
|
|
|
|
|
|
|
|
|
| |
LLVM r236120 renamed debug info IR constructs to use a `DI` prefix, now
that the `DIDescriptor` hierarchy has been gone for about a week. This
commit was generated using the rename-md-di-nodes.sh upgrade script
attached to PR23080, followed by running clang-format-diff.py on the
`lib/` portion of the patch.
llvm-svn: 236121
|
|
|
|
|
|
| |
This reverts commit r236059 as it breaks the gdb buildbot.
llvm-svn: 236110
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in the debug info. This patch deletes a hack that emits the members
of local anonymous unions as local variables.
Besides being morally wrong, the existing representation using local
variables breaks internal assumptions about the local variables' storage
size.
Compiling
```
void fn1() {
union {
int i;
char c;
};
i = c;
}
```
with -g -O3 -verify will cause the verifier to fail after SROA splits
the 32-bit storage for the "local variable" c into two pieces because the
second piece is clearly outside the 8-bit range that is expected for a
variable of type char. Given the choice I'd rather fix the debug
representation than weaken the verifier.
Debuggers generally already know how to deal with anonymous unions when
they are members of C++ record types, but they may have problems finding
the local anonymous struct members in the expression evaluator.
rdar://problem/20730771
llvm-svn: 236059
|
|
|
|
| |
llvm-svn: 235682
|
|
|
|
|
|
|
|
| |
An upcoming LLVM commit will remove the `DIArray` and `DITypeArray`
typedefs that shadow `DebugNodeArray` and `MDTypeRefArray`,
respectively. Use those types directly.
llvm-svn: 235412
|
|
|
|
|
|
|
| |
An upcoming LLVM commit will delete all the remaining subclasses of (the
already deleted) `DIDescriptor`. Stop using them.
llvm-svn: 235403
|
|
|
|
|
|
|
|
| |
Prepare for the deletion in LLVM of the subclasses of (the already
deleted) `DIScope` by using the raw pointers they were wrapping
directly.
llvm-svn: 235355
|
|
|
|
|
|
|
|
|
|
|
| |
Subclasses of (the already deleted) `DIType` will be deleted by an
upcoming LLVM commit. Remove references.
While `DICompositeType` wraps `MDCompositeTypeBase` and `DIDerivedType`
wraps `MDDerivedTypeBase`, most uses of each really meant the more
specific `MDCompositeType` and `MDDerivedType`. I updated accordingly.
llvm-svn: 235350
|
|
|
|
|
|
|
| |
`DIType` is going to be deleted by an upcoming LLVM commit, so replace
uses with `MDType*`.
llvm-svn: 235330
|
|
|
|
|
|
|
| |
An upcoming LLVM commit will delete `DIScope`, so update users to
`MDScope*`.
llvm-svn: 235326
|
|
|
|
|
|
| |
Prepare for upcoming LLVM change to delete `DIDescriptor`.
llvm-svn: 235245
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LLVM r235111 changed the `DIBuilder` API to stop using `DIDescriptor`
and its subclasses. Rolled into this was some tightening up of types:
- Scopes: `DIDescriptor` => `MDScope*`.
- Generic debug nodes: `DIDescriptor` => `DebugNode*`.
- Subroutine types: `DICompositeType` => `MDSubroutineType*`.
- Composite types: `DICompositeType` => `MDCompositeType*`.
Note that `DIDescriptor` wraps `MDNode`, and `DICompositeType` wraps
`MDCompositeTypeBase`.
It's this new type strictness that requires changes here.
llvm-svn: 235112
|
|
|
|
|
|
|
| |
All the API is about to be dropped from `DIDescriptor` in LLVM, so stop
using it.
llvm-svn: 235068
|
|
|
|
|
|
|
| |
An upcoming LLVM commit will gut `DIScope`, so just use `MDScope*`
directly.
llvm-svn: 235066
|
|
|
|
|
|
|
| |
`DIType` and its subclasses are about to be gutted in LLVM. Prepare for
that by treating these like the raw pointers they wrap.
llvm-svn: 235063
|
|
|
|
|
|
| |
This is being replaced with a null check.
llvm-svn: 235058
|
|
|
|
|
|
|
| |
An upcoming LLVM commit will gut `DICompileUnit` and `DIFile`, so start
treating them more like pointers.
llvm-svn: 235054
|
|
|
|
|
|
|
| |
Update for LLVM API change r235041 that makes `DIBuilder` require a
`DebugLoc` to create a debug info intrinsic.
llvm-svn: 235042
|
|
|
|
|
|
|
| |
An upcoming LLVM commit will remove this API, so stop using it. Just
access the raw pointers using `operator->()`.
llvm-svn: 234848
|
|
|
|
|
|
|
|
| |
Stop using `DIDescriptor`'s wrapper around
`MDNode::replaceAllUsesWith()` (which is going away). The new home for
this logic is `DIBuilder::replaceTemporary()`, added in LLVM r234695.
llvm-svn: 234696
|
|
|
|
|
|
|
| |
This reverts the bandaid commit in r234308 now that I have a proper fix
in LLVM as of r234326.
llvm-svn: 234339
|
|
|
|
|
|
|
|
|
| |
Update a few calls to `DIBuilder` now that `MDTuple` array-wrappers
don't have implicit conversions to `MDTuple*`. I may circle back and
update `DIBuilder` to take arrays here, to make it easier for the
callers.
llvm-svn: 234327
|
|
|
|
|
|
|
|
|
| |
Error message was:
CGDebugInfo.cpp(1047) : error C2666: 'llvm::MDTypeRefArray::operator []' : 2 overloads have similar conversions
DebugInfoMetadata.h(106): could be 'llvm::MDTypeRef llvm::MDTypeRefArray::operator [](unsigned int) const'
while trying to match the argument list '(llvm::DITypeArray, int)'
llvm-svn: 234308
|
|
|
|
|
|
| |
The API for `DIArray` changed; use the new one.
llvm-svn: 234291
|
|
|
|
|
|
|
| |
The clang edition of r234255: use built-in `isa<>`, `dyn_cast<>`, etc.,
and only build `DIDescriptor`s from pointers that are correctly typed.
llvm-svn: 234256
|
|
|
|
|
|
|
|
| |
`getScope()` passes the scope back through a `DILexicalBlock` even
though the underlying pointer may be an incompatible `MDSubprogram`.
Just use `getContext()` directly.
llvm-svn: 234245
|
|
|
|
|
|
|
| |
Use the new API for `DebugLoc` added in r233573 before the old one
disappears.
llvm-svn: 233589
|
|
|
|
|
|
|
|
|
|
| |
An upcoming LLVM commit will make calling
`DIBuilder::retainType(nullptr)` illegal (actually, it already was, but
it wasn't verified). Check for null before calling.
This triggered in test/CodeGenObjC/debug-info-block-helper.m.
llvm-svn: 233443
|
|
|
|
|
|
|
|
| |
A WIP patch to turn on stricter `DIDescriptor` accessor checks fires
here; it's obvious from the code that `T` can be null, so add an
explicit check. Caught by dozens of current testcases.
llvm-svn: 232791
|
|
|
|
|
|
| |
possible. Fixes PR22736.
llvm-svn: 230914
|
|
|
|
|
|
|
|
|
|
|
|
| |
When generating debug info for a static inline member which is initialized for
the DLLExport storage class, hoist the definition into a non-composite type
context. Otherwise, we would trigger an assertion when generating the DIE for
the associated global value as the debug context has a type association. This
addresses PR22669.
Thanks to David Blakie for help in coming up with a solution to this!
llvm-svn: 230816
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the newly minted `DIImportedEntity` default constructor (r230609)
rather than explicitly specifying `nullptr`. The latter will become
ambiguous when the new debug info hierarchy is committed, since we'll
have both of the following:
explicit DIImportedEntity(const MDNode *);
DIImportedEntity(const MDImportedEntity *);
(Currently we just have the former.)
A default constructor is just as clear.
llvm-svn: 230610
|
|
|
|
|
|
|
|
|
|
|
| |
a non-uniqueable temporary node that is only turned into a permanent
unique or distinct node after it is finished.
Otherwise an intermediate node may get accidentally uniqued with another
node as illustrated by the testcase.
Paired commit with LLVM.
llvm-svn: 228855
|
|
|
|
|
|
|
|
| |
It's slightly cheaper than copying it, if the DebugLoc points to replaceable
metadata every copy is recorded in a DenseMap, moving reduces the peak size of
that map.
llvm-svn: 228492
|