Implement MachOObjectFile::is64Bit directly.
authorRafael Espindola <rafael.espindola@gmail.com>
Sun, 7 Apr 2013 19:38:15 +0000 (19:38 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sun, 7 Apr 2013 19:38:15 +0000 (19:38 +0000)
llvm-svn: 178996

llvm/lib/Object/MachOObjectFile.cpp

index ee42bc8..7bb8c19 100644 (file)
@@ -55,7 +55,8 @@ MachOObjectFile::MachOObjectFile(MemoryBuffer *Object, error_code &ec)
 }
 
 bool MachOObjectFile::is64Bit() const {
-  return MachOObj->is64Bit();
+  StringRef Magic = getData(0, 4);
+  return (Magic == "\xFE\xED\xFA\xCF") || (Magic == "\xCF\xFA\xED\xFE");
 }
 
 const MachOFormat::LoadCommand *