Files
clang-p2996/clang/lib/Analysis/BodyFarm.h
Chandler Carruth 3a02247dc9 Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.

This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.

I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.

llvm-svn: 169237
2012-12-04 09:13:33 +00:00

44 lines
1.0 KiB
C++

//== BodyFarm.h - Factory for conjuring up fake bodies -------------*- C++ -*-//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// BodyFarm is a factory for creating faux implementations for functions/methods
// for analysis purposes.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_ANALYSIS_BODYFARM_H
#define LLVM_CLANG_ANALYSIS_BODYFARM_H
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Optional.h"
namespace clang {
class ASTContext;
class Decl;
class FunctionDecl;
class Stmt;
class BodyFarm {
public:
BodyFarm(ASTContext &C) : C(C) {}
/// Factory method for creating bodies for ordinary functions.
Stmt *getBody(const FunctionDecl *D);
private:
typedef llvm::DenseMap<const Decl *, llvm::Optional<Stmt *> > BodyMap;
ASTContext &C;
BodyMap Bodies;
};
}
#endif