[cfe-commits] r102226 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Devang Patel
dpatel at apple.com
Fri Apr 23 17:49:16 PDT 2010
Author: dpatel
Date: Fri Apr 23 19:49:16 2010
New Revision: 102226
URL: http://llvm.org/viewvc/llvm-project?rev=102226&view=rev
Log:
Revert accidental check-in.
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=102226&r1=102225&r2=102226&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Fri Apr 23 19:49:16 2010
@@ -1333,21 +1333,9 @@
llvm::StringRef Name;
MangleBuffer LinkageName;
- // It is expected that CurLoc is set before using EmitFunctionStart.
- // Usually, CurLoc points to the left bracket location of compound
- // statement representing function body.
- llvm::DIFile Unit = getOrCreateFile(CurLoc);
- llvm::DIDescriptor Context(Unit.getNode());
const Decl *D = GD.getDecl();
if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
- if (const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(FD)) {
- if (MD->isStatic()) {
- QualType RTy = CGM.getContext().getTypeDeclType(MD->getParent());
- Context = CreateType(RTy->getAs<RecordType>(), getOrCreateFile(CurLoc));
- }
- }
-
// If there is a DISubprogram for this function available then use it.
llvm::DenseMap<const FunctionDecl *, llvm::WeakVH>::iterator
FI = SPCache.find(FD);
@@ -1372,11 +1360,15 @@
Name = Name.substr(1);
}
+ // It is expected that CurLoc is set before using EmitFunctionStart.
+ // Usually, CurLoc points to the left bracket location of compound
+ // statement representing function body.
+ llvm::DIFile Unit = getOrCreateFile(CurLoc);
SourceManager &SM = CGM.getContext().getSourceManager();
unsigned LineNo = SM.getPresumedLoc(CurLoc).getLine();
llvm::DISubprogram SP =
- DebugFactory.CreateSubprogram(Context, Name, Name, LinkageName, Unit, LineNo,
+ DebugFactory.CreateSubprogram(Unit, Name, Name, LinkageName, Unit, LineNo,
getOrCreateType(FnType, Unit),
Fn->hasInternalLinkage(), true/*definition*/);
More information about the cfe-commits
mailing list