aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp7
-rw-r--r--lib/CodeGen/CGDebugInfo.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index e703396979..1827fc980c 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -77,6 +77,11 @@ CGDebugInfo::~CGDebugInfo()
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 @@ CGDebugInfo::getOrCreateFunctionType(QualType type, llvm::CompileUnitDesc *Unit)
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;
diff --git a/lib/CodeGen/CGDebugInfo.h b/lib/CodeGen/CGDebugInfo.h
index 9ac77a4b0d..4e6626fc4d 100644
--- a/lib/CodeGen/CGDebugInfo.h
+++ b/lib/CodeGen/CGDebugInfo.h
@@ -80,7 +80,7 @@ public:
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.