clang  9.0.0svn
Functions
InclusionRewriter.cpp File Reference
#include "clang/Rewrite/Frontend/Rewriters.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Frontend/PreprocessorOutputOptions.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/Pragma.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for InclusionRewriter.cpp:

Go to the source code of this file.

Functions

static StringRef DetectEOL (const MemoryBuffer &FromFile)
 Detect the likely line ending style of FromFile by examining the first newline found within it. More...
 

Function Documentation

◆ DetectEOL()

static StringRef DetectEOL ( const MemoryBuffer &  FromFile)
static

Detect the likely line ending style of FromFile by examining the first newline found within it.

Definition at line 238 of file InclusionRewriter.cpp.

References clang::comments::tok::eof, Filename, clang::SourceManager::getBuffer(), clang::FileEntry::getDir(), clang::SourceManager::getFileCharacteristic(), clang::SourceManager::getFileEntryForID(), clang::SourceManager::getFileIDSize(), clang::SourceManager::getFileOffset(), clang::Module::getFullModuleName(), clang::Preprocessor::getHeaderSearchInfo(), clang::Token::getIdentifierInfo(), clang::Preprocessor::GetIncludeFilenameSpelling(), clang::Preprocessor::getLangOpts(), clang::Token::getLength(), clang::SourceManager::getLineNumber(), clang::Token::getLocation(), clang::SourceManager::getLocForEndOfFile(), clang::SourceManager::getMainFileID(), clang::IdentifierInfo::getName(), clang::IdentifierInfo::getPPKeywordID(), clang::Preprocessor::getPredefinesFileID(), clang::Lexer::getSourceLocation(), clang::Preprocessor::getSourceManager(), clang::Preprocessor::getSpelling(), Identifier, clang::Token::is(), clang::Token::isAtStartOfLine(), clang::Token::isNot(), clang::IdentifierInfo::isStr(), clang::Lexer::LexFromRawLexer(), Line, clang::HeaderSearch::LookupFile(), clang::Preprocessor::LookUpIdentifierInfo(), clang::minimize_source_to_dependency_directives::pp_elif, clang::minimize_source_to_dependency_directives::pp_else, clang::minimize_source_to_dependency_directives::pp_endif, clang::minimize_source_to_dependency_directives::pp_if, clang::minimize_source_to_dependency_directives::pp_import, clang::minimize_source_to_dependency_directives::pp_include, clang::minimize_source_to_dependency_directives::pp_include_next, clang::Lexer::SetCommentRetentionState(), clang::Lexer::SetKeepWhitespaceMode(), and clang::PreprocessorLexer::setParsingPreprocessorDirective().