aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGRTTI.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-12-11 16:41:51 +0000
committerAnders Carlsson <andersca@mac.com>2009-12-11 16:41:51 +0000
commit44636d11eab74ea3948393f889173766096916ae (patch)
tree2d2470208c7f11439f34626af1939dc58b6c3ece /lib/CodeGen/CGRTTI.cpp
parent4e7135613a558020f003972b2a5ae5f8d5306508 (diff)
Move info vectors and add assertions in preparation of moving the vector directly into RTTIBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91129 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGRTTI.cpp')
-rw-r--r--lib/CodeGen/CGRTTI.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/CodeGen/CGRTTI.cpp b/lib/CodeGen/CGRTTI.cpp
index 24b3efff6d..a574703935 100644
--- a/lib/CodeGen/CGRTTI.cpp
+++ b/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);