[PATCH] D100024: [clang] Check AuxTarget exists when creating target in CompilerInstance.
Tommy Chiang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 7 06:01:35 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfc1117df5b87: [clang] Check AuxTarget exists when creating target in CompilerInstance (authored by oToToT).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100024/new/
https://reviews.llvm.org/D100024
Files:
clang/lib/Frontend/CompilerInstance.cpp
Index: clang/lib/Frontend/CompilerInstance.cpp
===================================================================
--- clang/lib/Frontend/CompilerInstance.cpp
+++ clang/lib/Frontend/CompilerInstance.cpp
@@ -104,8 +104,10 @@
if (!hasTarget())
return false;
- // Create TargetInfo for the other side of CUDA/OpenMP/SYCL compilation.
- if ((getLangOpts().CUDA || getLangOpts().OpenMPIsDevice ||
+ // Check whether AuxTarget exists, if not, then create TargetInfo for the
+ // other side of CUDA/OpenMP/SYCL compilation.
+ if (!getAuxTarget() &&
+ (getLangOpts().CUDA || getLangOpts().OpenMPIsDevice ||
getLangOpts().SYCLIsDevice) &&
!getFrontendOpts().AuxTriple.empty()) {
auto TO = std::make_shared<TargetOptions>();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100024.335790.patch
Type: text/x-patch
Size: 755 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210407/b5bee12e/attachment.bin>
More information about the cfe-commits
mailing list