[COFF] Fix section name for constants larger than 64 bits on Windows
authorFangrui Song <maskray@google.com>
Thu, 22 Aug 2019 01:48:34 +0000 (01:48 +0000)
committerFangrui Song <maskray@google.com>
Thu, 22 Aug 2019 01:48:34 +0000 (01:48 +0000)
commit246750c2a91951fc4b77ebe43d568f47843e6399
tree6f7b6233086711c7234d45ac41405910912cc5f7
parent22dc44ff896a34a94c7ed6d3bf7b577b98e34fbd
[COFF] Fix section name for constants larger than 64 bits on Windows

APIntToHexString returns wrong value ("0000000000000000ffffffffffffffff")
for integer larger than 64 bits, and thus
TargetLoweringObjectFileCOFF::getSectionForConstant returns same section name
for all numbers larger than 64 bits. This patch tries to fix it.

Differential Revision: https://reviews.llvm.org/D66458
Patch by Senran Zhang

llvm-svn: 369610
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/test/CodeGen/X86/coff-fp-section-name.ll [new file with mode: 0644]