[DirectX] Fix broken build after API removal
authorChris Bieneman <chris.bieneman@me.com>
Wed, 29 Jun 2022 00:45:11 +0000 (19:45 -0500)
committerChris Bieneman <chris.bieneman@me.com>
Wed, 29 Jun 2022 01:16:04 +0000 (20:16 -0500)
This removes the DirectX backend's usage of the MaybeAlign API removed
in 1baf1fc.

llvm/lib/Target/DirectX/DXILWriter/DXILBitcodeWriter.cpp

index 593897d..1aa1d5c 100644 (file)
@@ -1251,7 +1251,7 @@ void DXILBitcodeWriter::writeModuleInfo() {
                                                            //| constant
     Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6));   // Initializer.
     Abbv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 5)); // Linkage.
-    if (MaxAlignment == 0)                                 // Alignment.
+    if (MaxAlignment == Align(0))                          // Alignment.
       Abbv->Add(BitCodeAbbrevOp(0));
     else {
       unsigned MaxEncAlignment = getEncodedAlign(MaxAlignment);