diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-03 21:56:01 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-03 21:56:01 +0000 |
commit | 974860774e022d11b96798343fa4ecf80c344bb9 (patch) | |
tree | 47b84e0f68a8b50d6bf6f3c3e2788a56ddd97010 /llvm/lib/IR/AsmWriter.cpp | |
parent | 4e4aa7053503a00c29fadaec82e2f399bc9da492 (diff) | |
download | bcm5719-llvm-974860774e022d11b96798343fa4ecf80c344bb9.tar.gz bcm5719-llvm-974860774e022d11b96798343fa4ecf80c344bb9.zip |
AsmParser: Recognize DW_TAG_* constants
Recognize `DW_TAG_` constants in assembly, and output it by default for
`GenericDebugNode`.
llvm-svn: 228042
Diffstat (limited to 'llvm/lib/IR/AsmWriter.cpp')
-rw-r--r-- | llvm/lib/IR/AsmWriter.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp index ba1c5260074..46f26c579ac 100644 --- a/llvm/lib/IR/AsmWriter.cpp +++ b/llvm/lib/IR/AsmWriter.cpp @@ -1291,8 +1291,11 @@ static void writeGenericDebugNode(raw_ostream &Out, const GenericDebugNode *N, SlotTracker *Machine, const Module *Context) { Out << "!GenericDebugNode("; FieldSeparator FS; - // Always output the line, since 0 is a relevant and important value for it. - Out << FS << "tag: " << N->getTag(); + Out << FS << "tag: "; + if (const char *Tag = dwarf::TagString(N->getTag())) + Out << Tag; + else + Out << N->getTag(); if (!N->getHeader().empty()) { Out << FS << "header: \""; PrintEscapedString(N->getHeader(), Out); |