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
|
/// \brief An adjustment to be made to the temporary created when emitting a
|
||||||
/// reference binding, which accesses a particular subobject of that temporary.
|
/// reference binding, which accesses a particular subobject of that temporary.
|
||||||
struct SubobjectAdjustment {
|
struct SubobjectAdjustment {
|
||||||
enum { DerivedToBaseAdjustment, FieldAdjustment } Kind;
|
enum { DerivedToBaseAdjustment, FieldAdjustment } Kind;
|
||||||
|
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
const CastExpr *BasePath;
|
const CastExpr *BasePath;
|
||||||
const CXXRecordDecl *DerivedClass;
|
const CXXRecordDecl *DerivedClass;
|
||||||
} DerivedToBase;
|
} DerivedToBase;
|
||||||
|
|
||||||
FieldDecl *Field;
|
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 *
|
static llvm::Value *
|
||||||
CreateReferenceTemporary(CodeGenFunction& CGF, QualType Type,
|
CreateReferenceTemporary(CodeGenFunction& CGF, QualType Type,
|
||||||
|
|
|
@ -2291,8 +2291,8 @@ static bool isCharSpecialization(QualType T, const char *Name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
template <std::size_t StrLen>
|
template <std::size_t StrLen>
|
||||||
bool isStreamCharSpecialization(const ClassTemplateSpecializationDecl *SD,
|
static bool isStreamCharSpecialization(const ClassTemplateSpecializationDecl*SD,
|
||||||
const char (&Str)[StrLen]) {
|
const char (&Str)[StrLen]) {
|
||||||
if (!SD->getIdentifier()->isStr(Str))
|
if (!SD->getIdentifier()->isStr(Str))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -149,12 +149,14 @@ bool PCHValidator::ReadTargetTriple(llvm::StringRef Triple) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct EmptyStringRef {
|
namespace {
|
||||||
bool operator ()(llvm::StringRef r) const { return r.empty(); }
|
struct EmptyStringRef {
|
||||||
};
|
bool operator ()(llvm::StringRef r) const { return r.empty(); }
|
||||||
struct EmptyBlock {
|
};
|
||||||
bool operator ()(const PCHPredefinesBlock &r) const { return r.Data.empty(); }
|
struct EmptyBlock {
|
||||||
};
|
bool operator ()(const PCHPredefinesBlock &r) const {return r.Data.empty();}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
static bool EqualConcatenations(llvm::SmallVector<llvm::StringRef, 2> L,
|
static bool EqualConcatenations(llvm::SmallVector<llvm::StringRef, 2> L,
|
||||||
PCHPredefinesBlocks R) {
|
PCHPredefinesBlocks R) {
|
||||||
|
|
Loading…
Reference in New Issue