diff options
Diffstat (limited to 'tools/llvm-pdbutil/FormatUtil.h')
-rw-r--r-- | tools/llvm-pdbutil/FormatUtil.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/llvm-pdbutil/FormatUtil.h b/tools/llvm-pdbutil/FormatUtil.h index 3db2dbacc57b..df32ed9360fb 100644 --- a/tools/llvm-pdbutil/FormatUtil.h +++ b/tools/llvm-pdbutil/FormatUtil.h @@ -22,6 +22,14 @@ namespace llvm { namespace pdb { +std::string truncateStringBack(StringRef S, uint32_t MaxLen); +std::string truncateStringMiddle(StringRef S, uint32_t MaxLen); +std::string truncateStringFront(StringRef S, uint32_t MaxLen); +std::string truncateQuotedNameFront(StringRef Label, StringRef Name, + uint32_t MaxLen); +std::string truncateQuotedNameBack(StringRef Label, StringRef Name, + uint32_t MaxLen); + #define PUSH_MASKED_FLAG(Enum, Mask, TheOpt, Value, Text) \ if (Enum::TheOpt == (Value & Mask)) \ Opts.push_back(Text); @@ -33,7 +41,7 @@ namespace pdb { case Enum::X: \ return Ret; -template <typename T> static std::string formatUnknownEnum(T Value) { +template <typename T> std::string formatUnknownEnum(T Value) { return formatv("unknown ({0})", static_cast<typename std::underlying_type<T>::type>(Value)) .str(); |