From 565d281dc1b72e9ebfbedf8aa2e1a0fa21b17aa3 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Sat, 15 Nov 2014 00:24:50 +0000 Subject: [PATCH] CGDebugInfo: Update for DIBuilder API change Tracking LLVM commit r222070. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222071 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGDebugInfo.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index f2a5d2723f..24d86e5c00 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1287,8 +1287,9 @@ CGDebugInfo::CollectTemplateParams(const TemplateParameterList *TPList, V = CGM.getCXXABI().EmitMemberDataPointer(MPT, chars); } llvm::DITemplateValueParameter TVP = - DBuilder.createTemplateValueParameter(TheCU, Name, TTy, - V->stripPointerCasts()); + DBuilder.createTemplateValueParameter( + TheCU, Name, TTy, + cast_or_null(V->stripPointerCasts())); TemplateParams.push_back(TVP); } break; case TemplateArgument::NullPtr: { @@ -1309,7 +1310,8 @@ CGDebugInfo::CollectTemplateParams(const TemplateParameterList *TPList, if (!V) V = llvm::ConstantInt::get(CGM.Int8Ty, 0); llvm::DITemplateValueParameter TVP = - DBuilder.createTemplateValueParameter(TheCU, Name, TTy, V); + DBuilder.createTemplateValueParameter(TheCU, Name, TTy, + cast(V)); TemplateParams.push_back(TVP); } break; case TemplateArgument::Template: { @@ -1334,8 +1336,8 @@ CGDebugInfo::CollectTemplateParams(const TemplateParameterList *TPList, assert(V && "Expression in template argument isn't constant"); llvm::DIType TTy = getOrCreateType(T, Unit); llvm::DITemplateValueParameter TVP = - DBuilder.createTemplateValueParameter(TheCU, Name, TTy, - V->stripPointerCasts()); + DBuilder.createTemplateValueParameter( + TheCU, Name, TTy, cast(V->stripPointerCasts())); TemplateParams.push_back(TVP); } break; // And the following should never occur: -- 2.40.0