diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2008-05-29 11:08:17 +0000 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2008-05-29 11:08:17 +0000 |
| commit | 32ea35fee916ed73fe343bad2de9a609eb2cca38 (patch) | |
| tree | 2ff8621db04b7e6c7585ac3cc634d272efdb77d9 /lib/CodeGen/CGDebugInfo.cpp | |
| parent | a07b76419a03f126c22949dce2e546ba4df0e415 (diff) | |
| download | clang-32ea35fee916ed73fe343bad2de9a609eb2cca38.tar.gz clang-32ea35fee916ed73fe343bad2de9a609eb2cca38.tar.bz2 clang-32ea35fee916ed73fe343bad2de9a609eb2cca38.tar.xz | |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51675 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
| -rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 7 |
1 files changed, 7 insertions, 0 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; |
