[X86][FPEnv] Fix a use after free

Found by asan!
This commit is contained in:
Benjamin Kramer 2020-08-11 13:00:47 +02:00
parent 33d0031edb
commit 1de173c049
1 changed files with 1 additions and 1 deletions

View File

@ -3761,7 +3761,7 @@ void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) {
NewCall = Builder.CreateCall(NewFn, Args);
Value *Res = ApplyX86MaskOn1BitsVec(Builder, NewCall, nullptr);
StringRef Name = CI->getName();
std::string Name(CI->getName());
if (!Name.empty()) {
CI->setName(Name + ".old");
NewCall->setName(Name);