[Support] Introduce createStringError helper function
authorVictor Leschuk <vleschuk@accesssoftek.com>
Thu, 26 Jul 2018 02:21:40 +0000 (02:21 +0000)
committerVictor Leschuk <vleschuk@accesssoftek.com>
Thu, 26 Jul 2018 02:21:40 +0000 (02:21 +0000)
commite58e9907aca25316afad9573df077325f717ef18
treeba0e9e53a6bb6ad0fc782e2377bf5addb40ac3d5
parentfdd089aa14d90fcf220d54fb3fbfd2170f89de78
[Support] Introduce createStringError helper function

The function in question is copy-pasted lots of times in DWARF-related classes.
Thus it will make sense to place its implementation into the Support library.

Reviewed by: lhames

Differential Revision: https://reviews.llvm.org/D49824

llvm-svn: 337995
llvm/include/llvm/Support/Error.h
llvm/lib/Support/Error.cpp
llvm/unittests/Support/ErrorTest.cpp