llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.39k stars 12.15k forks source link

#pragma redefine_extname does not decorate target symbol #21272

Open llvmbot opened 10 years ago

llvmbot commented 10 years ago
Bugzilla Link 20898
Version trunk
OS All
Blocks llvm/llvm-project#7187
Reporter LLVM Bugzilla Contributor

Extended Description

Consider this testcase:

pragma redefine_extname name _imp__name

extern int name;

extern int name2;

pragma redefine_extname name2 _imp__name2

int f(void) { return name + name2; }

clang output: 00000003: A1 00 00 00 00 mov eax,dword ptr [_imp__name] 00000008: 03 05 00 00 00 00 add eax,dword ptr [_imp__name2]

gcc output: 00000003: 8B 15 00 00 00 00 mov edx,dword ptr [_impname] 00000009: A1 00 00 00 00 mov eax,dword ptr [imp__name2]

Tested with clang version 3.6.0 (217266) Target: i686-pc-windows-gnu Thread model: posix

llvmbot commented 3 years ago

mentioned in issue llvm/llvm-project#7187