forked from OSchip/llvm-project
parent
fac5612ab0
commit
fc917c6208
llvm/include/llvm
|
@ -226,7 +226,12 @@ template <typename T> class DIRef {
|
|||
explicit DIRef(const Value *V);
|
||||
|
||||
public:
|
||||
T resolve(const DITypeIdentifierMap &Map) const {
|
||||
T resolve(const DITypeIdentifierMap &Map) const;
|
||||
operator Value *() const { return const_cast<Value *>(Val); }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
T DIRef<T>::resolve(const DITypeIdentifierMap &Map) const {
|
||||
if (!Val)
|
||||
return T();
|
||||
|
||||
|
@ -240,9 +245,7 @@ public:
|
|||
assert(DIDescriptor(Iter->second).isType() &&
|
||||
"MDNode in DITypeIdentifierMap should be a DIType.");
|
||||
return T(Iter->second);
|
||||
}
|
||||
operator Value *() const { return const_cast<Value *>(Val); }
|
||||
};
|
||||
}
|
||||
|
||||
/// Specialize getFieldAs to handle fields that are references to DIScopes.
|
||||
template <> DIScopeRef DIDescriptor::getFieldAs<DIScopeRef>(unsigned Elt) const;
|
||||
|
|
Loading…
Reference in New Issue