aboutsummaryrefslogtreecommitdiffstats
path: root/lib/IR/DebugLoc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IR/DebugLoc.cpp')
-rw-r--r--lib/IR/DebugLoc.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/IR/DebugLoc.cpp b/lib/IR/DebugLoc.cpp
index e8bdcce..718da85 100644
--- a/lib/IR/DebugLoc.cpp
+++ b/lib/IR/DebugLoc.cpp
@@ -79,14 +79,8 @@ MDNode *DebugLoc::getScopeNode(const LLVMContext &Ctx) const {
DebugLoc DebugLoc::getFnDebugLoc(const LLVMContext &Ctx) const {
const MDNode *Scope = getScopeNode(Ctx);
DISubprogram SP = getDISubprogram(Scope);
- if (SP.isSubprogram()) {
- // Check for number of operands since the compatibility is
- // cheap here. FIXME: Name the magic constant.
- if (SP->getNumOperands() > 19)
- return DebugLoc::get(SP.getScopeLineNumber(), 0, SP);
- else
- return DebugLoc::get(SP.getLineNumber(), 0, SP);
- }
+ if (SP.isSubprogram())
+ return DebugLoc::get(SP.getScopeLineNumber(), 0, SP);
return DebugLoc();
}