DwarfDebug: Remove some needless recursion.
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 14 Mar 2014 16:33:32 +0000 (16:33 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 14 Mar 2014 16:33:32 +0000 (16:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203946 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index e4ec6e7e40e201763f8e75f7c66e85e0933d634c..1e3da83900c91d74192cbd8e2fcb059bd52c9ada 100644 (file)
@@ -689,8 +689,10 @@ unsigned DwarfDebug::getOrCreateSourceID(StringRef FileName, StringRef DirName,
     CUID = 0;
 
   // If FE did not provide a file name, then assume stdin.
-  if (FileName.empty())
-    return getOrCreateSourceID("<stdin>", StringRef(), CUID);
+  if (FileName.empty()) {
+    FileName = "<stdin>";
+    DirName = "";
+  }
 
   // TODO: this might not belong here. See if we can factor this better.
   if (DirName == CompilationDir)