diff --git a/lib/IR/AutoUpgrade.cpp b/lib/IR/AutoUpgrade.cpp index 88efef06b72..1a74b615321 100644 --- a/lib/IR/AutoUpgrade.cpp +++ b/lib/IR/AutoUpgrade.cpp @@ -745,7 +745,7 @@ void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) { return; } - llvm::StringRef Name = CI->getName(); + std::string Name = CI->getName(); if (!Name.empty()) CI->setName(Name + ".old");