clang 8.0.0

Functions
LiveVariables.cpp File Reference
`#include "clang/Analysis/Analyses/LiveVariables.h"`
`#include "clang/AST/Stmt.h"`
`#include "clang/AST/StmtVisitor.h"`
`#include "clang/Analysis/Analyses/PostOrderCFGView.h"`
`#include "clang/Analysis/AnalysisDeclContext.h"`
`#include "clang/Analysis/CFG.h"`
`#include "llvm/ADT/DenseMap.h"`
`#include "llvm/ADT/PostOrderIterator.h"`
`#include "llvm/ADT/PriorityQueue.h"`
`#include "llvm/Support/raw_ostream.h"`
`#include <algorithm>`
`#include <vector>`
Include dependency graph for LiveVariables.cpp:

Go to the source code of this file.

## Functions
static LiveVariablesImpl & | getImpl (void *x)
static bool | isAlwaysAlive (const VarDecl *D)
static const VariableArrayType * | FindVA (QualType Ty)
static const Stmt * | LookThroughStmt (const Stmt *S)
static void | AddLiveStmt (llvm::ImmutableSet< const Stmt *> &Set, llvm::ImmutableSet< const Stmt *>::Factory &F, const Stmt *S)
static bool | writeShouldKill (const VarDecl *VD)

## Function Documentation

## ◆ AddLiveStmt()

static void AddLiveStmt | ( | llvm::ImmutableSet< const Stmt *> & | Set,
|  | llvm::ImmutableSet< const Stmt *>::Factory & | F,
|  | const Stmt * | S
| ) |  |
| static

Definition at line 254 of file LiveVariables.cpp.

## ◆ FindVA()

static const VariableArrayType* FindVA | ( | QualType | Ty | ) |
| static

Definition at line 224 of file LiveVariables.cpp.

References clang::QualType::getTypePtr().

## ◆ getImpl()

static LiveVariablesImpl& getImpl | ( | void * | x | ) |
| static

Definition at line 107 of file LiveVariables.cpp.

Referenced by clang::LiveVariables::dumpBlockLiveness(), clang::LiveVariables::dumpStmtLiveness(), clang::LiveVariables::isLive(), and clang::LiveVariables::runOnAllBlocks().

## ◆ isAlwaysAlive()

static bool isAlwaysAlive | ( | const VarDecl * | D | ) |
| static

Definition at line 180 of file LiveVariables.cpp.

References clang::VarDecl::hasGlobalStorage().

Referenced by clang::LiveVariables::isLive(), and writeShouldKill().

## ◆ LookThroughStmt()

static const Stmt* LookThroughStmt | ( | const Stmt * | S | ) |
| static

Definition at line 237 of file LiveVariables.cpp.

## ◆ writeShouldKill()

static bool writeShouldKill | ( | const VarDecl * | VD | ) |
| static

Definition at line 368 of file LiveVariables.cpp.

References clang::Decl::add(), clang::CFGElement::castAs(), clang::DeclStmt::decls(), clang::UnaryExprOrTypeTraitExpr::getArgumentExpr(), clang::CFGElement::getAs(), clang::BlockExpr::getBlockDecl(), clang::DeclRefExpr::getDecl(), clang::ObjCForCollectionStmt::getElement(), clang::UnaryExprOrTypeTraitExpr::getKind(), clang::BinaryOperator::getLHS(), clang::UnaryOperator::getOpcode(), clang::DeclStmt::getSingleDecl(), clang::UnaryOperator::getSubExpr(), clang::CFGBlock::getTerminator(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Expr::IgnoreParens(), isAlwaysAlive(), clang::UnaryExprOrTypeTraitExpr::isArgumentType(), clang::BinaryOperator::isAssignmentOp(), clang::Expr::isLValue(), clang::Type::isReferenceType(), clang::Type::isVariableArrayType(), clang::LiveVariables::LivenessValues::liveDecls, clang::CFGBlock::rbegin(), clang::CFGBlock::rend(), runOnBlock(), and clang::UETT_SizeOf.