Skip to content

Commit

Permalink
add clang-16 support
Browse files Browse the repository at this point in the history
  • Loading branch information
I747530 committed Nov 9, 2024
1 parent 42f05a6 commit 2da969d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/clang_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def compile_to_llvm_for_analysis(c_filepath: str , output_file_folder: str, outp
file_to_compile: str = c_filepath
output_file: str = os.path.join(output_file_folder, f"{output_name}.bc")

commands: List[str] = ["clang", "-emit-llvm", "-Xclang","-disable-O0-optnone", "-c", file_to_compile, "-o", output_file] + extra_flags
commands: List[str] = ["clang", "-emit-llvm", "-Xclang","-disable-O0-optnone", "-Wno-implicit-function-declaration", "-c", file_to_compile, "-o", output_file] + extra_flags
for lib in extra_libs:
commands.append(f"-I{lib}")
subprocess.run(commands, check=True)
Expand Down
2 changes: 1 addition & 1 deletion src/inliner.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def assemble_bitcode(input_file, output_file):
run_command(f"llvm-as {input_file} -o {output_file}")

def inline_bitcode(input_file, output_file):
run_command(f"opt -always-inline -inline -inline-threshold=10000000 {input_file} -o {output_file}")
run_command(f'opt -passes="always-inline,inline" -inline-threshold=10000000 {input_file} -o {output_file}')

def generate_cfg(input_file):
run_command(f"opt -dot-cfg {input_file}")
Expand Down

0 comments on commit 2da969d

Please sign in to comment.