Added "used" attribute to entries in yosys_cover_list
authorClifford Wolf <clifford@clifford.at>
Fri, 7 Nov 2014 19:58:08 +0000 (20:58 +0100)
committerClifford Wolf <clifford@clifford.at>
Fri, 7 Nov 2014 19:58:08 +0000 (20:58 +0100)
http://www.reddit.com/r/yosys/comments/2kw479/fyi_clang_350_build_error/cltgwyc
http://llvm.org/bugs/show_bug.cgi?id=19474

kernel/log.h

index 707497a99898c171a3d51bc4eca46fb288975b58..93e8144a0905a1d3d7a4302a1581ffefb9503a39 100644 (file)
@@ -90,7 +90,7 @@ static inline void log_assert_worker(bool cond, const char *expr, const char *fi
 #ifdef YOSYS_ENABLE_COVER
 
 #define cover(_id) do { \
-    static CoverData __d __attribute__((section("yosys_cover_list"), aligned(1))) = { __FILE__, __FUNCTION__, _id, __LINE__, 0 }; \
+    static CoverData __d __attribute__((section("yosys_cover_list"), aligned(1), used)) = { __FILE__, __FUNCTION__, _id, __LINE__, 0 }; \
     __d.counter++; \
 } while (0)