mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Fix uninitialized warning in llvm/lib/IR/DataLayout.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199147 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
df7e862802
commit
486fdf2e65
@ -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;
|
||||
}
|
||||
|
||||
|
4
test/Assembler/getInt.ll
Normal file
4
test/Assembler/getInt.ll
Normal file
@ -0,0 +1,4 @@
|
||||
; RUN: opt < %s
|
||||
; XFAIL: *
|
||||
|
||||
target datalayout = "p:4294967296:64:64"
|
Loading…
Reference in New Issue
Block a user