r222071 - CGDebugInfo: Update for DIBuilder API change
Duncan P. N. Exon Smith
dexonsmith at apple.com
Fri Nov 14 16:24:51 PST 2014
Author: dexonsmith
Date: Fri Nov 14 18:24:50 2014
New Revision: 222071
URL: http://llvm.org/viewvc/llvm-project?rev=222071&view=rev
Log:
CGDebugInfo: Update for DIBuilder API change
Tracking LLVM commit r222070.
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=222071&r1=222070&r2=222071&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Fri Nov 14 18:24:50 2014
@@ -1287,8 +1287,9 @@ CGDebugInfo::CollectTemplateParams(const
V = CGM.getCXXABI().EmitMemberDataPointer(MPT, chars);
}
llvm::DITemplateValueParameter TVP =
- DBuilder.createTemplateValueParameter(TheCU, Name, TTy,
- V->stripPointerCasts());
+ DBuilder.createTemplateValueParameter(
+ TheCU, Name, TTy,
+ cast_or_null<llvm::Constant>(V->stripPointerCasts()));
TemplateParams.push_back(TVP);
} break;
case TemplateArgument::NullPtr: {
@@ -1309,7 +1310,8 @@ CGDebugInfo::CollectTemplateParams(const
if (!V)
V = llvm::ConstantInt::get(CGM.Int8Ty, 0);
llvm::DITemplateValueParameter TVP =
- DBuilder.createTemplateValueParameter(TheCU, Name, TTy, V);
+ DBuilder.createTemplateValueParameter(TheCU, Name, TTy,
+ cast<llvm::Constant>(V));
TemplateParams.push_back(TVP);
} break;
case TemplateArgument::Template: {
@@ -1334,8 +1336,8 @@ CGDebugInfo::CollectTemplateParams(const
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<llvm::Constant>(V->stripPointerCasts()));
TemplateParams.push_back(TVP);
} break;
// And the following should never occur:
More information about the cfe-commits
mailing list