mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-22 10:29:35 +00:00
IR: Make DICompositeType mutators private
Make `DICompositeType` mutators private to prevent misuse. All calls to `setArrays()` and `setContainingType()` should go through `DIBuilder::replaceArrays()` and `DIBuilder::replaceVTableHolder()`. This is a follow-up to r224482 (now that clang has been updated in r224483). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224486 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1025e9e9d6
commit
1e6990e4dc
@ -500,6 +500,7 @@ public:
|
||||
// FIXME: Make this derive from DIType directly & just store the
|
||||
// base type in a single DIType field.
|
||||
class DICompositeType : public DIDerivedType {
|
||||
friend class DIBuilder;
|
||||
friend class DIDescriptor;
|
||||
void printInternal(raw_ostream &OS) const;
|
||||
|
||||
@ -513,6 +514,8 @@ public:
|
||||
assert(!isSubroutineType() && "no elements for DISubroutineType");
|
||||
return getFieldAs<DIArray>(4);
|
||||
}
|
||||
|
||||
private:
|
||||
template <typename T>
|
||||
void setArrays(DITypedArray<T> Elements, DIArray TParams = DIArray()) {
|
||||
assert((!TParams || DbgNode->getNumOperands() == 8) &&
|
||||
@ -520,13 +523,18 @@ public:
|
||||
"for that!");
|
||||
setArraysHelper(Elements, TParams);
|
||||
}
|
||||
|
||||
public:
|
||||
unsigned getRunTimeLang() const {
|
||||
return getHeaderFieldAs<unsigned>(7);
|
||||
}
|
||||
DITypeRef getContainingType() const { return getFieldAs<DITypeRef>(5); }
|
||||
|
||||
private:
|
||||
/// \brief Set the containing type.
|
||||
void setContainingType(DICompositeType ContainingType);
|
||||
|
||||
public:
|
||||
DIArray getTemplateParams() const { return getFieldAs<DIArray>(6); }
|
||||
MDString *getIdentifier() const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user