11
11
//
12
12
// ===------------------------------------------------------------------------===
13
13
14
- #include " llvm/Analysis/Verifier.h"
15
- #include " llvm/Module.h"
16
14
#include " ParserInternals.h"
17
- using std::string;
15
+ #include " llvm/Module.h"
16
+ #include " llvm/Analysis/Verifier.h"
18
17
19
18
// The useful interface defined by this file... Parse an ASCII file, and return
20
19
// the internal representation in a nice slice'n'dice'able representation.
21
20
//
22
- Module *ParseAssemblyFile (const string &Filename) { // throw (ParseException)
21
+ Module *ParseAssemblyFile (const std:: string &Filename) {
23
22
FILE *F = stdin;
24
23
25
24
if (Filename != " -" ) {
@@ -49,7 +48,8 @@ Module *ParseAssemblyFile(const string &Filename) { // throw (ParseException)
49
48
// ===------------------------------------------------------------------------===
50
49
51
50
52
- ParseException::ParseException (const string &filename, const string &message,
51
+ ParseException::ParseException (const std::string &filename,
52
+ const std::string &message,
53
53
int lineNo, int colNo)
54
54
: Filename(filename), Message(message) {
55
55
LineNo = lineNo; ColumnNo = colNo;
@@ -61,8 +61,9 @@ ParseException::ParseException(const ParseException &E)
61
61
ColumnNo = E.ColumnNo ;
62
62
}
63
63
64
- const string ParseException::getMessage () const { // Includes info from options
65
- string Result;
64
+ // Includes info from options
65
+ const std::string ParseException::getMessage () const {
66
+ std::string Result;
66
67
char Buffer[10 ];
67
68
68
69
if (Filename == " -" )
@@ -72,10 +73,10 @@ const string ParseException::getMessage() const { // Includes info from options
72
73
73
74
if (LineNo != -1 ) {
74
75
sprintf (Buffer, " %d" , LineNo);
75
- Result += string (" :" ) + Buffer;
76
+ Result += std:: string (" :" ) + Buffer;
76
77
if (ColumnNo != -1 ) {
77
78
sprintf (Buffer, " %d" , ColumnNo);
78
- Result += string (" ," ) + Buffer;
79
+ Result += std:: string (" ," ) + Buffer;
79
80
}
80
81
}
81
82
0 commit comments