1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00

DIFlags: use StringRef instead of raw pointer (NFC)

llvm-svn: 283012
This commit is contained in:
Mehdi Amini 2016-10-01 05:57:50 +00:00
parent b9d860c7ab
commit 74130c0750
3 changed files with 4 additions and 4 deletions

View File

@ -183,7 +183,7 @@ public:
};
static DIFlags getFlag(StringRef Flag);
static const char *getFlagString(DIFlags Flag);
static StringRef getFlagString(DIFlags Flag);
/// \brief Split up a flags bitfield.
///

View File

@ -1488,8 +1488,8 @@ void MDFieldPrinter::printDIFlags(StringRef Name, DINode::DIFlags Flags) {
FieldSeparator FlagsFS(" | ");
for (auto F : SplitFlags) {
const char *StringF = DINode::getFlagString(F);
assert(StringF && "Expected valid flag");
auto StringF = DINode::getFlagString(F);
assert(!StringF.empty() && "Expected valid flag");
Out << FlagsFS << StringF;
}
if (Extra || SplitFlags.empty())

View File

@ -72,7 +72,7 @@ DINode::DIFlags DINode::getFlag(StringRef Flag) {
.Default(DINode::FlagZero);
}
const char *DINode::getFlagString(DIFlags Flag) {
StringRef DINode::getFlagString(DIFlags Flag) {
switch (Flag) {
#define HANDLE_DI_FLAG(ID, NAME) \
case Flag##NAME: \