summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Valgrind.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Add a missing include of cstddef needed for size_t.Adrian Prantl2015-10-151-0/+1
| | | | llvm-svn: 250446
* Support: Clean up TSan annotations.Peter Collingbourne2015-08-181-20/+0
| | | | | | | | | | | Remove support for Valgrind-based TSan, which hasn't been maintained for a few years. We now use the TSan annotations only if LLVM is compiled with -fsanitize=thread. We no longer need the weak function definitions as we are guaranteed that our program is linked directly with the TSan runtime. Differential Revision: http://reviews.llvm.org/D12121 llvm-svn: 245374
* Provide the same ABI regardless of NDEBUGDmitri Gribenko2015-02-191-2/+1
| | | | | | | | | | | | | | | | | | | | | For projects depending on LLVM, I find it very useful to combine a release-no-asserts build of LLVM with a debug+asserts build of the dependent project. The motivation is that when developing a dependent project, you are debugging that project itself, not LLVM. In my usecase, a significant part of the runtime is spent in LLVM optimization passes, so I would like to build LLVM without assertions to get the best performance from this combination. Currently, `lib/Support/Debug.cpp` changes the set of symbols it provides depending on NDEBUG, while `include/llvm/Support/Debug.h` requires extra symbols when NDEBUG is not defined. Thus, it is not possible to enable assertions in an external project that uses facilities of `Debug.h`. This patch changes `Debug.cpp` and `Valgrind.cpp` to always define the symbols that other code may depend on when #including LLVM headers without NDEBUG. http://reviews.llvm.org/D7662 llvm-svn: 229819
* Don't mark the declarations of the TSan annotation functions as weak.Chandler Carruth2014-03-301-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | That causes references to them to be weak references which can collapse to null if no definition is provided. We call these functions unconditionally, so a definition *must* be provided. Make the definitions provided in the .cpp file weak by re-declaring them as weak just prior to defining them. This should keep compilers which cannot attach the weak attribute to the definition happy while actually resolving the symbols correctly during the link. You might ask yourself upon reading this commit log: how did *any* of this work before? Well, fun story. It turns out we have some code in Support (BumpPtrAllocator) which both uses virtual dispatch and has out-of-line vtables used by that virtual dispatch. If you move the virtual dispatch into its header in *just* the right way, the optimizer gets to devirtualize, and remove all references to the vtable. Then the sad part: the references to this one vtable were the only strong symbol uses in the support library for llvm-tblgen AFAICT. At least, after doing something just like this, these symbols stopped getting their weak definition and random calls to them would segfault instead. Yay software. llvm-svn: 205137
* Don't define these unless we plan to use them.Nick Lewycky2011-11-281-0/+2
| | | | llvm-svn: 145289
* Move WEAK marking to the declaration.Nick Lewycky2011-11-151-6/+6
| | | | llvm-svn: 144603
* Fix linking for some users who already have tsan enabled code and are trying toNick Lewycky2011-11-151-6/+6
| | | | | | link it against llvm code, by making our definitions weak. "Some users." llvm-svn: 144596
* Add support for tsan annotations (thread sanitizer, a valgrind-based tool).Nick Lewycky2011-11-141-0/+11
| | | | | | | | | | | | These annotations are disabled entirely when either ENABLE_THREADS is off, or building a release build. When enabled, they add calls to functions with no statements to ManagedStatic's getters. Use these annotations to inform tsan that the race used inside ManagedStatic initialization is actually benign. Thanks to Kostya Serebryany for helping write this patch! llvm-svn: 144567
* Revert previous commit. It seems that whether casting to voidDuncan Sands2011-07-021-1/+1
| | | | | | is valid or not depends on which system you build. llvm-svn: 134321
* Supress gcc-4.5 warning about the result not being used.Duncan Sands2011-07-021-1/+1
| | | | llvm-svn: 134319
* Merge System into Support.Michael J. Spencer2010-11-291-0/+54
llvm-svn: 120298
OpenPOWER on IntegriCloud