Support: ensure proper state in ErrorOr copy ctors before calling 'get'
authorMeador Inge <meadori@codesourcery.com>
Tue, 5 Feb 2013 15:41:27 +0000 (15:41 +0000)
committerMeador Inge <meadori@codesourcery.com>
Tue, 5 Feb 2013 15:41:27 +0000 (15:41 +0000)
commit2c6cf8e2c7d659e7c3a2332b13cba6b1f1baacac
tree4b91e32aaf1b054359956ca7abcdf60d7d0dd3f9
parent7ec43d9b3770d0607a08401ec784e12d4a63780a
Support: ensure proper state in ErrorOr copy ctors before calling 'get'

Some paths through the copy constructors for 'ErrorOr' were calling
'get' when 'HasError' and 'IsValid' were not properly initialized.
Depending on what happened to be in memory for those member variables
the asserts in 'get' might incorrectly fire.  Fixed by ensuring that
the member variables in question are always initialized before calling
'get'.

llvm-svn: 174381
llvm/include/llvm/Support/ErrorOr.h