Always enable hashed program output when using reference outputs

Because several of the reference outputs require hashed output, running
with reference outputs but without hashed program output yields anomalous
failures.

llvm-svn: 181260
diff --git a/Makefile.programs b/Makefile.programs
index e00648e..5900d13 100644
--- a/Makefile.programs
+++ b/Makefile.programs
@@ -474,6 +474,12 @@
 JIT_OPTS += -enable-correct-eh-support
 endif
 
+# Some of the reference outputs assume that ENABLE_HASHED_PROGRAM_OUTPUT
+# is defined. Make sure it is defined if USE_REFERENCE_OUTPUT is defined.
+ifdef USE_REFERENCE_OUTPUT
+ENABLE_HASHED_PROGRAM_OUTPUT := 1
+endif
+
 # If the program wants its output hashed, add an output filter.
 ifdef ENABLE_HASHED_PROGRAM_OUTPUT
 ifdef HASH_PROGRAM_OUTPUT