aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DebugInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r--lib/Analysis/DebugInfo.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 10356e59fa..12bb2921f5 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -453,7 +453,8 @@ DICompileUnit DIFactory::CreateCompileUnit(unsigned LangID,
const std::string &Producer,
bool isMain,
bool isOptimized,
- const char *Flags) {
+ const char *Flags,
+ unsigned RunTimeVer) {
Constant *Elts[] = {
GetTagConstant(dwarf::DW_TAG_compile_unit),
getCastToEmpty(GetOrCreateCompileUnitAnchor()),
@@ -463,7 +464,8 @@ DICompileUnit DIFactory::CreateCompileUnit(unsigned LangID,
GetStringConstant(Producer),
ConstantInt::get(Type::Int1Ty, isMain),
ConstantInt::get(Type::Int1Ty, isOptimized),
- GetStringConstant(Flags)
+ GetStringConstant(Flags),
+ ConstantInt::get(Type::Int32Ty, RunTimeVer)
};
Constant *Init = ConstantStruct::get(Elts, sizeof(Elts)/sizeof(Elts[0]));
@@ -573,7 +575,8 @@ DICompositeType DIFactory::CreateCompositeType(unsigned Tag,
uint64_t OffsetInBits,
unsigned Flags,
DIType DerivedFrom,
- DIArray Elements) {
+ DIArray Elements,
+ unsigned RuntimeLang) {
Constant *Elts[] = {
GetTagConstant(Tag),
@@ -586,7 +589,8 @@ DICompositeType DIFactory::CreateCompositeType(unsigned Tag,
ConstantInt::get(Type::Int64Ty, OffsetInBits),
ConstantInt::get(Type::Int32Ty, Flags),
getCastToEmpty(DerivedFrom),
- getCastToEmpty(Elements)
+ getCastToEmpty(Elements),
+ ConstantInt::get(Type::Int32Ty, RuntimeLang)
};
Constant *Init = ConstantStruct::get(Elts, sizeof(Elts)/sizeof(Elts[0]));