summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Transforms/Vectorize/VPlanLoopInfoTest.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2018-08-03 12:00:12 +0000
committerNico Weber <nicolasweber@gmx.de>2018-08-03 12:00:12 +0000
commitd48d5f086ff4d71ee03d3f0f068e69de7cb5f684 (patch)
tree4171105e6d6e0070d3ccae49984ad79b60c944f7 /llvm/unittests/Transforms/Vectorize/VPlanLoopInfoTest.cpp
parentf107b7275c7f4dfc6aea1461201ff30f421bd0e9 (diff)
downloadbcm5719-llvm-d48d5f086ff4d71ee03d3f0f068e69de7cb5f684.tar.gz
bcm5719-llvm-d48d5f086ff4d71ee03d3f0f068e69de7cb5f684.zip
lld-link: Fix subsystem inference for non-console apps on 32-bit, and fix entry point inference on 32-bit with /nodefaultlib
LinkerDriver::inferSubsystem() used to do Symtab->findUnderscore("WinMain"), but WinMain is stdcall in 32-bit and is hence is called _WinMain@16. Instead, Symtab->findMangle(mangle("WinMain")) needs to be called. But since LinkerDriver::inferSubsystem() and LinkerDriver::findDefaultEntry() both need to call this, introduce a common helper function for this and call it from both places. (Also call it for "main" for consistency, even though findUnderscore() is enough for main since that's __cdecl on 32-bit). This also exposed a bug for /nodefaultlib entrypoint inference: The code here called findMangle(Sym) instead of findMangle(mangle(Sym)), again doing the wrong thing on 32-bit. Fix that too. While here, make Driver::mangle() a static free function. https://reviews.llvm.org/D50184 llvm-svn: 338877
Diffstat (limited to 'llvm/unittests/Transforms/Vectorize/VPlanLoopInfoTest.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud