Use C++ casts to avoid a warning

warning: cast from type ‘const void*’ to type
‘llvm::PrettyStackTraceEntry*’ casts away qualifiers [-Wcast-qual]
   PrettyStackTraceHead = (PrettyStackTraceEntry*)Top;

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271069 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sanjoy Das 2016-05-27 23:04:28 +00:00
parent c465f6c040
commit 051a0b5646

View File

@ -178,7 +178,8 @@ const void *llvm::SavePrettyStackState() {
void llvm::RestorePrettyStackState(const void *Top) {
#if defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)
PrettyStackTraceHead = (PrettyStackTraceEntry*)Top;
PrettyStackTraceHead =
static_cast<PrettyStackTraceEntry *>(const_cast<void *>(Top));
#endif
}