mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
Implement forward/external declarations for methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e181564419
commit
739a56d26d
@ -65,10 +65,12 @@ bool AssemblyWriter::processConstPool(const ConstantPool &CP, bool isMethod) {
|
||||
|
||||
ModuleAnalyzer::processConstPool(CP, isMethod);
|
||||
|
||||
if (isMethod)
|
||||
Out << "begin";
|
||||
else
|
||||
if (isMethod) {
|
||||
if (!CP.getParentV()->castMethodAsserting()->isExternal())
|
||||
Out << "begin";
|
||||
} else {
|
||||
Out << "implementation\n";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -103,11 +105,13 @@ bool AssemblyWriter::processConstant(const ConstPoolVal *CPV) {
|
||||
//
|
||||
bool AssemblyWriter::processMethod(const Method *M) {
|
||||
// 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);
|
||||
ModuleAnalyzer::processMethod(M);
|
||||
Table.purgeMethod();
|
||||
Out << "end\n";
|
||||
if (!M->isExternal())
|
||||
Out << "end\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user