title: LLVM command line on OSX
body: <p>I'm working though [http://llvm.org/docs/WritingAnLLVMPass.html][1], trying to write a very simple pass. I've written the pass and compiled it (thanks in part to the Stackoverflow community) but now I'm having trouble running it...</p>
  
  <p>The documentation reads: </p>
  
  <blockquote>
    <p>To test it, follow the example at the end of the Getting Started Guide
    to compile "Hello World" to LLVM. We can now run the bitcode file
    (hello.bc) for the program through our transformation like this (or
    course, any bitcode file will work):</p>
    
    <p>$ opt -load ../../../Debug+Asserts/lib/Hello.so -hello &lt; hello.bc >
    /dev/null Hello: __main Hello: puts Hello: main The '-load' option
    specifies that 'opt' should load your pass as a shared object, which
    makes '-hello' a valid command line argument (which is one reason you
    need to register your pass). Because the hello pass does not modify
    the program in any interesting way, we just throw away the result of
    opt (sending it to /dev/null).</p>
  </blockquote>
  
  <p>However when I run the command I get the following issue: </p>
  
  <pre><code>mymachine$./opt -load ../../../Debug+Asserts/lib/Hello.so -hello &lt; hello.bc &gt; /dev/null 
  Error opening '../../../Debug+Asserts/lib/Hello.so': 
     dlopen(../../../Debug+Asserts/lib/Hello.so, 9): image not found  
     -load request ignored. opt: Unknown command line argument '-hello'.  
  Try: './opt -help' opt: Did you mean '-help'?
  </code></pre>
  
  <p>Any ideas? I'm running OSX and I suspect that is part of the issue...</p>