mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
DIFlags: use StringRef instead of raw pointer (NFC)
llvm-svn: 283012
This commit is contained in:
parent
b9d860c7ab
commit
74130c0750
@ -183,7 +183,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
static DIFlags getFlag(StringRef Flag);
|
static DIFlags getFlag(StringRef Flag);
|
||||||
static const char *getFlagString(DIFlags Flag);
|
static StringRef getFlagString(DIFlags Flag);
|
||||||
|
|
||||||
/// \brief Split up a flags bitfield.
|
/// \brief Split up a flags bitfield.
|
||||||
///
|
///
|
||||||
|
@ -1488,8 +1488,8 @@ void MDFieldPrinter::printDIFlags(StringRef Name, DINode::DIFlags Flags) {
|
|||||||
|
|
||||||
FieldSeparator FlagsFS(" | ");
|
FieldSeparator FlagsFS(" | ");
|
||||||
for (auto F : SplitFlags) {
|
for (auto F : SplitFlags) {
|
||||||
const char *StringF = DINode::getFlagString(F);
|
auto StringF = DINode::getFlagString(F);
|
||||||
assert(StringF && "Expected valid flag");
|
assert(!StringF.empty() && "Expected valid flag");
|
||||||
Out << FlagsFS << StringF;
|
Out << FlagsFS << StringF;
|
||||||
}
|
}
|
||||||
if (Extra || SplitFlags.empty())
|
if (Extra || SplitFlags.empty())
|
||||||
|
@ -72,7 +72,7 @@ DINode::DIFlags DINode::getFlag(StringRef Flag) {
|
|||||||
.Default(DINode::FlagZero);
|
.Default(DINode::FlagZero);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *DINode::getFlagString(DIFlags Flag) {
|
StringRef DINode::getFlagString(DIFlags Flag) {
|
||||||
switch (Flag) {
|
switch (Flag) {
|
||||||
#define HANDLE_DI_FLAG(ID, NAME) \
|
#define HANDLE_DI_FLAG(ID, NAME) \
|
||||||
case Flag##NAME: \
|
case Flag##NAME: \
|
||||||
|
Loading…
Reference in New Issue
Block a user