From 2ae54aba03f24bf5047bd0fc4552c4bd7a09a39a Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Wed, 9 Oct 2019 13:53:37 +0000 Subject: [PATCH] [clang-offload-bundler] Support `.cui` and `.d`. Reviewers: tra, yaxunl Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68663 llvm-svn: 374167 --- clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp b/clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp index 277c031..19325e4 100644 --- a/clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp +++ b/clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp @@ -71,6 +71,8 @@ static cl::opt "Current supported types are:\n" " i - cpp-output\n" " ii - c++-cpp-output\n" + " cui - cuda/hip-output\n" + " d - dependency\n" " ll - llvm\n" " bc - llvm-bc\n" " s - assembler\n" @@ -628,6 +630,12 @@ static FileHandler *CreateFileHandler(MemoryBuffer &FirstInput) { return new TextFileHandler(/*Comment=*/"//"); if (FilesType == "ii") return new TextFileHandler(/*Comment=*/"//"); + if (FilesType == "cui") + return new TextFileHandler(/*Comment=*/"//"); + // TODO: `.d` should be eventually removed once `-M` and its variants are + // handled properly in offload compilation. + if (FilesType == "d") + return new TextFileHandler(/*Comment=*/"#"); if (FilesType == "ll") return new TextFileHandler(/*Comment=*/";"); if (FilesType == "bc") -- 2.7.4