[llvm] [llvm-ar][Object][COFF] Compute UseECMap in computeMemberData. (PR #85230)
Jacek Caban via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 15 05:25:45 PDT 2024
================
@@ -678,6 +678,25 @@ static bool isECObject(object::SymbolicFile &Obj) {
return false;
}
+static bool useECMap(object::SymbolicFile &Obj) {
+ if (Obj.isCOFF())
+ return COFF::isAnyArm64(cast<COFFObjectFile>(&Obj)->getMachine());
+
+ if (Obj.isCOFFImportFile())
+ return COFF::isAnyArm64(cast<COFFImportFile>(&Obj)->getMachine());
+
+ if (Obj.isIR()) {
+ Expected<std::string> TripleStr =
+ getBitcodeTargetTriple(Obj.getMemoryBufferRef());
+ if (!TripleStr)
+ return false;
+ Triple T(*TripleStr);
+ return T.getArch() == Triple::aarch64;
----------------
cjacek wrote:
The whole check is done only for K_COFF format, but sure, it would be better to be more strict here. I will change it.
https://github.com/llvm/llvm-project/pull/85230
More information about the llvm-commits
mailing list