clang
3.7.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
work
release_test
rc4
llvm.src
tools
clang
include
clang
Analysis
CFGStmtMap.h
Go to the documentation of this file.
1
//===--- CFGStmtMap.h - Map from Stmt* to CFGBlock* -----------*- 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
//
10
// This file defines the CFGStmtMap class, which defines a mapping from
11
// Stmt* to CFGBlock*
12
//
13
//===----------------------------------------------------------------------===//
14
15
#ifndef LLVM_CLANG_ANALYSIS_CFGSTMTMAP_H
16
#define LLVM_CLANG_ANALYSIS_CFGSTMTMAP_H
17
18
#include "
clang/Analysis/CFG.h
"
19
20
namespace
clang {
21
22
class
CFG;
23
class
CFGBlock;
24
class
ParentMap;
25
class
Stmt
;
26
27
class
CFGStmtMap
{
28
ParentMap
*PM;
29
void
*M;
30
31
CFGStmtMap
(
ParentMap
*pm,
void
*m) : PM(pm), M(m) {}
32
33
public
:
34
~CFGStmtMap
();
35
36
/// Returns a new CFGMap for the given CFG. It is the caller's
37
/// responsibility to 'delete' this object when done using it.
38
static
CFGStmtMap
*
Build
(
CFG
*
C
,
ParentMap
*PM);
39
40
/// Returns the CFGBlock the specified Stmt* appears in. For Stmt* that
41
/// are terminators, the CFGBlock is the block they appear as a terminator,
42
/// and not the block they appear as a block-level expression (e.g, '&&').
43
/// CaseStmts and LabelStmts map to the CFGBlock they label.
44
CFGBlock
*
getBlock
(
Stmt
*
S
);
45
46
const
CFGBlock
*
getBlock
(
const
Stmt
* S)
const
{
47
return
const_cast<
CFGStmtMap
*
>
(
this
)->
getBlock
(const_cast<Stmt*>(S));
48
}
49
};
50
51
}
// end clang namespace
52
#endif
clang::ParentMap
Definition:
ParentMap.h:21
Stmt
clang::CFGStmtMap::getBlock
const CFGBlock * getBlock(const Stmt *S) const
Definition:
CFGStmtMap.h:46
clang::CFGBlock
Definition:
CFG.h:354
clang::CFG
Definition:
CFG.h:722
clang::CFGStmtMap::getBlock
CFGBlock * getBlock(Stmt *S)
Definition:
CFGStmtMap.cpp:27
clang::CFGStmtMap::~CFGStmtMap
~CFGStmtMap()
Definition:
CFGStmtMap.cpp:25
clang::CFGStmtMap
Definition:
CFGStmtMap.h:27
S
Sema & S
Definition:
AnalysisBasedWarnings.cpp:1443
clang::CFGStmtMap::Build
static CFGStmtMap * Build(CFG *C, ParentMap *PM)
Definition:
CFGStmtMap.cpp:78
CFG.h
AttributeLangSupport::C
Definition:
SemaDeclAttr.cpp:39
Generated on Mon Aug 31 2015 10:45:11 for clang by
1.8.6