Add a debug info code generation level to the compile unit metadata

and update everything accordingly. This can be used to conditionalize
the amount of output in the backend based on the amount of debug
requested/metadata emission scheme by a front end (e.g. clang).

Paired with a commit to clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202332 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2014-02-27 01:24:56 +00:00
parent dac5e919df
commit 0181303087
7 changed files with 13 additions and 7 deletions

View File

@ -97,7 +97,9 @@ DICompileUnit DIBuilder::createCompileUnit(unsigned Lang, StringRef Filename,
StringRef Directory,
StringRef Producer, bool isOptimized,
StringRef Flags, unsigned RunTimeVer,
StringRef SplitName) {
StringRef SplitName,
DebugEmissionKind Kind) {
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");
@ -127,7 +129,8 @@ DICompileUnit DIBuilder::createCompileUnit(unsigned Lang, StringRef Filename,
TempSubprograms,
TempGVs,
TempImportedModules,
MDString::get(VMContext, SplitName)
MDString::get(VMContext, SplitName),
ConstantInt::get(Type::getInt32Ty(VMContext), Kind)
};
MDNode *CUNode = MDNode::get(VMContext, Elts);