Revert "DI: Fold constant arguments into a single MDString"

This reverts commit r218914 while I investigate some bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218918 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2014-10-02 22:15:31 +00:00
parent 7bd81ba05b
commit 32e192aeb3
354 changed files with 6707 additions and 6806 deletions

View File

@ -79,8 +79,14 @@ 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())
return DebugLoc::get(SP.getScopeLineNumber(), 0, SP);
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);
}
return DebugLoc();
}