[PATCH] D43010: Report fatal error in the case of out of memory

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 19 00:10:14 PST 2018


sepavloff added a comment.

The idea to have the same names (malloc etc) in the namespace llvm and in the global namespace leads to a fragile solution. There are several case in projects other than llvm/clang which do not compile due to ambiguities between the two declarations.
As a solution, functions llvm::malloc and others can be renamed to llvm::safe_malloc etc. Such names are descriptive, and are not used in standard headers yet.


Repository:
  rL LLVM

https://reviews.llvm.org/D43010





More information about the llvm-commits mailing list