summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGRTTI.cpp18
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);
OpenPOWER on IntegriCloud