~MDImportedEntity() {}
static MDImportedEntity *getImpl(LLVMContext &Context, unsigned Tag,
- MDScope *Scope, Metadata *Entity,
+ MDScope *Scope, DebugNodeRef Entity,
unsigned Line, StringRef Name,
StorageType Storage,
bool ShouldCreate = true) {
public:
DEFINE_MDNODE_GET(MDImportedEntity,
- (unsigned Tag, MDScope *Scope, Metadata *Entity,
+ (unsigned Tag, MDScope *Scope, DebugNodeRef Entity,
unsigned Line, StringRef Name = ""),
(Tag, Scope, Entity, Line, Name))
DEFINE_MDNODE_GET(MDImportedEntity,
unsigned getLine() const { return Line; }
MDScope *getScope() const { return cast_or_null<MDScope>(getRawScope()); }
- Metadata *getEntity() const { return getRawEntity(); }
+ DebugNodeRef getEntity() const { return DebugNodeRef(getRawEntity()); }
StringRef getName() const { return getStringOperand(2); }
Metadata *getRawScope() const { return getOperand(0); }
createImportedModule(LLVMContext &C, dwarf::Tag Tag, DIScope Context,
Metadata *NS, unsigned Line, StringRef Name,
SmallVectorImpl<TrackingMDNodeRef> &AllImportedModules) {
- DIImportedEntity M = MDImportedEntity::get(C, Tag, Context, NS, Line, Name);
+ DIImportedEntity M =
+ MDImportedEntity::get(C, Tag, Context, DebugNodeRef(NS), Line, Name);
AllImportedModules.emplace_back(M.get());
return M;
}