[llvm] r180852 - get rid of windows warning:
Peng Cheng
gm4cheng at gmail.com
Wed May 1 08:04:18 PDT 2013
Author: chp
Date: Wed May 1 10:04:18 2013
New Revision: 180852
URL: http://llvm.org/viewvc/llvm-project?rev=180852&view=rev
Log:
get rid of windows warning:
warning C4946: reinterpret_cast used between related classes
Modified:
llvm/trunk/include/llvm/IR/GlobalValue.h
Modified: llvm/trunk/include/llvm/IR/GlobalValue.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/GlobalValue.h?rev=180852&r1=180851&r2=180852&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/GlobalValue.h (original)
+++ llvm/trunk/include/llvm/IR/GlobalValue.h Wed May 1 10:04:18 2013
@@ -19,6 +19,7 @@
#define LLVM_IR_GLOBALVALUE_H
#include "llvm/IR/Constant.h"
+#include "llvm/IR/DerivedTypes.h"
namespace llvm {
@@ -105,7 +106,7 @@ public:
/// getType - Global values are always pointers.
inline PointerType *getType() const {
- return reinterpret_cast<PointerType*>(User::getType());
+ return cast<PointerType>(User::getType());
}
static LinkageTypes getLinkOnceLinkage(bool ODR) {
More information about the llvm-commits
mailing list