aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2023-01-13 13:18:45 +0000
committerGuillaume Chatelet <gchatelet@google.com>2023-01-13 13:19:19 +0000
commiteaa1f46f11f523104be54de058e812c9d7059819 (patch)
tree5123cc1cc5b463c49a245f0b9ac29047cd9e0c05 /clang/lib/CodeGen/CodeGenFunction.h
parent22404099c48cff1c118cd4f6fd9e1acf7ff0fefb (diff)
downloadllvm-eaa1f46f11f523104be54de058e812c9d7059819.zip
llvm-eaa1f46f11f523104be54de058e812c9d7059819.tar.gz
llvm-eaa1f46f11f523104be54de058e812c9d7059819.tar.bz2
[clang][NFC] Remove dependency on DataLayout::getPrefTypeAlignment
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index f1d7cc7..66f6058 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -4850,10 +4850,10 @@ DominatingLLVMValue::save(CodeGenFunction &CGF, llvm::Value *value) {
if (!needsSaving(value)) return saved_type(value, false);
// Otherwise, we need an alloca.
- auto align = CharUnits::fromQuantity(
- CGF.CGM.getDataLayout().getPrefTypeAlignment(value->getType()));
+ auto align = CharUnits::fromAlign(
+ CGF.CGM.getDataLayout().getPrefTypeAlign(value->getType()));
Address alloca =
- CGF.CreateTempAlloca(value->getType(), align, "cond-cleanup.save");
+ CGF.CreateTempAlloca(value->getType(), align, "cond-cleanup.save");
CGF.Builder.CreateStore(value, alloca);
return saved_type(alloca.getPointer(), true);