diff options
| author | Chris Lattner <sabre@nondot.org> | 2001-11-26 18:54:16 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2001-11-26 18:54:16 +0000 |
| commit | 841d8b9e50fcf333c51e6154e4f670c9996bc908 (patch) | |
| tree | 9076efc65795ac80366c45e8da3e6337365b742d /llvm/lib/VMCore/AsmWriter.cpp | |
| parent | 34dfe56c1a6d63deb8364efbe88fc7c0aee31d0d (diff) | |
| download | bcm5719-llvm-841d8b9e50fcf333c51e6154e4f670c9996bc908.tar.gz bcm5719-llvm-841d8b9e50fcf333c51e6154e4f670c9996bc908.zip | |
Implement support for internal methods
llvm-svn: 1373
Diffstat (limited to 'llvm/lib/VMCore/AsmWriter.cpp')
| -rw-r--r-- | llvm/lib/VMCore/AsmWriter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index e22d97d7ce7..1bfdff9364a 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/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); |

