Skip to content

Commit ad44de1

Browse files
committed
* Eliminate `using' directive
* Order #includes as per style guide llvm-svn: 9429
1 parent 05c71fb commit ad44de1

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

llvm/lib/AsmParser/Parser.cpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@
1111
//
1212
//===------------------------------------------------------------------------===
1313

14-
#include "llvm/Analysis/Verifier.h"
15-
#include "llvm/Module.h"
1614
#include "ParserInternals.h"
17-
using std::string;
15+
#include "llvm/Module.h"
16+
#include "llvm/Analysis/Verifier.h"
1817

1918
// The useful interface defined by this file... Parse an ASCII file, and return
2019
// the internal representation in a nice slice'n'dice'able representation.
2120
//
22-
Module *ParseAssemblyFile(const string &Filename) { // throw (ParseException)
21+
Module *ParseAssemblyFile(const std::string &Filename) {
2322
FILE *F = stdin;
2423

2524
if (Filename != "-") {
@@ -49,7 +48,8 @@ Module *ParseAssemblyFile(const string &Filename) { // throw (ParseException)
4948
//===------------------------------------------------------------------------===
5049

5150

52-
ParseException::ParseException(const string &filename, const string &message,
51+
ParseException::ParseException(const std::string &filename,
52+
const std::string &message,
5353
int lineNo, int colNo)
5454
: Filename(filename), Message(message) {
5555
LineNo = lineNo; ColumnNo = colNo;
@@ -61,8 +61,9 @@ ParseException::ParseException(const ParseException &E)
6161
ColumnNo = E.ColumnNo;
6262
}
6363

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;
6667
char Buffer[10];
6768

6869
if (Filename == "-")
@@ -72,10 +73,10 @@ const string ParseException::getMessage() const { // Includes info from options
7273

7374
if (LineNo != -1) {
7475
sprintf(Buffer, "%d", LineNo);
75-
Result += string(":") + Buffer;
76+
Result += std::string(":") + Buffer;
7677
if (ColumnNo != -1) {
7778
sprintf(Buffer, "%d", ColumnNo);
78-
Result += string(",") + Buffer;
79+
Result += std::string(",") + Buffer;
7980
}
8081
}
8182

0 commit comments

Comments
 (0)