Fix thinko in yesterday's fix.

Providing linkage name for function static variable confuses gdb, so don't do that.

llvm-svn: 103779
This commit is contained in:
Devang Patel 2010-05-14 16:55:25 +00:00
parent 30e3db2ba3
commit ec2a9abd4a
1 changed files with 1 additions and 1 deletions

View File

@ -1575,7 +1575,7 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var,
}
llvm::StringRef DeclName = D->getName();
llvm::StringRef LinkageName;
if (D->getDeclContext() && isa<FunctionDecl>(D->getDeclContext()))
if (D->getDeclContext() && !isa<FunctionDecl>(D->getDeclContext()))
LinkageName = Var->getName();
llvm::DIDescriptor DContext =
getContextDescriptor(dyn_cast<Decl>(D->getDeclContext()), Unit);