Skip to content

Instantly share code, notes, and snippets.

Created Aug 9, 2014
What would you like to do?
Test file pass
#include "llvm/Pass.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
class Test : public FunctionPass {
static char ID;
Test() : FunctionPass(ID) {}
virtual bool runOnFunction(Function &function) {
errs() << function.getName() << "\n";
return false;
virtual void getAnalysisUsage(AnalysisUsage &au) const {}
char Test::ID = 0;
static RegisterPass<Test> X("test", "Test!");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment