Added a new disassembler plugin, DisassemblerLLVMC,
which uses the Disassembler.h interface to the LLVM
disassemblers rather than the EnhancedDisassembly.h
interface.  Disassembler.h is a better-maintained
API and will be stabler in the long term.

Currently the output from Disassembler.h does not
provide for symbolic disassembly in all the places
that the old disassembler did, so I have gated (and
disabled) the disassembler.  It'll be easy to flip
the switch later.

In the meantime, to enable the new disassembler,
uncomment "#define USE_NEW_DISASSEMBLER" in
lldb.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150772 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/lldb.cpp b/source/lldb.cpp
index 6ee3e1c..faa563b 100644
--- a/source/lldb.cpp
+++ b/source/lldb.cpp
@@ -26,6 +26,7 @@
 #include "Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h"
 #include "Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h"
 #include "Plugins/Disassembler/llvm/DisassemblerLLVM.h"
+#include "Plugins/Disassembler/llvm/DisassemblerLLVMC.h"
 #include "Plugins/Instruction/ARM/EmulateInstructionARM.h"
 #include "Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.h"
 #include "Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h"
@@ -72,6 +73,7 @@
 using namespace lldb;
 using namespace lldb_private;
 
+//#define USE_NEW_DISASSEMBLER
 
 void
 lldb_private::Initialize ()
@@ -91,7 +93,11 @@
         ABIMacOSX_i386::Initialize();
         ABIMacOSX_arm::Initialize();
         ABISysV_x86_64::Initialize();
+#if defined (USE_NEW_DISASSEMBLER)
+        DisassemblerLLVMC::Initialize();
+#else
         DisassemblerLLVM::Initialize();
+#endif
         ObjectContainerBSDArchive::Initialize();
         ObjectFileELF::Initialize();
         SymbolFileDWARF::Initialize();
@@ -166,7 +172,11 @@
     ABIMacOSX_i386::Terminate();
     ABIMacOSX_arm::Terminate();
     ABISysV_x86_64::Terminate();
+#if defined (USE_NEW_DISASSEMBLER)
+    DisassemblerLLVMC::Terminate();
+#else
     DisassemblerLLVM::Terminate();
+#endif
     ObjectContainerBSDArchive::Terminate();
     ObjectFileELF::Terminate();
     SymbolFileDWARF::Terminate();