mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
DebugInfo: Move an assertion into MDCompositeTypeBase
In the name of gutting the `DIDescriptor` hierarchy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234829 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f016115f60
commit
d48d32bba9
@ -350,10 +350,7 @@ public:
|
||||
MDCompositeTypeBase *operator->() const { return get(); }
|
||||
MDCompositeTypeBase &operator*() const { return *get(); }
|
||||
|
||||
DIArray getElements() const {
|
||||
assert(!isa<MDSubroutineType>(*this) && "no elements for DISubroutineType");
|
||||
return DIArray(get()->getElements());
|
||||
}
|
||||
DIArray getElements() const { return get()->getElements(); }
|
||||
|
||||
unsigned getRunTimeLang() const { return get()->getRuntimeLang(); }
|
||||
DITypeRef getContainingType() const { return get()->getVTableHolder(); }
|
||||
|
@ -786,7 +786,13 @@ protected:
|
||||
~MDCompositeTypeBase() = default;
|
||||
|
||||
public:
|
||||
/// \brief Get the elements of the composite type.
|
||||
///
|
||||
/// \note Calling this is only valid for \a MDCompositeType. This assertion
|
||||
/// can be removed once \a MDSubroutineType has been separated from
|
||||
/// "composite types".
|
||||
DebugNodeArray getElements() const {
|
||||
assert(!isa<MDSubroutineType>(this) && "no elements for DISubroutineType");
|
||||
return cast_or_null<MDTuple>(getRawElements());
|
||||
}
|
||||
MDTypeRef getVTableHolder() const { return MDTypeRef(getRawVTableHolder()); }
|
||||
|
Loading…
Reference in New Issue
Block a user