[NFC] Change Key in Argument to a std::string
Before, Key was a StringRef to avoid unnecessary copies. This commit changes that to a std::string. This was okay previously because when people called emit for remarks before, they would create the remark *within* the call to emit. However, if you build the remark up and call emit *afterward*, it's possible to end up freeing the memory assigned to the StringRef before the call to emit. This caused a test failure with https://reviews.llvm.org/D37085 on Linux. Since building remarks before a call to emit is a valid use-case, it makes sense to replace this with a std::string. llvm-svn: 312277
Loading
Please sign in to comment