r305377 - Fix for Itanium mangler issue with templates

Dmitry Polukhin via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 14 02:47:48 PDT 2017


Author: dpolukhin
Date: Wed Jun 14 04:47:47 2017
New Revision: 305377

URL: http://llvm.org/viewvc/llvm-project?rev=305377&view=rev
Log:
Fix for Itanium mangler issue with templates

Patch by Serge Preis

Differential Revision: https://reviews.llvm.org/D32428

Modified:
    cfe/trunk/lib/AST/ItaniumMangle.cpp

Modified: cfe/trunk/lib/AST/ItaniumMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ItaniumMangle.cpp?rev=305377&r1=305376&r2=305377&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ItaniumMangle.cpp (original)
+++ cfe/trunk/lib/AST/ItaniumMangle.cpp Wed Jun 14 04:47:47 2017
@@ -4550,9 +4550,11 @@ CXXNameMangler::makeFunctionReturnTypeTa
 
   const FunctionProtoType *Proto =
       cast<FunctionProtoType>(FD->getType()->getAs<FunctionType>());
+  FunctionTypeDepthState saved = TrackReturnTypeTags.FunctionTypeDepth.push();
   TrackReturnTypeTags.FunctionTypeDepth.enterResultType();
   TrackReturnTypeTags.mangleType(Proto->getReturnType());
   TrackReturnTypeTags.FunctionTypeDepth.leaveResultType();
+  TrackReturnTypeTags.FunctionTypeDepth.pop(saved);
 
   return TrackReturnTypeTags.AbiTagsRoot.getSortedUniqueUsedAbiTags();
 }




More information about the cfe-commits mailing list