[llvm] r178996 - Implement MachOObjectFile::is64Bit directly.
Rafael Espindola
rafael.espindola at gmail.com
Sun Apr 7 12:38:15 PDT 2013
Author: rafael
Date: Sun Apr 7 14:38:15 2013
New Revision: 178996
URL: http://llvm.org/viewvc/llvm-project?rev=178996&view=rev
Log:
Implement MachOObjectFile::is64Bit directly.
Modified:
llvm/trunk/lib/Object/MachOObjectFile.cpp
Modified: llvm/trunk/lib/Object/MachOObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/MachOObjectFile.cpp?rev=178996&r1=178995&r2=178996&view=diff
==============================================================================
--- llvm/trunk/lib/Object/MachOObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/MachOObjectFile.cpp Sun Apr 7 14:38:15 2013
@@ -55,7 +55,8 @@ MachOObjectFile::MachOObjectFile(MemoryB
}
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 *
More information about the llvm-commits
mailing list