summaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-01-23 22:33:47 +0000
committerDevang Patel <dpatel@apple.com>2009-01-23 22:33:47 +0000
commit3b64c6bc2916bc62a99ef8a2995a426d994e1a04 (patch)
treecc7d737ff28292510cd2195c01a8d164017363ae /lib/Analysis
parent91387de8cece07e871e02148d62fd3f17d831cad (diff)
downloadllvm-3b64c6bc2916bc62a99ef8a2995a426d994e1a04.tar.gz
llvm-3b64c6bc2916bc62a99ef8a2995a426d994e1a04.tar.bz2
llvm-3b64c6bc2916bc62a99ef8a2995a426d994e1a04.tar.xz
Introduce two DWARF attribute extentions DW_AT_APPLE_optimized, DW_AT_APPLE_flags.
DW_AT_APPLE_optimized flag is set when a compile_unit is optimized. The debugger takes advantage of this information some way. DW_AT_APPLE_flags encodes command line options when certain env. variable is set. This is used by build engineers to track various gcc command lines used by by a project, irrespective of whether the project used makefile, Xcode or something else. llvm-gcc patch is next. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62888 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/DebugInfo.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 34ccd0a97c..2f336572a1 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -440,14 +440,18 @@ DISubrange DIFactory::GetOrCreateSubrange(int64_t Lo, int64_t Hi) {
DICompileUnit DIFactory::CreateCompileUnit(unsigned LangID,
const std::string &Filename,
const std::string &Directory,
- const std::string &Producer) {
+ const std::string &Producer,
+ bool isOptimized,
+ const char *Flags) {
Constant *Elts[] = {
GetTagConstant(dwarf::DW_TAG_compile_unit),
getCastToEmpty(GetOrCreateCompileUnitAnchor()),
ConstantInt::get(Type::Int32Ty, LangID),
GetStringConstant(Filename),
GetStringConstant(Directory),
- GetStringConstant(Producer)
+ GetStringConstant(Producer),
+ ConstantInt::get(Type::Int1Ty, isOptimized),
+ GetStringConstant(Flags)
};
Constant *Init = ConstantStruct::get(Elts, sizeof(Elts)/sizeof(Elts[0]));