opnsense-src/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp

489 lines
16 KiB
C++
Raw Normal View History

2009-06-02 13:58:47 -04:00
//===--- AnalysisConsumer.cpp - ASTConsumer for running Analyses ----------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// "Meta" ASTConsumer for running different source analyses.
//
//===----------------------------------------------------------------------===//
#include "AnalysisConsumer.h"
2009-06-02 13:58:47 -04:00
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/Decl.h"
2010-01-01 05:34:51 -05:00
#include "clang/AST/DeclCXX.h"
2009-06-02 13:58:47 -04:00
#include "clang/AST/DeclObjC.h"
2009-11-05 12:18:09 -05:00
#include "clang/AST/ParentMap.h"
#include "clang/Analysis/CFG.h"
#include "clang/StaticAnalyzer/Frontend/CheckerRegistration.h"
#include "clang/StaticAnalyzer/Core/CheckerManager.h"
#include "clang/StaticAnalyzer/Checkers/LocalCheckers.h"
#include "clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/TransferFuncs.h"
#include "clang/StaticAnalyzer/Core/PathDiagnosticClients.h"
2009-11-05 12:18:09 -05:00
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
2010-07-13 13:21:42 -04:00
#include "clang/Frontend/AnalyzerOptions.h"
2009-11-05 12:18:09 -05:00
#include "clang/Lex/Preprocessor.h"
2009-06-02 13:58:47 -04:00
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Program.h"
2009-10-14 14:03:49 -04:00
#include "llvm/ADT/OwningPtr.h"
2009-06-02 13:58:47 -04:00
using namespace clang;
using namespace ento;
2009-06-02 13:58:47 -04:00
2009-10-14 14:03:49 -04:00
static ExplodedNode::Auditor* CreateUbiViz();
2009-06-02 13:58:47 -04:00
2009-10-14 14:03:49 -04:00
//===----------------------------------------------------------------------===//
// Special PathDiagnosticClients.
//===----------------------------------------------------------------------===//
static PathDiagnosticClient*
createPlistHTMLDiagnosticClient(const std::string& prefix,
2009-11-05 12:18:09 -05:00
const Preprocessor &PP) {
PathDiagnosticClient *PD =
createHTMLDiagnosticClient(llvm::sys::path::parent_path(prefix), PP);
return createPlistDiagnosticClient(prefix, PP, PD);
2009-10-14 14:03:49 -04:00
}
2009-06-02 13:58:47 -04:00
//===----------------------------------------------------------------------===//
// AnalysisConsumer declaration.
//===----------------------------------------------------------------------===//
namespace {
2010-05-04 12:12:48 -04:00
class AnalysisConsumer : public ASTConsumer {
2009-11-18 09:59:57 -05:00
public:
ASTContext* Ctx;
const Preprocessor &PP;
const std::string OutDir;
AnalyzerOptions Opts;
// PD is owned by AnalysisManager.
PathDiagnosticClient *PD;
StoreManagerCreator CreateStoreMgr;
ConstraintManagerCreator CreateConstraintMgr;
llvm::OwningPtr<CheckerManager> checkerMgr;
2009-11-18 09:59:57 -05:00
llvm::OwningPtr<AnalysisManager> Mgr;
AnalysisConsumer(const Preprocessor& pp,
const std::string& outdir,
const AnalyzerOptions& opts)
: Ctx(0), PP(pp), OutDir(outdir),
2010-07-13 13:21:42 -04:00
Opts(opts), PD(0) {
2009-11-18 09:59:57 -05:00
DigestAnalyzerOptions();
}
2009-06-02 13:58:47 -04:00
2009-11-18 09:59:57 -05:00
void DigestAnalyzerOptions() {
// Create the PathDiagnosticClient.
if (!OutDir.empty()) {
switch (Opts.AnalysisDiagOpt) {
default:
2009-10-14 14:03:49 -04:00
#define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATEFN, AUTOCREATE) \
2009-11-18 09:59:57 -05:00
case PD_##NAME: PD = CREATEFN(OutDir, PP); break;
2009-06-02 13:58:47 -04:00
#include "clang/Frontend/Analyses.def"
}
} else if (Opts.AnalysisDiagOpt == PD_TEXT) {
// Create the text client even without a specified output file since
// it just uses diagnostic notes.
PD = createTextPathDiagnosticClient("", PP);
2009-11-18 09:59:57 -05:00
}
2009-06-02 13:58:47 -04:00
2009-11-18 09:59:57 -05:00
// Create the analyzer component creators.
switch (Opts.AnalysisStoreOpt) {
default:
assert(0 && "Unknown store manager.");
2009-10-14 14:03:49 -04:00
#define ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATEFN) \
case NAME##Model: CreateStoreMgr = CREATEFN; break;
2009-06-02 13:58:47 -04:00
#include "clang/Frontend/Analyses.def"
2009-11-18 09:59:57 -05:00
}
2009-06-02 13:58:47 -04:00
switch (Opts.AnalysisConstraintsOpt) {
default:
assert(0 && "Unknown store manager.");
2009-06-02 13:58:47 -04:00
#define ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATEFN) \
case NAME##Model: CreateConstraintMgr = CREATEFN; break;
2009-06-02 13:58:47 -04:00
#include "clang/Frontend/Analyses.def"
2009-10-14 14:03:49 -04:00
}
2009-11-18 09:59:57 -05:00
}
2010-02-16 04:31:36 -05:00
2009-11-18 09:59:57 -05:00
void DisplayFunction(const Decl *D) {
2010-07-13 13:21:42 -04:00
if (!Opts.AnalyzerDisplayProgress)
2009-11-18 09:59:57 -05:00
return;
2010-02-16 04:31:36 -05:00
2009-12-15 13:49:47 -05:00
SourceManager &SM = Mgr->getASTContext().getSourceManager();
PresumedLoc Loc = SM.getPresumedLoc(D->getLocation());
if (Loc.isValid()) {
llvm::errs() << "ANALYZE: " << Loc.getFilename();
2009-12-15 13:49:47 -05:00
if (isa<FunctionDecl>(D) || isa<ObjCMethodDecl>(D)) {
const NamedDecl *ND = cast<NamedDecl>(D);
llvm::errs() << ' ' << ND << '\n';
}
else if (isa<BlockDecl>(D)) {
llvm::errs() << ' ' << "block(line:" << Loc.getLine() << ",col:"
<< Loc.getColumn() << '\n';
}
else if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(D)) {
Selector S = MD->getSelector();
llvm::errs() << ' ' << S.getAsString();
}
2009-10-14 14:03:49 -04:00
}
2009-11-18 09:59:57 -05:00
}
2009-10-14 14:03:49 -04:00
2009-11-18 09:59:57 -05:00
virtual void Initialize(ASTContext &Context) {
Ctx = &Context;
checkerMgr.reset(registerCheckers(Opts, PP.getLangOptions(),
PP.getDiagnostics()));
2009-11-18 09:59:57 -05:00
Mgr.reset(new AnalysisManager(*Ctx, PP.getDiagnostics(),
PP.getLangOptions(), PD,
CreateStoreMgr, CreateConstraintMgr,
checkerMgr.get(),
/* Indexer */ 0,
2010-05-27 11:17:06 -04:00
Opts.MaxNodes, Opts.MaxLoop,
2009-11-18 09:59:57 -05:00
Opts.VisualizeEGDot, Opts.VisualizeEGUbi,
Opts.PurgeDead, Opts.EagerlyAssume,
Opts.TrimGraph, Opts.InlineCall,
Opts.UnoptimizedCFG, Opts.CFGAddImplicitDtors,
Opts.CFGAddInitializers,
Opts.EagerlyTrimEGraph));
2009-11-18 09:59:57 -05:00
}
2009-06-02 13:58:47 -04:00
2009-11-18 09:59:57 -05:00
virtual void HandleTranslationUnit(ASTContext &C);
void HandleDeclContext(ASTContext &C, DeclContext *dc);
void HandleCode(Decl *D);
2009-11-18 09:59:57 -05:00
};
2009-06-02 13:58:47 -04:00
} // end anonymous namespace
//===----------------------------------------------------------------------===//
// AnalysisConsumer implementation.
//===----------------------------------------------------------------------===//
void AnalysisConsumer::HandleDeclContext(ASTContext &C, DeclContext *dc) {
BugReporter BR(*Mgr);
for (DeclContext::decl_iterator I = dc->decls_begin(), E = dc->decls_end();
2010-05-04 12:12:48 -04:00
I != E; ++I) {
Decl *D = *I;
checkerMgr->runCheckersOnASTDecl(D, *Mgr, BR);
2010-05-04 12:12:48 -04:00
switch (D->getKind()) {
case Decl::Namespace: {
HandleDeclContext(C, cast<NamespaceDecl>(D));
break;
2010-05-04 12:12:48 -04:00
}
case Decl::CXXConstructor:
case Decl::CXXDestructor:
case Decl::CXXConversion:
case Decl::CXXMethod:
case Decl::Function: {
FunctionDecl* FD = cast<FunctionDecl>(D);
// We skip function template definitions, as their semantics is
// only determined when they are instantiated.
if (FD->isThisDeclarationADefinition() &&
!FD->isDependentContext()) {
2010-05-04 12:12:48 -04:00
if (!Opts.AnalyzeSpecificFunction.empty() &&
FD->getDeclName().getAsString() != Opts.AnalyzeSpecificFunction)
2010-05-04 12:12:48 -04:00
break;
DisplayFunction(FD);
HandleCode(FD);
2010-05-04 12:12:48 -04:00
}
break;
2010-05-04 12:12:48 -04:00
}
case Decl::ObjCCategoryImpl:
case Decl::ObjCImplementation: {
ObjCImplDecl* ID = cast<ObjCImplDecl>(*I);
HandleCode(ID);
for (ObjCContainerDecl::method_iterator MI = ID->meth_begin(),
ME = ID->meth_end(); MI != ME; ++MI) {
checkerMgr->runCheckersOnASTDecl(*MI, *Mgr, BR);
if ((*MI)->isThisDeclarationADefinition()) {
if (!Opts.AnalyzeSpecificFunction.empty() &&
Opts.AnalyzeSpecificFunction !=
(*MI)->getSelector().getAsString())
break;
DisplayFunction(*MI);
HandleCode(*MI);
}
}
break;
}
default:
break;
2010-05-04 12:12:48 -04:00
}
}
}
2009-06-02 13:58:47 -04:00
void AnalysisConsumer::HandleTranslationUnit(ASTContext &C) {
BugReporter BR(*Mgr);
TranslationUnitDecl *TU = C.getTranslationUnitDecl();
checkerMgr->runCheckersOnASTDecl(TU, *Mgr, BR);
HandleDeclContext(C, TU);
2009-06-02 13:58:47 -04:00
// After all decls handled, run checkers on the entire TranslationUnit.
checkerMgr->runCheckersOnEndOfTranslationUnit(TU, *Mgr, BR);
2009-10-14 14:03:49 -04:00
// Explicitly destroy the PathDiagnosticClient. This will flush its output.
// FIXME: This should be replaced with something that doesn't rely on
2009-12-15 13:49:47 -05:00
// side-effects in PathDiagnosticClient's destructor. This is required when
// used with option -disable-free.
2009-10-14 14:03:49 -04:00
Mgr.reset(NULL);
2009-06-02 13:58:47 -04:00
}
2009-12-15 13:49:47 -05:00
static void FindBlocks(DeclContext *D, llvm::SmallVectorImpl<Decl*> &WL) {
if (BlockDecl *BD = dyn_cast<BlockDecl>(D))
WL.push_back(BD);
2010-02-16 04:31:36 -05:00
2009-12-15 13:49:47 -05:00
for (DeclContext::decl_iterator I = D->decls_begin(), E = D->decls_end();
I!=E; ++I)
if (DeclContext *DC = dyn_cast<DeclContext>(*I))
FindBlocks(DC, WL);
}
static void ActionObjCMemChecker(AnalysisConsumer &C, AnalysisManager& mgr,
Decl *D);
void AnalysisConsumer::HandleCode(Decl *D) {
2009-10-14 14:03:49 -04:00
// Don't run the actions if an error has occurred with parsing the file.
2010-05-04 12:12:48 -04:00
Diagnostic &Diags = PP.getDiagnostics();
if (Diags.hasErrorOccurred() || Diags.hasFatalErrorOccurred())
2009-06-02 13:58:47 -04:00
return;
// Don't run the actions on declarations in header files unless
// otherwise specified.
2010-07-13 13:21:42 -04:00
SourceManager &SM = Ctx->getSourceManager();
SourceLocation SL = SM.getInstantiationLoc(D->getLocation());
if (!Opts.AnalyzeAll && !SM.isFromMainFile(SL))
2009-10-14 14:03:49 -04:00
return;
2009-06-02 13:58:47 -04:00
2009-10-23 10:22:18 -04:00
// Clear the AnalysisManager of old AnalysisContexts.
Mgr->ClearContexts();
2010-02-16 04:31:36 -05:00
2009-10-14 14:03:49 -04:00
// Dispatch on the actions.
2009-12-15 13:49:47 -05:00
llvm::SmallVector<Decl*, 10> WL;
WL.push_back(D);
2010-02-16 04:31:36 -05:00
2010-07-13 13:21:42 -04:00
if (D->hasBody() && Opts.AnalyzeNestedBlocks)
2009-12-15 13:49:47 -05:00
FindBlocks(cast<DeclContext>(D), WL);
2010-02-16 04:31:36 -05:00
BugReporter BR(*Mgr);
for (llvm::SmallVectorImpl<Decl*>::iterator WI=WL.begin(), WE=WL.end();
WI != WE; ++WI)
if ((*WI)->hasBody()) {
checkerMgr->runCheckersOnASTBody(*WI, *Mgr, BR);
if (checkerMgr->hasPathSensitiveCheckers())
ActionObjCMemChecker(*this, *Mgr, *WI);
}
2009-06-02 13:58:47 -04:00
}
//===----------------------------------------------------------------------===//
// Path-sensitive checking.
2009-06-02 13:58:47 -04:00
//===----------------------------------------------------------------------===//
static void ActionExprEngine(AnalysisConsumer &C, AnalysisManager& mgr,
2010-02-16 04:31:36 -05:00
Decl *D,
TransferFuncs* tf) {
2009-10-14 14:03:49 -04:00
llvm::OwningPtr<TransferFuncs> TF(tf);
2009-06-02 13:58:47 -04:00
2009-10-14 14:03:49 -04:00
// Construct the analysis engine. We first query for the LiveVariables
// information to see if the CFG is valid.
// FIXME: Inter-procedural analysis will need to handle invalid CFGs.
if (!mgr.getLiveVariables(D))
2010-02-16 04:31:36 -05:00
return;
ExprEngine Eng(mgr, TF.take());
2010-02-16 04:31:36 -05:00
2009-06-02 13:58:47 -04:00
// Set the graph auditor.
2009-10-14 14:03:49 -04:00
llvm::OwningPtr<ExplodedNode::Auditor> Auditor;
2009-06-02 13:58:47 -04:00
if (mgr.shouldVisualizeUbigraph()) {
Auditor.reset(CreateUbiViz());
2009-10-14 14:03:49 -04:00
ExplodedNode::SetAuditor(Auditor.get());
2009-06-02 13:58:47 -04:00
}
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
// Execute the worklist algorithm.
Eng.ExecuteWorkList(mgr.getStackFrame(D, 0), mgr.getMaxNodes());
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
// Release the auditor (if any) so that it doesn't monitor the graph
// created BugReporter.
2009-10-14 14:03:49 -04:00
ExplodedNode::SetAuditor(0);
2009-06-02 13:58:47 -04:00
// Visualize the exploded graph.
if (mgr.shouldVisualizeGraphviz())
Eng.ViewGraph(mgr.shouldTrimGraph());
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
// Display warnings.
Eng.getBugReporter().FlushReports();
}
2010-02-16 04:31:36 -05:00
static void ActionObjCMemCheckerAux(AnalysisConsumer &C, AnalysisManager& mgr,
2009-11-18 09:59:57 -05:00
Decl *D, bool GCEnabled) {
2009-10-14 14:03:49 -04:00
TransferFuncs* TF = MakeCFRefCountTF(mgr.getASTContext(),
2009-06-02 13:58:47 -04:00
GCEnabled,
mgr.getLangOptions());
2009-10-14 14:03:49 -04:00
ActionExprEngine(C, mgr, D, TF);
2009-06-02 13:58:47 -04:00
}
2010-02-16 04:31:36 -05:00
static void ActionObjCMemChecker(AnalysisConsumer &C, AnalysisManager& mgr,
2009-11-18 09:59:57 -05:00
Decl *D) {
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
switch (mgr.getLangOptions().getGCMode()) {
2010-01-23 06:10:26 -05:00
default:
assert (false && "Invalid GC mode.");
case LangOptions::NonGC:
2010-02-16 04:31:36 -05:00
ActionObjCMemCheckerAux(C, mgr, D, false);
2010-01-23 06:10:26 -05:00
break;
case LangOptions::GCOnly:
2010-02-16 04:31:36 -05:00
ActionObjCMemCheckerAux(C, mgr, D, true);
2010-01-23 06:10:26 -05:00
break;
case LangOptions::HybridGC:
2010-02-16 04:31:36 -05:00
ActionObjCMemCheckerAux(C, mgr, D, false);
ActionObjCMemCheckerAux(C, mgr, D, true);
2010-01-23 06:10:26 -05:00
break;
2009-06-02 13:58:47 -04:00
}
}
//===----------------------------------------------------------------------===//
// AnalysisConsumer creation.
//===----------------------------------------------------------------------===//
ASTConsumer* ento::CreateAnalysisConsumer(const Preprocessor& pp,
2009-06-02 13:58:47 -04:00
const std::string& OutDir,
const AnalyzerOptions& Opts) {
2009-11-05 12:18:09 -05:00
llvm::OwningPtr<AnalysisConsumer> C(new AnalysisConsumer(pp, OutDir, Opts));
2009-06-02 13:58:47 -04:00
// Last, disable the effects of '-Werror' when using the AnalysisConsumer.
2009-11-05 12:18:09 -05:00
pp.getDiagnostics().setWarningsAsErrors(false);
2009-06-02 13:58:47 -04:00
return C.take();
}
//===----------------------------------------------------------------------===//
// Ubigraph Visualization. FIXME: Move to separate file.
//===----------------------------------------------------------------------===//
namespace {
2009-10-14 14:03:49 -04:00
class UbigraphViz : public ExplodedNode::Auditor {
2009-06-02 13:58:47 -04:00
llvm::OwningPtr<llvm::raw_ostream> Out;
llvm::sys::Path Dir, Filename;
unsigned Cntr;
typedef llvm::DenseMap<void*,unsigned> VMap;
VMap M;
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
public:
UbigraphViz(llvm::raw_ostream* out, llvm::sys::Path& dir,
llvm::sys::Path& filename);
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
~UbigraphViz();
2009-10-14 14:03:49 -04:00
virtual void AddEdge(ExplodedNode* Src, ExplodedNode* Dst);
2009-06-02 13:58:47 -04:00
};
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
} // end anonymous namespace
2009-10-14 14:03:49 -04:00
static ExplodedNode::Auditor* CreateUbiViz() {
2009-06-02 13:58:47 -04:00
std::string ErrMsg;
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
llvm::sys::Path Dir = llvm::sys::Path::GetTemporaryDirectory(&ErrMsg);
if (!ErrMsg.empty())
return 0;
llvm::sys::Path Filename = Dir;
Filename.appendComponent("llvm_ubi");
Filename.makeUnique(true,&ErrMsg);
if (!ErrMsg.empty())
return 0;
2009-10-14 14:03:49 -04:00
llvm::errs() << "Writing '" << Filename.str() << "'.\n";
2009-06-02 13:58:47 -04:00
llvm::OwningPtr<llvm::raw_fd_ostream> Stream;
2009-10-14 14:03:49 -04:00
Stream.reset(new llvm::raw_fd_ostream(Filename.c_str(), ErrMsg));
2009-06-02 13:58:47 -04:00
if (!ErrMsg.empty())
return 0;
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
return new UbigraphViz(Stream.take(), Dir, Filename);
}
2009-10-14 14:03:49 -04:00
void UbigraphViz::AddEdge(ExplodedNode* Src, ExplodedNode* Dst) {
2009-06-02 13:58:47 -04:00
assert (Src != Dst && "Self-edges are not allowed.");
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
// Lookup the Src. If it is a new node, it's a root.
VMap::iterator SrcI= M.find(Src);
unsigned SrcID;
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
if (SrcI == M.end()) {
M[Src] = SrcID = Cntr++;
*Out << "('vertex', " << SrcID << ", ('color','#00ff00'))\n";
}
else
SrcID = SrcI->second;
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
// Lookup the Dst.
VMap::iterator DstI= M.find(Dst);
unsigned DstID;
if (DstI == M.end()) {
M[Dst] = DstID = Cntr++;
*Out << "('vertex', " << DstID << ")\n";
}
else {
// We have hit DstID before. Change its style to reflect a cache hit.
DstID = DstI->second;
*Out << "('change_vertex_style', " << DstID << ", 1)\n";
}
// Add the edge.
2009-10-14 14:03:49 -04:00
*Out << "('edge', " << SrcID << ", " << DstID
2009-06-02 13:58:47 -04:00
<< ", ('arrow','true'), ('oriented', 'true'))\n";
}
UbigraphViz::UbigraphViz(llvm::raw_ostream* out, llvm::sys::Path& dir,
llvm::sys::Path& filename)
: Out(out), Dir(dir), Filename(filename), Cntr(0) {
*Out << "('vertex_style_attribute', 0, ('shape', 'icosahedron'))\n";
*Out << "('vertex_style', 1, 0, ('shape', 'sphere'), ('color', '#ffcc66'),"
" ('size', '1.5'))\n";
}
UbigraphViz::~UbigraphViz() {
Out.reset(0);
2009-10-14 14:03:49 -04:00
llvm::errs() << "Running 'ubiviz' program... ";
2009-06-02 13:58:47 -04:00
std::string ErrMsg;
llvm::sys::Path Ubiviz = llvm::sys::Program::FindProgramByName("ubiviz");
std::vector<const char*> args;
args.push_back(Ubiviz.c_str());
args.push_back(Filename.c_str());
args.push_back(0);
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
if (llvm::sys::Program::ExecuteAndWait(Ubiviz, &args[0],0,0,0,0,&ErrMsg)) {
2009-10-14 14:03:49 -04:00
llvm::errs() << "Error viewing graph: " << ErrMsg << "\n";
2009-06-02 13:58:47 -04:00
}
2009-10-14 14:03:49 -04:00
2009-06-02 13:58:47 -04:00
// Delete the directory.
2009-10-14 14:03:49 -04:00
Dir.eraseFromDisk(true);
2009-06-02 13:58:47 -04:00
}