From fa5b05013679fe04bac94084d411d2774608236f Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Tue, 3 Apr 2012 17:55:42 +0000 Subject: Fix thinko check for number of operands to be the one that actually might have more than 19 operands. Add a testcase to make sure I never screw that up again. Part of rdar://11026482 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153961 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp') diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 420f2cd..b3a9a14 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1200,7 +1200,7 @@ static DebugLoc getFnDebugLoc(DebugLoc DL, const LLVMContext &Ctx) { if (SP.Verify()) { // Check for number of operands since the compatibility is // cheap here. - if (Scope->getNumOperands() > 19) + if (SP->getNumOperands() > 19) return DebugLoc::get(SP.getScopeLineNumber(), 0, SP); else return DebugLoc::get(SP.getLineNumber(), 0, SP); -- cgit v1.1