[llvm] c967c3d - [DirectX] Properly fix for MaybeAlign API removal
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 28 19:54:08 PDT 2022
Author: Chris Bieneman
Date: 2022-06-28T21:53:59-05:00
New Revision: c967c3d39bc0dc247052a952bd84a8b539f54e45
URL: https://github.com/llvm/llvm-project/commit/c967c3d39bc0dc247052a952bd84a8b539f54e45
DIFF: https://github.com/llvm/llvm-project/commit/c967c3d39bc0dc247052a952bd84a8b539f54e45.diff
LOG: [DirectX] Properly fix for MaybeAlign API removal
My last attempt caused a test case failure. This resovles the issue.
Added:
Modified:
llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp b/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
index 1aa1d5c75299..494a71e51a89 100644
--- a/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
+++ b/llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp
@@ -1251,7 +1251,7 @@ void DXILBitcodeWriter::writeModuleInfo() {
//| constant
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // Initializer.
Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 5)); // Linkage.
- if (MaxAlignment == Align(0)) // Alignment.
+ if (!MaxAlignment) // Alignment.
Abbv->Add(BitCodeAbbrevOp(0));
else {
unsigned MaxEncAlignment = getEncodedAlign(MaxAlignment);
More information about the llvm-commits
mailing list