Author: Alex Langford Date: 2023-06-27T10:46:34-07:00 New Revision: 1bd69ae0c5a7e704979f6efa1c7d7c39d4e2d5c9
URL: https://github.com/llvm/llvm-project/commit/1bd69ae0c5a7e704979f6efa1c7d7c39d4e2d5c9 DIFF: https://github.com/llvm/llvm-project/commit/1bd69ae0c5a7e704979f6efa1c7d7c39d4e2d5c9.diff LOG: [lldb][NFCI] Apply LLDB_DEPRECATED to things that have deprecated comments Now that we have a proper way to deprecate things in the SB API, we should apply it where we have manually done so with comments. Differential Revision: https://reviews.llvm.org/D153824 Added: Modified: lldb/include/lldb/API/SBCommandReturnObject.h lldb/include/lldb/API/SBDebugger.h lldb/include/lldb/API/SBFileSpec.h lldb/include/lldb/API/SBProcess.h lldb/include/lldb/API/SBValue.h Removed: ################################################################################ diff --git a/lldb/include/lldb/API/SBCommandReturnObject.h b/lldb/include/lldb/API/SBCommandReturnObject.h index f4132f3600b83..ce93b28ba84cb 100644 --- a/lldb/include/lldb/API/SBCommandReturnObject.h +++ b/lldb/include/lldb/API/SBCommandReturnObject.h @@ -47,7 +47,9 @@ class LLDB_API SBCommandReturnObject { const char *GetError(); #ifndef SWIG - size_t PutOutput(FILE *fh); // DEPRECATED + LLDB_DEPRECATED("Use PutOutput(SBFile) or PutOutput(FileSP)", + "PutOutput(SBFile)") + size_t PutOutput(FILE *fh); #endif size_t PutOutput(SBFile file); @@ -59,7 +61,9 @@ class LLDB_API SBCommandReturnObject { size_t GetErrorSize(); #ifndef SWIG - size_t PutError(FILE *fh); // DEPRECATED + LLDB_DEPRECATED("Use PutError(SBFile) or PutError(FileSP)", + "PutError(SBFile)") + size_t PutError(FILE *fh); #endif size_t PutError(SBFile file); @@ -83,13 +87,25 @@ class LLDB_API SBCommandReturnObject { bool GetDescription(lldb::SBStream &description); #ifndef SWIG - void SetImmediateOutputFile(FILE *fh); // DEPRECATED - - void SetImmediateErrorFile(FILE *fh); // DEPRECATED - - void SetImmediateOutputFile(FILE *fh, bool transfer_ownership); // DEPRECATED - - void SetImmediateErrorFile(FILE *fh, bool transfer_ownership); // DEPRECATED + LLDB_DEPRECATED( + "Use SetImmediateOutputFile(SBFile) or SetImmediateOutputFile(FileSP)", + "SetImmediateOutputFile(SBFile)") + void SetImmediateOutputFile(FILE *fh); + + LLDB_DEPRECATED( + "Use SetImmediateErrorFile(SBFile) or SetImmediateErrorFile(FileSP)", + "SetImmediateErrorFile(SBFile)") + void SetImmediateErrorFile(FILE *fh); + + LLDB_DEPRECATED( + "Use SetImmediateOutputFile(SBFile) or SetImmediateOutputFile(FileSP)", + "SetImmediateOutputFile(SBFile)") + void SetImmediateOutputFile(FILE *fh, bool transfer_ownership); + + LLDB_DEPRECATED( + "Use SetImmediateErrorFile(SBFile) or SetImmediateErrorFile(FileSP)", + "SetImmediateErrorFile(SBFile)") + void SetImmediateErrorFile(FILE *fh, bool transfer_ownership); #endif void SetImmediateOutputFile(SBFile file); diff --git a/lldb/include/lldb/API/SBDebugger.h b/lldb/include/lldb/API/SBDebugger.h index 0eea6e0cce1c4..5a2ea634d882d 100644 --- a/lldb/include/lldb/API/SBDebugger.h +++ b/lldb/include/lldb/API/SBDebugger.h @@ -115,7 +115,7 @@ class LLDB_API SBDebugger { static void Terminate(); - // Deprecated, use the one that takes a source_init_files bool. + LLDB_DEPRECATED("Use one of the other Create variants", "Create(bool)") static lldb::SBDebugger Create(); static lldb::SBDebugger Create(bool source_init_files); @@ -208,9 +208,14 @@ class LLDB_API SBDebugger { lldb::SBListener GetListener(); #ifndef SWIG + LLDB_DEPRECATED( + "Use HandleProcessEvent(const SBProcess &, const SBEvent &, SBFile, " + "SBFile) or HandleProcessEvent(const SBProcess &, const SBEvent &, " + "FileSP, FileSP)", + "HandleProcessEvent(const SBProcess &, const SBEvent &, SBFile, SBFile)") void HandleProcessEvent(const lldb::SBProcess &process, const lldb::SBEvent &event, FILE *out, - FILE *err); // DEPRECATED + FILE *err); #endif void HandleProcessEvent(const lldb::SBProcess &process, @@ -326,8 +331,9 @@ class LLDB_API SBDebugger { void SetDestroyCallback(lldb::SBDebuggerDestroyCallback destroy_callback, void *baton); - // DEPRECATED #ifndef SWIG + LLDB_DEPRECATED("Use DispatchInput(const void *, size_t)", + "DispatchInput(const void *, size_t)") void DispatchInput(void *baton, const void *data, size_t data_len); #endif diff --git a/lldb/include/lldb/API/SBFileSpec.h b/lldb/include/lldb/API/SBFileSpec.h index a286912f109e5..48171e64e5c88 100644 --- a/lldb/include/lldb/API/SBFileSpec.h +++ b/lldb/include/lldb/API/SBFileSpec.h @@ -19,8 +19,10 @@ class LLDB_API SBFileSpec { SBFileSpec(const lldb::SBFileSpec &rhs); - SBFileSpec(const char *path); // Deprecated, use SBFileSpec (const char *path, - // bool resolve) + LLDB_DEPRECATED("Use the other constructor to determine if this the file " + "spec should be resolved", + "SBFileSpec(const char *, bool)") + SBFileSpec(const char *path); SBFileSpec(const char *path, bool resolve); diff --git a/lldb/include/lldb/API/SBProcess.h b/lldb/include/lldb/API/SBProcess.h index 8b1fc0632ffda..76cf155d4b618 100644 --- a/lldb/include/lldb/API/SBProcess.h +++ b/lldb/include/lldb/API/SBProcess.h @@ -48,7 +48,7 @@ class LLDB_API SBProcess { const char *GetPluginName(); - // DEPRECATED: use GetPluginName() + LLDB_DEPRECATED("Use GetPluginName()", "GetPluginName()") const char *GetShortPluginName(); void Clear(); diff --git a/lldb/include/lldb/API/SBValue.h b/lldb/include/lldb/API/SBValue.h index 2b6d08b98be14..408298a743ec0 100644 --- a/lldb/include/lldb/API/SBValue.h +++ b/lldb/include/lldb/API/SBValue.h @@ -105,7 +105,8 @@ class LLDB_API SBValue { const char *GetLocation(); - // Deprecated - use the one that takes SBError& + LLDB_DEPRECATED("Use the variant that takes an SBError &", + "SetValueFromCString(const char *, SBError &)") bool SetValueFromCString(const char *value_str); bool SetValueFromCString(const char *value_str, lldb::SBError &error); @@ -123,7 +124,7 @@ class LLDB_API SBValue { lldb::SBValue CreateChildAtOffset(const char *name, uint32_t offset, lldb::SBType type); - // Deprecated - use the expression evaluator to perform type casting + LLDB_DEPRECATED("Use the expression evaluator to perform type casting", "") lldb::SBValue Cast(lldb::SBType type); lldb::SBValue CreateValueFromExpression(const char *name, @@ -294,7 +295,7 @@ class LLDB_API SBValue { lldb::SBValue Dereference(); - // Deprecated - please use GetType().IsPointerType() instead. + LLDB_DEPRECATED("Use GetType().IsPointerType() instead", "") bool TypeIsPointerType(); lldb::SBType GetType(); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits