summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis/AnalysisManager.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2009-07-30 09:11:52 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2009-07-30 09:11:52 +0000
commit4b03d4913aecceb78e2a1c4e675e407368577842 (patch)
treea7814f4932f2503bdb508a2df20e7730619dff3c /clang/lib/Analysis/AnalysisManager.cpp
parent92df9c33239b2d90d3041231e2c22d59c33c530c (diff)
downloadbcm5719-llvm-4b03d4913aecceb78e2a1c4e675e407368577842.tar.gz
bcm5719-llvm-4b03d4913aecceb78e2a1c4e675e407368577842.zip
Make AnalysisManager into its own source file and a pure data management class.
Move all components creation code into AnalysisConsumer::DigestAnalyzerOptions(). llvm-svn: 77585
Diffstat (limited to 'clang/lib/Analysis/AnalysisManager.cpp')
-rw-r--r--clang/lib/Analysis/AnalysisManager.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/clang/lib/Analysis/AnalysisManager.cpp b/clang/lib/Analysis/AnalysisManager.cpp
new file mode 100644
index 00000000000..125c00bfee6
--- /dev/null
+++ b/clang/lib/Analysis/AnalysisManager.cpp
@@ -0,0 +1,36 @@
+//== AnalysisManager.cpp - Path sensitive analysis data manager ----*- C++ -*-//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements the AnalysisManager class.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/Analysis/PathSensitive/AnalysisManager.h"
+#include "clang/Basic/SourceManager.h"
+#include "llvm/Support/Streams.h"
+
+using namespace clang;
+
+void AnalysisManager::DisplayFunction() {
+
+ if (DisplayedFunction)
+ return;
+
+ DisplayedFunction = true;
+
+ // FIXME: Is getCodeDecl() always a named decl?
+ if (isa<FunctionDecl>(getCodeDecl()) ||
+ isa<ObjCMethodDecl>(getCodeDecl())) {
+ NamedDecl *ND = cast<NamedDecl>(getCodeDecl());
+ SourceManager &SM = getContext().getSourceManager();
+ llvm::cerr << "ANALYZE: "
+ << SM.getPresumedLoc(ND->getLocation()).getFilename()
+ << ' ' << ND->getNameAsString() << '\n';
+ }
+}
OpenPOWER on IntegriCloud