1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/unittests/Analysis
David L. Jones 268960185f [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

llvm-svn: 292848
2017-01-23 23:16:46 +00:00
..
AliasAnalysisTest.cpp Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
BlockFrequencyInfoTest.cpp Add an interface to scale the frequencies of a set of blocks. 2017-01-19 18:53:16 +00:00
BranchProbabilityInfoTest.cpp Retry: [BPI] Use a safer constructor to calculate branch probabilities 2016-12-17 01:02:08 +00:00
CallGraphTest.cpp [GraphTraits] Replace all NodeType usage with NodeRef 2016-08-22 21:09:30 +00:00
CFGTest.cpp Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
CGSCCPassManagerTest.cpp [PM] Introduce the facilities for registering cross-IR-unit dependencies 2016-12-27 08:40:39 +00:00
CMakeLists.txt [TLI] Add prototype checking for all remaining LibFuncs. 2017-01-17 03:10:02 +00:00
LazyCallGraphTest.cpp [PM] Teach the CGSCC's CG update utility to more carefully invalidate 2016-12-28 10:34:50 +00:00
LoopInfoTest.cpp [LoopInfo] Add helper methods to compute two useful orderings of the 2017-01-20 02:41:20 +00:00
MemoryBuiltinsTest.cpp Don't consider allocsize functions to be allocation functions. 2016-12-23 01:18:09 +00:00
ProfileSummaryInfoTest.cpp Compute summary before calling extractProfTotalWeight 2017-01-14 00:32:37 +00:00
ScalarEvolutionTest.cpp Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
TargetLibraryInfoTest.cpp [Analysis] Add LibFunc_ prefix to enums in TargetLibraryInfo. (NFC) 2017-01-23 23:16:46 +00:00
TBAATest.cpp [TBAA] Don't generate invalid TBAA when merging nodes 2016-12-11 20:07:25 +00:00
UnrollAnalyzer.cpp Delete a dead argument. NFC 2017-01-15 19:53:59 +00:00
ValueTrackingTest.cpp Fix an issue with isGuaranteedToTransferExecutionToSuccessor 2016-12-31 22:12:34 +00:00