hfinkel added inline comments.

================
Comment at: lib/Driver/Driver.cpp:2091
@@ +2090,3 @@
+        InputArg->getOption().getKind() == llvm::opt::Option::InputClass &&
+        !types::isSrcFile(HostAction->getType())) {
+      auto UnbundlingHostAction =
----------------
hfinkel wrote:
> This checks that the file needs to be preprocessed. What does preprocessing 
> have to do with this? I don't imagine that providing a preprocessed source 
> file as input should invoke the unbundler   .
On second thought, this is okay. It does not make sense to have a non-bundled 
preprocessed source for the input there, as the host and device compilation 
don't share a common preprocessor state.

We do need to be careful, perhaps, about .s files (which don't need 
preprocessing as .S files do) -- we should probably assume that all non-bundled 
.s files are host assembly code.

================
Comment at: test/Driver/openmp-offload.c:274
@@ +273,3 @@
+/// Check separate compilation with offloading - unbundling actions
+// RUN:   touch %t.i
+// RUN:   %clang -### -ccc-print-phases -fopenmp -o %t.out -lsomelib -target 
powerpc64le-linux 
-fopenmp-targets=powerpc64le-ibm-linux-gnu,x86_64-pc-linux-gnu %t.i 2>&1 \
----------------
hfinkel wrote:
> Oh, are you using .i to indicate a bundle instead of a preprocessed file? 
> Don't do that. Please use a different suffix -- the bundler has its own file 
> format.
Never mind; this is okay too.


https://reviews.llvm.org/D21853



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to