[llvm-commits] [llvm] r111952 - in /llvm/trunk: bindings/ada/llvm/llvm.ads lib/Linker/LinkModules.cpp tools/llvm-nm/llvm-nm.cpp
Bill Wendling
isanbard at gmail.com
Tue Aug 24 13:00:52 PDT 2010
Author: void
Date: Tue Aug 24 15:00:52 2010
New Revision: 111952
URL: http://llvm.org/viewvc/llvm-project?rev=111952&view=rev
Log:
- Add the LinkerPrivateWeakDefAutoLinkage to the Ada bindings.
- Support the LinkerWeak*Linkage types in llvm-nm and in LinkModules.cpp.
Modified:
llvm/trunk/bindings/ada/llvm/llvm.ads
llvm/trunk/lib/Linker/LinkModules.cpp
llvm/trunk/tools/llvm-nm/llvm-nm.cpp
Modified: llvm/trunk/bindings/ada/llvm/llvm.ads
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ada/llvm/llvm.ads?rev=111952&r1=111951&r2=111952&view=diff
==============================================================================
--- llvm/trunk/bindings/ada/llvm/llvm.ads (original)
+++ llvm/trunk/bindings/ada/llvm/llvm.ads Tue Aug 24 15:00:52 2010
@@ -317,25 +317,27 @@
LLVMGhostLinkage,
LLVMCommonLinkage,
LLVMLinkerPrivateLinkage,
- LLVMLinkerPrivateWeakLinkage);
+ LLVMLinkerPrivateWeakLinkage,
+ LinkerPrivateWeakDefAutoLinkage);
for LLVMLinkage use
- (LLVMExternalLinkage => 0,
- LLVMAvailableExternallyLinkage => 1,
- LLVMLinkOnceAnyLinkage => 2,
- LLVMLinkOnceODRLinkage => 3,
- LLVMWeakAnyLinkage => 4,
- LLVMWeakODRLinkage => 5,
- LLVMAppendingLinkage => 6,
- LLVMInternalLinkage => 7,
- LLVMPrivateLinkage => 8,
- LLVMDLLImportLinkage => 9,
- LLVMDLLExportLinkage => 10,
- LLVMExternalWeakLinkage => 11,
- LLVMGhostLinkage => 12,
- LLVMCommonLinkage => 13,
- LLVMLinkerPrivateLinkage => 14,
- LLVMLinkerPrivateWeakLinkage => 15);
+ (LLVMExternalLinkage => 0,
+ LLVMAvailableExternallyLinkage => 1,
+ LLVMLinkOnceAnyLinkage => 2,
+ LLVMLinkOnceODRLinkage => 3,
+ LLVMWeakAnyLinkage => 4,
+ LLVMWeakODRLinkage => 5,
+ LLVMAppendingLinkage => 6,
+ LLVMInternalLinkage => 7,
+ LLVMPrivateLinkage => 8,
+ LLVMDLLImportLinkage => 9,
+ LLVMDLLExportLinkage => 10,
+ LLVMExternalWeakLinkage => 11,
+ LLVMGhostLinkage => 12,
+ LLVMCommonLinkage => 13,
+ LLVMLinkerPrivateLinkage => 14,
+ LLVMLinkerPrivateWeakLinkage => 15,
+ LinkerPrivateWeakDefAutoLinkage => 16);
pragma Convention (C, LLVMLinkage);
Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=111952&r1=111951&r2=111952&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Tue Aug 24 15:00:52 2010
@@ -643,6 +643,12 @@
else if (SL == GlobalValue::LinkerPrivateLinkage &&
DL == GlobalValue::LinkerPrivateLinkage)
return GlobalValue::LinkerPrivateLinkage;
+ else if (SL == GlobalValue::LinkerPrivateWeakLinkage &&
+ DL == GlobalValue::LinkerPrivateWeakLinkage)
+ return GlobalValue::LinkerPrivateWeakLinkage;
+ else if (SL == GlobalValue::LinkerPrivateWeakDefAutoLinkage &&
+ DL == GlobalValue::LinkerPrivateWeakDefAutoLinkage)
+ return GlobalValue::LinkerPrivateWeakDefAutoLinkage;
else {
assert (SL == GlobalValue::PrivateLinkage &&
DL == GlobalValue::PrivateLinkage && "Unexpected linkage type");
Modified: llvm/trunk/tools/llvm-nm/llvm-nm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-nm/llvm-nm.cpp?rev=111952&r1=111951&r2=111952&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-nm/llvm-nm.cpp (original)
+++ llvm/trunk/tools/llvm-nm/llvm-nm.cpp Tue Aug 24 15:00:52 2010
@@ -88,8 +88,11 @@
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())
+ if (GV.hasPrivateLinkage() ||
+ GV.hasLinkerPrivateLinkage() ||
+ GV.hasLinkerPrivateWeakLinkage() ||
+ GV.hasLinkerPrivateWeakDefAutoLinkage() ||
+ GV.hasAvailableExternallyLinkage())
return;
const std::string SymbolAddrStr = " "; // Not used yet...
More information about the llvm-commits
mailing list