[PATCH 1/5] Restore support for llvm-3.9

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>

For patches 1, 2, 5, and 6: Acked-by: Aaron Watry <awatry@gmail.com>
Patch 3 is Reviewed-by: Aaron Watry <awatry@gmail.com>

I've got one small comment on patch 4 that I'll send in a moment.

--Aaron

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
---
check_external_calls.sh | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100755 check_external_calls.sh

diff --git a/check_external_calls.sh b/check_external_calls.sh
new file mode 100755
index 0000000..c7c54aa
--- /dev/null
+++ b/check_external_calls.sh
@@ -0,0 +1,20 @@
+
+FILE=$1
+if [ ! -f $FILE ]; then
+ echo "ERROR: Not a file: $FILE"
+fi
+
+BIN_DIR=$($LLVM_CONFIG --bindir)

Could/Should we default LLVM_CONFIG to llvm-config from $PATH? First
time I tried to run this script manually it yelled at me that --bindir
wasn't a valid command.

--Aaron

v2: add shell shebang
    improve error checks and reporting

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>

v2: add shell shebang
    improve error checks and reporting

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
---
check_external_calls.sh | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
create mode 100755 check_external_calls.sh

diff --git a/check_external_calls.sh b/check_external_calls.sh
new file mode 100755
index 0000000..5605552
--- /dev/null
+++ b/check_external_calls.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+FILE=$1
+if [ ! -f $FILE ]; then
+ echo "ERROR: Not a file: $FILE"
+ exit 3
+fi
+ret=0
+if [ "x$LLVM_CONFIG" = "x" ]; then
+ LLVM_CONFIG=llvm-config
+ echo 'WARNING: $LLVM_CONFIG not set, falling back to $PATH llvm-config'
+ ret=2
+fi
+
+
+BIN_DIR=$($LLVM_CONFIG --bindir)
+DIS="$BIN_DIR/llvm-dis"
+if [ ! -x $DIS ]; then
+ echo "ERROR: Dissassmbler '$DIS' is not executable"

Type-o: s/Dissassmbler/Disassembler/

With that, Reviewed-by: Aaron Watry <awatry@gmail.com>