Skip to content

Commit 6ba9e24

Browse files
author
Wael Yehia
committed
add comments about the enum IsLocal
1 parent c8094b6 commit 6ba9e24

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3386,7 +3386,17 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) {
33863386
}
33873387

33883388
static bool TOCRestoreNeededForCallToImplementation(const GlobalIFunc &GI) {
3389-
enum class IsLocal { Unknown, True, False };
3389+
enum class IsLocal {
3390+
Unknown, // Structure of the llvm::Value is not one of the recognizable
3391+
// structures, and so it's unknown if the llvm::Value is the
3392+
// address of a local function at runtime.
3393+
True, // We can statically prove that all runtime values of the
3394+
// llvm::Value is an address of a local function.
3395+
False // We can statically prove that one of the runtime values of the
3396+
// llvm::Value is the address of a non-local function; it could be
3397+
// the case that at runtime the non-local function is never
3398+
// selected but we don't care.
3399+
};
33903400
auto Combine = [](IsLocal LHS, IsLocal RHS) -> IsLocal {
33913401
if (LHS == IsLocal::False || RHS == IsLocal::False)
33923402
return IsLocal::False;

0 commit comments

Comments
 (0)