Skip to content

[Flang] Remove unused triple variable. NFC #77275

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

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

lukel97
Copy link
Contributor

@lukel97 lukel97 commented Jan 8, 2024

I'm not sure why we don't get an unused variable warning, but triple doesn't
seem to be used after 898db11.

I'm not sure why we don't get an unused variable warning, but triple doesn't
seem to be used after 898db11.
@llvmbot llvmbot added flang:driver flang Flang issues not falling into any other category labels Jan 8, 2024
@llvmbot
Copy link
Member

llvmbot commented Jan 8, 2024

@llvm/pr-subscribers-flang-driver

Author: Luke Lau (lukel97)

Changes

I'm not sure why we don't get an unused variable warning, but triple doesn't
seem to be used after 898db11.


Full diff: https://github.com/llvm/llvm-project/pull/77275.diff

1 Files Affected:

  • (modified) flang/lib/Frontend/FrontendActions.cpp (-3)
diff --git a/flang/lib/Frontend/FrontendActions.cpp b/flang/lib/Frontend/FrontendActions.cpp
index d4a3e164d20739..1f8174bdcf220c 100644
--- a/flang/lib/Frontend/FrontendActions.cpp
+++ b/flang/lib/Frontend/FrontendActions.cpp
@@ -743,9 +743,6 @@ void CodeGenAction::generateLLVMIR() {
 
   MLIRToLLVMPassPipelineConfig config(level, opts);
 
-  const auto targetOpts = ci.getInvocation().getTargetOpts();
-  const llvm::Triple triple(targetOpts.triple);
-
   if (auto vsr = getVScaleRange(ci)) {
     config.VScaleMin = vsr->first;
     config.VScaleMax = vsr->second;

Copy link
Contributor

@tblah tblah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the cleanup

@lukel97 lukel97 merged commit c8c5256 into llvm:main Jan 8, 2024
justinfargnoli pushed a commit to justinfargnoli/llvm-project that referenced this pull request Jan 28, 2024
I'm not sure why we don't get an unused variable warning, but triple
doesn't
seem to be used after 898db11.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:driver flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants