Update LLVM, picking up new -disable-free flag logic (#5333)

This requires fixing some uses of deprecated APIs.
This commit is contained in:
Chandler Carruth
2025-04-18 03:49:27 +00:00
committed by GitHub
parent 034e374f0a
commit 55705aaef8
4 changed files with 9 additions and 8 deletions
+4 -3
View File
@@ -15,17 +15,18 @@
namespace Carbon {
auto CodeGen::Make(llvm::Module* module, llvm::StringRef target_triple,
auto CodeGen::Make(llvm::Module* module, llvm::StringRef target_triple_str,
llvm::raw_pwrite_stream* errors) -> std::optional<CodeGen> {
std::string error;
const llvm::Target* target =
llvm::TargetRegistry::lookupTarget(target_triple, error);
llvm::TargetRegistry::lookupTarget(target_triple_str, error);
if (!target) {
*errors << "error: invalid target: " << error << "\n";
return {};
}
module->setTargetTriple(llvm::Triple(target_triple));
llvm::Triple target_triple(target_triple_str);
module->setTargetTriple(target_triple);
constexpr llvm::StringLiteral CPU = "generic";
constexpr llvm::StringLiteral Features = "";