diff options
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Driver/Compilation.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Driver/Compilation.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp b/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp index 6a2616f..5c13e59 100644 --- a/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp +++ b/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp @@ -37,11 +37,9 @@ Compilation::~Compilation() { delete Args; // Free any derived arg lists. - for (llvm::DenseMap<std::pair<const ToolChain*, const char*>, - DerivedArgList*>::iterator it = TCArgs.begin(), - ie = TCArgs.end(); it != ie; ++it) - if (it->second != TranslatedArgs) - delete it->second; + for (auto Arg : TCArgs) + if (Arg.second != TranslatedArgs) + delete Arg.second; // Free redirections of stdout/stderr. if (Redirects) { @@ -52,14 +50,15 @@ Compilation::~Compilation() { } } -const DerivedArgList &Compilation::getArgsForToolChain(const ToolChain *TC, - const char *BoundArch) { +const DerivedArgList & +Compilation::getArgsForToolChain(const ToolChain *TC, StringRef BoundArch, + Action::OffloadKind DeviceOffloadKind) { if (!TC) TC = &DefaultToolChain; - DerivedArgList *&Entry = TCArgs[std::make_pair(TC, BoundArch)]; + DerivedArgList *&Entry = TCArgs[{TC, BoundArch, DeviceOffloadKind}]; if (!Entry) { - Entry = TC->TranslateArgs(*TranslatedArgs, BoundArch); + Entry = TC->TranslateArgs(*TranslatedArgs, BoundArch, DeviceOffloadKind); if (!Entry) Entry = TranslatedArgs; } |