title: clang++ always generates empty profraw coverage reports
body: <p>I'm trying to integrate coverage in C++ with clang 6 for the first time and have been following <a href="https://releases.llvm.org/6.0.0/tools/clang/docs/SourceBasedCodeCoverage.html" rel="nofollow noreferrer">this</a> guide. </p>
  
  <p>I successfully compiled the binary, generated a <code>.profraw</code> file and generated a <code>.profdata</code> file as described in steps 1, 2 and 3a. But when I try to create a line-oriented coverage report as described in 3b, I receive the following message:</p>
  
  <pre><code>error: build/debug/dane: Failed to load coverage: No coverage data found
  </code></pre>
  
  <p>Upon checking the <code>.profraw</code> file, I found it was empty. I tried changing my code a bit and running again but the generated <code>.profraw</code> was always empty.</p>
  
  <p>My <code>main.cpp</code> file:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;iostream&gt;
  
  int main(int argc, char **argv) {
      std::cout &lt;&lt; "Hello, World!" &lt;&lt; std::endl;
      return 0;
  }
  </code></pre>
  
  <p>My <code>SConstruct</code> file:</p>
  
  <pre class="lang-py prettyprint-override"><code>
  env = Environment(CXX='clang++', CXXFLAGS=['-Wall', '-g', '-O0'], LINKFLAGS=['-fprofile-instr-generate', '-fcoverage-mapping'])
  env.Program(target='build/debug/dane', source=['src/main.cpp'])
  
  </code></pre>
  
  <p>Command line output:</p>
  
  <pre class="lang-sh prettyprint-override"><code>➤ scons
  scons: Reading SConscript files ...
  scons: done reading SConscript files.
  scons: Building targets ...
  clang++ -o src/main.o -c -Wall -g -O0 src/main.cpp
  clang++ -o build/debug/dane -fprofile-instr-generate -fcoverage-mapping src/main.o
  scons: done building targets.
  ➤ build/debug/dane
  Hello, World!
  ➤ llvm-profdata merge -sparse default.profraw -o default.profdata
  ➤ llvm-cov show build/debug/dane -instr-profile=default.profdata
  error: build/debug/dane: Failed to load coverage: No coverage data found
  </code></pre>
  
  <p>I expected the <code>default.profraw</code> file to hold meaningful coverage results, and have no clue why it's empty.</p>