Home
last modified time | relevance | path

Searched refs:SourceMgr (Results 1 – 25 of 229) sorted by relevance

12345678910

/external/swiftshader/third_party/llvm-7.0/llvm/unittests/Support/
DSourceMgrTest.cpp21 SourceMgr SM;
40 void printMessage(SMLoc Loc, SourceMgr::DiagKind Kind, in printMessage()
52 printMessage(getLoc(4), SourceMgr::DK_Error, "message", None, None); in TEST_F()
62 printMessage(getLoc(4), SourceMgr::DK_Warning, "message", None, None); in TEST_F()
72 printMessage(getLoc(4), SourceMgr::DK_Remark, "message", None, None); in TEST_F()
82 printMessage(getLoc(4), SourceMgr::DK_Note, "message", None, None); in TEST_F()
92 printMessage(getLoc(6), SourceMgr::DK_Error, "message", None, None); in TEST_F()
102 printMessage(getLoc(7), SourceMgr::DK_Error, "message", None, None); in TEST_F()
112 printMessage(getLoc(0), SourceMgr::DK_Error, "message", None, None); in TEST_F()
122 printMessage(getLoc(0), SourceMgr::DK_Error, "message", None, None); in TEST_F()
[all …]
DYAMLParserTest.cpp33 SourceMgr SM; in ExpectParseError()
42 SourceMgr SM; in ExpectParseSuccess()
160 SourceMgr SM; in TEST()
191 SourceMgr SM; in ExpectCanParseString()
228 SourceMgr SM; in TEST()
236 SourceMgr SM; in TEST()
249 SourceMgr SM; in TEST()
264 SourceMgr SM; in TEST()
279 SourceMgr SM; in TEST()
294 SourceMgr SM; in TEST()
[all …]
/external/clang/unittests/Basic/
DSourceManagerTest.cpp37 SourceMgr(Diags, FileMgr), in SourceManagerTest()
47 SourceManager SourceMgr; member in __anon6f5b52de0111::SourceManagerTest
77 FileID mainFileID = SourceMgr.createFileID(std::move(Buf)); in TEST_F()
78 SourceMgr.setMainFileID(mainFileID); in TEST_F()
81 HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, in TEST_F()
83 Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr, in TEST_F()
109 SourceLocation macroExpStartLoc = SourceMgr.translateLineCol(mainFileID, 2, 1); in TEST_F()
110 SourceLocation macroExpEndLoc = SourceMgr.translateLineCol(mainFileID, 2, 6); in TEST_F()
118 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(lsqrLoc, idLoc)); in TEST_F()
119 EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(idLoc, rsqrLoc)); in TEST_F()
[all …]
/external/llvm/unittests/Support/
DSourceMgrTest.cpp21 SourceMgr SM;
40 void printMessage(SMLoc Loc, SourceMgr::DiagKind Kind, in printMessage()
52 printMessage(getLoc(4), SourceMgr::DK_Error, "message", None, None); in TEST_F()
62 printMessage(getLoc(4), SourceMgr::DK_Warning, "message", None, None); in TEST_F()
72 printMessage(getLoc(4), SourceMgr::DK_Note, "message", None, None); in TEST_F()
82 printMessage(getLoc(6), SourceMgr::DK_Error, "message", None, None); in TEST_F()
92 printMessage(getLoc(7), SourceMgr::DK_Error, "message", None, None); in TEST_F()
102 printMessage(getLoc(4), SourceMgr::DK_Error, "message", getRange(4, 3), None); in TEST_F()
112 printMessage(getLoc(4), SourceMgr::DK_Error, "message", getRange(3, 3), None); in TEST_F()
122 printMessage(getLoc(4), SourceMgr::DK_Error, "message", getRange(4, 7), None); in TEST_F()
[all …]
DYAMLParserTest.cpp33 SourceMgr SM; in ExpectParseError()
42 SourceMgr SM; in ExpectParseSuccess()
160 SourceMgr SM; in TEST()
190 SourceMgr SM; in ExpectCanParseString()
227 SourceMgr SM; in TEST()
235 SourceMgr SM; in TEST()
248 SourceMgr SM; in TEST()
263 SourceMgr SM; in TEST()
278 SourceMgr SM; in TEST()
293 SourceMgr SM; in TEST()
[all …]
/external/clang/unittests/Lex/
DLexerTest.cpp54 SourceMgr(Diags, FileMgr), in LexerTest()
64 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(Buf))); in Lex()
67 HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, LangOpts, in Lex()
69 Preprocessor PP(new PreprocessorOptions(), Diags, LangOpts, SourceMgr, in Lex()
103 SourceMgr, LangOpts, &Invalid); in getSourceText()
113 SourceManager SourceMgr; member in __anon5fadadf90111::LexerTest
296 macroPair = SourceMgr.getExpansionRange(lsqrLoc); in TEST_F()
300 EXPECT_TRUE(Lexer::isAtStartOfMacroExpansion(lsqrLoc, SourceMgr, LangOpts, &Loc)); in TEST_F()
302 EXPECT_FALSE(Lexer::isAtStartOfMacroExpansion(idLoc, SourceMgr, LangOpts)); in TEST_F()
303 EXPECT_FALSE(Lexer::isAtEndOfMacroExpansion(idLoc, SourceMgr, LangOpts)); in TEST_F()
[all …]
DPPCallbacksTest.cpp117 SourceMgr(Diags, FileMgr), TargetOpts(new TargetOptions()) { in PPCallbacksTest()
127 SourceManager SourceMgr; member in __anonf86715790111::PPCallbacksTest
149 const char* B = SourceMgr.getCharacterData(Range.getBegin()); in GetSourceString()
150 const char* E = SourceMgr.getCharacterData(Range.getEnd()); in GetSourceString()
161 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(Buf))); in InclusionDirectiveFilenameRange()
166 HeaderSearch HeaderInfo(HSOpts, SourceMgr, Diags, LangOpts, in InclusionDirectiveFilenameRange()
171 Preprocessor PP(PPOpts, Diags, LangOpts, SourceMgr, HeaderInfo, ModLoader, in InclusionDirectiveFilenameRange()
199 SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(SourceBuf))); in PragmaOpenCLExtensionCall()
202 HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags, in PragmaOpenCLExtensionCall()
205 Preprocessor PP(new PreprocessorOptions(), Diags, OpenCLLangOpts, SourceMgr, in PragmaOpenCLExtensionCall()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/utils/FileCheck/
DFileCheck.cpp168 bool ParsePattern(StringRef PatternStr, StringRef Prefix, SourceMgr &SM,
172 void PrintVariableUses(const SourceMgr &SM, StringRef Buffer,
175 void PrintFuzzyMatch(const SourceMgr &SM, StringRef Buffer,
185 bool AddRegExToRegEx(StringRef RS, unsigned &CurParen, SourceMgr &SM);
191 size_t FindRegexVarEnd(StringRef Str, SourceMgr &SM);
201 SourceMgr &SM, unsigned LineNumber) { in ParsePattern()
215 SM.PrintMessage(PatternLoc, SourceMgr::DK_Error, in ParsePattern()
222 PatternLoc, SourceMgr::DK_Error, in ParsePattern()
260 SourceMgr::DK_Error, in ParsePattern()
292 SourceMgr::DK_Error, in ParsePattern()
[all …]
/external/llvm/utils/FileCheck/
DFileCheck.cpp141 SourceMgr &SM,
155 void PrintFailureInfo(const SourceMgr &SM, StringRef Buffer,
164 bool AddRegExToRegEx(StringRef RS, unsigned &CurParen, SourceMgr &SM);
182 size_t FindRegexVarEnd(StringRef Str, SourceMgr &SM);
188 SourceMgr &SM, in ParsePattern()
202 SM.PrintMessage(PatternLoc, SourceMgr::DK_Error, in ParsePattern()
235 SourceMgr::DK_Error, in ParsePattern()
267 SourceMgr::DK_Error, in ParsePattern()
280 SM.PrintMessage(SMLoc::getFromPointer(Name.data()), SourceMgr::DK_Error, in ParsePattern()
293 SourceMgr::DK_Error, in ParsePattern()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/TableGen/
DError.cpp24 SourceMgr SrcMgr;
27 static void PrintMessage(ArrayRef<SMLoc> Loc, SourceMgr::DiagKind Kind, in PrintMessage()
31 if (Kind == SourceMgr::DK_Error) in PrintMessage()
39 SrcMgr.PrintMessage(Loc[i], SourceMgr::DK_Note, in PrintMessage()
44 PrintMessage(NoteLoc, SourceMgr::DK_Note, Msg); in PrintNote()
48 PrintMessage(WarningLoc, SourceMgr::DK_Warning, Msg); in PrintWarning()
52 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Warning, Msg); in PrintWarning()
58 PrintMessage(ErrorLoc, SourceMgr::DK_Error, Msg); in PrintError()
62 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Error, Msg); in PrintError()
/external/swiftshader/third_party/llvm-subzero/include/llvm/Support/
DSourceMgr.h27 class SourceMgr; variable
35 class SourceMgr {
71 SourceMgr(const SourceMgr&) = delete;
72 void operator=(const SourceMgr&) = delete;
74 SourceMgr() in SourceMgr() function
76 ~SourceMgr();
229 const SourceMgr *SM;
233 SourceMgr::DiagKind Kind;
241 : SM(nullptr), LineNo(0), ColumnNo(0), Kind(SourceMgr::DK_Error) {} in SMDiagnostic()
243 SMDiagnostic(StringRef filename, SourceMgr::DiagKind Knd, StringRef Msg) in SMDiagnostic()
[all …]
/external/llvm/include/llvm/Support/
DSourceMgr.h27 class SourceMgr; variable
35 class SourceMgr {
76 SourceMgr(const SourceMgr&) = delete;
77 void operator=(const SourceMgr&) = delete;
79 SourceMgr() in SourceMgr() function
81 ~SourceMgr();
234 const SourceMgr *SM;
238 SourceMgr::DiagKind Kind;
246 : SM(nullptr), LineNo(0), ColumnNo(0), Kind(SourceMgr::DK_Error) {} in SMDiagnostic()
248 SMDiagnostic(StringRef filename, SourceMgr::DiagKind Knd, StringRef Msg) in SMDiagnostic()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/Support/
DSourceMgr.h42 class SourceMgr {
107 SourceMgr() = default;
108 SourceMgr(const SourceMgr &) = delete;
109 SourceMgr &operator=(const SourceMgr &) = delete;
110 ~SourceMgr() = default;
261 const SourceMgr *SM = nullptr;
266 SourceMgr::DiagKind Kind = SourceMgr::DK_Error;
275 SMDiagnostic(StringRef filename, SourceMgr::DiagKind Knd, StringRef Msg) in SMDiagnostic()
279 SMDiagnostic(const SourceMgr &sm, SMLoc L, StringRef FN,
280 int Line, int Col, SourceMgr::DiagKind Kind,
[all …]
/external/llvm/lib/TableGen/
DError.cpp23 SourceMgr SrcMgr;
26 static void PrintMessage(ArrayRef<SMLoc> Loc, SourceMgr::DiagKind Kind, in PrintMessage()
30 if (Kind == SourceMgr::DK_Error) in PrintMessage()
38 SrcMgr.PrintMessage(Loc[i], SourceMgr::DK_Note, in PrintMessage()
43 PrintMessage(WarningLoc, SourceMgr::DK_Warning, Msg); in PrintWarning()
47 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Warning, Msg); in PrintWarning()
55 PrintMessage(ErrorLoc, SourceMgr::DK_Error, Msg); in PrintError()
59 SrcMgr.PrintMessage(SMLoc::getFromPointer(Loc), SourceMgr::DK_Error, Msg); in PrintError()
/external/swiftshader/third_party/LLVM/include/llvm/Support/
DSourceMgr.h27 class SourceMgr; variable
34 class SourceMgr {
64 SourceMgr(const SourceMgr&); // DO NOT IMPLEMENT
65 void operator=(const SourceMgr&); // DO NOT IMPLEMENT
67 SourceMgr() : LineNoCache(0), DiagHandler(0), DiagContext(0) {} in SourceMgr() function
68 ~SourceMgr();
157 const SourceMgr *SM;
173 SMDiagnostic(const SourceMgr &sm, SMLoc L, const std::string &FN,
180 const SourceMgr *getSourceMgr() const { return SM; } in getSourceMgr()
/external/clang/lib/Format/
DWhitespaceManager.h40 WhitespaceManager(const SourceManager &SourceMgr, const FormatStyle &Style, in WhitespaceManager() argument
42 : SourceMgr(SourceMgr), Style(Style), UseCRLF(UseCRLF) {} in WhitespaceManager()
90 IsBeforeInFile(const SourceManager &SourceMgr) : SourceMgr(SourceMgr) {} in IsBeforeInFile()
94 const SourceManager &SourceMgr;
206 const SourceManager &SourceMgr; variable
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Support/
DSourceMgr.cpp40 unsigned SourceMgr::AddIncludeFile(const std::string &Filename, in AddIncludeFile()
61 unsigned SourceMgr::FindBufferContainingLoc(SMLoc Loc) const { in FindBufferContainingLoc()
72 unsigned SourceMgr::SrcBuffer::getLineNumber(const char *Ptr) const { in getLineNumber()
108 SourceMgr::SrcBuffer::SrcBuffer(SourceMgr::SrcBuffer &&Other) in SrcBuffer()
115 SourceMgr::SrcBuffer::~SrcBuffer() { in ~SrcBuffer()
130 SourceMgr::getLineAndColumn(SMLoc Loc, unsigned BufferID) const { in getLineAndColumn()
155 void SourceMgr::PrintIncludeStack(SMLoc IncludeLoc, raw_ostream &OS) const { in PrintIncludeStack()
168 SMDiagnostic SourceMgr::GetMessage(SMLoc Loc, SourceMgr::DiagKind Kind, in GetMessage()
230 void SourceMgr::PrintMessage(raw_ostream &OS, const SMDiagnostic &Diagnostic, in PrintMessage()
247 void SourceMgr::PrintMessage(raw_ostream &OS, SMLoc Loc, in PrintMessage()
[all …]
/external/llvm/lib/Support/
DSourceMgr.cpp39 SourceMgr::~SourceMgr() { in ~SourceMgr()
45 unsigned SourceMgr::AddIncludeFile(const std::string &Filename, in AddIncludeFile()
66 unsigned SourceMgr::FindBufferContainingLoc(SMLoc Loc) const { in FindBufferContainingLoc()
77 SourceMgr::getLineAndColumn(SMLoc Loc, unsigned BufferID) const { in getLineAndColumn()
121 void SourceMgr::PrintIncludeStack(SMLoc IncludeLoc, raw_ostream &OS) const { in PrintIncludeStack()
135 SMDiagnostic SourceMgr::GetMessage(SMLoc Loc, SourceMgr::DiagKind Kind, in GetMessage()
198 void SourceMgr::PrintMessage(raw_ostream &OS, const SMDiagnostic &Diagnostic, in PrintMessage()
215 void SourceMgr::PrintMessage(raw_ostream &OS, SMLoc Loc, in PrintMessage()
216 SourceMgr::DiagKind Kind, in PrintMessage()
222 void SourceMgr::PrintMessage(SMLoc Loc, SourceMgr::DiagKind Kind, in PrintMessage()
[all …]
/external/clang/lib/Lex/
DPPConditionalDirectiveRecord.cpp20 : SourceMgr(SM) { in PPConditionalDirectiveRecord()
31 Range.getBegin(), CondDirectiveLoc::Comp(SourceMgr)); in rangeIntersectsConditionalDirective()
35 if (SourceMgr.isBeforeInTranslationUnit(Range.getEnd(), low->getLoc())) in rangeIntersectsConditionalDirective()
40 Range.getEnd(), CondDirectiveLoc::Comp(SourceMgr)); in rangeIntersectsConditionalDirective()
55 if (SourceMgr.isBeforeInTranslationUnit(CondDirectiveLocs.back().getLoc(), in findConditionalDirectiveRegionLoc()
61 Loc, CondDirectiveLoc::Comp(SourceMgr)); in findConditionalDirectiveRegionLoc()
69 if (SourceMgr.isInSystemHeader(DirLoc.getLoc())) in addCondDirectiveLoc()
73 SourceMgr.isBeforeInTranslationUnit(CondDirectiveLocs.back().getLoc(), in addCondDirectiveLoc()
/external/swiftshader/third_party/llvm-7.0/llvm/tools/llvm-mc/
DDisassembler.cpp36 SourceMgr &SM, raw_ostream &Out, in PrintInsts()
54 SourceMgr::DK_Warning, in PrintInsts()
67 SourceMgr::DK_Warning, in PrintInsts()
103 SourceMgr &SM) { in ByteArrayFromString()
117 SM.PrintMessage(SMLoc::getFromPointer(Value.data()), SourceMgr::DK_Error, in ByteArrayFromString()
138 SourceMgr &SM, in disassemble()
179 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
188 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
206 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
/external/llvm/tools/llvm-mc/
DDisassembler.cpp36 SourceMgr &SM, raw_ostream &Out, in PrintInsts()
54 SourceMgr::DK_Warning, in PrintInsts()
67 SourceMgr::DK_Warning, in PrintInsts()
103 SourceMgr &SM) { in ByteArrayFromString()
117 SM.PrintMessage(SMLoc::getFromPointer(Value.data()), SourceMgr::DK_Error, in ByteArrayFromString()
138 SourceMgr &SM, in disassemble()
179 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
188 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
206 SM.PrintMessage(SMLoc::getFromPointer(Str.data()), SourceMgr::DK_Error, in disassemble()
/external/clang/lib/AST/
DRawCommentList.cpp109 RawComment::RawComment(const SourceManager &SourceMgr, SourceRange SR, in RawComment() argument
115 if (SR.getBegin() == SR.getEnd() || getRawText(SourceMgr).empty()) { in RawComment()
128 SourceMgr.getDecomposedLoc(Range.getBegin()); in RawComment()
132 SourceMgr.getBufferData(BeginFileID, &Invalid).data(); in RawComment()
151 StringRef RawComment::getRawTextSlow(const SourceManager &SourceMgr) const { in getRawTextSlow()
158 SourceMgr.getDecomposedLoc(Range.getBegin()); in getRawTextSlow()
159 std::tie(EndFileID, EndOffset) = SourceMgr.getDecomposedLoc(Range.getEnd()); in getRawTextSlow()
169 const char *BufferStart = SourceMgr.getBufferData(BeginFileID, in getRawTextSlow()
279 !SourceMgr.isBeforeInTranslationUnit(Comments.back()->getLocStart(), in addComment()
316 commentsStartOnSameColumn(SourceMgr, C1, C2))) && in addComment()
[all …]
/external/clang/include/clang/AST/
DRawCommentList.h43 RawComment(const SourceManager &SourceMgr, SourceRange SR,
101 StringRef getRawText(const SourceManager &SourceMgr) const { in getRawText() argument
105 RawText = getRawTextSlow(SourceMgr); in getRawText()
156 StringRef getRawTextSlow(const SourceManager &SourceMgr) const;
184 RawCommentList(SourceManager &SourceMgr) : SourceMgr(SourceMgr) {} in RawCommentList() argument
193 SourceManager &SourceMgr;
/external/clang/lib/Rewrite/
DRewriter.cpp152 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRangeSize()
187 const char *Ptr = SourceMgr->getCharacterData(Range.getBegin()); in getRewrittenText()
191 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRewrittenText()
201 EndOff += Lexer::MeasureTokenLength(Range.getEnd(), *SourceMgr, *LangOpts); in getRewrittenText()
215 std::pair<FileID,unsigned> V = SourceMgr->getDecomposedLoc(Loc); in getLocationOffsetAndFileID()
230 StringRef MB = SourceMgr->getBufferData(FID); in getEditBuffer()
246 StringRef MB = SourceMgr->getBufferData(FID); in InsertText()
248 unsigned lineNo = SourceMgr->getLineNumber(FID, StartOffs) - 1; in InsertText()
250 Content = SourceMgr->getSLocEntry(FID).getFile().getContentCache(); in InsertText()
323 StringRef MB = SourceMgr->getBufferData(FID); in ReplaceText()
[all …]
/external/swiftshader/third_party/LLVM/lib/Support/
DSourceMgr.cpp37 SourceMgr::~SourceMgr() { in ~SourceMgr()
51 unsigned SourceMgr::AddIncludeFile(const std::string &Filename, in AddIncludeFile()
72 int SourceMgr::FindBufferContainingLoc(SMLoc Loc) const { in FindBufferContainingLoc()
84 unsigned SourceMgr::FindLineNumber(SMLoc Loc, int BufferID) const { in FindLineNumber()
124 void SourceMgr::PrintIncludeStack(SMLoc IncludeLoc, raw_ostream &OS) const { in PrintIncludeStack()
143 SMDiagnostic SourceMgr::GetMessage(SMLoc Loc, const Twine &Msg, in GetMessage()
181 void SourceMgr::PrintMessage(SMLoc Loc, const Twine &Msg, in PrintMessage()

12345678910