aboutsummaryrefslogtreecommitdiff
path: root/lib/IR/IRBuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IR/IRBuilder.cpp')
-rw-r--r--lib/IR/IRBuilder.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/IR/IRBuilder.cpp b/lib/IR/IRBuilder.cpp
index 0c6461c9078f..b782012e9731 100644
--- a/lib/IR/IRBuilder.cpp
+++ b/lib/IR/IRBuilder.cpp
@@ -49,7 +49,7 @@ GlobalVariable *IRBuilderBase::CreateGlobalString(StringRef Str,
nullptr, GlobalVariable::NotThreadLocal,
AddressSpace);
GV->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
- GV->setAlignment(1);
+ GV->setAlignment(Align::None());
return GV;
}
@@ -289,8 +289,10 @@ CallInst *IRBuilderBase::CreateElementUnorderedAtomicMemMove(
CallInst *CI = createCallHelper(TheFn, Ops, this);
// Set the alignment of the pointer args.
- CI->addParamAttr(0, Attribute::getWithAlignment(CI->getContext(), DstAlign));
- CI->addParamAttr(1, Attribute::getWithAlignment(CI->getContext(), SrcAlign));
+ CI->addParamAttr(
+ 0, Attribute::getWithAlignment(CI->getContext(), Align(DstAlign)));
+ CI->addParamAttr(
+ 1, Attribute::getWithAlignment(CI->getContext(), Align(SrcAlign)));
// Set the TBAA info if present.
if (TBAATag)