Hide a bunch of symbols.

llvm-svn: 120153
This commit is contained in:
Benjamin Kramer 2010-11-25 18:29:30 +00:00
parent 0787bc37c4
commit 90b5b68535
3 changed files with 35 additions and 33 deletions

View File

@ -121,34 +121,34 @@ void CodeGenFunction::EmitAnyExprToMem(const Expr *E,
}
}
namespace {
/// \brief An adjustment to be made to the temporary created when emitting a
/// reference binding, which accesses a particular subobject of that temporary.
struct SubobjectAdjustment {
enum { DerivedToBaseAdjustment, FieldAdjustment } Kind;
union {
struct {
const CastExpr *BasePath;
const CXXRecordDecl *DerivedClass;
} DerivedToBase;
FieldDecl *Field;
struct SubobjectAdjustment {
enum { DerivedToBaseAdjustment, FieldAdjustment } Kind;
union {
struct {
const CastExpr *BasePath;
const CXXRecordDecl *DerivedClass;
} DerivedToBase;
FieldDecl *Field;
};
SubobjectAdjustment(const CastExpr *BasePath,
const CXXRecordDecl *DerivedClass)
: Kind(DerivedToBaseAdjustment) {
DerivedToBase.BasePath = BasePath;
DerivedToBase.DerivedClass = DerivedClass;
}
SubobjectAdjustment(FieldDecl *Field)
: Kind(FieldAdjustment) {
this->Field = Field;
}
};
SubobjectAdjustment(const CastExpr *BasePath,
const CXXRecordDecl *DerivedClass)
: Kind(DerivedToBaseAdjustment)
{
DerivedToBase.BasePath = BasePath;
DerivedToBase.DerivedClass = DerivedClass;
}
SubobjectAdjustment(FieldDecl *Field)
: Kind(FieldAdjustment)
{
this->Field = Field;
}
};
}
static llvm::Value *
CreateReferenceTemporary(CodeGenFunction& CGF, QualType Type,

View File

@ -2291,8 +2291,8 @@ static bool isCharSpecialization(QualType T, const char *Name) {
}
template <std::size_t StrLen>
bool isStreamCharSpecialization(const ClassTemplateSpecializationDecl *SD,
const char (&Str)[StrLen]) {
static bool isStreamCharSpecialization(const ClassTemplateSpecializationDecl*SD,
const char (&Str)[StrLen]) {
if (!SD->getIdentifier()->isStr(Str))
return false;

View File

@ -149,12 +149,14 @@ bool PCHValidator::ReadTargetTriple(llvm::StringRef Triple) {
return true;
}
struct EmptyStringRef {
bool operator ()(llvm::StringRef r) const { return r.empty(); }
};
struct EmptyBlock {
bool operator ()(const PCHPredefinesBlock &r) const { return r.Data.empty(); }
};
namespace {
struct EmptyStringRef {
bool operator ()(llvm::StringRef r) const { return r.empty(); }
};
struct EmptyBlock {
bool operator ()(const PCHPredefinesBlock &r) const {return r.Data.empty();}
};
}
static bool EqualConcatenations(llvm::SmallVector<llvm::StringRef, 2> L,
PCHPredefinesBlocks R) {