]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/llvm/lib/Transforms/Instrumentation/FunctionBlackList.h
MFC r234353:
[FreeBSD/stable/9.git] / contrib / llvm / lib / Transforms / Instrumentation / FunctionBlackList.h
1 //===-- FunctionBlackList.cpp - blacklist of functions ----------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //===----------------------------------------------------------------------===//
8 //
9 // This is a utility class for instrumentation passes (like AddressSanitizer
10 // or ThreadSanitizer) to avoid instrumenting some functions based on
11 // user-supplied blacklist.
12 //
13 //===----------------------------------------------------------------------===//
14 //
15
16 #include <string>
17
18 namespace llvm {
19 class Function;
20 class Regex;
21
22 // Blacklisted functions are not instrumented.
23 // The blacklist file contains one or more lines like this:
24 // ---
25 // fun:FunctionWildCard
26 // ---
27 // This is similar to the "ignore" feature of ThreadSanitizer.
28 // http://code.google.com/p/data-race-test/wiki/ThreadSanitizerIgnores
29 class FunctionBlackList {
30  public:
31   FunctionBlackList(const std::string &Path);
32   bool isIn(const Function &F);
33  private:
34   Regex *Functions;
35 };
36
37 }  // namespace llvm