diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2009-01-02 22:46:48 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2009-01-02 22:46:48 +0000 |
commit | 9ea4034e007a83c778cd306ea66481be1317a51b (patch) | |
tree | 6c36cb8f2a79e34bc756e732708f0ec5e88c4e53 /lib/AsmParser/Parser.cpp | |
parent | 27c1e89a4b82b205cbc11fd2f18dcb9e5f033dfb (diff) |
Down with trailing whitespace!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61594 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/Parser.cpp')
-rw-r--r-- | lib/AsmParser/Parser.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/AsmParser/Parser.cpp b/lib/AsmParser/Parser.cpp index 36c9712b9d..ce0d268a16 100644 --- a/lib/AsmParser/Parser.cpp +++ b/lib/AsmParser/Parser.cpp @@ -21,25 +21,25 @@ using namespace llvm; Module *llvm::ParseAssemblyFile(const std::string &Filename, ParseError &Err) { Err.setFilename(Filename); - + std::string ErrorStr; MemoryBuffer *F = MemoryBuffer::getFileOrSTDIN(Filename.c_str(), &ErrorStr); if (F == 0) { Err.setError("Could not open input file '" + Filename + "'"); return 0; } - + Module *Result = LLParser(F, Err).Run(); delete F; return Result; } // FIXME: M is ignored?? -Module *llvm::ParseAssemblyString(const char *AsmString, Module *M, +Module *llvm::ParseAssemblyString(const char *AsmString, Module *M, ParseError &Err) { Err.setFilename("<string>"); - MemoryBuffer *F = MemoryBuffer::getMemBuffer(AsmString, + MemoryBuffer *F = MemoryBuffer::getMemBuffer(AsmString, AsmString+strlen(AsmString), "<string>"); Module *Result = LLParser(F, Err).Run(); @@ -58,22 +58,21 @@ void ParseError::PrintError(const char *ProgName, raw_ostream &S) { errs() << "<stdin>"; else errs() << Filename; - + if (LineNo != -1) { errs() << ':' << LineNo; if (ColumnNo != -1) errs() << ':' << (ColumnNo+1); } - + errs() << ": " << Message << '\n'; - + if (LineNo != -1 && ColumnNo != -1) { errs() << LineContents << '\n'; - + // Print out spaces/tabs before the caret. for (unsigned i = 0; i != unsigned(ColumnNo); ++i) errs() << (LineContents[i] == '\t' ? '\t' : ' '); errs() << "^\n"; } } - |