[cfe-commits] r51675 - in /cfe/trunk/lib/CodeGen: CGDebugInfo.cpp CGDebugInfo.h
Eli Friedman
eli.friedman at gmail.com
Thu May 29 04:08:21 PDT 2008
Author: efriedma
Date: Thu May 29 06:08:17 2008
New Revision: 51675
URL: http://llvm.org/viewvc/llvm-project?rev=51675&view=rev
Log:
A couple minor fixes to make debug info usable for arbitrary code: don't
emit incomplete types, because they crash llc, and always use the
logical location as the current location so we don't crash doing invalid
queries on CurLoc.
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
cfe/trunk/lib/CodeGen/CGDebugInfo.h
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=51675&r1=51674&r2=51675&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu May 29 06:08:17 2008
@@ -77,6 +77,11 @@
delete SubprogramAnchor;
}
+void CGDebugInfo::setLocation(SourceLocation loc)
+{
+ SourceManager &SM = M->getContext().getSourceManager();
+ CurLoc = SM.getLogicalLoc(loc);
+}
/// getCastValueFor - Return a llvm representation for a given debug information
/// descriptor cast to an empty struct pointer.
@@ -339,6 +344,8 @@
llvm::TypeDesc *
CGDebugInfo::getOrCreateType(QualType type, llvm::CompileUnitDesc *Unit)
{
+ // TODO: Re-enable once we can generate all types
+ return 0;
if (type.isNull())
return NULL;
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.h?rev=51675&r1=51674&r2=51675&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.h (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.h Thu May 29 06:08:17 2008
@@ -80,7 +80,7 @@
CGDebugInfo(CodeGenModule *m);
~CGDebugInfo();
- void setLocation(SourceLocation loc) { CurLoc = loc; }
+ void setLocation(SourceLocation loc);
/// EmitStopPoint - Emit a call to llvm.dbg.stoppoint to indicate a change of
/// source line.
More information about the cfe-commits
mailing list