forked from OSchip/llvm-project
Simplify, following MemoryBuffer::getSTDIN API fix.
llvm-svn: 86633
This commit is contained in:
parent
69914f4134
commit
a8b869e794
|
@ -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(),
|
||||
|
|
Loading…
Reference in New Issue