]> granicus.if.org Git - clang/commitdiff
Remove evil const_cast that's not needed anymore.
authorBill Wendling <isanbard@gmail.com>
Thu, 9 Feb 2012 22:45:21 +0000 (22:45 +0000)
committerBill Wendling <isanbard@gmail.com>
Thu, 9 Feb 2012 22:45:21 +0000 (22:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150210 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCMac.cpp

index 0ac32cca061f826f7092a9bfbc9b90e669a99504..1b9554729248261b9ade3d8952fbc2029a63c517 100644 (file)
@@ -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<ObjCMethodDecl*>(D),
-                                                    TypeStr, Extended))
+  if (CGM.getContext().getObjCEncodingForMethodDecl(D, TypeStr, Extended))
     return 0;
 
   llvm::GlobalVariable *&Entry = MethodVarTypes[TypeStr];