X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FIR%2FDebugLoc.cpp;h=718da852fec34ae94ffa29c73808597dfe867f64;hp=e8bdccebae96d5445abd9fd103d61466e14055c5;hb=0917b70630bb3f426cacd6c89a2bdf0b9aaf6865;hpb=bf21d40070d18a82b3f0af0c05dc3d7e33b11f3a diff --git a/lib/IR/DebugLoc.cpp b/lib/IR/DebugLoc.cpp index e8bdccebae9..718da852fec 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(); }