DI: Fold constant arguments into a single MDString
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfUnit.cpp
index b19b576cdf3d56b15c5194b9cac941354116f385..902dafa6f4605a4a599f054e77abd668b7dbebb1 100644 (file)
@@ -1713,7 +1713,7 @@ DIE *DwarfCompileUnit::getOrCreateGlobalVariableDIE(DIGlobalVariable GV) {
     // it is not a static member.
     if (!IsStaticMember)
       addConstantValue(*VariableDIE, CI, GTy);
-  } else if (const ConstantExpr *CE = getMergedGlobalExpr(GV->getOperand(11))) {
+  } else if (const ConstantExpr *CE = getMergedGlobalExpr(GV.getConstant())) {
     addToAccelTable = true;
     // GV is a merged global.
     DIELoc *Loc = new (DIEValueAllocator) DIELoc();