[PATCH] D28476: [Analysis] Add LF_ prefix to LibFunc enums in TargetLibraryInfo. (NFC)

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 16:00:26 PST 2017


efriedma added a comment.

Appealing to the standard is not helpful here... fopen64 isn't defined by any standard, and therefore there isn't really any difference between using the token "fopen64" and the token "LF_fopen64".  In practice, of course, the global namespace on most systems is polluted with a bunch of non-standard symbols, but we really don't want to rename stuff every time someone finds a system with an unusual `#define`, so therefore our usual solution is just to "#undef" the relevant symbol.

I guess you could argue that TargetLibraryInfo in particular is extremely likely to cause problems in the future, and therefore we should preemptively rename all the library functions to avoid problems.


https://reviews.llvm.org/D28476





More information about the llvm-commits mailing list