[llvm-commits] [compiler-rt] r165913 - /compiler-rt/trunk/lib/ubsan/ubsan_value.cc

David Blaikie dblaikie at gmail.com
Thu Nov 29 13:53:32 PST 2012


On Sun, Oct 14, 2012 at 4:53 PM, Richard Smith
<richard-llvm at metafoo.co.uk> wrote:
> Author: rsmith
> Date: Sun Oct 14 18:53:37 2012
> New Revision: 165913
>
> URL: http://llvm.org/viewvc/llvm-project?rev=165913&view=rev
> Log:
> Provide a slightly more helpful diagnostic if -fcatch-undefined-behavior finds
> a problem with __int128 arithmetic but the runtime was not built with __int128
> support.

Would it be possible for the test cases that depend on this would be
marked as untested/xfail/something on platforms that don't support it?
Building with clang is actually failing for me, strangely enough. (I
assume clang should be supporting __int128? since when?)

>
> Modified:
>     compiler-rt/trunk/lib/ubsan/ubsan_value.cc
>
> Modified: compiler-rt/trunk/lib/ubsan/ubsan_value.cc
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/ubsan_value.cc?rev=165913&r1=165912&r2=165913&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/ubsan/ubsan_value.cc (original)
> +++ compiler-rt/trunk/lib/ubsan/ubsan_value.cc Sun Oct 14 18:53:37 2012
> @@ -30,6 +30,9 @@
>  #if HAVE_INT128_T
>    if (getType().getIntegerBitWidth() == 128)
>      return *reinterpret_cast<s128*>(Val);
> +#else
> +  if (getType().getIntegerBitWidth() == 128)
> +    UNREACHABLE("libclang_rt.ubsan was built without __int128 support");
>  #endif
>    UNREACHABLE("unexpected bit width");
>  }
> @@ -43,6 +46,9 @@
>  #if HAVE_INT128_T
>    if (getType().getIntegerBitWidth() == 128)
>      return *reinterpret_cast<u128*>(Val);
> +#else
> +  if (getType().getIntegerBitWidth() == 128)
> +    UNREACHABLE("libclang_rt.ubsan was built without __int128 support");
>  #endif
>    UNREACHABLE("unexpected bit width");
>  }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list