For disassembler

Change-Id: I14e64ec4640cbeb57ac87473775e8ba8a7320b3f
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index e907f07..f7c9d84 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -13,8 +13,10 @@
 
 #define DEBUG_TYPE "asm-printer"
 #include "llvm/CodeGen/AsmPrinter.h"
-#include "DwarfDebug.h"
-#include "DwarfException.h"
+#ifndef ANDROID_TARGET_BUILD
+#   include "DwarfDebug.h"
+#   include "DwarfException.h"
+#endif // ANDROID_TARGET_BUILD
 #include "llvm/Module.h"
 #include "llvm/CodeGen/GCMetadataPrinter.h"
 #include "llvm/CodeGen/MachineConstantPool.h"
@@ -155,11 +157,13 @@
     OutStreamer.AddBlankLine();
   }
 
+#ifndef ANDROID_TARGET_BUILD
   if (MAI->doesSupportDebugInformation())
     DD = new DwarfDebug(this, &M);
     
   if (MAI->doesSupportExceptionHandling())
     DE = new DwarfException(this);
+#endif // ANDROID_TARGET_BUILD
 
   return false;
 }
@@ -361,6 +365,7 @@
   }
   
   // Emit pre-function debug and/or EH information.
+#ifndef ANDROID_TARGET_BUILD
   if (DE) {
     if (TimePassesIsEnabled) {
       NamedRegionTimer T(EHTimerName, DWARFGroupName);
@@ -377,6 +382,7 @@
       DD->beginFunction(MF);
     }
   }
+#endif // ANDROID_TARGET_BUILD
 }
 
 /// EmitFunctionEntryLabel - Emit the label that is the entrypoint for the
@@ -535,6 +541,7 @@
       
       ++EmittedInsts;
       
+#ifndef ANDROID_TARGET_BUILD
       if (ShouldPrintDebugScopes) {
 	if (TimePassesIsEnabled) {
 	  NamedRegionTimer T(DbgTimerName, DWARFGroupName);
@@ -543,6 +550,7 @@
 	  DD->beginScope(II);
 	}
       }
+#endif // ANDROID_TARGET_BUILD
       
       if (isVerbose())
         EmitComments(*II, OutStreamer.GetCommentOS());
@@ -573,6 +581,7 @@
         break;
       }
       
+#ifndef ANDROID_TARGET_BUILD
       if (ShouldPrintDebugScopes) {
 	if (TimePassesIsEnabled) {
 	  NamedRegionTimer T(DbgTimerName, DWARFGroupName);
@@ -581,6 +590,7 @@
 	  DD->endScope(II);
 	}
       }
+#endif // ANDROID_TARGET_BUILD
     }
   }
   
@@ -616,6 +626,7 @@
   }
   
   // Emit post-function debug information.
+#ifndef ANDROID_TARGET_BUILD
   if (DD) {
     if (TimePassesIsEnabled) {
       NamedRegionTimer T(DbgTimerName, DWARFGroupName);
@@ -632,6 +643,7 @@
       DE->EndFunction();
     }
   }
+#endif // ANDROID_TARGET_BUILD
   MMI->EndFunction();
   
   // Print out jump tables referenced by the function.
@@ -648,6 +660,7 @@
     EmitGlobalVariable(I);
   
   // Finalize debug and EH information.
+#ifndef ANDROID_TARGET_BUILD
   if (DE) {
     if (TimePassesIsEnabled) {
       NamedRegionTimer T(EHTimerName, DWARFGroupName);
@@ -666,6 +679,7 @@
     }
     delete DD; DD = 0;
   }
+#endif // ANDROID_TARGET_BUILD
   
   // If the target wants to know about weak references, print them all.
   if (MAI->getWeakRefDirective()) {