aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorPiotr Padlewski <prazek@google.com>2015-09-10 20:18:30 +0000
committerPiotr Padlewski <prazek@google.com>2015-09-10 20:18:30 +0000
commit4bed31b9bffedfdcbf7177ceb465da7f04cc08b5 (patch)
tree2915b111207042b146523b59045ea90daed69596 /clang/lib/CodeGen/CodeGenFunction.h
parent4eb5d5a02d8bca389aae3d43a317e3d0bdeba2de (diff)
downloadllvm-4bed31b9bffedfdcbf7177ceb465da7f04cc08b5.zip
llvm-4bed31b9bffedfdcbf7177ceb465da7f04cc08b5.tar.gz
llvm-4bed31b9bffedfdcbf7177ceb465da7f04cc08b5.tar.bz2
Revert "Generating assumption loads of vptr after ctor call (fixed)"
It seems that there is small bug, and we can't generate assume loads when some virtual functions have internal visibiliy This reverts commit 982bb7d966947812d216489b3c519c9825cacbf2. llvm-svn: 247332
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h40
1 files changed, 13 insertions, 27 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 76296de..b03700d 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -1354,27 +1354,21 @@ public:
void EmitInitializerForField(FieldDecl *Field, LValue LHS, Expr *Init,
ArrayRef<VarDecl *> ArrayIndexes);
- /// Struct with all informations about dynamic [sub]class needed to set vptr.
- struct VPtr {
- BaseSubobject Base;
- const CXXRecordDecl *NearestVBase;
- CharUnits OffsetFromNearestVBase;
- const CXXRecordDecl *VTableClass;
- };
-
- /// Initialize the vtable pointer of the given subobject.
- void InitializeVTablePointer(const VPtr &vptr);
-
- typedef llvm::SmallVector<VPtr, 4> VPtrsVector;
+ /// InitializeVTablePointer - Initialize the vtable pointer of the given
+ /// subobject.
+ ///
+ void InitializeVTablePointer(BaseSubobject Base,
+ const CXXRecordDecl *NearestVBase,
+ CharUnits OffsetFromNearestVBase,
+ const CXXRecordDecl *VTableClass);
typedef llvm::SmallPtrSet<const CXXRecordDecl *, 4> VisitedVirtualBasesSetTy;
- VPtrsVector getVTablePointers(const CXXRecordDecl *VTableClass);
-
- void getVTablePointers(BaseSubobject Base, const CXXRecordDecl *NearestVBase,
- CharUnits OffsetFromNearestVBase,
- bool BaseIsNonVirtualPrimaryBase,
- const CXXRecordDecl *VTableClass,
- VisitedVirtualBasesSetTy &VBases, VPtrsVector &vptrs);
+ void InitializeVTablePointers(BaseSubobject Base,
+ const CXXRecordDecl *NearestVBase,
+ CharUnits OffsetFromNearestVBase,
+ bool BaseIsNonVirtualPrimaryBase,
+ const CXXRecordDecl *VTableClass,
+ VisitedVirtualBasesSetTy& VBases);
void InitializeVTablePointers(const CXXRecordDecl *ClassDecl);
@@ -1842,18 +1836,10 @@ public:
// they are substantially the same.
void EmitDelegatingCXXConstructorCall(const CXXConstructorDecl *Ctor,
const FunctionArgList &Args);
-
void EmitCXXConstructorCall(const CXXConstructorDecl *D, CXXCtorType Type,
bool ForVirtualBase, bool Delegating,
Address This, const CXXConstructExpr *E);
- /// Emit assumption load for all bases. Requires to be be called only on
- /// most-derived class and not under construction of the object.
- void EmitVTableAssumptionLoads(const CXXRecordDecl *ClassDecl, Address This);
-
- /// Emit assumption that vptr load == global vtable.
- void EmitVTableAssumptionLoad(const VPtr &vptr, Address This);
-
void EmitSynthesizedCXXCopyCtorCall(const CXXConstructorDecl *D,
Address This, Address Src,
const CXXConstructExpr *E);