Skip to content
Commit 0dfd8c88 authored by Jessica Paquette's avatar Jessica Paquette
Browse files

[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
parent 99c6982b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment