Skip to content

Commit

Permalink
Add necessary includes to fix compilation errors and gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonn76 committed Nov 8, 2024
1 parent ab02f25 commit b99ba77
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode/
2 changes: 1 addition & 1 deletion llvm-passes/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ CMakeFiles/
.clangd
.ninja_deps
.ninja_log

.vscode/
build/
1 change: 1 addition & 0 deletions llvm-passes/lib/AddConstPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "AddConst.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/Constants.h"

using namespace llvm;

Expand Down
8 changes: 7 additions & 1 deletion llvm-passes/tool/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
#include "llvm/IRReader/IRReader.h"
#include "llvm/Passes/PassBuilder.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Function.h"



using namespace llvm;

Expand Down Expand Up @@ -72,7 +77,8 @@ int main(int Argc, char **Argv) {
// Create a FunctionPassManager and add the AddConstPass to it:
addconst::AddConstPass Pass;
FunctionPassManager FPM;
FPM.addPass(Pass);
FPM.addPass(std::move(Pass));


// Create a FunctionAnalysisManager and add the AddConstAnalysis to it:
FunctionAnalysisManager FAM;
Expand Down

0 comments on commit b99ba77

Please sign in to comment.