Fix unused variable warning.
authorChad Rosier <mcrosier@apple.com>
Mon, 22 Apr 2013 20:42:32 +0000 (20:42 +0000)
committerChad Rosier <mcrosier@apple.com>
Mon, 22 Apr 2013 20:42:32 +0000 (20:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180044 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/AsmParser/X86AsmParser.cpp

index 2ca863509f8fddfd653f546c207eb868f51646dd..282064d383be1cc39083ed090e7fabbf0945f99c 100644 (file)
@@ -1130,7 +1130,7 @@ X86AsmParser::CreateMemForInlineAsm(unsigned SegReg, const MCExpr *Disp,
                                     InlineAsmIdentifierInfo &Info){
 
 
-  if (const MCSymbolRefExpr *SymRef = dyn_cast<MCSymbolRefExpr>(Disp)) {
+  if (Disp && isa<MCSymbolRefExpr>(Disp)) {
     // If this is not a VarDecl then assume it is a FuncDecl or some other label
     // reference.  We need an 'r' constraint here, so we need to create register
     // operand to ensure proper matching.  Just pick a GPR based on the size of