OSDN Git Service

Check the return value of std::getenv.
authorMikhail Glushenkov <foldr@codedgers.com>
Wed, 12 Nov 2008 12:41:18 +0000 (12:41 +0000)
committerMikhail Glushenkov <foldr@codedgers.com>
Wed, 12 Nov 2008 12:41:18 +0000 (12:41 +0000)
commit6766572dcbb00008c14f66bc81d494356ce85268
treea8f094c0de6e3406c2c148a5d4efc8cb09248f7f
parent9a365b6acb3e43dace074dc28264ed70511b103c
Check the return value of std::getenv.

When constructing std::strings from C strings, we should check the input
value to be not NULL so that the std::string constructor does not
segfault.
Fixes #3047.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59131 91177308-0d34-0410-b5e6-96231b3b80d8
utils/TableGen/LLVMCConfigurationEmitter.cpp