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:
parent
b9d860c7ab
commit
74130c0750
@ -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.
|
||||
///
|
||||
|
@ -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())
|
||||
|
@ -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: \
|
||||
|
Loading…
Reference in New Issue
Block a user