[llvm] 462a31f - [APFloat] Remove workaround for old clang.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 23 10:47:38 PST 2022


Author: Craig Topper
Date: 2022-12-23T10:25:42-08:00
New Revision: 462a31f5a5abb905869ea93cc49b096079b11aa4

URL: https://github.com/llvm/llvm-project/commit/462a31f5a5abb905869ea93cc49b096079b11aa4
DIFF: https://github.com/llvm/llvm-project/commit/462a31f5a5abb905869ea93cc49b096079b11aa4.diff

LOG: [APFloat] Remove workaround for old clang.

The comment says this is for clang 3.3. Our build requirements
are clang 5.0 or newer so I think we can remove this.

Reviewed By: nikic, RKSimon

Differential Revision: https://reviews.llvm.org/D140613

Added: 
    

Modified: 
    llvm/include/llvm/ADT/APFloat.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ADT/APFloat.h b/llvm/include/llvm/ADT/APFloat.h
index a3961442b93f7..c0e2d13c29392 100644
--- a/llvm/include/llvm/ADT/APFloat.h
+++ b/llvm/include/llvm/ADT/APFloat.h
@@ -859,13 +859,6 @@ class APFloat : public APFloatBase {
     APFLOAT_DISPATCH_ON_SEMANTICS(makeSmallestNormalized(Neg));
   }
 
-  // FIXME: This is due to clang 3.3 (or older version) always checks for the
-  // default constructor in an array aggregate initialization, even if no
-  // elements in the array is default initialized.
-  APFloat() : U(IEEEdouble()) {
-    llvm_unreachable("This is a workaround for old clang.");
-  }
-
   explicit APFloat(IEEEFloat F, const fltSemantics &S) : U(std::move(F), S) {}
   explicit APFloat(DoubleAPFloat F, const fltSemantics &S)
       : U(std::move(F), S) {}


        


More information about the llvm-commits mailing list