diff options
author | Jiyoung Yun <jy910.yun@samsung.com> | 2016-11-23 19:09:09 +0900 |
---|---|---|
committer | Jiyoung Yun <jy910.yun@samsung.com> | 2016-11-23 19:09:09 +0900 |
commit | 4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (patch) | |
tree | 98110734c91668dfdbb126fcc0e15ddbd93738ca /src/inc/prettyprintsig.h | |
parent | fa45f57ed55137c75ac870356a1b8f76c84b229c (diff) | |
download | coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.tar.gz coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.tar.bz2 coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.zip |
Imported Upstream version 1.1.0upstream/1.1.0
Diffstat (limited to 'src/inc/prettyprintsig.h')
-rw-r--r-- | src/inc/prettyprintsig.h | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/src/inc/prettyprintsig.h b/src/inc/prettyprintsig.h new file mode 100644 index 0000000000..adab46ee0f --- /dev/null +++ b/src/inc/prettyprintsig.h @@ -0,0 +1,91 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +//***************************************************************************** +// This code supports formatting a method and it's signature in a friendly +// and consistent format. +// +//***************************************************************************** + +#ifndef __PrettyPrintSig_h__ +#define __PrettyPrintSig_h__ + +#include <cor.h> + +class CQuickBytes; + +// +// The return value is either NULL or a null-terminated ASCII string +// + +//--------------------------------------------------------------------------------------- +// +// Prints a signature in a human readable format. +// No one should use this function. This exists strictly for backwards compatibility with external formats. +// +// Arguments: +// sigPtr - Method/field sig to convert +// sigLen - length of sig +// name - the name of the method for this sig. Can be L"" +// scratch - scratch buffer to use +// pIMDI - Import api to use. +// +// Return Value: +// The formatted string. +// +// Assumptions: +// None +// +// Notes: +// Dev's SHOULD NOT create new callers to this function. Use +// code:PrettyPrintSig in formatype.h instead. This function exists for +// legacy support in the CLR. There are places that depend on the format +// of this string. +// + +LPCWSTR PrettyPrintSigLegacy( + PCCOR_SIGNATURE sigPtr, // Method/field sig to convert + unsigned sigLen, // length of sig + LPCWSTR name, // the name of the method for this sig. Can be L"" + CQuickBytes *scratch, // scratch buffer to use + IMetaDataImport *pIMDI); // Import api to use. + +struct IMDInternalImport; + +//--------------------------------------------------------------------------------------- +// +// Prints a signature in a human readable format. +// No one should use this function. This exists strictly for backwards compatibility with external formats. +// +// Arguments: +// sigPtr - Method/field sig to convert +// sigLen - length of sig +// name - the name of the method for this sig. Can be L"" +// out - The buffer in which to write the pretty printed string. +// pIMDI - Import api to use. +// +// Return Value: +// An HRESULT and the formatted string is in out as a unicode string. +// +// Assumptions: +// None +// +// Notes: +// Dev's SHOULD NOT create new callers to this function. Use +// code:PrettyPrintSig in formattype.h instead. This function exists for +// legacy support in the CLR. There are places that depend on the format +// of this string. +// +HRESULT PrettyPrintSigInternalLegacy( // S_OK or error. + PCCOR_SIGNATURE sigPtr, // sig to convert, + unsigned sigLen, // length of sig + LPCSTR name, // can be "", the name of the method for this sig + CQuickBytes *out, // where to put the pretty printed string + IMDInternalImport *pIMDI); // Import api to use. + +// +// On success, the null-terminated ASCII string is in "out.Ptr()" +// + +#endif // __PrettyPrintSig_h__ |