]> granicus.if.org Git - clang/commit
[CodeGen] Don't crash when sizeof(long) != 4 for some intrins
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 27 May 2016 02:06:19 +0000 (02:06 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 27 May 2016 02:06:19 +0000 (02:06 +0000)
commit59a255152d5af0f2f5d432a06400dd30d17df2a0
tree0b42942640f5696f55a346cdf4c5d08b50fbc138
parente9b54fb2e9d2c0e797501c02e8472262467ab9fc
[CodeGen] Don't crash when sizeof(long) != 4 for some intrins

_InterlockedIncrement and _InterlockedDecrement have 'long' in their
prototypes.  We assumed 'long' was the same size as an i32 which is
incorrect for other targets.

This fixes PR27892.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270953 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGBuiltin.cpp
test/CodeGen/pr27892.c [new file with mode: 0644]