aboutsummaryrefslogtreecommitdiff
path: root/src/compiler.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler.js')
-rw-r--r--src/compiler.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/compiler.js b/src/compiler.js
index 31d033b4..7395c896 100644
--- a/src/compiler.js
+++ b/src/compiler.js
@@ -268,9 +268,11 @@ function compile(raw) {
}
}
-if (ll_file.indexOf('\n') == -1) {
- compile(read(ll_file));
-} else {
- compile(ll_file); // we are given raw .ll
+if (ll_file) {
+ if (ll_file.indexOf(String.fromCharCode(10)) == -1) {
+ compile(read(ll_file));
+ } else {
+ compile(ll_file); // we are given raw .ll
+ }
}