Skip to content
Commit 9204c831 authored by Chandler Carruth's avatar Chandler Carruth
Browse files

Rather than rendering an argument to a std::string (which is primarily

intended for debugging and diagnostic output), just inspect the spelling
to check for specific prefixes in drectve section flags.

In addition to being significantly cheaper and not relying on
a debugging interface, this also avoids creating a temporary string and
binding it to StringRef variable. We then went on to access it after the
memory had been deallocated.

This bug too was caught by ASan. I love ASan so much. =]

llvm-svn: 193487
parent 50e5b329
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment