diff options
author | Anders Carlsson <andersca@mac.com> | 2009-12-11 16:41:51 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-12-11 16:41:51 +0000 |
commit | 1d6ad508260efc5b980d2f12754a097de50ae23c (patch) | |
tree | 65aae04293ed609d292440f9842948790adcfcd3 /clang/lib/CodeGen/CGRTTI.cpp | |
parent | a0b98f083a7b37222e6ea051cf0c82f0346953a6 (diff) | |
download | bcm5719-llvm-1d6ad508260efc5b980d2f12754a097de50ae23c.tar.gz bcm5719-llvm-1d6ad508260efc5b980d2f12754a097de50ae23c.zip |
Move info vectors and add assertions in preparation of moving the vector directly into RTTIBuilder.
llvm-svn: 91129
Diffstat (limited to 'clang/lib/CodeGen/CGRTTI.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGRTTI.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGRTTI.cpp b/clang/lib/CodeGen/CGRTTI.cpp index 24b3efff6d9..a574703935c 100644 --- a/clang/lib/CodeGen/CGRTTI.cpp +++ b/clang/lib/CodeGen/CGRTTI.cpp @@ -24,7 +24,8 @@ class RTTIBuilder { const llvm::Type *Int8PtrTy; llvm::SmallSet<const CXXRecordDecl *, 16> SeenVBase; llvm::SmallSet<const CXXRecordDecl *, 32> SeenBase; - + + // Type info flags. enum { /// TI_Const - Type has const qualifier. @@ -213,6 +214,9 @@ public: llvm::Constant * Buildclass_type_info(const CXXRecordDecl *RD, llvm::GlobalVariable::LinkageTypes Linkage) { + std::vector<llvm::Constant *> info; + assert(info.empty() && "Info vector must be empty!"); + llvm::Constant *C; llvm::SmallString<256> OutName; @@ -225,8 +229,6 @@ public: if (GV && !GV->isDeclaration()) return llvm::ConstantExpr::getBitCast(GV, Int8PtrTy); - std::vector<llvm::Constant *> info; - // If we're in an anonymous namespace, then we always want internal linkage. if (RD->isInAnonymousNamespace()) Linkage = llvm::GlobalVariable::InternalLinkage; @@ -311,6 +313,9 @@ public: } llvm::Constant *BuildPointerType(QualType Ty) { + std::vector<llvm::Constant *> info; + assert(info.empty() && "Info vector must be empty!"); + llvm::Constant *C; llvm::SmallString<256> OutName; @@ -322,8 +327,6 @@ public: if (GV && !GV->isDeclaration()) return llvm::ConstantExpr::getBitCast(GV, Int8PtrTy); - std::vector<llvm::Constant *> info; - bool Extern = DecideExtern(Ty); bool Hidden = DecideHidden(Ty); @@ -374,6 +377,9 @@ public: } llvm::Constant *BuildSimpleType(QualType Ty, const char *vtbl) { + std::vector<llvm::Constant *> info; + assert(info.empty() && "Info vector must be empty!"); + llvm::Constant *C; llvm::SmallString<256> OutName; @@ -385,8 +391,6 @@ public: if (GV && !GV->isDeclaration()) return llvm::ConstantExpr::getBitCast(GV, Int8PtrTy); - std::vector<llvm::Constant *> info; - bool Extern = DecideExtern(Ty); bool Hidden = DecideHidden(Ty); |