本文整理汇总了C++中GlobalValue::hasLinkerPrivateLinkage方法的典型用法代码示例。如果您正苦于以下问题:C++ GlobalValue::hasLinkerPrivateLinkage方法的具体用法?C++ GlobalValue::hasLinkerPrivateLinkage怎么用?C++ GlobalValue::hasLinkerPrivateLinkage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GlobalValue
的用法示例。
在下文中一共展示了GlobalValue::hasLinkerPrivateLinkage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DumpSymbolNameForGlobalValue
static void DumpSymbolNameForGlobalValue(GlobalValue &GV) {
// Private linkage and available_externally linkage don't exist in symtab.
if (GV.hasPrivateLinkage() || GV.hasLinkerPrivateLinkage() ||
GV.hasLinkerPrivateWeakLinkage() || GV.hasAvailableExternallyLinkage())
return;
const std::string SymbolAddrStr = " "; // Not used yet...
char TypeChar = TypeCharForSymbol(GV);
if ((TypeChar != 'U') && UndefinedOnly)
return;
if ((TypeChar == 'U') && DefinedOnly)
return;
if (GV.hasLocalLinkage () && ExternalOnly)
return;
if (OutputFormat == posix) {
outs() << GV.getName () << " " << TypeCharForSymbol(GV) << " "
<< SymbolAddrStr << "\n";
} else if (OutputFormat == bsd) {
outs() << SymbolAddrStr << " " << TypeCharForSymbol(GV) << " "
<< GV.getName () << "\n";
} else if (OutputFormat == sysv) {
std::string PaddedName (GV.getName ());
while (PaddedName.length () < 20)
PaddedName += " ";
outs() << PaddedName << "|" << SymbolAddrStr << "| "
<< TypeCharForSymbol(GV)
<< " | | | |\n";
}
}
示例2: DumpSymbolNameForGlobalValue
static void DumpSymbolNameForGlobalValue(GlobalValue &GV) {
// Private linkage and available_externally linkage don't exist in symtab.
if (GV.hasPrivateLinkage() ||
GV.hasLinkerPrivateLinkage() ||
GV.hasLinkerPrivateWeakLinkage() ||
GV.hasAvailableExternallyLinkage())
return;
char TypeChar = TypeCharForSymbol(GV);
if (GV.hasLocalLinkage () && ExternalOnly)
return;
NMSymbol s;
s.Address = object::UnknownAddressOrSize;
s.Size = object::UnknownAddressOrSize;
s.TypeChar = TypeChar;
s.Name = GV.getName();
SymbolList.push_back(s);
}