[PATCH] D129822: [Support] Workaround compiler bug in MSVC
Tom Stellard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 26 12:55:37 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGec8f4fd68cd4: [Support] Workaround compiler bug in MSVC (authored by tstellar).
Changed prior to commit:
https://reviews.llvm.org/D129822?vs=444847&id=447807#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129822/new/
https://reviews.llvm.org/D129822
Files:
llvm/lib/Support/NativeFormatting.cpp
Index: llvm/lib/Support/NativeFormatting.cpp
===================================================================
--- llvm/lib/Support/NativeFormatting.cpp
+++ llvm/lib/Support/NativeFormatting.cpp
@@ -262,5 +262,11 @@
case FloatStyle::Percent:
return 2; // Number of decimal places.
}
+ // Workaround for MSVC bug in VS2022:
+ // https://developercommunity.visualstudio.com/t/Prev-Issue---with-__assume-isnan-/1597317
+ // llvm_unreachable expands to __assume(false) with MSVC which triggers the
+ // bug.
+#ifndef _MSC_VER
llvm_unreachable("Unknown FloatStyle enum");
+#endif
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129822.447807.patch
Type: text/x-patch
Size: 598 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220726/c2411d4c/attachment.bin>
More information about the llvm-commits
mailing list