diff options
author | David Blaikie <dblaikie@gmail.com> | 2017-07-06 05:33:32 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2017-07-06 05:33:32 +0000 |
commit | fd8777ed88ac858f5e094a35cbe5fff91b1da6d7 (patch) | |
tree | e606c016c3805d82e056d5a8a7e304c1c531ced5 | |
parent | 5b079d83a68a428163fc76f7c9ed2e7e4f553169 (diff) | |
download | bcm5719-llvm-fd8777ed88ac858f5e094a35cbe5fff91b1da6d7.tar.gz bcm5719-llvm-fd8777ed88ac858f5e094a35cbe5fff91b1da6d7.zip |
Fix -Wunused-function by making function declarations in a header non-static
Also avoids ODR violations by ensuring names used in headers find the
same entity, not different, file-local entities in each translation
unit.
llvm-svn: 307237
-rw-r--r-- | llvm/tools/llvm-pdbutil/FormatUtil.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/llvm-pdbutil/FormatUtil.h b/llvm/tools/llvm-pdbutil/FormatUtil.h index 4d8a1db3d4a..31e4be34958 100644 --- a/llvm/tools/llvm-pdbutil/FormatUtil.h +++ b/llvm/tools/llvm-pdbutil/FormatUtil.h @@ -23,7 +23,7 @@ namespace llvm { namespace pdb { std::string truncateStringBack(StringRef S, uint32_t MaxLen); -static std::string truncateStringFront(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, @@ -40,7 +40,7 @@ std::string truncateQuotedNameBack(StringRef Label, StringRef Name, 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(); |