diff --git a/llvm/tools/llvm-rc/ResourceScriptParser.cpp b/llvm/tools/llvm-rc/ResourceScriptParser.cpp index 499d0af83ad5..41b11911b068 100644 --- a/llvm/tools/llvm-rc/ResourceScriptParser.cpp +++ b/llvm/tools/llvm-rc/ResourceScriptParser.cpp @@ -329,7 +329,7 @@ Expected RCParser::parseControl() { // [class] id, x, y, width, height [, style] [, exstyle] [, helpID] // Note that control ids must be integers. ASSIGN_OR_RETURN(ClassResult, readIdentifier()); - StringRef ClassUpper = ClassResult->upper(); + std::string ClassUpper = ClassResult->upper(); if (Control::SupportedCtls.find(ClassUpper) == Control::SupportedCtls.end()) return getExpectedError("control type, END or '}'", true);