OSDN Git Service

[GlobalObject] Fix setSection("")
authorKeno Fischer <keno@alumni.harvard.edu>
Wed, 15 Feb 2017 21:42:42 +0000 (21:42 +0000)
committerKeno Fischer <keno@alumni.harvard.edu>
Wed, 15 Feb 2017 21:42:42 +0000 (21:42 +0000)
commitb863b6b817c34c5714c3bdf08e55980e8e245083
tree3131db4e1c6e2ddf7af143cfbaf9fb8bf8897d4c
parent75af20e9434182891049be66a1ea132e78276277
[GlobalObject] Fix setSection("")

Summary:
In rL291613, the section name was interned in LLVMContext. However,
this broke the ability to remove the section from a GlobalObject,
because it tried to intern empty strings, which is not allowed.
Fix that and add an appropriate regression test.

Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D29795

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295238 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Globals.cpp
unittests/IR/FunctionTest.cpp