jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added a subscriber: dang. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
This patch adds marshalling to the `-cuid=` option introduced in D95007 <https://reviews.llvm.org/D95007>. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D97461 Files: clang/include/clang/Driver/Options.td clang/lib/Frontend/CompilerInvocation.cpp Index: clang/lib/Frontend/CompilerInvocation.cpp =================================================================== --- clang/lib/Frontend/CompilerInvocation.cpp +++ clang/lib/Frontend/CompilerInvocation.cpp @@ -3632,11 +3632,6 @@ } } - - if (auto *A = Args.getLastArg(OPT_cuid_EQ)) { - Opts.CUID = std::string(A->getValue()); - } - if (Opts.ObjC) { if (Arg *arg = Args.getLastArg(OPT_fobjc_runtime_EQ)) { StringRef value = arg->getValue(); Index: clang/include/clang/Driver/Options.td =================================================================== --- clang/include/clang/Driver/Options.td +++ clang/include/clang/Driver/Options.td @@ -934,7 +934,8 @@ "compilation unit but different for different compilation units. " "It is used to externalize device-side static variables for single " "source offloading languages CUDA and HIP so that they can be " - "accessed by the host code of the same compilation unit.">; + "accessed by the host code of the same compilation unit.">, + MarshallingInfoString<LangOpts<"CUID">>; def fuse_cuid_EQ : Joined<["-"], "fuse-cuid=">, HelpText<"Method to generate ID's for compilation units for single source " "offloading languages CUDA and HIP: 'hash' (ID's generated by hashing "
Index: clang/lib/Frontend/CompilerInvocation.cpp =================================================================== --- clang/lib/Frontend/CompilerInvocation.cpp +++ clang/lib/Frontend/CompilerInvocation.cpp @@ -3632,11 +3632,6 @@ } } - - if (auto *A = Args.getLastArg(OPT_cuid_EQ)) { - Opts.CUID = std::string(A->getValue()); - } - if (Opts.ObjC) { if (Arg *arg = Args.getLastArg(OPT_fobjc_runtime_EQ)) { StringRef value = arg->getValue(); Index: clang/include/clang/Driver/Options.td =================================================================== --- clang/include/clang/Driver/Options.td +++ clang/include/clang/Driver/Options.td @@ -934,7 +934,8 @@ "compilation unit but different for different compilation units. " "It is used to externalize device-side static variables for single " "source offloading languages CUDA and HIP so that they can be " - "accessed by the host code of the same compilation unit.">; + "accessed by the host code of the same compilation unit.">, + MarshallingInfoString<LangOpts<"CUID">>; def fuse_cuid_EQ : Joined<["-"], "fuse-cuid=">, HelpText<"Method to generate ID's for compilation units for single source " "offloading languages CUDA and HIP: 'hash' (ID's generated by hashing "
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits