More strict error checking in parseSpecifier + simplified code.
authorPatrik Hagglund <patrik.h.hagglund@ericsson.com>
Fri, 30 Nov 2012 10:06:59 +0000 (10:06 +0000)
committerPatrik Hagglund <patrik.h.hagglund@ericsson.com>
Fri, 30 Nov 2012 10:06:59 +0000 (10:06 +0000)
commit086ee1ee502f703e07692cf10cfb1c54d3a60f25
tree8446fbd219b81792254a8df7acf64ca63217d11d
parent6a786e66cf047d64636e910f8678015cfaa5e55b
More strict error checking in parseSpecifier + simplified code.

For example, don't allow empty strings to be passed to getInt.

Move asserts inside parseSpecifier. (One day we may want to pass parse
error messages to the user - from LLParser - instead of using asserts,
but keep the code simple until then. There have been an attempt to do
this. See r142288, which got reverted, and r142605.)

llvm-svn: 168991
llvm/include/llvm/DataLayout.h
llvm/lib/VMCore/DataLayout.cpp