[PATCH] D22140: Make a std::string copy of StringRef Name so that it remains valid when the original Name is overridden.

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 8 09:04:42 PDT 2016

bkramer added inline comments.

Comment at: lib/IR/AutoUpgrade.cpp:351
@@ -347,3 +350,3 @@
                   Name.startswith("avx512.mask.psrli."))) {
       F->setName("llvm.x86." + Name + ".old");
       Intrinsic::ID ShiftID;
Can we just move the setName call below the accesses to Name? I think that would be simpler and avoids the string copy.


More information about the llvm-commits mailing list