Skip to content

Conversation

jhuber6
Copy link
Contributor

@jhuber6 jhuber6 commented Jul 22, 2025

Summary:
The synthesized args contains a list of unique pointers, so this should
clean this generated argument up once created.

Summary:
The synthesized args contains a list of unique pointers, so this should
clean this generated argument up once created.
@jhuber6 jhuber6 requested review from Artem-B, jplehr, jsji and yxsamliu July 22, 2025 23:20
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Jul 22, 2025
@llvmbot llvmbot added the clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' label Jul 22, 2025
@llvmbot
Copy link
Member

llvmbot commented Jul 22, 2025

@llvm/pr-subscribers-clang-driver

@llvm/pr-subscribers-clang

Author: Joseph Huber (jhuber6)

Changes

Summary:
The synthesized args contains a list of unique pointers, so this should
clean this generated argument up once created.


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

1 Files Affected:

  • (modified) clang/lib/Driver/Driver.cpp (+1)
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index ff2f92d1a94c8..e3d220d731dc7 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -1013,6 +1013,7 @@ inferOffloadToolchains(Compilation &C, Action::OffloadKind Kind) {
                      C.getArgs().MakeArgString(Triple.split("-").first),
                      C.getArgs().MakeArgString("--offload-arch=" + Arch));
     C.getArgs().append(A);
+    C.getArgs().AddSynthesizedArg(A);
     Triples.insert(Triple);
   }
 

Copy link
Member

@jsji jsji left a comment

Choose a reason for hiding this comment

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

LG, Thanks!

@jhuber6 jhuber6 merged commit efffa42 into llvm:main Jul 23, 2025
12 checks passed
@jhuber6 jhuber6 deleted the synthesized branch July 23, 2025 01:20
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Jul 28, 2025
…#150142)

Summary:
The synthesized args contains a list of unique pointers, so this should
clean this generated argument up once created.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants