Handle the removal of the debug chain.
llvm-svn: 26729
diff --git a/llvm/lib/Target/CBackend/Writer.cpp b/llvm/lib/Target/CBackend/Writer.cpp
index 57723b4..43b4b71 100644
--- a/llvm/lib/Target/CBackend/Writer.cpp
+++ b/llvm/lib/Target/CBackend/Writer.cpp
@@ -1691,8 +1691,8 @@
case Intrinsic::dbg_stoppoint: {
// If we use writeOperand directly we get a "u" suffix which is rejected
// by gcc.
- ConstantUInt *SI = cast<ConstantUInt>(I.getOperand(2));
- GlobalVariable *GV = cast<GlobalVariable>(I.getOperand(4));
+ ConstantUInt *SI = cast<ConstantUInt>(I.getOperand(1));
+ GlobalVariable *GV = cast<GlobalVariable>(I.getOperand(3));
ConstantStruct *CS = cast<ConstantStruct>(GV->getInitializer());
std::string FileName = CS->getOperand(4)->getStringValue();
std::string Directory = CS->getOperand(5)->getStringValue();