Search in sources :

Example 1 with ModuleRecord

use of com.oracle.truffle.llvm.parser.records.ModuleRecord in project sulong by graalvm.

the class Module method record.

@Override
public void record(long id, long[] args) {
    final ModuleRecord record = ModuleRecord.decode(id);
    switch(record) {
        case VERSION:
            mode = (int) args[0];
            break;
        case TARGET_TRIPLE:
            module.addTargetInformation(new TargetTriple(Records.toString(args)));
            break;
        case TARGET_DATALAYOUT:
            final TargetDataLayout layout = TargetDataLayout.fromString(Records.toString(args));
            module.setTargetDataLayout(layout);
            break;
        case GLOBAL_VARIABLE:
            createGlobalVariable(args);
            break;
        case FUNCTION:
            createFunction(args);
            break;
        case ALIAS:
            createGlobalAliasNew(args);
            break;
        case ALIAS_OLD:
            createGlobalAliasOld(args);
            break;
        default:
            break;
    }
}
Also used : TargetDataLayout(com.oracle.truffle.llvm.parser.model.target.TargetDataLayout) ModuleRecord(com.oracle.truffle.llvm.parser.records.ModuleRecord) TargetTriple(com.oracle.truffle.llvm.parser.model.target.TargetTriple)

Aggregations

TargetDataLayout (com.oracle.truffle.llvm.parser.model.target.TargetDataLayout)1 TargetTriple (com.oracle.truffle.llvm.parser.model.target.TargetTriple)1 ModuleRecord (com.oracle.truffle.llvm.parser.records.ModuleRecord)1