Author: arphaman Date: Tue Aug 8 04:22:21 2017 New Revision: 310347 URL: http://llvm.org/viewvc/llvm-project?rev=310347&view=rev Log: Darwin's toolchain should be initialized before openmp offloading is processed
This fixes an 'openmp-offload.c' test failure introduced by r310263. Modified: cfe/trunk/lib/Driver/Driver.cpp Modified: cfe/trunk/lib/Driver/Driver.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=310347&r1=310346&r2=310347&view=diff ============================================================================== --- cfe/trunk/lib/Driver/Driver.cpp (original) +++ cfe/trunk/lib/Driver/Driver.cpp Tue Aug 8 04:22:21 2017 @@ -3224,6 +3224,12 @@ InputInfo Driver::BuildJobsForActionNoCa InputInfoList OffloadDependencesInputInfo; bool BuildingForOffloadDevice = TargetDeviceOffloadKind != Action::OFK_None; if (const OffloadAction *OA = dyn_cast<OffloadAction>(A)) { + // The 'Darwin' toolchain is initialized only when its arguments are + // computed. Get the default arguments for OFK_None to ensure that + // initialization is performed before processing the offload action. + // FIXME: Remove when darwin's toolchain is initialized during construction. + C.getArgsForToolChain(TC, BoundArch, Action::OFK_None); + // The offload action is expected to be used in four different situations. // // a) Set a toolchain/architecture/kind for a host action: _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits