If VariableDIe is not created (may be because global was optimzed away) then do not try to use the variable die.

llvm-svn: 91077
This commit is contained in:
Devang Patel 2009-12-10 23:25:41 +00:00
parent e1f6280093
commit 2eec32d944
1 changed files with 2 additions and 0 deletions

View File

@ -1632,6 +1632,8 @@ void DwarfDebug::constructGlobalVariableDIE(MDNode *N) {
return;
DIE *VariableDie = createGlobalVariableDIE(DI_GV);
if (!VariableDie)
return;
// Add to map.
ModuleCU->insertDIE(N, VariableDie);