RUN: llvm-readobj --coff-imports %p/Inputs/imports.exe.coff-i386 | FileCheck -check-prefix=X86 %s
RUN: llvm-readobj --coff-imports %p/Inputs/imports.exe.coff-x86-64 | FileCheck -check-prefix=X64  %s

X86:      Import {
X86-NEXT:   Name: KERNEL32.dll
X86-NEXT:   ImportLookupTableRVA: 0x2108
X86-NEXT:   ImportAddressTableRVA: 0x2000
X86-NEXT:   Symbol: ExitProcess (337)
X86-NEXT:   Symbol: GetProcAddress (669)
X86-NEXT:   Symbol: FreeLibrary (414)
X86-NEXT:   Symbol: GetLastError (592)
X86-NEXT:   Symbol: RaiseException (1087)
X86-NEXT:   Symbol: LoadLibraryExA (934)
X86-NEXT: }
X86-NEXT: Import {
X86-NEXT:   Name: USER32.dll
X86-NEXT:   ImportLookupTableRVA: 0x2124
X86-NEXT:   ImportAddressTableRVA: 0x201C
X86-NEXT:   Symbol: MessageBoxA (582)
X86-NEXT: }
X86-NEXT: Import {
X86-NEXT:   Name: mydll.dll
X86-NEXT:   ImportLookupTableRVA: 0x212C
X86-NEXT:   ImportAddressTableRVA: 0x2024
X86-NEXT:   Symbol: Func1 (0)
X86-NEXT:   Symbol: Func2 (1)
X86-NEXT:   Symbol:  (3)
X86-NEXT: }
X86-NEXT: DelayImport {
X86-NEXT:   Name: lazyload.dll
X86-NEXT:   Attributes: 0x1
X86-NEXT:   ModuleHandle: 0x301C
X86-NEXT:   ImportAddressTable: 0x3010
X86-NEXT:   ImportNameTable: 0x2090
X86-NEXT:   BoundDelayImportTable: 0x20AC
X86-NEXT:   UnloadDelayImportTable: 0x0
X86-NEXT:   Import {
X86-NEXT:     Symbol: Func5 (0)
X86-NEXT:     Address: 0x401073
X86-NEXT:   }
X86-NEXT:   Import {
X86-NEXT:     Symbol: Func4 (0)
X86-NEXT:     Address: 0x401052
X86-NEXT:   }
X86-NEXT: }

X64:      Import {
X64-NEXT:   Name: KERNEL32.dll
X64-NEXT:   ImportLookupTableRVA: 0x2170
X64-NEXT:   ImportAddressTableRVA: 0x2000
X64-NEXT:   Symbol: ExitProcess (343)
X64-NEXT:   Symbol: GetProcAddress (676)
X64-NEXT:   Symbol: FreeLibrary (420)
X64-NEXT:   Symbol: GetLastError (598)
X64-NEXT:   Symbol: RaiseException (1091)
X64-NEXT:   Symbol: LoadLibraryExA (937)
X64-NEXT: }
X64-NEXT: Import {
X64-NEXT:   Name: USER32.dll
X64-NEXT:   ImportLookupTableRVA: 0x21A8
X64-NEXT:   ImportAddressTableRVA: 0x2038
X64-NEXT:   Symbol: MessageBoxA (586)
X64-NEXT: }
X64-NEXT: Import {
X64-NEXT:   Name: mydll.dll
X64-NEXT:   ImportLookupTableRVA: 0x21B8
X64-NEXT:   ImportAddressTableRVA: 0x2048
X64-NEXT:   Symbol: Func1 (0)
X64-NEXT:   Symbol: Func2 (1)
X64-NEXT:   Symbol:  (3)
X64-NEXT: }
X64-NEXT: DelayImport {
X64-NEXT:   Name: lazyload.dll
X64-NEXT:   Attributes: 0x1
X64-NEXT:   ModuleHandle: 0x3028
X64-NEXT:   ImportAddressTable: 0x3010
X64-NEXT:   ImportNameTable: 0x20E0
X64-NEXT:   BoundDelayImportTable: 0x2108
X64-NEXT:   UnloadDelayImportTable: 0x0
X64-NEXT:   Import {
X64-NEXT:     Symbol: Func5 (0)
X64-NEXT:     Address: 0x1400010F1
X64-NEXT:   }
X64-NEXT:   Import {
X64-NEXT:     Symbol: Func4 (0)
X64-NEXT:     Address: 0x140001066
X64-NEXT:   }
X64-NEXT: }