Improve consistency for cling -x cuda.
This commit is contained in:
parent
a8bce0d416
commit
87a972e570
@ -731,7 +731,7 @@ namespace {
|
||||
const SrcMgr::ContentCache* MainFileCC
|
||||
= MainFileSLocE.getFile().getContentCache();
|
||||
if (!Buffer)
|
||||
Buffer = llvm::MemoryBuffer::getMemBuffer("/*CLING DEFAULT MEMBUF*/\n");
|
||||
Buffer = llvm::MemoryBuffer::getMemBuffer("/*CLING DEFAULT MEMBUF*/;\n");
|
||||
const_cast<SrcMgr::ContentCache*>(MainFileCC)->setBuffer(std::move(Buffer));
|
||||
|
||||
// Set up the preprocessor
|
||||
|
@ -177,6 +177,11 @@ namespace cling {
|
||||
if (External)
|
||||
External->StartTranslationUnit(m_Consumer);
|
||||
|
||||
Parser::DeclGroupPtrTy ADecl;
|
||||
// Start parsing the "main file" to warm up lexing (enter caching lex mode
|
||||
// for ParseInternal()'s call EnterSourceFile() to make sense.
|
||||
while (!m_Parser->ParseTopLevelDecl(ADecl)) {}
|
||||
|
||||
// If I belong to the parent Interpreter, only then do
|
||||
// the #include <new>
|
||||
if (!isChildInterpreter && m_CI->getLangOpts().CPlusPlus) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user