From 1aef163a6815e7bff675f83ddec8b063d6082e86 Mon Sep 17 00:00:00 2001 From: Amara Emerson Date: Fri, 3 May 2013 23:57:17 +0000 Subject: Revert r181009. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181079 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-readobj/ELFDumper.cpp | 63 ------------------------------------- tools/llvm-readobj/ObjDumper.h | 1 - tools/llvm-readobj/llvm-readobj.cpp | 6 ---- 3 files changed, 70 deletions(-) (limited to 'tools') diff --git a/tools/llvm-readobj/ELFDumper.cpp b/tools/llvm-readobj/ELFDumper.cpp index 6fa9026..ea1b83f 100644 --- a/tools/llvm-readobj/ELFDumper.cpp +++ b/tools/llvm-readobj/ELFDumper.cpp @@ -51,7 +51,6 @@ public: virtual void printDynamicTable() LLVM_OVERRIDE; virtual void printNeededLibraries() LLVM_OVERRIDE; virtual void printProgramHeaders() LLVM_OVERRIDE; - virtual void printARMBuildAttributes() LLVM_OVERRIDE; private: typedef ELFObjectFile ELFO; @@ -859,65 +858,3 @@ void ELFDumper::printProgramHeaders() { W.printNumber("Alignment", PI->p_align); } } - -#define LLVM_READOBJ_ARMATTR_NUMCASE(X) case ARMBuildAttrs::X: \ - W.printNumber(" Tag_" #X, BuildAttrs.Tag_##X); \ - break; \ - -#define LLVM_READOBJ_ARMATTR_STRCASE(X) case ARMBuildAttrs::X: \ - W.printString(" Tag_" #X, BuildAttrs.Tag_##X); \ - break; \ - -template -void ELFDumper::printARMBuildAttributes() { - if (Obj->getArch() != Triple::arm || !Obj->hasARMBuildAttributes()) - return; - ARMBuildAttrs::ARMGenericBuildAttrInfo BuildAttrs; - SmallVector AttrsRead; - error_code EC = Obj->readARMBuildAttributes(BuildAttrs, AttrsRead); - if (error(EC)) - return; - - DictScope D(W, "ARMBuildAttributes"); - - for (SmallVector::iterator I = AttrsRead.begin(), - E = AttrsRead.end(); I != E; ++I) { - switch (*I) { - LLVM_READOBJ_ARMATTR_STRCASE(CPU_name) - LLVM_READOBJ_ARMATTR_STRCASE(CPU_raw_name) - LLVM_READOBJ_ARMATTR_NUMCASE(CPU_arch) - LLVM_READOBJ_ARMATTR_NUMCASE(CPU_arch_profile) - LLVM_READOBJ_ARMATTR_NUMCASE(ARM_ISA_use) - LLVM_READOBJ_ARMATTR_NUMCASE(THUMB_ISA_use) - LLVM_READOBJ_ARMATTR_NUMCASE(FP_arch) - LLVM_READOBJ_ARMATTR_NUMCASE(WMMX_arch) - LLVM_READOBJ_ARMATTR_NUMCASE(Advanced_SIMD_arch) - LLVM_READOBJ_ARMATTR_NUMCASE(PCS_config) - LLVM_READOBJ_ARMATTR_NUMCASE(ABI_PCS_R9_use) - LLVM_READOBJ_ARMATTR_NUMCASE(ABI_PCS_RW_data) - LLVM_READOBJ_ARMATTR_NUMCASE(ABI_PCS_RO_data) - LLVM_READOBJ_ARMATTR_NUMCASE(ABI_PCS_GOT_use) - LLVM_READOBJ_ARMATTR_NUMCASE(ABI_PCS_wchar_t) - LLVM_READOBJ_ARMATTR_NUMCASE(ABI_FP_rounding) - LLVM_READOBJ_ARMATTR_NUMCASE(ABI_FP_denormal) - LLVM_READOBJ_ARMATTR_NUMCASE(ABI_FP_exceptions) - LLVM_READOBJ_ARMATTR_NUMCASE(ABI_FP_user_exceptions) - LLVM_READOBJ_ARMATTR_NUMCASE(ABI_FP_number_model) - LLVM_READOBJ_ARMATTR_NUMCASE(ABI_align8_needed) - LLVM_READOBJ_ARMATTR_NUMCASE(ABI_align8_preserved) - LLVM_READOBJ_ARMATTR_NUMCASE(ABI_enum_size) - LLVM_READOBJ_ARMATTR_NUMCASE(ABI_HardFP_use) - LLVM_READOBJ_ARMATTR_NUMCASE(ABI_VFP_args) - LLVM_READOBJ_ARMATTR_NUMCASE(CPU_unaligned_access) - LLVM_READOBJ_ARMATTR_NUMCASE(FP_HP_extension) - LLVM_READOBJ_ARMATTR_NUMCASE(MPextension_use) - LLVM_READOBJ_ARMATTR_NUMCASE(DIV_use) - LLVM_READOBJ_ARMATTR_NUMCASE(T2EE_use) - LLVM_READOBJ_ARMATTR_NUMCASE(Virtualization_use) - LLVM_READOBJ_ARMATTR_NUMCASE(ABI_optimization_goals) - LLVM_READOBJ_ARMATTR_NUMCASE(ABI_FP_optimization_goals) - default: - break; - } - } -} diff --git a/tools/llvm-readobj/ObjDumper.h b/tools/llvm-readobj/ObjDumper.h index 9a8f0c1..6918e28 100644 --- a/tools/llvm-readobj/ObjDumper.h +++ b/tools/llvm-readobj/ObjDumper.h @@ -39,7 +39,6 @@ public: virtual void printDynamicTable() { } virtual void printNeededLibraries() { } virtual void printProgramHeaders() { } - virtual void printARMBuildAttributes() { } protected: StreamWriter& W; diff --git a/tools/llvm-readobj/llvm-readobj.cpp b/tools/llvm-readobj/llvm-readobj.cpp index d5eb854..2e95b6b 100644 --- a/tools/llvm-readobj/llvm-readobj.cpp +++ b/tools/llvm-readobj/llvm-readobj.cpp @@ -128,10 +128,6 @@ namespace opts { // -expand-relocs cl::opt ExpandRelocs("expand-relocs", cl::desc("Expand each shown relocation to multiple lines")); - - // -arm-buildattrs - cl::opt ArmBuildAttrs("arm-buildattrs", - cl::desc("Display ARM ELF build attributes")); } // namespace opts namespace llvm { @@ -225,8 +221,6 @@ static void dumpObject(const ObjectFile *Obj) { Dumper->printNeededLibraries(); if (opts::ProgramHeaders) Dumper->printProgramHeaders(); - if (opts::ArmBuildAttrs) - Dumper->printARMBuildAttributes(); } -- cgit v1.1