Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: third_party/libopenjpeg20/opj_intmath.h

Issue 1405553003: Land temporary workaround for clang-cl not yet understanding __emul (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libopenjpeg20/opj_intmath.h
diff --git a/third_party/libopenjpeg20/opj_intmath.h b/third_party/libopenjpeg20/opj_intmath.h
index 3f7934c470cbbf3bec7e9fab5488df7f8de74018..c52e7e0155468881ef2278c632ceefb11dcaa413 100644
--- a/third_party/libopenjpeg20/opj_intmath.h
+++ b/third_party/libopenjpeg20/opj_intmath.h
@@ -192,7 +192,8 @@ Multiply two fixed-precision rational numbers.
@return Returns a * b
*/
static INLINE OPJ_INT32 opj_int_fix_mul(OPJ_INT32 a, OPJ_INT32 b) {
-#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__INTEL_COMPILER) && defined(_M_IX86)
+// TODO(thakis): Remove __clang__ once chromium's clang has clang r250301
+#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__INTEL_COMPILER) && defined(_M_IX86) && !defined(__clang__)
OPJ_INT64 temp = __emul(a, b);
#else
OPJ_INT64 temp = (OPJ_INT64) a * (OPJ_INT64) b ;
@@ -204,7 +205,8 @@ static INLINE OPJ_INT32 opj_int_fix_mul(OPJ_INT32 a, OPJ_INT32 b) {
}
static INLINE OPJ_INT32 opj_int_fix_mul_t1(OPJ_INT32 a, OPJ_INT32 b) {
-#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__INTEL_COMPILER) && defined(_M_IX86)
+// TODO(thakis): Remove __clang__ once chromium's clang has clang r250301
+#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__INTEL_COMPILER) && defined(_M_IX86) && !defined(__clang__)
OPJ_INT64 temp = __emul(a, b);
#else
OPJ_INT64 temp = (OPJ_INT64) a * (OPJ_INT64) b ;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698