summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorCameron McInally <cameron.mcinally@nyu.edu>2014-01-13 22:04:55 +0000
committerCameron McInally <cameron.mcinally@nyu.edu>2014-01-13 22:04:55 +0000
commitf0379fa41ab430ae9d38ecb294f5ca1176ecdfb0 (patch)
tree06e5f1782788f0dae057480845f5a4b90dd326b2 /llvm/lib/IR
parent6840282c9997413ae26d84ed555d955fdb642aff (diff)
downloadbcm5719-llvm-f0379fa41ab430ae9d38ecb294f5ca1176ecdfb0.tar.gz
bcm5719-llvm-f0379fa41ab430ae9d38ecb294f5ca1176ecdfb0.zip
Fix uninitialized warning in llvm/lib/IR/DataLayout.cpp.
llvm-svn: 199147
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/DataLayout.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/IR/DataLayout.cpp b/llvm/lib/IR/DataLayout.cpp
index 7df867279b2..7de41faac4f 100644
--- a/llvm/lib/IR/DataLayout.cpp
+++ b/llvm/lib/IR/DataLayout.cpp
@@ -207,9 +207,10 @@ static std::pair<StringRef, StringRef> split(StringRef Str, char Separator) {
/// Get an unsigned integer, including error checks.
static unsigned getInt(StringRef R) {
- unsigned Result = 0;
+ unsigned Result;
bool error = R.getAsInteger(10, Result); (void)error;
- assert(!error && "not a number, or does not fit in an unsigned int");
+ if (error)
+ report_fatal_error("not a number, or does not fit in an unsigned int");
return Result;
}
OpenPOWER on IntegriCloud