diff options
Diffstat (limited to 'llvm/lib/IR')
| -rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 3be5e0f8496..38fc90f865e 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -695,6 +695,13 @@ DIArray DISubprogram::getVariables() const { return DIArray(); } +void DIScope::setFilename(StringRef Name, LLVMContext &Context) { + if (!DbgNode) + return; + MDString *MDName(MDString::get(Context, Name)); + const_cast<MDNode*>(getNodeField(DbgNode, 1))->replaceOperandWith(0, MDName); +} + StringRef DIScope::getFilename() const { if (!DbgNode) return StringRef(); |

