OSDN Git Service

Guard xar RAII behind HAVE_LIBXAR
authorFrancis Ricci <francisjricci@gmail.com>
Fri, 6 Oct 2017 15:54:20 +0000 (15:54 +0000)
committerFrancis Ricci <francisjricci@gmail.com>
Fri, 6 Oct 2017 15:54:20 +0000 (15:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315072 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-objdump/MachODump.cpp

index 031427c..91ec7fe 100644 (file)
@@ -202,6 +202,7 @@ typedef std::pair<uint64_t, DiceRef> DiceTableEntry;
 typedef std::vector<DiceTableEntry> DiceTable;
 typedef DiceTable::iterator dice_table_iterator;
 
+#ifdef HAVE_LIBXAR
 namespace {
 struct ScopedXarFile {
   xar_t xar;
@@ -229,6 +230,7 @@ struct ScopedXarIter {
   operator xar_iter_t() { return iter; }
 };
 } // namespace
+#endif // defined(HAVE_LIBXAR)
 
 // This is used to search for a data in code table entry for the PC being
 // disassembled.  The j parameter has the PC in j.first.  A single data in code