mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-22 13:29:44 +00:00
Add DISubprogram::getReturnTypeName()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74015 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ecc63f8687
commit
0de4fa621e
@ -330,6 +330,19 @@ namespace llvm {
|
|||||||
|
|
||||||
DICompositeType getType() const { return getFieldAs<DICompositeType>(8); }
|
DICompositeType getType() const { return getFieldAs<DICompositeType>(8); }
|
||||||
|
|
||||||
|
/// getReturnTypeName - Subprogram return types are encoded either as
|
||||||
|
/// DIType or as DICompositeType.
|
||||||
|
const std::string &getReturnTypeName(std::string &F) const {
|
||||||
|
DICompositeType DCT(getFieldAs<DICompositeType>(8));
|
||||||
|
if (!DCT.isNull()) {
|
||||||
|
DIArray A = DCT.getTypeArray();
|
||||||
|
DIType T(A.getElement(0).getGV());
|
||||||
|
return T.getName(F);
|
||||||
|
}
|
||||||
|
DIType T(getFieldAs<DIType>(8));
|
||||||
|
return T.getName(F);
|
||||||
|
}
|
||||||
|
|
||||||
/// Verify - Verify that a subprogram descriptor is well formed.
|
/// Verify - Verify that a subprogram descriptor is well formed.
|
||||||
bool Verify() const;
|
bool Verify() const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user