Skip to content

Commit

Permalink
silence clang warning for arm
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninja3047 committed Oct 6, 2022
1 parent b0c5757 commit b67c04c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/Decompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ Result<DecompilationResult, DecompilationError> Decompile(
std::vector<std::string> args{"-Wno-pointer-to-int-cast",
"-Wno-pointer-sign", "-target",
module->getTargetTriple()};
// Silence clang warning
// warning: unknown platform, assumming -mfloat-abi=soft
const auto& triple{llvm::Triple(module->getTargetTriple())};
if (triple.isARM()) {
args.push_back("-mfloat-abi=soft");
}
auto ast_unit{clang::tooling::buildASTFromCodeWithArgs("", args, "out.c")};
rellic::DecompilationContext dec_ctx(*ast_unit);

Expand Down Expand Up @@ -167,4 +173,4 @@ Result<DecompilationResult, DecompilationError> Decompile(
return Result<DecompilationResult, DecompilationError>(std::move(error));
}
}
} // namespace rellic
} // namespace rellic

0 comments on commit b67c04c

Please sign in to comment.