forked from OSchip/llvm-project
parent
0787bc37c4
commit
90b5b68535
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue