diff options
Diffstat (limited to 'clang/lib/CIR/CodeGen/CIRGenFunction.cpp')
-rw-r--r-- | clang/lib/CIR/CodeGen/CIRGenFunction.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp index fd413fe..c029853 100644 --- a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp @@ -550,6 +550,15 @@ LValue CIRGenFunction::makeNaturalAlignPointeeAddrLValue(mlir::Value val, return makeAddrLValue(Address(val, align), ty, baseInfo); } +LValue CIRGenFunction::makeNaturalAlignAddrLValue(mlir::Value val, + QualType ty) { + LValueBaseInfo baseInfo; + CharUnits alignment = cgm.getNaturalTypeAlignment(ty, &baseInfo); + Address addr(val, convertTypeForMem(ty), alignment); + assert(!cir::MissingFeatures::opTBAA()); + return makeAddrLValue(addr, ty, baseInfo); +} + clang::QualType CIRGenFunction::buildFunctionArgList(clang::GlobalDecl gd, FunctionArgList &args) { const auto *fd = cast<FunctionDecl>(gd.getDecl()); |