aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/AsmWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-11-26 18:54:16 +0000
committerChris Lattner <sabre@nondot.org>2001-11-26 18:54:16 +0000
commitdda719665ba2ffd2eb1c32a0d2daa3921448db7c (patch)
tree82c3acad6b6ca7656fe6ee0e2f0df3fe2a11e63a /lib/VMCore/AsmWriter.cpp
parenta2eb259c6b86d6daec58af70402a075272750cc2 (diff)
downloadexternal_llvm-dda719665ba2ffd2eb1c32a0d2daa3921448db7c.zip
external_llvm-dda719665ba2ffd2eb1c32a0d2daa3921448db7c.tar.gz
external_llvm-dda719665ba2ffd2eb1c32a0d2daa3921448db7c.tar.bz2
Implement support for internal methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1373 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/AsmWriter.cpp')
-rw-r--r--lib/VMCore/AsmWriter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index e22d97d..1bfdff9 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -320,6 +320,7 @@ void AssemblyWriter::printModule(const Module *M) {
void AssemblyWriter::printGlobal(const GlobalVariable *GV) {
if (GV->hasName()) Out << "%" << GV->getName() << " = ";
+ if (GV->hasInternalLinkage()) Out << "internal ";
if (!GV->hasInitializer()) Out << "uninitialized ";
Out << (GV->isConstant() ? "constant " : "global ");
@@ -383,7 +384,8 @@ void AssemblyWriter::printConstant(const ConstPoolVal *CPV) {
//
void AssemblyWriter::printMethod(const Method *M) {
// Print out the return type and name...
- Out << "\n" << (M->isExternal() ? "declare " : "");
+ Out << "\n" << (M->isExternal() ? "declare " : "")
+ << (M->hasInternalLinkage() ? "internal " : "");
printType(M->getReturnType()) << " \"" << M->getName() << "\"(";
Table.incorporateMethod(M);