[llvm] r370874 - Revert "[Clang Interpreter] Initial patch for the constexpr interpreter"

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 4 03:57:07 PDT 2019


Author: lebedevri
Date: Wed Sep  4 03:57:06 2019
New Revision: 370874

URL: http://llvm.org/viewvc/llvm-project?rev=370874&view=rev
Log:
Revert "[Clang Interpreter] Initial patch for the constexpr interpreter"

Breaks BUILD_SHARED_LIBS build, introduces cycles in library dependency
graphs. (clangInterp depends on clangAST which depends on clangInterp)

This reverts r370839, which is an yet another recommit of D64146.

Removed:
    llvm/trunk/utils/gn/secondary/clang/lib/AST/Interp/
Modified:
    llvm/trunk/include/llvm/Support/MathExtras.h
    llvm/trunk/utils/gn/secondary/clang/lib/AST/BUILD.gn
    llvm/trunk/utils/gn/secondary/clang/utils/TableGen/BUILD.gn

Modified: llvm/trunk/include/llvm/Support/MathExtras.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/MathExtras.h?rev=370874&r1=370873&r2=370874&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/MathExtras.h (original)
+++ llvm/trunk/include/llvm/Support/MathExtras.h Wed Sep  4 03:57:06 2019
@@ -902,6 +902,9 @@ SubOverflow(T X, T Y, T &Result) {
 template <typename T>
 typename std::enable_if<std::is_signed<T>::value, T>::type
 MulOverflow(T X, T Y, T &Result) {
+#if __has_builtin(__builtin_mul_overflow)
+  return __builtin_mul_overflow(X, Y, &Result);
+#else
   // Perform the unsigned multiplication on absolute values.
   using U = typename std::make_unsigned<T>::type;
   const U UX = X < 0 ? (0 - static_cast<U>(X)) : static_cast<U>(X);
@@ -923,6 +926,7 @@ MulOverflow(T X, T Y, T &Result) {
     return UX > (static_cast<U>(std::numeric_limits<T>::max()) + U(1)) / UY;
   else
     return UX > (static_cast<U>(std::numeric_limits<T>::max())) / UY;
+#endif
 }
 
 } // End llvm namespace

Modified: llvm/trunk/utils/gn/secondary/clang/lib/AST/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang/lib/AST/BUILD.gn?rev=370874&r1=370873&r2=370874&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang/lib/AST/BUILD.gn (original)
+++ llvm/trunk/utils/gn/secondary/clang/lib/AST/BUILD.gn Wed Sep  4 03:57:06 2019
@@ -10,7 +10,6 @@ static_library("AST") {
     "//clang/include/clang/AST:CommentHTMLTags",
     "//clang/include/clang/AST:CommentHTMLTagsProperties",
     "//clang/include/clang/AST:DeclNodes",
-    "//clang/lib/AST/Interp",
     "//clang/lib/Basic",
     "//clang/lib/Lex",
     "//llvm/lib/BinaryFormat",

Modified: llvm/trunk/utils/gn/secondary/clang/utils/TableGen/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang/utils/TableGen/BUILD.gn?rev=370874&r1=370873&r2=370874&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang/utils/TableGen/BUILD.gn (original)
+++ llvm/trunk/utils/gn/secondary/clang/utils/TableGen/BUILD.gn Wed Sep  4 03:57:06 2019
@@ -14,7 +14,6 @@ executable("clang-tblgen") {
     "ClangOpenCLBuiltinEmitter.cpp",
     "ClangOptionDocEmitter.cpp",
     "ClangSACheckersEmitter.cpp",
-    "ClangOpcodesEmitter.cpp",
     "NeonEmitter.cpp",
     "TableGen.cpp",
   ]




More information about the llvm-commits mailing list