mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
Implement forward/external declarations for methods.
llvm-svn: 196
This commit is contained in:
parent
bb3f9b179a
commit
5c33905f73
@ -65,10 +65,12 @@ bool AssemblyWriter::processConstPool(const ConstantPool &CP, bool isMethod) {
|
|||||||
|
|
||||||
ModuleAnalyzer::processConstPool(CP, isMethod);
|
ModuleAnalyzer::processConstPool(CP, isMethod);
|
||||||
|
|
||||||
if (isMethod)
|
if (isMethod) {
|
||||||
Out << "begin";
|
if (!CP.getParentV()->castMethodAsserting()->isExternal())
|
||||||
else
|
Out << "begin";
|
||||||
|
} else {
|
||||||
Out << "implementation\n";
|
Out << "implementation\n";
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,11 +105,13 @@ bool AssemblyWriter::processConstant(const ConstPoolVal *CPV) {
|
|||||||
//
|
//
|
||||||
bool AssemblyWriter::processMethod(const Method *M) {
|
bool AssemblyWriter::processMethod(const Method *M) {
|
||||||
// Print out the return type and name...
|
// Print out the return type and name...
|
||||||
Out << "\n" << M->getReturnType() << " \"" << M->getName() << "\"(";
|
Out << "\n" << (M->isExternal() ? "declare " : "")
|
||||||
|
<< M->getReturnType() << " \"" << M->getName() << "\"(";
|
||||||
Table.incorporateMethod(M);
|
Table.incorporateMethod(M);
|
||||||
ModuleAnalyzer::processMethod(M);
|
ModuleAnalyzer::processMethod(M);
|
||||||
Table.purgeMethod();
|
Table.purgeMethod();
|
||||||
Out << "end\n";
|
if (!M->isExternal())
|
||||||
|
Out << "end\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user