From 5e89a7d1f93965f8972df2774d9bb4d0e34eb077 Mon Sep 17 00:00:00 2001 From: Tim Shen Date: Wed, 26 Oct 2016 23:31:41 +0000 Subject: [PATCH] [APFloat] Fix APFloat::getExactInverse when the input is nullptr. This is a regression introduced by r285105. Reviewers: kbarton, echristo, iteratee, eugenis Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D26017 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285256 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/APFloat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/ADT/APFloat.h b/include/llvm/ADT/APFloat.h index f809065a5ed..c44696decdc 100644 --- a/include/llvm/ADT/APFloat.h +++ b/include/llvm/ADT/APFloat.h @@ -855,7 +855,7 @@ public: } bool getExactInverse(APFloat *inv) const { - return IEEE.getExactInverse(&inv->IEEE); + return IEEE.getExactInverse(inv ? &inv->IEEE : nullptr); } friend hash_code hash_value(const APFloat &Arg); -- 2.40.0