aboutsummaryrefslogtreecommitdiff
blob: 08fa6abeafb527dea417740ee795142b1d5eba52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//===-- GuardUtils.cpp - Utils for work with guards -------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// Utils that are used to perform analyzes related to guards and their
// conditions.
//===----------------------------------------------------------------------===//

#include "llvm/Analysis/GuardUtils.h"
#include "llvm/IR/PatternMatch.h"

using namespace llvm;

bool llvm::isGuard(const User *U) {
  using namespace llvm::PatternMatch;
  return match(U, m_Intrinsic<Intrinsic::experimental_guard>());
}