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
Loading
Please register or sign in to comment