search for: sourcemgr

Displaying 20 results from an estimated 68 matches for "sourcemgr".

2015 Sep 28
3
SourceMgr lifespan
I've tried using SourceMgr in a parser to get the nice error reporting with automatic line/column tracking, and it works well. I'm thinking about extending that to try to get the nice error reporting in subsequent type checking, and that leads to a question. As I understand it, SourceMgr owns the memory buffers (be the...
2019 Sep 03
2
SourceMgr vs EXPENSIVE_CHECKS
Hi, I'm trying to build llvm (git monorepo) on Ubuntu 18.04 with EXPENSIVE_CHECKS enabled and running into various errors compiling SourceMgr.cpp, depending on which host compiler I use. For example with GCC: $ CC=gcc-8 CXX=g++-8 cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_EXPENSIVE_CHECKS=ON ~/git/llvm-project/llvm/ && ninja ... [89/2690] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/SourceMgr.cpp.o FAILE...
2019 Sep 03
2
SourceMgr vs EXPENSIVE_CHECKS
...~~~~ > > On Tue, Sep 3, 2019 at 7:10 AM Jay Foad via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> >> Hi, >> >> I'm trying to build llvm (git monorepo) on Ubuntu 18.04 with >> EXPENSIVE_CHECKS enabled and running into various errors compiling >> SourceMgr.cpp, depending on which host compiler I use. >> >> For example with GCC: >> >> $ CC=gcc-8 CXX=g++-8 cmake -GNinja -DCMAKE_BUILD_TYPE=Debug >> -DLLVM_ENABLE_EXPENSIVE_CHECKS=ON ~/git/llvm-project/llvm/ && ninja >> ... >> [89/2690] Building CXX object...
2019 Oct 02
2
SourceMgr vs EXPENSIVE_CHECKS
...via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> >> >> >> Hi, >> >> >> >> I'm trying to build llvm (git monorepo) on Ubuntu 18.04 with >> >> EXPENSIVE_CHECKS enabled and running into various errors compiling >> >> SourceMgr.cpp, depending on which host compiler I use. >> >> >> >> For example with GCC: >> >> >> >> $ CC=gcc-8 CXX=g++-8 cmake -GNinja -DCMAKE_BUILD_TYPE=Debug >> >> -DLLVM_ENABLE_EXPENSIVE_CHECKS=ON ~/git/llvm-project/llvm/ && ninja >&g...
2015 Sep 22
2
SourceMgr include relative to current file
SourceMgr provides AddIncludeFile which I'm thinking of using for parsing the TPTP language. As far as I can see, AddIncludeFile only deals with #include <...> style, i.e. only search the include directories. I don't see any code for dealing with #include "...", i.e. first look relat...
2012 Sep 07
1
[LLVMdev] teaching FileCheck to handle variations in order
...r - If non-empty, this pattern is a fixed string match with the /// specified fixed string. @@ -77,7 +89,7 @@ class Pattern { public: - Pattern(bool matchEOF = false) : MatchEOF(matchEOF) { } + Pattern(enum MatchType t = MatchStr) : Type(t) { } bool ParsePattern(StringRef PatternStr, SourceMgr &SM); @@ -285,9 +297,18 @@ bool Pattern::AddRegExToRegEx(StringRef RegexStr, unsigned &CurParen, size_t Pattern::Match(StringRef Buffer, size_t &MatchLen, StringMap<StringRef> &VariableTable) const { // If this is the EOF pattern, match it immediat...
2017 Mar 13
2
[RFC] improvements to LLVM diagnostic infrastructure
...; for files assembled with clang and inline assembly. Clang already has support for these options but does not apply them to diagnostics originating from (inline) assembly. I plan to add an LLVMDiagnosticsEngine class that takes responsibility for handling diagnostics options (superseding parts of SourceMgr and LLVMContext). The diagnostics themselves will be defined in TableGen (just like in clang). Currently, diagnostics are passed through a SourceMgr to get location info and then passed on to a diagnostics handler for printing (if it exists). This is usually wrapped in Warning() and Error() functi...
2013 Jan 14
0
[LLVMdev] Need some brief explanation about llvm::MemoryBuffer and llvm::SourceMgr
Is this for user prompts, or just reading data from stdin? You can use MemoryBuffer::getSTDIN to read the contents of stdin into a memory buffer. Then you can get the data pointer and size and read it in. As far as I know, there is not a good way to implement user prompts with the LLVM APIs. On Mon, Jan 14, 2013 at 4:57 AM, Journeyer J. Joh <oosaprogrammer at gmail.com>wrote: >
2012 Sep 07
0
[LLVMdev] teaching FileCheck to handle variations in order
On 9/7/2012 7:20 AM, Matthew Curtis wrote: > > The attached patch implements one possible solution. It introduces a > position stack and a couple of directives: > > * 'CHECK-PUSH:' pushes the current match position onto the stack. > * 'CHECK-POP:' pops the top value off of the stack and uses it to set > the current match position. > > The above
2012 Sep 07
5
[LLVMdev] teaching FileCheck to handle variations in order
...r - If non-empty, this pattern is a fixed string match with the /// specified fixed string. @@ -77,7 +89,7 @@ class Pattern { public: - Pattern(bool matchEOF = false) : MatchEOF(matchEOF) { } + Pattern(enum MatchType t = MatchStr) : Type(t) { } bool ParsePattern(StringRef PatternStr, SourceMgr &SM); @@ -285,9 +297,18 @@ bool Pattern::AddRegExToRegEx(StringRef RegexStr, unsigned &CurParen, size_t Pattern::Match(StringRef Buffer, size_t &MatchLen, StringMap<StringRef> &VariableTable) const { // If this is the EOF pattern, match it immediat...
2013 Jan 14
2
[LLVMdev] Need some brief explanation about llvm::MemoryBuffer and llvm::SourceMgr
Hello list, I learned that under LLVM, #including of <iostream> is forbidden. Instead LLVM provides llvm::raw_ostream(for std::cout, std::cerr) and llvm::MemoryBuffer(for input stream). And using of llvm::raw_ostream is pretty easy but for me learning of how to use llvm::MemoryBuffer is pretty much difficult. I found a good sample code; utils/yaml2obj/yaml2obj.cpp. The function, main() in
2011 Feb 11
0
[LLVMdev] Compiler error when self-hosting
...build llvm[1]: Compiling Regex.cpp for Release build llvm[1]: Compiling SearchForAddressOfSpecialSymbol.cpp for Release build llvm[1]: Compiling Signals.cpp for Release build llvm[1]: Compiling SmallPtrSet.cpp for Release build llvm[1]: Compiling SmallVector.cpp for Release build llvm[1]: Compiling SourceMgr.cpp for Release build llvm[1]: Compiling Statistic.cpp for Release build llvm[1]: Compiling StringExtras.cpp for Release build llvm[1]: Compiling StringMap.cpp for Release build llvm[1]: Compiling StringPool.cpp for Release build llvm[1]: Compiling StringRef.cpp for Release build llvm[1]: Compiling...
2013 Jan 15
0
[LLVMdev] Need some brief explanation about llvm::MemoryBuffer and llvm::SourceMgr
And for this kind of question I think I would better hold in. There would be more important issue worth on this list. For this reason I am sorry. Sincerely Journeyer 2013/1/15 Journeyer J. Joh <oosaprogrammer at gmail.com>: > Hi Justin Holewinski, > >>> As far as I know, there is not a good way to implement user prompts with the LLVM APIs. > > This info helps me a
2013 Jan 15
2
[LLVMdev] Need some brief explanation about llvm::MemoryBuffer and llvm::SourceMgr
Hi Justin Holewinski, >> As far as I know, there is not a good way to implement user prompts with the LLVM APIs. This info helps me a lot. I tried to do a thing that is not possible. Thank you very much. Sincerely Journeyer 2013/1/15 Justin Holewinski <justin.holewinski at gmail.com>: > Is this for user prompts, or just reading data from stdin? You can use >
2016 Mar 25
2
Link error on Linux
...aklo-aklo.o: In function `llvm::raw_ostream::operator<<(char)': /home/a/llvm/include/llvm/Support/raw_ostream.h:141: undefined reference to `llvm::raw_ostream::write(unsigned char)' aklo-aklo.o: In function `error(std::string)': /mnt/a2/aklo.cpp:172: undefined reference to `llvm::SourceMgr::PrintMessage(llvm::SMLoc, llvm::SourceMgr::DiagKind, llvm::Twine const&, llvm::ArrayRef<llvm::SMRange>, llvm::ArrayRef<llvm::SMFixIt>, bool) const' aklo-aklo.o: In function `print(long)': /mnt/a2/aklo.cpp:388: undefined reference to `llvm::outs()' /mnt/a2/aklo.cpp:393:...
2016 Mar 25
3
Link error on Linux
...lt;<(char)': > > /home/a/llvm/include/llvm/Support/raw_ostream.h:141: undefined reference > to > > `llvm::raw_ostream::write(unsigned char)' > > aklo-aklo.o: In function `error(std::string)': > > /mnt/a2/aklo.cpp:172: undefined reference to > > `llvm::SourceMgr::PrintMessage(llvm::SMLoc, llvm::SourceMgr::DiagKind, > > llvm::Twine const&, llvm::ArrayRef<llvm::SMRange>, > > llvm::ArrayRef<llvm::SMFixIt>, bool) const' > > aklo-aklo.o: In function `print(long)': > > /mnt/a2/aklo.cpp:388: undefined reference to `...
2010 Jun 21
2
[LLVMdev] MC: Object file specific parsing
...nMachO.h" #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCAsmInfo.h" @@ -36,10 +37,11 @@ class TargetAsmParser; class Twine; class AsmParser : public MCAsmParser { -private: +protected: AsmLexer Lexer; MCContext &Ctx; MCStreamer &Out; +private: SourceMgr &SrcMgr; TargetAsmParser *TargetParser; @@ -88,14 +90,23 @@ public: virtual bool ParseParenExpression(const MCExpr *&Res, SMLoc &EndLoc); virtual bool ParseAbsoluteExpression(int64_t &Res); + virtual bool ParseInstruction(const StringRef &Name, SMLoc NameLoc, +...
2016 Mar 25
0
Link error on Linux
...`llvm::raw_ostream::operator<<(char)': > /home/a/llvm/include/llvm/Support/raw_ostream.h:141: undefined reference to > `llvm::raw_ostream::write(unsigned char)' > aklo-aklo.o: In function `error(std::string)': > /mnt/a2/aklo.cpp:172: undefined reference to > `llvm::SourceMgr::PrintMessage(llvm::SMLoc, llvm::SourceMgr::DiagKind, > llvm::Twine const&, llvm::ArrayRef<llvm::SMRange>, > llvm::ArrayRef<llvm::SMFixIt>, bool) const' > aklo-aklo.o: In function `print(long)': > /mnt/a2/aklo.cpp:388: undefined reference to `llvm::outs()' &g...
2016 Mar 25
2
Link error on Linux
...> > /home/a/llvm/include/llvm/Support/raw_ostream.h:141: undefined >> reference to >> > `llvm::raw_ostream::write(unsigned char)' >> > aklo-aklo.o: In function `error(std::string)': >> > /mnt/a2/aklo.cpp:172: undefined reference to >> > `llvm::SourceMgr::PrintMessage(llvm::SMLoc, llvm::SourceMgr::DiagKind, >> > llvm::Twine const&, llvm::ArrayRef<llvm::SMRange>, >> > llvm::ArrayRef<llvm::SMFixIt>, bool) const' >> > aklo-aklo.o: In function `print(long)': >> > /mnt/a2/aklo.cpp:388: undefine...
2016 Mar 25
0
Link error on Linux
...ator<<(char)': > > /home/a/llvm/include/llvm/Support/raw_ostream.h:141: undefined reference to > > `llvm::raw_ostream::write(unsigned char)' > > aklo-aklo.o: In function `error(std::string)': > > /mnt/a2/aklo.cpp:172: undefined reference to > > `llvm::SourceMgr::PrintMessage(llvm::SMLoc, llvm::SourceMgr::DiagKind, > > llvm::Twine const&, llvm::ArrayRef<llvm::SMRange>, > > llvm::ArrayRef<llvm::SMFixIt>, bool) const' > > aklo-aklo.o: In function `print(long)': > > /mnt/a2/aklo.cpp:388: undefined reference to `...