[llvm-branch-commits] [cfe-branch] r311671 - Merging r311601:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 24 09:21:49 PDT 2017


Author: hans
Date: Thu Aug 24 09:21:49 2017
New Revision: 311671

URL: http://llvm.org/viewvc/llvm-project?rev=311671&view=rev
Log:
Merging r311601:
------------------------------------------------------------------------
r311601 | adrian | 2017-08-23 14:24:12 -0700 (Wed, 23 Aug 2017) | 5 lines

Fix a bug in CGDebugInfo::EmitInlineFunctionStart causing DILocations to be
parented in function declarations.

Fixes PR33997.
https://bugs.llvm.org/show_bug.cgi?id=33997
------------------------------------------------------------------------

Added:
    cfe/branches/release_50/test/CodeGenCXX/debug-info-inlined.cpp
      - copied unchanged from r311601, cfe/trunk/test/CodeGenCXX/debug-info-inlined.cpp
Modified:
    cfe/branches/release_50/   (props changed)
    cfe/branches/release_50/lib/CodeGen/CGDebugInfo.cpp

Propchange: cfe/branches/release_50/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 24 09:21:49 2017
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:308455,308722,308824,308897,308996,309054,309058,309112-309113,309263,309382-309383,309488,309503,309523,309569,309607,309633,309636,309640,309722,309752,309975,310006,310158,310191,310359,310516,310672,310691-310692,310694,310700,310704,310706,310776,310804,310829,310983,311115,311182,311330,311391,311397,311443,311532
+/cfe/trunk:308455,308722,308824,308897,308996,309054,309058,309112-309113,309263,309382-309383,309488,309503,309523,309569,309607,309633,309636,309640,309722,309752,309975,310006,310158,310191,310359,310516,310672,310691-310692,310694,310700,310704,310706,310776,310804,310829,310983,311115,311182,311330,311391,311397,311443,311532,311601
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_50/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_50/lib/CodeGen/CGDebugInfo.cpp?rev=311671&r1=311670&r2=311671&view=diff
==============================================================================
--- cfe/branches/release_50/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/branches/release_50/lib/CodeGen/CGDebugInfo.cpp Thu Aug 24 09:21:49 2017
@@ -3260,7 +3260,7 @@ void CGDebugInfo::EmitInlineFunctionStar
   llvm::DISubprogram *SP = nullptr;
   if (FI != SPCache.end())
     SP = dyn_cast_or_null<llvm::DISubprogram>(FI->second);
-  if (!SP)
+  if (!SP || !SP->isDefinition())
     SP = getFunctionStub(GD);
   FnBeginRegionCount.push_back(LexicalBlockStack.size());
   LexicalBlockStack.emplace_back(SP);




More information about the llvm-branch-commits mailing list