]> granicus.if.org Git - clang/commit
CodeGen: Don't crash when replacing functions
authorDavid Majnemer <david.majnemer@gmail.com>
Sat, 29 Mar 2014 14:19:55 +0000 (14:19 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sat, 29 Mar 2014 14:19:55 +0000 (14:19 +0000)
commit6614bf2dd1f7e09bbef38b243fd42f7182897908
treedc632d398c6649052e671d6d90256cde96f5f143
parent4eff9acb0b3ea44ca26289885766b53528b5e44e
CodeGen: Don't crash when replacing functions

The peculiarities of C99 create scenario where an LLVM IR function
declaration may need to be replaced with a definition baring a different
type because the prototype and definition are not required to agree.

However, we were not properly deferring this when it occurred.

This fixes PR19280.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205099 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenModule.cpp
test/CodeGen/inline2.c