mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-27 22:55:15 +00:00
Debug Info: Don't print the display name and colon prefix for DEBUG_VALUE comments if the display name is empty
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184026 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f3f3523b9c
commit
702ff96ff3
@ -562,8 +562,11 @@ static bool emitDebugValueComment(const MachineInstr *MI, AsmPrinter &AP) {
|
||||
|
||||
// cast away const; DIetc do not take const operands for some reason.
|
||||
DIVariable V(const_cast<MDNode*>(MI->getOperand(2).getMetadata()));
|
||||
if (V.getContext().isSubprogram())
|
||||
OS << DISubprogram(V.getContext()).getDisplayName() << ":";
|
||||
if (V.getContext().isSubprogram()) {
|
||||
StringRef Name = DISubprogram(V.getContext()).getDisplayName();
|
||||
if (!Name.empty())
|
||||
OS << Name << ":";
|
||||
}
|
||||
OS << V.getName() << " <- ";
|
||||
|
||||
// Register or immediate value. Register 0 means undef.
|
||||
|
@ -6,7 +6,7 @@
|
||||
; terminator.
|
||||
;
|
||||
; CHECK: test:
|
||||
; CHECK: ##DEBUG_VALUE: :i
|
||||
; CHECK: ##DEBUG_VALUE: i
|
||||
%a = type { i32, i32 }
|
||||
|
||||
define hidden fastcc %a* @test() #1 {
|
||||
|
Loading…
Reference in New Issue
Block a user