aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/AsmWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-10-16 18:29:00 +0000
committerChris Lattner <sabre@nondot.org>2003-10-16 18:29:00 +0000
commit72ac148d4964fbff950fe11a0eeeda73973b849b (patch)
treefde7ca11baf974328570db3b0d678d98e576fb30 /lib/VMCore/AsmWriter.cpp
parent6b25242a4ba80e8c3a8a2664eefeba9c69814012 (diff)
downloadexternal_llvm-72ac148d4964fbff950fe11a0eeeda73973b849b.zip
external_llvm-72ac148d4964fbff950fe11a0eeeda73973b849b.tar.gz
external_llvm-72ac148d4964fbff950fe11a0eeeda73973b849b.tar.bz2
Add support for 'weak' linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/AsmWriter.cpp')
-rw-r--r--lib/VMCore/AsmWriter.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index ea8f43c..9437b59 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -584,8 +584,9 @@ void AssemblyWriter::printGlobal(const GlobalVariable *GV) {
Out << "external ";
else
switch (GV->getLinkage()) {
- case GlobalValue::InternalLinkage: Out << "internal "; break;
- case GlobalValue::LinkOnceLinkage: Out << "linkonce "; break;
+ case GlobalValue::InternalLinkage: Out << "internal "; break;
+ case GlobalValue::LinkOnceLinkage: Out << "linkonce "; break;
+ case GlobalValue::WeakLinkage: Out << "weak "; break;
case GlobalValue::AppendingLinkage: Out << "appending "; break;
case GlobalValue::ExternalLinkage: break;
}
@@ -652,8 +653,9 @@ void AssemblyWriter::printFunction(const Function *F) {
Out << "declare ";
else
switch (F->getLinkage()) {
- case GlobalValue::InternalLinkage: Out << "internal "; break;
- case GlobalValue::LinkOnceLinkage: Out << "linkonce "; break;
+ case GlobalValue::InternalLinkage: Out << "internal "; break;
+ case GlobalValue::LinkOnceLinkage: Out << "linkonce "; break;
+ case GlobalValue::WeakLinkage: Out << "weak "; break;
case GlobalValue::AppendingLinkage: Out << "appending "; break;
case GlobalValue::ExternalLinkage: break;
}