1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

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
This commit is contained in:
David Blaikie 2017-07-06 05:33:32 +00:00
parent 48423ddf61
commit 42e7c44727

View File

@ -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();