llvm.org GIT mirror llvm / 1913848
* Eliminate `using' directive * Order #includes as per style guide git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9429 91177308-0d34-0410-b5e6-96231b3b80d8 Misha Brukman 15 years ago
1 changed file(s) with 10 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
1010 //
1111 //===------------------------------------------------------------------------===
1212
13 #include "ParserInternals.h"
14 #include "llvm/Module.h"
1315 #include "llvm/Analysis/Verifier.h"
14 #include "llvm/Module.h"
15 #include "ParserInternals.h"
16 using std::string;
1716
1817 // The useful interface defined by this file... Parse an ASCII file, and return
1918 // the internal representation in a nice slice'n'dice'able representation.
2019 //
21 Module *ParseAssemblyFile(const string &Filename) { // throw (ParseException)
20 Module *ParseAssemblyFile(const std::string &Filename) {
2221 FILE *F = stdin;
2322
2423 if (Filename != "-") {
4847 //===------------------------------------------------------------------------===
4948
5049
51 ParseException::ParseException(const string &filename, const string &message,
50 ParseException::ParseException(const std::string &filename,
51 const std::string &message,
5252 int lineNo, int colNo)
5353 : Filename(filename), Message(message) {
5454 LineNo = lineNo; ColumnNo = colNo;
6060 ColumnNo = E.ColumnNo;
6161 }
6262
63 const string ParseException::getMessage() const { // Includes info from options
64 string Result;
63 // Includes info from options
64 const std::string ParseException::getMessage() const {
65 std::string Result;
6566 char Buffer[10];
6667
6768 if (Filename == "-")
7172
7273 if (LineNo != -1) {
7374 sprintf(Buffer, "%d", LineNo);
74 Result += string(":") + Buffer;
75 Result += std::string(":") + Buffer;
7576 if (ColumnNo != -1) {
7677 sprintf(Buffer, "%d", ColumnNo);
77 Result += string(",") + Buffer;
78 Result += std::string(",") + Buffer;
7879 }
7980 }
8081