[llvm-commits] [llvm] r72768 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp

Duncan Sands baldrick at free.fr
Wed Jun 3 05:05:31 PDT 2009


Author: baldrick
Date: Wed Jun  3 07:05:18 2009
New Revision: 72768

URL: http://llvm.org/viewvc/llvm-project?rev=72768&view=rev
Log:
Avoid a warning "'U' might be used uninitialized in
this function" when using a not-too-smart compiler.

Modified:
    llvm/trunk/lib/Target/X86/X86FastISel.cpp

Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=72768&r1=72767&r2=72768&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Wed Jun  3 07:05:18 2009
@@ -321,7 +321,7 @@
 /// X86SelectAddress - Attempt to fill in an address from the given value.
 ///
 bool X86FastISel::X86SelectAddress(Value *V, X86AddressMode &AM, bool isCall) {
-  User *U;
+  User *U = NULL;
   unsigned Opcode = Instruction::UserOp1;
   if (Instruction *I = dyn_cast<Instruction>(V)) {
     Opcode = I->getOpcode();





More information about the llvm-commits mailing list