diff options
Diffstat (limited to 'llvm/lib/IR/Core.cpp')
-rw-r--r-- | llvm/lib/IR/Core.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp index c548c56211a..afa73b33cd1 100644 --- a/llvm/lib/IR/Core.cpp +++ b/llvm/lib/IR/Core.cpp @@ -2008,7 +2008,7 @@ unsigned LLVMGetAlignment(LLVMValueRef V) { void LLVMSetAlignment(LLVMValueRef V, unsigned Bytes) { Value *P = unwrap<Value>(V); if (GlobalObject *GV = dyn_cast<GlobalObject>(P)) - GV->setAlignment(Bytes); + GV->setAlignment(MaybeAlign(Bytes)); else if (AllocaInst *AI = dyn_cast<AllocaInst>(P)) AI->setAlignment(MaybeAlign(Bytes)); else if (LoadInst *LI = dyn_cast<LoadInst>(P)) |