klee
Casting.h
Go to the documentation of this file.
1//===-- Casting.h -----------------------------------------------*- C++ -*-===//
2//
3// The KLEE Symbolic Virtual Machine
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef KLEE_CASTING_H
11#define KLEE_CASTING_H
12
13#include "klee/Config/Version.h"
14
15#include "llvm/Support/Casting.h"
16
17namespace klee {
18
19using llvm::cast;
20using llvm::cast_or_null;
21using llvm::dyn_cast;
22using llvm::dyn_cast_or_null;
23using llvm::isa;
24#if LLVM_VERSION_CODE >= LLVM_VERSION(9, 0)
25using llvm::isa_and_nonnull;
26#else
27template <typename... X, typename Y>
28inline bool isa_and_nonnull(const Y &value) {
29 return value && isa<X...>(value);
30}
31#endif
32
33} // namespace klee
34
35#endif /* KLEE_CASTING_H */
#define X(C)
Definition: main.cpp:291