mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-15 02:28:33 +00:00
Update LLVM, picking up new -disable-free flag logic (#5333)
This requires fixing some uses of deprecated APIs.
This commit is contained in:
1 parent
034e374f0a
commit
55705aaef8
4 files changed
+9
-8
No files matched your search
@@ -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 = "";
|
||||
|
||||
Reference in new issue
Block a user