Implement support for internal methods

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1373 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2001-11-26 18:54:16 +00:00
parent a2eb259c6b
commit dda719665b
4 changed files with 34 additions and 28 deletions

View File

@@ -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);