Use stripPointerCasts when checking for AllocaInsts for the stackprotector intrinsic.
[oota-llvm.git] / lib / VMCore / IntrinsicInst.cpp
index 6bd9431767e08b595e754943f84fcea262bcca54..c440275fc3a09673cede716086306f8df7dd3ffe 100644 (file)
@@ -29,7 +29,6 @@
 #include "llvm/Constants.h"
 #include "llvm/GlobalVariable.h"
 #include "llvm/Analysis/ValueTracking.h"
-#include "llvm/CodeGen/MachineDebugInfoDesc.h"
 #include "llvm/CodeGen/MachineModuleInfo.h"
 using namespace llvm;
 
@@ -65,7 +64,7 @@ Value *DbgStopPointInst::getFileName() const {
   GlobalVariable *GV = cast<GlobalVariable>(getContext());
   if (!GV->hasInitializer()) return NULL;
   ConstantStruct *CS = cast<ConstantStruct>(GV->getInitializer());
-  return CS->getOperand(4);
+  return CS->getOperand(3);
 }
 
 Value *DbgStopPointInst::getDirectory() const {