2018-08-30 03:39:16 +00:00
|
|
|
//===-- GuardUtils.cpp - Utils for work with guards -------------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 08:50:56 +00:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2018-08-30 03:39:16 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// 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>());
|
|
|
|
}
|