yaxunl marked an inline comment as done.
yaxunl added a comment.

In D92720#2453277 <https://reviews.llvm.org/D92720#2453277>, @tra wrote:

> In D92720#2448890 <https://reviews.llvm.org/D92720#2448890>, @yaxunl wrote:
>
>> Output of `-E` for HIP combined host/device compilation is a plain text. It 
>> has C++ comments inserted between preprocessor outputs for host and 
>> different GPU arch's. The C++ comments follow the format of 
>> clang-offload-bundler bundled text files therefore clang-offload-bundler is 
>> able to unbundle it.
>
> OK.
>
> This actually exposed a minor issue. Using something that may legitemately 
> occur in the user source as a separator is rather easy to break.
> E.g. there's nothing wrong with the following code, but the bundler will not 
> handle it well if it's used with `hip-cpp-output`:
>
>   const char* s1 = R"foo(
>   // __CLANG_OFFLOAD_BUNDLE____END__ hip-amdgcn-amd-amdhsa-gfx803
>   )foo";
>
> It's not a showstopper, but it would be great if the separator would be 
> something that can't be encountered in the preprocessed output.

That's a good point. Need to think about a better way even though the chances 
of encountering such issue are low.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92720/new/

https://reviews.llvm.org/D92720

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

Reply via email to