diff options
author | dim <dim@FreeBSD.org> | 2011-02-27 01:32:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-02-27 01:32:10 +0000 |
commit | b951d621be1d00a520871c689c1cd687b6aa3ae6 (patch) | |
tree | 5c342f2374324ffec4626f558d9aa49f323f90b4 /contrib/llvm/tools/clang/lib/Analysis/AnalysisContext.cpp | |
parent | 4004d6a3076e94bd23e681411c43682267a202fe (diff) | |
parent | a0fb00f9837bd0d2e5948f16f6a6b82a7a628f51 (diff) | |
download | FreeBSD-src-b951d621be1d00a520871c689c1cd687b6aa3ae6.zip FreeBSD-src-b951d621be1d00a520871c689c1cd687b6aa3ae6.tar.gz |
Update llvm/clang to trunk r126547.
There are several bugfixes in this update, but the most important one is
to ensure __start_ and __stop_ symbols for linker sets and kernel module
metadata are always emitted in object files:
http://llvm.org/bugs/show_bug.cgi?id=9292
Before this fix, if you compiled kernel modules with clang, they would
not be properly processed by kldxref, and if they had any dependencies,
the kernel would fail to load those. Another problem occurred when
attempting to mount a tmpfs filesystem, which would result in 'operation
not supported by device'.
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Analysis/AnalysisContext.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Analysis/AnalysisContext.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/contrib/llvm/tools/clang/lib/Analysis/AnalysisContext.cpp b/contrib/llvm/tools/clang/lib/Analysis/AnalysisContext.cpp index 5233d3b..62097ef 100644 --- a/contrib/llvm/tools/clang/lib/Analysis/AnalysisContext.cpp +++ b/contrib/llvm/tools/clang/lib/Analysis/AnalysisContext.cpp @@ -19,8 +19,10 @@ #include "clang/AST/StmtVisitor.h" #include "clang/Analysis/Analyses/LiveVariables.h" #include "clang/Analysis/Analyses/PseudoConstantAnalysis.h" +#include "clang/Analysis/Analyses/CFGReachabilityAnalysis.h" #include "clang/Analysis/AnalysisContext.h" #include "clang/Analysis/CFG.h" +#include "clang/Analysis/CFGStmtMap.h" #include "clang/Analysis/Support/BumpVector.h" #include "llvm/ADT/SmallSet.h" #include "llvm/Support/ErrorHandling.h" @@ -86,6 +88,30 @@ CFG *AnalysisContext::getUnoptimizedCFG() { return completeCFG; } +CFGStmtMap *AnalysisContext::getCFGStmtMap() { + if (cfgStmtMap) + return cfgStmtMap; + + if (CFG *c = getCFG()) { + cfgStmtMap = CFGStmtMap::Build(c, &getParentMap()); + return cfgStmtMap; + } + + return 0; +} + +CFGReachabilityAnalysis *AnalysisContext::getCFGReachablityAnalysis() { + if (CFA) + return CFA; + + if (CFG *c = getCFG()) { + CFA = new CFGReachabilityAnalysis(*c); + return CFA; + } + + return 0; +} + void AnalysisContext::dumpCFG() { getCFG()->dump(getASTContext().getLangOptions()); } @@ -346,10 +372,12 @@ AnalysisContext::getReferencedBlockVars(const BlockDecl *BD) { AnalysisContext::~AnalysisContext() { delete cfg; delete completeCFG; + delete cfgStmtMap; delete liveness; delete relaxedLiveness; delete PM; delete PCA; + delete CFA; delete ReferencedBlockVars; } |