]> granicus.if.org Git - clang/commitdiff
Simplify, following MemoryBuffer::getSTDIN API fix.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 10 Nov 2009 00:46:25 +0000 (00:46 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 10 Nov 2009 00:46:25 +0000 (00:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86633 91177308-0d34-0410-b5e6-96231b3b80d8

tools/clang-cc/clang-cc.cpp

index 33f7465fa9c6983119bd4178717edb7faa486e68..b80d5f87a38e5874f53fca7b51f746b61a1b1537 100644 (file)
@@ -909,14 +909,6 @@ static bool InitializeSourceManager(Preprocessor &PP,
     }
   } else {
     llvm::MemoryBuffer *SB = llvm::MemoryBuffer::getSTDIN();
-
-    // If stdin was empty, SB is null.  Cons up an empty memory
-    // buffer now.
-    if (!SB) {
-      const char *EmptyStr = "";
-      SB = llvm::MemoryBuffer::getMemBuffer(EmptyStr, EmptyStr, "<stdin>");
-    }
-
     SourceMgr.createMainFileIDForMemBuffer(SB);
     if (SourceMgr.getMainFileID().isInvalid()) {
       PP.getDiagnostics().Report(FullSourceLoc(),