[llvm-commits] [dragonegg] r94890 - /dragonegg/trunk/llvm-debug.cpp
Duncan Sands
baldrick at free.fr
Sat Jan 30 06:09:16 PST 2010
Author: baldrick
Date: Sat Jan 30 08:09:16 2010
New Revision: 94890
URL: http://llvm.org/viewvc/llvm-project?rev=94890&view=rev
Log:
Port llvm-gcc commit 93620 (dpatel):
- There is not any reason to skip function name if its debug info is emitted.
- Update code to match comment.
Modified:
dragonegg/trunk/llvm-debug.cpp
Modified: dragonegg/trunk/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-debug.cpp?rev=94890&r1=94889&r2=94890&view=diff
==============================================================================
--- dragonegg/trunk/llvm-debug.cpp (original)
+++ dragonegg/trunk/llvm-debug.cpp Sat Jan 30 08:09:16 2010
@@ -258,20 +258,21 @@
Virtuality = dwarf::DW_VIRTUALITY_virtual;
ContainingType = getOrCreateType(DECL_CONTEXT (FnDecl));
}
- bool UseModuleContext = false;
+
+ bool ArtificialFnWithAbstractOrigin = false;
// If this artificial function has abstract origin then put this function
// at module scope. The abstract copy will be placed in appropriate region.
- if (DECL_ABSTRACT_ORIGIN (FnDecl) != FnDecl
- && DECL_ARTIFICIAL(FnDecl))
- UseModuleContext = true;
-
+ if (DECL_ARTIFICIAL (FnDecl)
+ && DECL_ABSTRACT_ORIGIN (FnDecl)
+ && DECL_ABSTRACT_ORIGIN (FnDecl) != FnDecl)
+ ArtificialFnWithAbstractOrigin = true;
+
const char *FnName = lang_hooks.dwarf_name(FnDecl, 0);
DISubprogram SP =
- DebugFactory.CreateSubprogram((UseModuleContext ?
- getOrCreateCompileUnit(main_input_filename) :
- findRegion(DECL_CONTEXT(FnDecl))),
- (UseModuleContext ? FnName : StringRef()),
- (UseModuleContext ? FnName : StringRef()),
+ DebugFactory.CreateSubprogram(ArtificialFnWithAbstractOrigin ?
+ getOrCreateCompileUnit(main_input_filename) :
+ findRegion (DECL_CONTEXT(FnDecl)),
+ FnName, FnName,
LinkageName,
getOrCreateCompileUnit(Loc.file), lineno,
FNType,
More information about the llvm-commits
mailing list