Skip to content

Commit

Permalink
Merge pull request #5166 from wbh123456/detect_float_type
Browse files Browse the repository at this point in the history
Add DataType::isFloat()
  • Loading branch information
andrewcraik authored May 7, 2020
2 parents 66a131b + 9641fe4 commit 5b48c2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion compiler/il/OMRDataTypes.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2019 IBM Corp. and others
* Copyright (c) 2000, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -345,6 +345,7 @@ class OMR_EXTENSIBLE DataType
inline bool isVector();
inline bool isBFPorHFP();
inline bool isDouble();
inline bool isFloat();

inline bool isAddress();
inline bool isAggregate();
Expand Down
8 changes: 7 additions & 1 deletion compiler/il/OMRDataTypes_inlines.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2017, 2017 IBM Corp. and others
* Copyright (c) 2017, 2020 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -96,6 +96,12 @@ OMR::DataType::isDouble()
return self()->getDataType() == TR::Double;
}

bool
OMR::DataType::isFloat()
{
return self()->getDataType() == TR::Float;
}

bool
OMR::DataType::isAddress()
{
Expand Down

0 comments on commit 5b48c2d

Please sign in to comment.