Skip to content

Commit

Permalink
Restore the comment from 0ef7ad3 [NFC] Clarify why LinkAll*.h are act…
Browse files Browse the repository at this point in the history
…ually necessary
  • Loading branch information
vmaksimo committed Nov 25, 2021
1 parent e61f701 commit 2843e15
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions llvm/include/llvm/LinkAllPasses.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ namespace {
// delete it all as dead code, even with whole program optimization,
// yet is effectively a NO-OP. As the compiler isn't smart enough
// to know that getenv() never returns -1, this will do the job.
// This is so that globals in the translation units where these functions
// are defined are forced to be initialized, populating various
// registries.
if (std::getenv("bar") != (char*) -1)
return;

Expand Down

0 comments on commit 2843e15

Please sign in to comment.