[PATCH] D37636: [TableGen] Ensure that __lsan_is_turned_off isn't removed by DCE in llvm-tblgen

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 8 12:11:55 PDT 2017


alexshap added inline comments.


================
Comment at: utils/TableGen/TableGen.cpp:220
 // very interesting to fix. See compiler-rt/include/sanitizer/lsan_interface.h .
-int __lsan_is_turned_off() { return 1; }
+int __attribute__((__used__)) __lsan_is_turned_off() { return 1; }
 #endif  // __has_feature(address_sanitizer)
----------------
LLVM_ATTRIBUTE_USED ?


https://reviews.llvm.org/D37636





More information about the llvm-commits mailing list