[cfe-commits] r91129 - /cfe/trunk/lib/CodeGen/CGRTTI.cpp
Anders Carlsson
andersca at mac.com
Fri Dec 11 08:41:51 PST 2009
Author: andersca
Date: Fri Dec 11 10:41:51 2009
New Revision: 91129
URL: http://llvm.org/viewvc/llvm-project?rev=91129&view=rev
Log:
Move info vectors and add assertions in preparation of moving the vector directly into RTTIBuilder.
Modified:
cfe/trunk/lib/CodeGen/CGRTTI.cpp
Modified: cfe/trunk/lib/CodeGen/CGRTTI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGRTTI.cpp?rev=91129&r1=91128&r2=91129&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGRTTI.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGRTTI.cpp Fri Dec 11 10:41:51 2009
@@ -24,7 +24,8 @@
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 @@
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 @@
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 @@
}
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 @@
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 @@
}
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 @@
if (GV && !GV->isDeclaration())
return llvm::ConstantExpr::getBitCast(GV, Int8PtrTy);
- std::vector<llvm::Constant *> info;
-
bool Extern = DecideExtern(Ty);
bool Hidden = DecideHidden(Ty);
More information about the cfe-commits
mailing list