[PATCH] D38259: [OpenMP] Fix translation of target args
Jonas Hahnfeld via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 27 11:14:34 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL314330: [OpenMP] Fix translation of target args (authored by Hahnfeld).
Changed prior to commit:
https://reviews.llvm.org/D38259?vs=116610&id=116846#toc
Repository:
rL LLVM
https://reviews.llvm.org/D38259
Files:
cfe/trunk/lib/Driver/Compilation.cpp
Index: cfe/trunk/lib/Driver/Compilation.cpp
===================================================================
--- cfe/trunk/lib/Driver/Compilation.cpp
+++ cfe/trunk/lib/Driver/Compilation.cpp
@@ -57,14 +57,16 @@
*TranslatedArgs, DeviceOffloadKind, AllocatedArgs);
if (!OpenMPArgs) {
Entry = TC->TranslateArgs(*TranslatedArgs, BoundArch, DeviceOffloadKind);
+ if (!Entry)
+ Entry = TranslatedArgs;
} else {
Entry = TC->TranslateArgs(*OpenMPArgs, BoundArch, DeviceOffloadKind);
- delete OpenMPArgs;
+ if (!Entry)
+ Entry = OpenMPArgs;
+ else
+ delete OpenMPArgs;
}
- if (!Entry)
- Entry = TranslatedArgs;
-
// Add allocated arguments to the final DAL.
for (auto ArgPtr : AllocatedArgs) {
Entry->AddSynthesizedArg(ArgPtr);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38259.116846.patch
Type: text/x-patch
Size: 828 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170927/514e59f8/attachment-0001.bin>
More information about the cfe-commits
mailing list