When determining if we can fold (x >> C1) << C2, the bits that we need to verify...
[oota-llvm.git] / lib / Object / MachOObject.cpp
index 1051ce27fa0db7fedebe58879196047ae15eabda..5e64d6323288c3f4ddcd46c0655bc128a3806a35 100644 (file)
@@ -10,8 +10,8 @@
 #include "llvm/Object/MachOObject.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/MemoryBuffer.h"
-#include "llvm/System/Host.h"
-#include "llvm/System/SwapByteOrder.h"
+#include "llvm/Support/Host.h"
+#include "llvm/Support/SwapByteOrder.h"
 
 using namespace llvm;
 using namespace llvm::object;
@@ -84,7 +84,7 @@ MachOObject::MachOObject(MemoryBuffer *Buffer_, bool IsLittleEndian_,
 }
 
 MachOObject::~MachOObject() {
-  delete LoadCommands;
+  delete [] LoadCommands;
 }
 
 MachOObject *MachOObject::LoadFromBuffer(MemoryBuffer *Buffer,
@@ -217,7 +217,7 @@ template<>
 void SwapStruct(macho::DysymtabLoadCommand &Value) {
   SwapValue(Value.Type);
   SwapValue(Value.Size);
-  SwapValue(Value.LocalSymbolIndex);
+  SwapValue(Value.LocalSymbolsIndex);
   SwapValue(Value.NumLocalSymbols);
   SwapValue(Value.ExternalSymbolsIndex);
   SwapValue(Value.NumExternalSymbols);