Go to file
David L. Jones 7a7dd031e9 Add LF_ prefix to LibFunc enums in TargetLibraryInfo.
Summary:
The LibFunc::Func enum holds enumerators named for libc functions.
Unfortunately, there are real situations, including libc implementations, where
function names are actually macros (musl uses "#define fopen64 fopen", for
example; any other transitively visible macro would have similar effects).

Strictly speaking, a conforming C++ Standard Library should provide any such
macros as functions instead (via <cstdio>). However, there are some "library"
functions which are not part of the standard, and thus not subject to this
rule (fopen64, for example). So, in order to be both portable and consistent,
the enum should not use the bare function names.

The old enum naming used a namespace LibFunc and an enum Func, with bare
enumerators. This patch changes LibFunc to be an enum with enumerators prefixed
with "LF_". (Unfortunately, a scoped enum is not sufficient to override macros.)

These changes are for clang. See https://reviews.llvm.org/D28476 for LLVM.

Reviewers: rsmith

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D28477

llvm-svn: 292849
2017-01-23 23:16:58 +00:00
clang Add LF_ prefix to LibFunc enums in TargetLibraryInfo. 2017-01-23 23:16:58 +00:00
clang-tools-extra [clang-tidy] Ignore implicit functions in performance-unnecessary-value-param 2017-01-23 13:18:08 +00:00
compiler-rt Revert "[lsan] Enable LSan for x86 Linux." 2017-01-23 22:52:31 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc math: Add logb builtin 2017-01-18 03:14:10 +00:00
libcxx Manually force the use of __decltype in C++03 with Clang 3.4. 2017-01-23 21:41:13 +00:00
libcxxabi Fix catch_reference_nullptr.pass.cpp test for GCC. 2017-01-20 19:34:19 +00:00
libunwind DWARF: correct cast (NFC) 2017-01-21 21:27:29 +00:00
lld [ELF] - Committed missing ld.ldd invocation to constructor.s 2017-01-23 16:55:13 +00:00
lldb Replace getcwd with the llvm equivalent 2017-01-23 15:56:45 +00:00
llgo [llgo] Remove support for LLVM attributes 2016-12-06 19:22:04 +00:00
llvm [Analysis] Add LibFunc_ prefix to enums in TargetLibraryInfo. (NFC) 2017-01-23 23:16:46 +00:00
openmp Use C++11 static_assert() for build asserts. 2017-01-18 07:49:30 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly BlockGenerator: Do not redundantly reload from PHI-allocas in non-affine stmts 2017-01-19 14:12:45 +00:00