summaryrefslogtreecommitdiff
path: root/test/example/find_div0s.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-04-11 19:43:58 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-04-11 19:43:58 -0700
commit73c606a04d01dc7018d028eed3216a507ab03ee9 (patch)
treebf4255d2fead5fdf721ea178607abfc408cd6ac8 /test/example/find_div0s.cpp
parent65d9334b3066bae667e729f3202f7aa2d7c11530 (diff)
parent1044d6cbca6d279d457cdd1cf7000671ec48e841 (diff)
downloadbinaryen-73c606a04d01dc7018d028eed3216a507ab03ee9.tar.gz
binaryen-73c606a04d01dc7018d028eed3216a507ab03ee9.tar.bz2
binaryen-73c606a04d01dc7018d028eed3216a507ab03ee9.zip
Merge pull request #334 from WebAssembly/opts2
More optimizations
Diffstat (limited to 'test/example/find_div0s.cpp')
-rw-r--r--test/example/find_div0s.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/example/find_div0s.cpp b/test/example/find_div0s.cpp
index 9f1cf911f..14eac95bb 100644
--- a/test/example/find_div0s.cpp
+++ b/test/example/find_div0s.cpp
@@ -44,7 +44,7 @@ int main() {
// In every Binary, look for integer divisions
if (curr->op == BinaryOp::DivS || curr->op == BinaryOp::DivU) {
// Check if the right operand is a constant, and if it is 0
- auto right = curr->right->dyn_cast<Const>();
+ auto right = curr->right->dynCast<Const>();
if (right && right->value.getInteger() == 0) {
std::cout << "We found that " << curr->left << " is divided by zero\n";
}