-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Update LLVM and update APIs #6147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1066,9 +1066,10 @@ auto CompileSubcommand::Run(DriverEnv& driver_env) -> DriverResult { | |
| } | ||
|
|
||
| // Validate the target before passing it to Clang. | ||
| llvm::Triple target_triple(options_.codegen_options.target); | ||
| std::string target_error; | ||
| const llvm::Target* target = llvm::TargetRegistry::lookupTarget( | ||
| llvm::Triple(options_.codegen_options.target), target_error); | ||
| const llvm::Target* target = | ||
| llvm::TargetRegistry::lookupTarget(target_triple, target_error); | ||
|
Comment on lines
+1069
to
+1072
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No objection to the change, but I'm surprised this was necessary -- it looks like the old code would have still compiled and worked. Did it not?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, looks like this issue was fixed in 5714f4d and I guess this PR was written against an older version. Nothing to see here, then. |
||
| if (!target) { | ||
| CARBON_DIAGNOSTIC(CompileTargetInvalid, Error, "invalid target: {0}", | ||
| std::string); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the version of LLVM we're moving to doesn't have this rename yet (llvm/llvm-project@b516dcc landed on October 15, but this PR is picking an LLVM revision from September).