From 872bb3681009ab31965228305bc0452e84569355 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Thu, 27 Jun 2013 11:07:42 +0000 Subject: [PATCH] Don't cast away constness. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185071 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86ISelDAGToDAG.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index 39b205ef770..b07928150f3 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -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(getTargetLowering()); bool SrcIsSSE = X86Lowering->isScalarFPTypeInSSEReg(SrcVT); bool DstIsSSE = X86Lowering->isScalarFPTypeInSSEReg(DstVT); if (SrcIsSSE && DstIsSSE)