aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/DIBuilder.h7
-rw-r--r--include/llvm/DebugInfo.h2
-rw-r--r--lib/IR/DIBuilder.cpp5
3 files changed, 10 insertions, 4 deletions
diff --git a/include/llvm/DIBuilder.h b/include/llvm/DIBuilder.h
index 3de75ffd2d..5efbb9ef5b 100644
--- a/include/llvm/DIBuilder.h
+++ b/include/llvm/DIBuilder.h
@@ -91,9 +91,12 @@ namespace llvm {
/// by a tool analyzing generated debugging information.
/// @param RV This indicates runtime version for languages like
/// Objective-C.
+ /// @param SplitName The name of the file that we'll split debug info out
+ /// into.
void createCompileUnit(unsigned Lang, StringRef File, StringRef Dir,
- StringRef Producer,
- bool isOptimized, StringRef Flags, unsigned RV);
+ StringRef Producer, bool isOptimized,
+ StringRef Flags, unsigned RV,
+ StringRef SplitName = StringRef());
/// createFile - Create a file descriptor to hold debugging information
/// for a file.
diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h
index a281f22ff8..c557a7afb3 100644
--- a/include/llvm/DebugInfo.h
+++ b/include/llvm/DebugInfo.h
@@ -203,6 +203,8 @@ namespace llvm {
DIArray getSubprograms() const;
DIArray getGlobalVariables() const;
+ StringRef getSplitDebugFilename() const { return getStringField(14); }
+
/// Verify - Verify that a compile unit is well formed.
bool Verify() const;
};
diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp
index 3b691194b4..bab30e4ef1 100644
--- a/lib/IR/DIBuilder.cpp
+++ b/lib/IR/DIBuilder.cpp
@@ -76,7 +76,7 @@ static MDNode *getNonCompileUnitScope(MDNode *N) {
void DIBuilder::createCompileUnit(unsigned Lang, StringRef Filename,
StringRef Directory, StringRef Producer,
bool isOptimized, StringRef Flags,
- unsigned RunTimeVer) {
+ unsigned RunTimeVer, StringRef SplitName) {
assert(((Lang <= dwarf::DW_LANG_Python && Lang >= dwarf::DW_LANG_C89) ||
(Lang <= dwarf::DW_LANG_hi_user && Lang >= dwarf::DW_LANG_lo_user)) &&
"Invalid Language tag");
@@ -106,7 +106,8 @@ void DIBuilder::createCompileUnit(unsigned Lang, StringRef Filename,
TempEnumTypes,
TempRetainTypes,
TempSubprograms,
- TempGVs
+ TempGVs,
+ MDString::get(VMContext, SplitName)
};
TheCU = DICompileUnit(MDNode::get(VMContext, Elts));