summaryrefslogtreecommitdiffstats
path: root/tools/wpa
diff options
context:
space:
mode:
Diffstat (limited to 'tools/wpa')
-rw-r--r--tools/wpa/CMakeLists.txt20
-rw-r--r--tools/wpa/Makefile16
-rw-r--r--tools/wpa/clang-wpa.cpp62
3 files changed, 0 insertions, 98 deletions
diff --git a/tools/wpa/CMakeLists.txt b/tools/wpa/CMakeLists.txt
deleted file mode 100644
index 5553474..0000000
--- a/tools/wpa/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-set(LLVM_NO_RTTI 1)
-
-set( LLVM_USED_LIBS
- clangFrontend
- clangAnalysis
- clangSema
- clangAST
- clangLex
- clangBasic
- clangIndex
- )
-
-set( LLVM_LINK_COMPONENTS
- mc
- )
-
-add_clang_executable(clang-wpa
- clang-wpa.cpp
- )
-add_dependencies(clang-wpa clang-headers)
diff --git a/tools/wpa/Makefile b/tools/wpa/Makefile
deleted file mode 100644
index 01dbd11..0000000
--- a/tools/wpa/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-LEVEL = ../../../..
-
-TOOLNAME = clang-wpa
-CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
-CXXFLAGS = -fno-rtti
-NO_INSTALL = 1
-
-# No plugins, optimize startup time.
-TOOL_NO_EXPORTS = 1
-
-include $(LEVEL)/Makefile.config
-
-LINK_COMPONENTS := bitreader mc
-USEDLIBS = clangFrontend.a clangSema.a clangAST.a clangLex.a clangBasic.a clangAnalysis.a clangIndex.a
-
-include $(LLVM_SRC_ROOT)/Makefile.rules
diff --git a/tools/wpa/clang-wpa.cpp b/tools/wpa/clang-wpa.cpp
deleted file mode 100644
index 346634b..0000000
--- a/tools/wpa/clang-wpa.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-//===--- clang-wpa.cpp - clang whole program analyzer ---------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This tool reads a sequence of precompiled AST files, and do various
-// cross translation unit analyses.
-//
-//===----------------------------------------------------------------------===//
-
-#include "clang/Analysis/CallGraph.h"
-#include "clang/Frontend/ASTUnit.h"
-#include "clang/Basic/FileManager.h"
-#include "clang/Basic/SourceManager.h"
-#include "clang/Frontend/TextDiagnosticBuffer.h"
-#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/raw_ostream.h"
-using namespace clang;
-using namespace idx;
-
-static llvm::cl::list<std::string>
-InputFilenames(llvm::cl::Positional, llvm::cl::desc("<input AST files>"));
-
-int main(int argc, char **argv) {
- llvm::cl::ParseCommandLineOptions(argc, argv, "clang-wpa");
- FileManager FileMgr;
- std::vector<ASTUnit*> ASTUnits;
-
- if (InputFilenames.empty())
- return 0;
-
- TextDiagnosticBuffer DiagClient;
- Diagnostic Diags(&DiagClient);
-
- for (unsigned i = 0, e = InputFilenames.size(); i != e; ++i) {
- const std::string &InFile = InputFilenames[i];
-
- std::string ErrMsg;
- llvm::OwningPtr<ASTUnit> AST;
-
- AST.reset(ASTUnit::LoadFromPCHFile(InFile, Diags, FileMgr, &ErrMsg));
-
- if (!AST) {
- llvm::errs() << "[" << InFile << "] error: " << ErrMsg << '\n';
- return 1;
- }
-
- ASTUnits.push_back(AST.take());
- }
-
- llvm::OwningPtr<CallGraph> CG;
- CG.reset(new CallGraph());
-
- for (unsigned i = 0, e = ASTUnits.size(); i != e; ++i)
- CG->addTU(ASTUnits[i]->getASTContext());
-
- CG->ViewCallGraph();
-}
OpenPOWER on IntegriCloud