llvm/unittests
David L. Jones 32028c8f08 [Analysis] Add LibFunc_ prefix to enums in TargetLibraryInfo. (NFC)
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 "LibFFunc_". (Unfortunately, a scoped enum is not sufficient to override
macros.)

There are additional changes required in clang.

Reviewers: rsmith

Subscribers: mehdi_amini, mzolotukhin, nemanjai, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292848 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-23 23:16:46 +00:00
..
ADT [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble) 2017-01-23 22:39:35 +00:00
Analysis [Analysis] Add LibFunc_ prefix to enums in TargetLibraryInfo. (NFC) 2017-01-23 23:16:46 +00:00
AsmParser
Bitcode Reapply "Make BitCodeAbbrev ownership explicit using shared_ptr rather than IntrusiveRefCntPtr"" 2017-01-04 22:36:33 +00:00
CodeGen
DebugInfo Post-commit review feedback from dblaikie 2017-01-23 16:49:34 +00:00
ExecutionEngine [Orc][RPC] Add 'removeHandler' and 'clearHandlers' methods to RPC endpoints. 2017-01-21 07:46:03 +00:00
IR Fix some -Wsign-compare warnings by making some integer literals explicitly unsigned 2017-01-12 17:44:32 +00:00
LineEditor
Linker
MC
MI
Object
ObjectYAML
Option
ProfileData Fix spelling mistakes in Tools/Tests comments. NFC. 2016-11-20 13:31:13 +00:00
Support [ARM] Create objdump subtarget from build attrs 2017-01-18 13:52:12 +00:00
Target
Transforms [PM] Teach the loop PM to run LoopSimplify prior to the loop pipeline. 2017-01-21 03:48:51 +00:00
CMakeLists.txt [gtest] Fix the way we disable a warning for unittests. 2017-01-04 23:40:06 +00:00