Index: include/llvm/LTO/LTO.h =================================================================== --- include/llvm/LTO/LTO.h +++ include/llvm/LTO/LTO.h @@ -126,6 +126,7 @@ using irsymtab::Symbol::getCommonSize; using irsymtab::Symbol::getCommonAlignment; using irsymtab::Symbol::getCOFFWeakExternalFallback; + using irsymtab::Symbol::isExecutable; }; /// A range over the symbols in this InputFile. Index: include/llvm/Object/IRSymtab.h =================================================================== --- include/llvm/Object/IRSymtab.h +++ include/llvm/Object/IRSymtab.h @@ -92,6 +92,7 @@ FB_global, FB_format_specific, FB_unnamed_addr, + FB_executable, }; /// The index into the Uncommon table, or -1 if this symbol does not have an @@ -166,6 +167,7 @@ bool isGlobal() const { return (Flags >> S::FB_global) & 1; } bool isFormatSpecific() const { return (Flags >> S::FB_format_specific) & 1; } bool isUnnamedAddr() const { return (Flags >> S::FB_unnamed_addr) & 1; } + bool isExecutable() const { return (Flags >> S::FB_executable) & 1; } uint64_t getCommonSize() const { assert(isCommon()); Index: lib/Object/IRSymtab.cpp =================================================================== --- lib/Object/IRSymtab.cpp +++ lib/Object/IRSymtab.cpp @@ -125,6 +125,8 @@ Sym.Flags |= 1 << storage::Symbol::FB_global; if (Flags & object::BasicSymbolRef::SF_FormatSpecific) Sym.Flags |= 1 << storage::Symbol::FB_format_specific; + if (Flags & object::BasicSymbolRef::SF_Executable) + Sym.Flags |= 1 << storage::Symbol::FB_executable; Sym.ComdatIndex = -1; auto *GV = Msym.dyn_cast();