diff options
author | Brad King <brad.king@kitware.com> | 2020-03-31 18:44:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-03-31 18:44:17 (GMT) |
commit | ab2bbe078894357ecfc166f11789b08fe5997b0a (patch) | |
tree | 5a56dd48b97fbb14d27c7cfd59a7cb4a5b82d784 | |
parent | 861054ea7af9cd09e1c08f390bb0ff4ee6acd71f (diff) | |
parent | f9a05da69459cc17980f0ea06ffb838f839cae57 (diff) | |
download | CastXML-ab2bbe078894357ecfc166f11789b08fe5997b0a.zip CastXML-ab2bbe078894357ecfc166f11789b08fe5997b0a.tar.gz CastXML-ab2bbe078894357ecfc166f11789b08fe5997b0a.tar.bz2 |
Merge branch 'msvc-builtin-conflict'
-rw-r--r-- | src/RunClang.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/RunClang.cxx b/src/RunClang.cxx index 7c97c91..20a9fe6 100644 --- a/src/RunClang.cxx +++ b/src/RunClang.cxx @@ -287,6 +287,17 @@ protected: "#define __float128 __castxml__float128\n"; } + if (CI.getLangOpts().MSCompatibilityVersion >= 192300000) { + // MSVC tools 14.23 and above declare __builtin_assume_aligned + // in "intrin0.h" with a signature incompatible with Clang's + // builtin. It is guarded by '!defined(__clang__)' but that + // breaks when we simulate MSVC's preprocessor. Rename the + // builtin via preprocessing to avoid the conflict. + builtins += "\n" + "#define __builtin_assume_aligned" + " __castxml__builtin_assume_aligned\n"; + } + // Provide __is_assignable builtin if simulating MSVC. // When a future Clang version supports the builtin then // we can skip this when built against such a Clang. |