aboutsummaryrefslogtreecommitdiff
path: root/src/intertyper.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/intertyper.js')
-rw-r--r--src/intertyper.js30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/intertyper.js b/src/intertyper.js
index 417a4f21..86da2a1f 100644
--- a/src/intertyper.js
+++ b/src/intertyper.js
@@ -11,28 +11,28 @@ function tokenize(text) {
function intertyper(data, sidePass, baseLineNum) {
var mainPass = !sidePass;
- dprint('framework', 'Big picture: Starting intertyper, main pass=' + mainPass);
-
baseLineNum = baseLineNum || 0;
- // Substrate
+ dprint('framework', 'Big picture: Starting intertyper, main pass=' + mainPass);
- if (LLVM_STYLE === null) {
- // new = clang on 2.8, old = llvm-gcc anywhere or clang on 2.7
- LLVM_STYLE = (data.indexOf('<label>') == -1 && data.indexOf('entry:') != -1) ? 'old' : 'new';
- //dprint('LLVM_STYLE: ' + LLVM_STYLE);
- }
+ if (mainPass) {
+ if (LLVM_STYLE === null) {
+ // new = clang on 2.8, old = llvm-gcc anywhere or clang on 2.7
+ LLVM_STYLE = (data.indexOf('<label>') == -1 && data.indexOf('entry:') != -1) ? 'old' : 'new';
+ //dprint('LLVM_STYLE: ' + LLVM_STYLE);
+ }
- // If the source contains debug info as LLVM metadata, process that out (and save the debugging info for later)
- for (var i = data.length-1; i >= 0; i--) {
- if (/^!\d+ = metadata .*/.exec(data[i])) {
- data = Debugging.processMetadata(data);
- //print(data.join('\n'));
- //dprint(JSON.stringify(Debugging));
- break;
+ // If the source contains debug info as LLVM metadata, process that out (and save the debugging info for later)
+ for (var i = data.length-1; i >= 0; i--) {
+ if (/^!\d+ = metadata .*/.exec(data[i])) {
+ Debugging.processMetadata(data);
+ break;
+ }
}
}
+ // Substrate
+
var substrate = new Substrate('Intertyper');
// Line splitter. We break off some bunches of lines into unparsedBundles, which are