Print the name last.
authorBill Wendling <isanbard@gmail.com>
Fri, 6 Jul 2012 23:43:12 +0000 (23:43 +0000)
committerBill Wendling <isanbard@gmail.com>
Fri, 6 Jul 2012 23:43:12 +0000 (23:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159879 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/DebugInfo.cpp

index 1cecddb6da09de9fa495db52733b85be6c2ea5fd..c8f8f7d67b845678eac7969d423acde39d1e96ef 100644 (file)
@@ -1081,12 +1081,7 @@ void DICompositeType::printInternal(raw_ostream &OS) const {
 }
 
 void DISubprogram::printInternal(raw_ostream &OS) const {
-  StringRef Res = getName();
-  if (!Res.empty())
-    OS << " [" << Res << ']';
-
   // TODO : Print context
-
   OS << " [line " << getLineNumber() << ']';
 
   if (isLocalToUnit())
@@ -1097,6 +1092,10 @@ void DISubprogram::printInternal(raw_ostream &OS) const {
 
   if (getScopeLineNumber() != getLineNumber())
     OS << " [scope " << getScopeLineNumber() << "]";
+
+  StringRef Res = getName();
+  if (!Res.empty())
+    OS << " [" << Res << ']';
 }
 
 void DIGlobalVariable::printInternal(raw_ostream &OS) const {