aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-07-14 21:31:22 +0000
committerDevang Patel <dpatel@apple.com>2009-07-14 21:31:22 +0000
commit6dba432c7b862c2219e5d6e52b0cd188fbf84b01 (patch)
tree1342be3f46a2fca0186d1a4b65eb8dc4b0c5aa70 /lib/CodeGen/CGDebugInfo.cpp
parent60fbe8f79838bff41fe9f5ed506ea9bc89d5d1df (diff)
Revert 75648 for now. It is causing test failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75684 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp27
1 files changed, 6 insertions, 21 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 3d7548e293..a5e4b2f3ad 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -19,7 +19,6 @@
#include "clang/AST/Expr.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/FileManager.h"
-#include "clang/Basic/TargetInfo.h"
#include "clang/Frontend/CompileOptions.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
@@ -34,22 +33,12 @@
using namespace clang;
using namespace clang::CodeGen;
-CGDebugInfo::CGDebugInfo(CodeGenModule *m, TargetInfo *t)
+CGDebugInfo::CGDebugInfo(CodeGenModule *m)
: M(m), isMainCompileUnitCreated(false), DebugFactory(M->getModule()),
BlockLiteralGenericSet(false) {
- LLVMMangler = new llvm::Mangler(m->getModule(), t->getUserLabelPrefix(), ".");
- // add chars used in ObjC method names so method names aren't mangled
- LLVMMangler->markCharAcceptable('[');
- LLVMMangler->markCharAcceptable(']');
- LLVMMangler->markCharAcceptable('(');
- LLVMMangler->markCharAcceptable(')');
- LLVMMangler->markCharAcceptable('-');
- LLVMMangler->markCharAcceptable('+');
- LLVMMangler->markCharAcceptable(' ');
}
CGDebugInfo::~CGDebugInfo() {
- delete LLVMMangler;
assert(RegionStack.empty() && "Region stack mismatch, stack not empty!");
}
@@ -831,6 +820,8 @@ llvm::DIType CGDebugInfo::getOrCreateType(QualType Ty,
void CGDebugInfo::EmitFunctionStart(const char *Name, QualType ReturnType,
llvm::Function *Fn,
CGBuilderTy &Builder) {
+ const char *LinkageName = Name;
+
// Skip the asm prefix if it exists.
//
// FIXME: This should probably be the unmangled name?
@@ -843,9 +834,7 @@ void CGDebugInfo::EmitFunctionStart(const char *Name, QualType ReturnType,
unsigned LineNo = SM.getPresumedLoc(CurLoc).getLine();
llvm::DISubprogram SP =
- DebugFactory.CreateSubprogram(Unit, Name, Name,
- LLVMMangler->getMangledName(Fn),
- Unit, LineNo,
+ DebugFactory.CreateSubprogram(Unit, Name, Name, LinkageName, Unit, LineNo,
getOrCreateType(ReturnType, Unit),
Fn->hasInternalLinkage(), true/*definition*/);
@@ -980,9 +969,7 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var,
ArrayType::Normal, 0);
}
- DebugFactory.CreateGlobalVariable(Unit, Name, Name,
- LLVMMangler->getMangledName(Var),
- Unit, LineNo,
+ DebugFactory.CreateGlobalVariable(Unit, Name, Name, "", Unit, LineNo,
getOrCreateType(T, Unit),
Var->hasInternalLinkage(),
true/*definition*/, Var);
@@ -1012,9 +999,7 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var,
ArrayType::Normal, 0);
}
- DebugFactory.CreateGlobalVariable(Unit, Name, Name,
- LLVMMangler->getMangledName(Var),
- Unit, LineNo,
+ DebugFactory.CreateGlobalVariable(Unit, Name, Name, "", Unit, LineNo,
getOrCreateType(T, Unit),
Var->hasInternalLinkage(),
true/*definition*/, Var);