diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-11 20:27:40 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-04-11 20:27:40 +0000 |
commit | 7ad0bd54d31788c4858cffa6e203cd06260b800b (patch) | |
tree | 6c6961fdbb487b6b9b693098f2da521ccc7e5c03 /llvm/lib/IR/DebugInfo.cpp | |
parent | 5ad6ff76dc898d1dab1aaccee5e193dbf9e04acb (diff) | |
download | llvm-7ad0bd54d31788c4858cffa6e203cd06260b800b.zip llvm-7ad0bd54d31788c4858cffa6e203cd06260b800b.tar.gz llvm-7ad0bd54d31788c4858cffa6e203cd06260b800b.tar.bz2 |
DebugInfo: Make MDSubprogram::getFunction() return Constant
Change `MDSubprogram::getFunction()` and
`MDGlobalVariable::getConstant()` to return a `Constant`. Previously,
both returned `ConstantAsMetadata`.
llvm-svn: 234699
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 19b799e..7797a02 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -49,12 +49,6 @@ bool DIVariable::isInlinedFnArgument(const Function *CurFn) { return !SP.describes(CurFn); } -Function *DISubprogram::getFunction() const { - if (auto *C = dyn_cast_or_null<ConstantAsMetadata>(get()->getFunction())) - return dyn_cast<Function>(C->getValue()); - return nullptr; -} - bool DISubprogram::describes(const Function *F) { assert(F && "Invalid function"); if (F == getFunction()) |