Skip to content

[NFC] [llvm] remove unused function #126613

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

Closed

Conversation

fmayer
Copy link
Contributor

@fmayer fmayer commented Feb 10, 2025

Fix build error caused by #126544

Created using spr 1.3.4
@llvmbot
Copy link
Member

llvmbot commented Feb 10, 2025

@llvm/pr-subscribers-backend-nvptx

Author: Florian Mayer (fmayer)

Changes

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

1 Files Affected:

  • (modified) llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp (-7)
diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
index 68a0f4cb0ade9e..75d930d9f7b6f9 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
@@ -761,13 +761,6 @@ void NVPTXAsmPrinter::emitDeclarations(const Module &M, raw_ostream &O) {
     emitAliasDeclaration(&GA, O);
 }
 
-static bool isEmptyXXStructor(GlobalVariable *GV) {
-  if (!GV) return true;
-  const ConstantArray *InitList = dyn_cast<ConstantArray>(GV->getInitializer());
-  if (!InitList) return true;  // Not an array; we don't know how to parse.
-  return InitList->getNumOperands() == 0;
-}
-
 void NVPTXAsmPrinter::emitStartOfAsmFile(Module &M) {
   // Construct a default subtarget off of the TargetMachine defaults. The
   // rest of NVPTX isn't friendly to change subtargets per function and

@fmayer fmayer requested a review from jhuber6 February 10, 2025 22:25
@jhuber6
Copy link
Contributor

jhuber6 commented Feb 10, 2025

Should be done in 07f2154. Sorry for the confusion.

@fmayer
Copy link
Contributor Author

fmayer commented Feb 10, 2025

Should be done in 07f2154. Sorry for the confusion.

Np. thanks for the quick fix, and sorry for sending the revert too quickly

@fmayer fmayer closed this Feb 10, 2025
@fmayer fmayer deleted the users/fmayer/spr/nfc-llvm-remove-unused-function branch February 10, 2025 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants