]> granicus.if.org Git - clang/commit
[OpenMP] Fix memory leak when translating arguments
authorJonas Hahnfeld <hahnjo@hahnjo.de>
Wed, 27 Sep 2017 18:12:31 +0000 (18:12 +0000)
committerJonas Hahnfeld <hahnjo@hahnjo.de>
Wed, 27 Sep 2017 18:12:31 +0000 (18:12 +0000)
commit365f2311caf47560932f13f88b897fe71625f09d
treea4d19e9863ca03bea7a39fc848787061f9ffb7c8
parentd80dab7c4537912c95d6df6e12c76ba4f72cd44c
[OpenMP] Fix memory leak when translating arguments

Parsing the argument after -Xopenmp-target allocates memory that needs
to be freed. Associate it with the final DerivedArgList after we know
which one will be used.

Differential Revision: https://reviews.llvm.org/D38257

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314328 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/ToolChain.h
lib/Driver/Compilation.cpp
lib/Driver/ToolChain.cpp
test/Driver/openmp-offload-gpu.c