This is an archive of the discontinued LLVM Phabricator instance.

Expose more properties of llvm::fltSemantics
ClosedPublic

Authored by jrkoenig on Aug 21 2015, 4:05 PM.

Details

Summary

Adds accessor functions for all the fields in llvm::fltSemantics. This will be used in MergeFunctions to order two APFloats with different semanatics.

Diff Detail

Repository
rL LLVM

Event Timeline

jrkoenig retitled this revision from to Expose more properties of llvm::fltSemantics.
jrkoenig updated this object.
jrkoenig added a reviewer: jfb.
jrkoenig added a subscriber: llvm-commits.
jfb accepted this revision.Aug 21 2015, 4:13 PM
jfb edited edge metadata.
jfb added a subscriber: dschuff.

lgtm

For observers: @jrkoenig's purpose could also be achieved with bool operator==(const fltSemantics &, const fltSemantics &). Exposing the getters seems simpler, but I'm OK with either.

This revision is now accepted and ready to land.Aug 21 2015, 4:14 PM

Actually, it would need to be bool operator<(const fltSemantics &, const fltSemantics &), which is not generally useful. I need to totally order APFloats, not just compare for equality.

This revision was automatically updated to reflect the committed changes.