projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38ebdee
)
DebugInfo: Assume a valid pointer for DISubprogram::getFunction()
author
Duncan P. N. Exon Smith
<dexonsmith@apple.com>
Sat, 11 Apr 2015 18:15:48 +0000
(18:15 +0000)
committer
Duncan P. N. Exon Smith
<dexonsmith@apple.com>
Sat, 11 Apr 2015 18:15:48 +0000
(18:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234693
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/IR/DebugInfo.cpp
patch
|
blob
|
history
diff --git
a/lib/IR/DebugInfo.cpp
b/lib/IR/DebugInfo.cpp
index 6845827fc242f5f6d49da3e03f6c1320cda558fd..c8ae26391619b0e2895ed1abef8801824ab2abd7 100644
(file)
--- a/
lib/IR/DebugInfo.cpp
+++ b/
lib/IR/DebugInfo.cpp
@@
-90,9
+90,8
@@
bool DIVariable::isInlinedFnArgument(const Function *CurFn) {
}
Function *DISubprogram::getFunction() const {
- if (auto *N = get())
- if (auto *C = dyn_cast_or_null<ConstantAsMetadata>(N->getFunction()))
- return dyn_cast<Function>(C->getValue());
+ if (auto *C = dyn_cast_or_null<ConstantAsMetadata>(get()->getFunction()))
+ return dyn_cast<Function>(C->getValue());
return nullptr;
}