utils: Adapt to llvm r325155
authorJan Vesely <jan.vesely@rutgers.edu>
Fri, 23 Feb 2018 07:37:03 +0000 (07:37 +0000)
committerJan Vesely <jan.vesely@rutgers.edu>
Fri, 23 Feb 2018 07:37:03 +0000 (07:37 +0000)
r325155 ("Pass a reference to a module to the bitcode writer.")
changed bit writer interface from pointer to reference

Reviewer: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 325867

libclc/utils/prepare-builtins.cpp

index 0f03e05..de1e804 100644 (file)
@@ -105,7 +105,11 @@ int main(int argc, char **argv) {
     exit(1);
   }
 
+#if HAVE_LLVM >= 0x0700
+  WriteBitcodeToFile(*M, Out->os());
+#else
   WriteBitcodeToFile(M, Out->os());
+#endif
 
   // Declare success.
   Out->keep();