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;

llvm-svn: 271069
This commit is contained in:
Sanjoy Das 2016-05-27 23:04:28 +00:00
parent 04f8e06696
commit ebeee960bd

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
}