diff options
author | Alexey Samsonov <samsonov@google.com> | 2014-05-15 21:24:32 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2014-05-15 21:24:32 +0000 |
commit | dce67348a8fd518d9f605f7a137059065f13ed77 (patch) | |
tree | cc2522db0bfca588c908429e186fef57250550d3 /llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | |
parent | 900d46ff39de8a4d28cbcbcd864a650f778c5214 (diff) | |
download | llvm-dce67348a8fd518d9f605f7a137059065f13ed77.zip llvm-dce67348a8fd518d9f605f7a137059065f13ed77.tar.gz llvm-dce67348a8fd518d9f605f7a137059065f13ed77.tar.bz2 |
[DWARF parser] Use enums instead of bitfields in DILineInfoSpecifier.
It is more appropriate than the current situation, when one flag
(AbsoluteFilePath) is relevant only if another flag is set.
This refactoring would also simplify fetching the short function name
(stored in DW_AT_name) instead of a linkage name returned currently.
No functionality change.
llvm-svn: 208921
Diffstat (limited to 'llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp')
-rw-r--r-- | llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp index e41ae25..58914f0 100644 --- a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp +++ b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp @@ -108,13 +108,13 @@ static void DumpInput(const StringRef &Filename) { DICtx->dump(outs(), DumpType); } else { // Print line info for the specified address. - int SpecFlags = DILineInfoSpecifier::FileLineInfo | - DILineInfoSpecifier::AbsoluteFilePath; - if (PrintFunctions) - SpecFlags |= DILineInfoSpecifier::FunctionName; + DILineInfoSpecifier Spec( + DILineInfoSpecifier::FileLineInfoKind::AbsoluteFilePath, + PrintFunctions ? DILineInfoSpecifier::FunctionNameKind::LinkageName + : DILineInfoSpecifier::FunctionNameKind::None); if (PrintInlining) { DIInliningInfo InliningInfo = - DICtx->getInliningInfoForAddress(Address, SpecFlags); + DICtx->getInliningInfoForAddress(Address, Spec); uint32_t n = InliningInfo.getNumberOfFrames(); if (n == 0) { // Print one empty debug line info in any case. @@ -126,7 +126,7 @@ static void DumpInput(const StringRef &Filename) { } } } else { - DILineInfo dli = DICtx->getLineInfoForAddress(Address, SpecFlags); + DILineInfo dli = DICtx->getLineInfoForAddress(Address, Spec); PrintDILineInfo(dli); } } |