Code Monkey home page Code Monkey logo

clang-mapper's Introduction

This project was deprecated, please go to Drafter

clang-mapper

clang-mapper is a standalone tool build for automatic generate Call Graph in iOS project

中文版

Compile the source code

You can just use the pre-compiled binary file in the relaese folder (Build with Clang5.0.0). Or you can compile the source code in clang-mapper folder by yourself

Follow the guide in Tutorial for building tools using LibTooling and LibASTMatchers.

  1. Download the LLVM and Clang source code, then copy the folder clang-mapper to llvm/tools/clang/tools/.
  2. Edit the file llvm/tools/clang/tools/CMakeLists.txt and add add_clang_subdirectory(clang-mapper) to the end.
  3. Then build it with cmake and you will get a binary file clang-mapper in the bin folder, now copy it to /usr/local/bin/

How to use

Before you use clang-mapper, make sure you have installed Graphviz.

Generate Call Graph

clang-mapper accept an arbitrary number of file or folder arguments, then it wil automatically deal with all code files and generate Call Graph in current path.

For example, i make a folder CallGraph in the same path as AFNetworking

$ mkdir CallGraph

Then run command in CallGraph folder

$ cd CallGraph
$ clang-mapper ../AFNetworking --

The clang-mapper will traverse the ../AFNetworking folder and generate all Call Graph in CallGraph folder All Call Graph AFHTTPSessionManager Call Graph

Optional Command line Option

  • -graph-only : Only generate .png files, this is a default option
  • -dot-only : Only generate .dot files
  • -dot-graph : Generate both .png and .dot files
  • -ignore-header : Ignore .h file in the given folder

clang-mapper's People

Contributors

l-zephyr avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.