OSDN Git Service

Don't cast away constness.
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 27 Jun 2013 11:07:42 +0000 (11:07 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 27 Jun 2013 11:07:42 +0000 (11:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185071 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelDAGToDAG.cpp

index 39b205e..b079281 100644 (file)
@@ -500,7 +500,8 @@ void X86DAGToDAGISel::PreprocessISelDAG() {
 
     // If the source and destination are SSE registers, then this is a legal
     // conversion that should not be lowered.
-    X86TargetLowering *X86Lowering = (X86TargetLowering*)getTargetLowering();
+    const X86TargetLowering *X86Lowering =
+        static_cast<const X86TargetLowering *>(getTargetLowering());
     bool SrcIsSSE = X86Lowering->isScalarFPTypeInSSEReg(SrcVT);
     bool DstIsSSE = X86Lowering->isScalarFPTypeInSSEReg(DstVT);
     if (SrcIsSSE && DstIsSSE)