summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/APFloat.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2019-05-15 13:03:10 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2019-05-15 13:03:10 +0000
commit2dd6a0c0c3841af24a6bb7e5025b26df92759c4a (patch)
tree84c15449e194d90bbc80dc5174e0e157815d3513 /llvm/lib/Support/APFloat.cpp
parent0582b22f10205c61d10531e4a6fa66c5048dc15c (diff)
downloadbcm5719-llvm-2dd6a0c0c3841af24a6bb7e5025b26df92759c4a.tar.gz
bcm5719-llvm-2dd6a0c0c3841af24a6bb7e5025b26df92759c4a.zip
Revert rL360675 : [APFloat] APFloat::Storage::Storage - fix use after move
This was mentioned both in https://www.viva64.com/en/b/0629/ and by scan-build checks ........ There's concerns this may just introduce a use-after-free instead..... llvm-svn: 360770
Diffstat (limited to 'llvm/lib/Support/APFloat.cpp')
-rw-r--r--llvm/lib/Support/APFloat.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp
index aea59301079..208950d7ab7 100644
--- a/llvm/lib/Support/APFloat.cpp
+++ b/llvm/lib/Support/APFloat.cpp
@@ -4418,9 +4418,9 @@ APFloat::Storage::Storage(IEEEFloat F, const fltSemantics &Semantics) {
return;
}
if (usesLayout<DoubleAPFloat>(Semantics)) {
- const fltSemantics IEEESemantics = F.getSemantics();
- new (&Double) DoubleAPFloat(Semantics, APFloat(std::move(F), IEEESemantics),
- APFloat(semIEEEdouble));
+ new (&Double)
+ DoubleAPFloat(Semantics, APFloat(std::move(F), F.getSemantics()),
+ APFloat(semIEEEdouble));
return;
}
llvm_unreachable("Unexpected semantics");
OpenPOWER on IntegriCloud