summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitccfacfff9a707e283e208a3d5295557cc060ac36 (patch)
treee711de52ac95930fe24aefb4fe27dee63aac9b2f /llvm/lib/Analysis
parent832959536a6471eef3bee0bd4774b49ac76d46eb (diff)
downloadbcm5719-llvm-ccfacfff9a707e283e208a3d5295557cc060ac36.tar.gz
bcm5719-llvm-ccfacfff9a707e283e208a3d5295557cc060ac36.zip
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. llvm-svn: 62888
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/DebugInfo.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp
index 34ccd0a97cf..2f336572a1d 100644
--- a/llvm/lib/Analysis/DebugInfo.cpp
+++ b/llvm/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]));
OpenPOWER on IntegriCloud