mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 21:24:00 +00:00
Enhancements to pass argc & argv to main if required
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@909 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -110,9 +110,10 @@ GenericValue lle_X_print(MethodType *M, const vector<GenericValue> &ArgVals) {
|
||||
GenericValue lle_X_printVal(MethodType *M, const vector<GenericValue> &ArgVal) {
|
||||
assert(ArgVal.size() == 1 && "generic print only takes one argument!");
|
||||
|
||||
// Specialize print([ubyte {x N} ] *)
|
||||
// Specialize print([ubyte {x N} ] *) and print(sbyte *)
|
||||
if (PointerType *PTy = dyn_cast<PointerType>(M->getParamTypes()[0].get()))
|
||||
if (const ArrayType *ATy = dyn_cast<ArrayType>(PTy->getValueType())) {
|
||||
if (PTy->getValueType() == Type::SByteTy ||
|
||||
isa<ArrayType>(PTy->getValueType())) {
|
||||
return lle_VP_printstr(M, ArgVal);
|
||||
}
|
||||
|
||||
@ -132,4 +133,9 @@ GenericValue lle_VB_putchar(MethodType *M, const vector<GenericValue> &Args) {
|
||||
return GenericValue();
|
||||
}
|
||||
|
||||
// void "__main"()
|
||||
GenericValue lle_V___main(MethodType *M, const vector<GenericValue> &Args) {
|
||||
return GenericValue();
|
||||
}
|
||||
|
||||
} // End extern "C"
|
||||
|
Reference in New Issue
Block a user