From: Bill Wendling Date: Thu, 9 Feb 2012 22:45:21 +0000 (+0000) Subject: Remove evil const_cast that's not needed anymore. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a4dc693368e7af4001fe88076bdf4efd440022fa;p=clang Remove evil const_cast that's not needed anymore. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150210 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index 0ac32cca06..1b95547292 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -4158,9 +4158,7 @@ llvm::Constant *CGObjCCommonMac::GetMethodVarType(const FieldDecl *Field) { llvm::Constant *CGObjCCommonMac::GetMethodVarType(const ObjCMethodDecl *D, bool Extended) { std::string TypeStr; - if (CGM.getContext().getObjCEncodingForMethodDecl( - const_cast(D), - TypeStr, Extended)) + if (CGM.getContext().getObjCEncodingForMethodDecl(D, TypeStr, Extended)) return 0; llvm::GlobalVariable *&Entry = MethodVarTypes[TypeStr];