diff options
Diffstat (limited to 'src/runtime.js')
-rw-r--r-- | src/runtime.js | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/runtime.js b/src/runtime.js index 730bf2ec..9a6cbc50 100644 --- a/src/runtime.js +++ b/src/runtime.js @@ -162,13 +162,18 @@ Runtime = { // { field1: 0, field2: 4 } (depending on QUANTUM_SIZE) // // You can optionally provide a type name as a second parameter. In that - // case, you do not need to provide the types (but you do still need to - // provide the names, since they are not present in the .ll), for example, - // generateStructInfo(['field1', 'field2'], '%struct.UserStructType'); - // (Note that you will need the full %struct.* name here at compile time, - // but not at runtime. The reason is that during compilation we cannot simplify - // the type names yet. At runtime, you can provide either the short or the - // full name.) + // case, you do not need to provide the types. If the .ll contains debugging + // symbols (i.e. it was compiled with the -g flag), you can leave the struct + // parameter entirely empty, for example: + // generateStructInfo(null, '%struct.UserStructType'); + // If the compilation was done without symbols, you will still need to provide + // the names, since they are not present in the .ll, for example: + // generateStructInfo(['field1', 'field2'], '%struct.UserStructType'); + // + // Note that you will need the full %struct.* name here at compile time, + // but not at runtime. The reason is that during compilation we cannot + // simplify the type names yet. At runtime, you can provide either the short + // or the full name. // // When providing a typeName, you can generate information for nested // structs, for example, struct = ['field1', { field2: ['sub1', 'sub2', 'sub3'] }, 'field3'] |