[llvm] [llvm-objdump][AVR] Detect AVR architecture from ELF flags for disassembling (PR #174731)

Ruoyu Qiu via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 18 03:52:25 PST 2026


================
@@ -2689,6 +2690,12 @@ static void disassembleObject(ObjectFile *Obj, bool InlineRelocs,
       Features.AddFeature(MAttrs[I]);
   } else if (MCPU.empty() && Obj->makeTriple().isAArch64()) {
     Features.AddFeature("+all");
+  } else if (MCPU.empty() && Obj->makeTriple().isAVR()) {
+    // Assign attributes based on the AVR architecture version
+    if (const auto *ELFFile = dyn_cast<ELFObjectFileBase>(Obj)) {
----------------
cabbaken wrote:

Applied. 

https://github.com/llvm/llvm-project/pull/174731


More information about the llvm-commits mailing list