]> granicus.if.org Git - clang/commitdiff
[clang-offload-bundler] Support `.cui` and `.d`.
authorMichael Liao <michael.hliao@gmail.com>
Wed, 9 Oct 2019 13:53:37 +0000 (13:53 +0000)
committerMichael Liao <michael.hliao@gmail.com>
Wed, 9 Oct 2019 13:53:37 +0000 (13:53 +0000)
Reviewers: tra, yaxunl

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D68663

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374167 91177308-0d34-0410-b5e6-96231b3b80d8

tools/clang-offload-bundler/ClangOffloadBundler.cpp

index 277c031511d00a565d543048a27741dcf50dc888..19325e4a33f2185eab9c67566315dfdc0ea123e7 100644 (file)
@@ -71,6 +71,8 @@ static cl::opt<std::string>
                        "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")