1 //== BodyFarm.h - Factory for conjuring up fake bodies -------------*- C++ -*-//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // BodyFarm is a factory for creating faux implementations for functions/methods
11 // for analysis purposes.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CLANG_ANALYSIS_BODYFARM_H
16 #define LLVM_CLANG_ANALYSIS_BODYFARM_H
18 #include "llvm/ADT/Optional.h"
19 #include "llvm/ADT/DenseMap.h"
30 BodyFarm(ASTContext &C) : C(C) {}
32 /// Factory method for creating bodies for ordinary functions.
33 Stmt *getBody(const FunctionDecl *D);
36 typedef llvm::DenseMap<const Decl *, llvm::Optional<Stmt *> > BodyMap;