diff options
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 8 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 1844b02516f..ff3fdd56920 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -1171,7 +1171,7 @@ LValue CodeGenFunction::EmitMemberExpr(const MemberExpr *E) { } LValue CodeGenFunction::EmitLValueForBitfield(llvm::Value* BaseValue, - FieldDecl* Field, + const FieldDecl* Field, unsigned CVRQualifiers) { CodeGenTypes::BitFieldInfo Info = CGM.getTypes().getBitFieldInfo(Field); @@ -1196,7 +1196,7 @@ LValue CodeGenFunction::EmitLValueForBitfield(llvm::Value* BaseValue, } LValue CodeGenFunction::EmitLValueForField(llvm::Value* BaseValue, - FieldDecl* Field, + const FieldDecl* Field, bool isUnion, unsigned CVRQualifiers) { if (Field->isBitField()) @@ -1563,8 +1563,8 @@ LValue CodeGenFunction::EmitPointerToDataMemberLValue(const FieldDecl *Field) { getContext().getTypeDeclType(const_cast<CXXRecordDecl*>(ClassDecl))); NNSpecTy = getContext().getPointerType(NNSpecTy); llvm::Value *V = llvm::Constant::getNullValue(ConvertType(NNSpecTy)); - LValue MemExpLV = EmitLValueForField(V, const_cast<FieldDecl*>(Field), - /*isUnion*/false, /*Qualifiers*/0); + LValue MemExpLV = EmitLValueForField(V, Field, /*isUnion=*/false, + /*Qualifiers=*/0); const llvm::Type *ResultType = ConvertType(getContext().getPointerDiffType()); V = Builder.CreatePtrToInt(MemExpLV.getAddress(), ResultType, "datamember"); return LValue::MakeAddr(V, MakeQualifiers(Field->getType())); diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index d0f184fc6f7..44561473100 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -844,13 +844,13 @@ public: llvm::Value *EmitIvarOffset(const ObjCInterfaceDecl *Interface, const ObjCIvarDecl *Ivar); - LValue EmitLValueForField(llvm::Value* Base, FieldDecl* Field, + LValue EmitLValueForField(llvm::Value* Base, const FieldDecl* Field, bool isUnion, unsigned CVRQualifiers); LValue EmitLValueForIvar(QualType ObjectTy, llvm::Value* Base, const ObjCIvarDecl *Ivar, unsigned CVRQualifiers); - LValue EmitLValueForBitfield(llvm::Value* Base, FieldDecl* Field, + LValue EmitLValueForBitfield(llvm::Value* Base, const FieldDecl* Field, unsigned CVRQualifiers); LValue EmitBlockDeclRefLValue(const BlockDeclRefExpr *E); |