Skip to content

Commit

Permalink
DwarfDebug: Remove some needless recursion.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203946 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dwblaikie committed Mar 14, 2014
1 parent 4fc4769 commit 2bc7715
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2bc7715

Please sign in to comment.