diff options
author | Devang Patel <dpatel@apple.com> | 2010-09-28 18:08:20 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-09-28 18:08:20 +0000 |
commit | 1a7ca0354a44e321d5f4839a73239e6eaec54ad5 (patch) | |
tree | b209a14a321a2a018ed688fee1bf3e626f5a1dbc /lib/Analysis/DebugInfo.cpp | |
parent | c2ec02c1833f00a3b3996d381f7ad5d41f6c47c9 (diff) |
Provide an interface to let FEs anchor debug info for types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114969 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r-- | lib/Analysis/DebugInfo.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index fec269e220..dba7b8f242 100644 --- a/lib/Analysis/DebugInfo.cpp +++ b/lib/Analysis/DebugInfo.cpp @@ -1306,6 +1306,14 @@ Instruction *DIFactory::InsertDbgValueIntrinsic(Value *V, uint64_t Offset, return CallInst::Create(ValueFn, Args, Args+3, "", InsertAtEnd); } +// RecordType - Record DIType in a module such that it is not lost even if +// it is not referenced through debug info anchors. +void DIFactory::RecordType(DIType T) { + NamedMDNode *NMD = M.getOrInsertNamedMetadata("llvm.dbg.ty"); + NMD->addOperand(T); +} + + //===----------------------------------------------------------------------===// // DebugInfoFinder implementations. //===----------------------------------------------------------------------===// |