clang API Documentation

TaintManager.h
Go to the documentation of this file.
00001 //== TaintManager.h - Managing taint --------------------------- -*- C++ -*--=//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 //  This file provides APIs for adding, removing, querying symbol taint.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef LLVM_CLANG_TAINTMANAGER_H
00015 #define LLVM_CLANG_TAINTMANAGER_H
00016 
00017 #include "clang/StaticAnalyzer/Core/PathSensitive/TaintTag.h"
00018 
00019 namespace clang {
00020 namespace ento {
00021 
00022 /// The GDM component containing the tainted root symbols. We lazily infer the
00023 /// taint of the dependent symbols. Currently, this is a map from a symbol to
00024 /// tag kind. TODO: Should support multiple tag kinds.
00025 struct TaintMap {};
00026 typedef llvm::ImmutableMap<SymbolRef, TaintTagType> TaintMapImpl;
00027 template<> struct ProgramStateTrait<TaintMap>
00028     :  public ProgramStatePartialTrait<TaintMapImpl> {
00029   static void *GDMIndex() { static int index = 0; return &index; }
00030 };
00031 
00032 class TaintManager {
00033 
00034   TaintManager() {}
00035 };
00036 
00037 }
00038 }
00039 
00040 #endif