[llvm] r271069 - Use C++ casts to avoid a warning
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Fri May 27 16:04:28 PDT 2016
Author: sanjoy
Date: Fri May 27 18:04:28 2016
New Revision: 271069
URL: http://llvm.org/viewvc/llvm-project?rev=271069&view=rev
Log:
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;
Modified:
llvm/trunk/lib/Support/PrettyStackTrace.cpp
Modified: llvm/trunk/lib/Support/PrettyStackTrace.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/PrettyStackTrace.cpp?rev=271069&r1=271068&r2=271069&view=diff
==============================================================================
--- llvm/trunk/lib/Support/PrettyStackTrace.cpp (original)
+++ llvm/trunk/lib/Support/PrettyStackTrace.cpp Fri May 27 18:04:28 2016
@@ -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
}
More information about the llvm-commits
mailing list