aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp4
-rw-r--r--test/CodeGen/2009-10-20-GlobalDebug.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 0e7318c6b7..9bd9444703 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -1364,7 +1364,7 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var,
}
DebugFactory.CreateGlobalVariable(getContext(Decl, Unit),
- Name, Name, "", Unit, LineNo,
+ Name, Name, Name, Unit, LineNo,
getOrCreateType(T, Unit),
Var->hasInternalLinkage(),
true/*definition*/, Var);
@@ -1394,7 +1394,7 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var,
ArrayType::Normal, 0);
}
- DebugFactory.CreateGlobalVariable(Unit, Name, Name, "", Unit, LineNo,
+ DebugFactory.CreateGlobalVariable(Unit, Name, Name, Name, Unit, LineNo,
getOrCreateType(T, Unit),
Var->hasInternalLinkage(),
true/*definition*/, Var);
diff --git a/test/CodeGen/2009-10-20-GlobalDebug.c b/test/CodeGen/2009-10-20-GlobalDebug.c
new file mode 100644
index 0000000000..33d89f1204
--- /dev/null
+++ b/test/CodeGen/2009-10-20-GlobalDebug.c
@@ -0,0 +1,4 @@
+// RUN: clang -S -g -dA %s -o - | FileCheck %s
+int global;
+// CHECK: asciz "global" ## DW_AT_MIPS_linkage_name
+int main() { return 0;}