<div class="gmail_quote">On Wed, Mar 14, 2012 at 4:22 PM, Kostya Serebryany <span dir="ltr"><<a href="mailto:kcc@google.com">kcc@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[asan] rename class BlackList to FunctionBlackList and move it into a separate file -- we will need the same functionality in ThreadSanitizer</blockquote></div><br><div>If you are going to be hacking on this, I would like to propose a significant cleanup to its design. This is especially relevant as it moves to be a more general feature.</div>
<div><br></div><div>We already have the ability to mark specific functions as ignored via a function attribute. We should be using that and only that mechanism inside of LLVM.</div><div><br></div><div>I think the way to support the blacklist file is to do it in the frontend (Clang in this case), where it loads the file, and applies the attribute(s?) to the matching functions while emitting LLVM IR. This has several advantages in my might, let me know what you think about them:</div>
<div><br></div><div>1) It separates concerns. LLVM now can be tested without inputs other than the IR.</div><div>2) The frontend is already in the business of finding random files on the users' machines which are not directly related to the source file.</div>
<div>3) The frontend is already in the business of exposing user-visible flags.</div><div>4) The frontend knows the un-mangled names of functions, making the syntax of the file (potentially) simpler.</div><div><br></div><div>
Thoughts?</div>