GithubHelp home page GithubHelp logo

jbulow / clang-tutorial Goto Github PK

View Code? Open in Web Editor NEW

This project forked from loarabia/clang-tutorial

0.0 2.0 0.0 146 KB

A collection of code samples showing usage of clang and llvm as a library

License: Other

clang-tutorial's Introduction

About

This is a collection of tutorials showing off how to use core Clang types. It is based directly on two older tutorials which no longer built due to code rot.

  1. tutorial 1 by Nico Weber - 9/28/2008
  2. tutorial 2 by Justin LaPre at Rensselaer Polytechnic Institute - 10/20/2009
  3. tutorial 3 by Larry Olson - 4/14/2012

This particular set of tutorials tracks the llvm / clang mainline and is updated semi-regularly to account for llvm / clang API changes.

See contents of the links above for a walkthrough of what these tutorials are doing.

Other Options

The Clang team has been hard at work making it easier to write tools using Clang. There are 4 options for developing tools using clang and llvm infrastructure.

Latest Stable LLVM / Clang (v3.2)

The master branch tracks recent commits to the clang and llvm svn. The tutorial assumes you have grabbed a copy of both llvm and clang by following these instructions and that have installed the the resulting binaries by running make install. If you want the latest public release, then checkout the 3.2 branch.

git clone [email protected]:loarabia/Clang-tutorial.git
git checkout 3.2

CI tutorials

The tutorials prefixed with CI are the same as the original tutorials but use the CompilerInstance object and its helper methods to perform the same tasks as the original tutorials. For the most part, this makes the code much more compact.

Windows Build

Note on the Windows build: Currently the paths are hardcoded. Please see the SharedBuild.targets file inside of the SharedBuild project to update the path for your specific LLVM and CLANG install.

In particular, the LLVMLibsDirs property and the LLVMIncludes property should be updated.

Contact Me

For any questions, please ping me via my github account. Changes and additions are always welcome.

clang-tutorial's People

Contributors

aseeda avatar bvdberg avatar chisophugis avatar loarabia avatar rpavlik avatar scriptdevil 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.