From c32d55e17c8fc028facf726bb4365a8e23122174 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Mon, 7 May 2007 18:50:07 +0000 Subject: [PATCH] Initialize variable to null so it has a value in the off chance that a memory buffer couldn't be allocated. llvm-svn: 36904 --- llvm/tools/llvm-prof/llvm-prof.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/tools/llvm-prof/llvm-prof.cpp b/llvm/tools/llvm-prof/llvm-prof.cpp index f88f1fcc0284..c85b0da1bc6c 100644 --- a/llvm/tools/llvm-prof/llvm-prof.cpp +++ b/llvm/tools/llvm-prof/llvm-prof.cpp @@ -117,7 +117,7 @@ int main(int argc, char **argv) { // Read in the bytecode file... std::string ErrorMessage; - Module *M; + Module *M = 0; if (MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(BytecodeFile, &ErrorMessage)) { M = ParseBitcodeFile(Buffer, &ErrorMessage);