forked from OSchip/llvm-project
parent
9e3ad5220d
commit
096d3ecb51
|
@ -518,21 +518,6 @@ public:
|
||||||
return llvm::ConstantExpr::getFPExtend(Src, DstTy);
|
return llvm::ConstantExpr::getFPExtend(Src, DstTy);
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm::Constant *EmitSizeAlignOf(QualType TypeToSize,
|
|
||||||
QualType RetType, bool isSizeOf) {
|
|
||||||
std::pair<uint64_t, unsigned> Info =
|
|
||||||
CGM.getContext().getTypeInfo(TypeToSize);
|
|
||||||
|
|
||||||
uint64_t Val = isSizeOf ? Info.first : Info.second;
|
|
||||||
Val /= 8; // Return size in bytes, not bits.
|
|
||||||
|
|
||||||
assert(RetType->isIntegerType() && "Result type must be an integer!");
|
|
||||||
|
|
||||||
uint32_t ResultWidth =
|
|
||||||
static_cast<uint32_t>(CGM.getContext().getTypeSize(RetType));
|
|
||||||
return llvm::ConstantInt::get(llvm::APInt(ResultWidth, Val));
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
llvm::Constant *EmitLValue(Expr *E) {
|
llvm::Constant *EmitLValue(Expr *E) {
|
||||||
switch (E->getStmtClass()) {
|
switch (E->getStmtClass()) {
|
||||||
|
|
Loading…
Reference in New Issue