search for: getfileorstdin

Displaying 20 results from an estimated 26 matches for "getfileorstdin".

2019 Jul 04
2
[RFC] [tools] Changing Behavior of LLVM binutils When No File Is Specified
I have been working towards this on D63859. My current route was to add an optional callback to MemoryBuffer::getFileOrSTDIN which will be executed if stdin has not been redirected. James and I were talking over there and are maybe deciding that this might not be the best solution. The alternative in my mind is that the tools which want this behavior could do so by explicitly testing if Process::StandardInIsUserInput rat...
2019 Jun 26
2
[RFC] [tools] Changing Behavior of LLVM binutils When No File Is Specified
...ood, I'll work on removing these in favor of defaulting to stdin then? > I think it would be much friendlier to just print "file or pipe expected" and then print the help. Do you have thoughts on this? I'm not sure there is a clean way to do this, the cleanest would be through getFileOrSTDIN(), but I'm not sure all of its users want this behavior. I don't think we need it personally, but if you think its a good quality of life change to the tools and worth working on, I'd be happy to do so. On Wed, Jun 26, 2019 at 1:41 AM Fāng-ruì Sòng <maskray at google.com<mailto:m...
2009 Jul 20
1
[LLVMdev] Got a "corrupted double-linked list" error?
...s the changed file to generate a bitcode file. But I got a "corrupted double-linked list" error when "my llvm-as" works,however,when I do nothing on the disassembled bitcode file,everything is OK, After debugged,I found the error line is "MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(), &ErrorStr);" in the "Module *llvm::ParseAssemblyFile(const std::string &Filename, SMDiagnostic &Err,LLVMContext &Context)" function, I don't know the reason,anyone once got the similar trouble? Thanks
2010 May 29
1
[LLVMdev] SVN version fails to compile
...ed reference to `llvm::MemoryBuffer::getMemBufferCopy(llvm::StringRef, char const*)' /tmp/llvm-svn/llvm-objects/utils/FileCheck/Debug/FileCheck.o(.text+0x1767): In function `ReadCheckFile': /tmp/llvm-svn/llvm/utils/FileCheck/FileCheck.cpp:478: undefined reference to `llvm::MemoryBuffer::getFileOrSTDIN(llvm::StringRef, std::basic_string<char, std::char_traits<char>, std::allocator<char> >*, long long, stat*)' /tmp/llvm-svn/llvm-objects/utils/FileCheck/Debug/FileCheck.o(.text+0x230c): In function `main': /tmp/llvm-svn/llvm/utils/FileCheck/FileCheck.cpp:636: undefined...
2008 Feb 17
1
[LLVMdev] llvm 2.2 build problems
I'm getting an error when trying to build llvm 2.2's tblgen: llvm[2]: Linking Release executable tblgen (without symbols) /usr/bin/ld: Undefined symbols: llvm::MemoryBuffer::getFileOrSTDIN(char const*, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >*, long long) llvm::cl::ParseCommandLineOptions(int, char**, char const*) It's being run with this to configure: "./configure --prefix=/opt/local --enable-optimized --enable-...
2010 Apr 27
3
[LLVMdev] Is the option --enable-shared discontinued in 2.7?
.../llvm-dis.o(.text+0x7b): In function `main': : undefined reference to `llvm::cl::ParseCommandLineOptions(int, char**, char const*, bool)' /tmp/llvm-build/2.7/llvm-objects/tools/llvm-dis/Release/llvm-dis.o(.text+0xb2): In function `main': : undefined reference to `llvm::MemoryBuffer::getFileOrSTDIN(llvm::StringRef, std::basic_string<char, std::char_traits<char>, std::allocator<char> >*, long long)' /tmp/llvm-build/2.7/llvm-objects/tools/llvm-dis/Release/llvm-dis.o(.text+0xcd): In function `main': : undefined reference to `llvm::ParseBitcodeFile(llvm::MemoryBuffer*...
2019 Jun 26
2
[RFC] [tools] Changing Behavior of LLVM binutils When No File Is Specified
...ood, I'll work on removing these in favor of defaulting to stdin then? > I think it would be much friendlier to just print "file or pipe expected" and then print the help. Do you have thoughts on this? I'm not sure there is a clean way to do this, the cleanest would be through getFileOrSTDIN(), but I'm not sure all of its users want this behavior. I don't think we need it personally, but if you think its a good quality of life change to the tools and worth working on, I'd be happy to do so. On Wed, Jun 26, 2019 at 1:41 AM Fāng-ruì Sòng <maskray at google.com> wrote:...
2013 Dec 17
0
[LLVMdev] llvmContext::removeModule doesn't remove NamedStructTypes
...gt;dump, %struct.cmd becomes %struct.cmd0. my code is simplified like this. int main() { llvm::LLVMContext &llvmCtx = llvm::getGlobalContext(); string ErrMsg; string filename = "wrapper.bc"; llvm::OwningPtr<llvm::MemoryBuffer> File; if (llvm::MemoryBuffer::getFileOrSTDIN(filename, File)) { assert(0); } llvm::MemoryBuffer * buffer = File.take(); { llvm::OwningPtr<llvm::Module> module(llvm::ParseBitcodeFile(buffer, llvmCtx, &ErrMsg)); module->dump(); } { llvm::OwningPtr<llvm::Module> module(llvm...
2011 Mar 05
1
[LLVMdev] llvm-config example need update
Hi This llvm-config --libs engine bcreader scalaropts <http://llvm.org/cmds/llvm-config.html> in website http://llvm.org/cmds/llvm-config.html But actually bcreader components is not there anymore. The new name of it is bitreader. I thinks this webpage may need to update and also. If i do "llvm-config --help". It will also show wrong component name in examples g++
2008 Nov 15
1
[LLVMdev] How to use EE->runFunction for a function with StructRet set?
...<llvm/ModuleProvider.h> #include <llvm/Support/MemoryBuffer.h> #include <llvm/Target/TargetData.h> #include <llvm/Type.h> using namespace std; using namespace llvm; int main(int argc, char** argv) { string ErrorMessage; auto_ptr<MemoryBuffer> Buffer(MemoryBuffer::getFileOrSTDIN("StructRetExample.bc", &ErrorMessage)); Module *M = ParseBitcodeFile(Buffer.get(), &ErrorMessage); ExecutionEngine *EE = ExecutionEngine::create(new ExistingModuleProvider(M), false, &ErrorMessage); // Function returning std::string Function *F = M->getFunction(&q...
2012 Sep 26
0
[LLVMdev] Error while loading profile information
...in the bitcode file... std::string ErrorMessage; OwningPtr<MemoryBuffer> Buffer; error_code ec; Module *M = 0; char BitcodeFile[100]; FILE* fp=fopen("profile.ini","r"); if(fp) fscanf(fp,"%s\n",BitcodeFile); if (!(ec = MemoryBuffer::getFileOrSTDIN(BitcodeFile, Buffer))) { M = ParseBitcodeFile(Buffer.get(), Context, &ErrorMessage); } ProfileInfoLoader PIL("llvm-prof","llvmprof.out",*M); PM->add(createProfileLoaderPass("llvmprof.out")); printf("\n%s:%d",__FILE__,__LINE__);...
2010 Apr 28
0
[LLVMdev] Is the option --enable-shared discontinued in 2.7?
...n function `main': > : undefined reference to `llvm::cl::ParseCommandLineOptions(int, char**, > char const*, bool)' > /tmp/llvm-build/2.7/llvm-objects/tools/llvm-dis/Release/llvm-dis.o(.text+0xb2): > In function `main': > : undefined reference to > `llvm::MemoryBuffer::getFileOrSTDIN(llvm::StringRef, > std::basic_string<char, std::char_traits<char>, std::allocator<char> >*, > long long)' > /tmp/llvm-build/2.7/llvm-objects/tools/llvm-dis/Release/llvm-dis.o(.text+0xcd): > In function `main': > : undefined reference to `llvm::ParseBitcodeFi...
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
2007 Jul 05
2
[LLVMdev] PATCH (rest of code changes) "bytecode" --> "bitcode"
Here is the bulk of the sanitizing. My residual doubts center around the question whether we still do/want to support (un)compressed *byte*code in 2.0/2.1. I need a definitive word on this to proceed. My understanding is that bytecode is already gone, but there are still some functions/enums that really deal with *byte*code (instead of *bit*code). I did not touch those areas, so the attached
2016 Mar 25
2
Link error on Linux
...on `main': /mnt/a2/aklo.cpp:456: undefined reference to `llvm::cl::AddExtraVersionPrinter(void (*)())' /mnt/a2/aklo.cpp:457: undefined reference to `llvm::cl::ParseCommandLineOptions(int, char const* const*, char const*)' /mnt/a2/aklo.cpp:460: undefined reference to `llvm::MemoryBuffer::getFileOrSTDIN(llvm::Twine const&, long, bool)' /mnt/a2/aklo.cpp:469: undefined reference to `llvm::outs()' aklo-aklo.o: In function `~PrettyStackTraceProgram': /home/a/llvm/include/llvm/Support/PrettyStackTrace.h:58: undefined reference to `vtable for llvm::PrettyStackTraceProgram' /home/a/ll...
2016 Mar 25
3
Link error on Linux
...erence to > > `llvm::cl::AddExtraVersionPrinter(void (*)())' > > /mnt/a2/aklo.cpp:457: undefined reference to > > `llvm::cl::ParseCommandLineOptions(int, char const* const*, char const*)' > > /mnt/a2/aklo.cpp:460: undefined reference to > > `llvm::MemoryBuffer::getFileOrSTDIN(llvm::Twine const&, long, bool)' > > /mnt/a2/aklo.cpp:469: undefined reference to `llvm::outs()' > > aklo-aklo.o: In function `~PrettyStackTraceProgram': > > /home/a/llvm/include/llvm/Support/PrettyStackTrace.h:58: undefined > reference > > to `vtable for...
2016 Nov 17
2
UB in MemoryBufferMMapFile
...API. If Clang isn’t using this (which seems to be > the case on a cursory look?), then we should change this > implementation to respect memorybuffer’s invariants IMO. This isn't clang, but the problem is happening entirely within LLVM - I'm getting here from a call to MemoryBuffer::getFileOrSTDIN(SomeFile). I can work around the problem by updating my client to pass RequiresNullTerminator=false, but that doesn't actually fix the problem in LLVM itself.
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
0
Link error on Linux
...lo.cpp:456: undefined reference to > `llvm::cl::AddExtraVersionPrinter(void (*)())' > /mnt/a2/aklo.cpp:457: undefined reference to > `llvm::cl::ParseCommandLineOptions(int, char const* const*, char const*)' > /mnt/a2/aklo.cpp:460: undefined reference to > `llvm::MemoryBuffer::getFileOrSTDIN(llvm::Twine const&, long, bool)' > /mnt/a2/aklo.cpp:469: undefined reference to `llvm::outs()' > aklo-aklo.o: In function `~PrettyStackTraceProgram': > /home/a/llvm/include/llvm/Support/PrettyStackTrace.h:58: undefined reference > to `vtable for llvm::PrettyStackTracePro...
2016 Mar 25
2
Link error on Linux
...::cl::AddExtraVersionPrinter(void (*)())' >> > /mnt/a2/aklo.cpp:457: undefined reference to >> > `llvm::cl::ParseCommandLineOptions(int, char const* const*, char >> const*)' >> > /mnt/a2/aklo.cpp:460: undefined reference to >> > `llvm::MemoryBuffer::getFileOrSTDIN(llvm::Twine const&, long, bool)' >> > /mnt/a2/aklo.cpp:469: undefined reference to `llvm::outs()' >> > aklo-aklo.o: In function `~PrettyStackTraceProgram': >> > /home/a/llvm/include/llvm/Support/PrettyStackTrace.h:58: undefined >> reference >>...