llvm/test/tools/llvm-cov/Inputs/prefer_used_to_unused.cpp
Igor Kudrin 88a127497f [Coverage] Fix an issue where improper coverage mapping data could be loaded for an inline function.
If an inline function is observed but unused in a translation unit, dummy
coverage mapping data with zero hash is stored for this function.
If such a coverage mapping section came earlier than real one, the latter
was ignored. As a result, llvm-cov was unable to show coverage information
for those functions.

Differential Revision: http://reviews.llvm.org/D20286


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270194 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-20 09:14:24 +00:00

6 lines
91 B
C++

#include "prefer_used_to_unused.h"
int main() {
return sampleFunc(5) + simpleFunc(5);
}