Add BitWriter_3_2 for JB+ target API.

This change switches llvm-rs-cc to use a single format for JB+ target API
LLVM bitcode. This simplifies upstream rebases, considering the divergent
compressed bitcode format that will be present in LLVM 3.3. We may move
back to using the upstream BitWriter again at some point in the future, but
for now, it seems like the best choice is to stick with the 3.2 format.

Change-Id: I8cfc54d7da7c7168f8f0d5f8fc24c2598b81aff8
diff --git a/slang_backend.cpp b/slang_backend.cpp
index 483b85a..58593ed 100644
--- a/slang_backend.cpp
+++ b/slang_backend.cpp
@@ -57,6 +57,7 @@
 #include "slang_assert.h"
 #include "BitWriter_2_9/ReaderWriter_2_9.h"
 #include "BitWriter_2_9_func/ReaderWriter_2_9_func.h"
+#include "BitWriter_3_2/ReaderWriter_3_2.h"
 
 namespace slang {
 
@@ -367,7 +368,10 @@
               TargetAPI > SLANG_MAXIMUM_TARGET_API) {
             slangAssert(false && "Invalid target API value");
           }
-          BCEmitPM->add(llvm::createBitcodeWriterPass(Bitcode));
+          // Switch to the 3.2 BitcodeWriter by default, and don't use
+          // LLVM's included BitcodeWriter at all (for now).
+          BCEmitPM->add(llvm_3_2::createBitcodeWriterPass(Bitcode));
+          //BCEmitPM->add(llvm::createBitcodeWriterPass(Bitcode));
           break;
         }
       }