diff options
author | Leonard Chan <leonardchan@google.com> | 2019-01-16 18:53:05 +0000 |
---|---|---|
committer | Leonard Chan <leonardchan@google.com> | 2019-01-16 18:53:05 +0000 |
commit | 86285d2e17ea669fe53853215759c554ad101d31 (patch) | |
tree | bbedc37df9ec3971359b80ed5b9c5503f576b213 /clang/lib/AST/ExprConstant.cpp | |
parent | 8265e390e740f0fb7464f7c20bd38d55ee145dd4 (diff) | |
download | bcm5719-llvm-86285d2e17ea669fe53853215759c554ad101d31.tar.gz bcm5719-llvm-86285d2e17ea669fe53853215759c554ad101d31.zip |
[Fixed Point Arithmetic] Add APFixedPoint to APValue
This adds APFixedPoint to the union of values that can be represented with an APValue.
Differential Revision: https://reviews.llvm.org/D56746
llvm-svn: 351368
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index da093ff22c1..6fced964841 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -2027,6 +2027,9 @@ static bool HandleConversionToBool(const APValue &Val, bool &Result) { case APValue::Int: Result = Val.getInt().getBoolValue(); return true; + case APValue::FixedPoint: + Result = Val.getFixedPoint().getBoolValue(); + return true; case APValue::Float: Result = !Val.getFloat().isZero(); return true; |