diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-05-20 03:25:47 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-05-20 03:25:47 +0000 |
| commit | 416a0d4c18b06b89d170979720e2f3e81268d59e (patch) | |
| tree | b661c83a0b9da771bfe1012ab003a17153ac90ea /llvm/lib/AsmParser/ParserInternals.h | |
| parent | 086f56c7f9f3bb43ceb7f85d19f1db5653b796ce (diff) | |
| download | bcm5719-llvm-416a0d4c18b06b89d170979720e2f3e81268d59e.tar.gz bcm5719-llvm-416a0d4c18b06b89d170979720e2f3e81268d59e.zip | |
Give the asmparser the ability to parse strings. Patch contributed by
Alexander Friedman
llvm-svn: 22146
Diffstat (limited to 'llvm/lib/AsmParser/ParserInternals.h')
| -rw-r--r-- | llvm/lib/AsmParser/ParserInternals.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/ParserInternals.h b/llvm/lib/AsmParser/ParserInternals.h index 20961357c88..b21dea7a078 100644 --- a/llvm/lib/AsmParser/ParserInternals.h +++ b/llvm/lib/AsmParser/ParserInternals.h @@ -22,10 +22,17 @@ #include "llvm/Assembly/Parser.h" #include "llvm/ADT/StringExtras.h" + // Global variables exported from the lexer... -extern std::FILE *llvmAsmin; + extern int llvmAsmlineno; +extern std::string &llvmAsmTextin; + +// functions exported from the lexer +void set_scan_file(FILE * F); +void set_scan_string (const char * str); + // Globals exported by the parser... extern char* llvmAsmtext; extern int llvmAsmleng; @@ -38,6 +45,9 @@ extern std::string CurFilename; class Module; Module *RunVMAsmParser(const std::string &Filename, FILE *F); +// Parse a string directly +Module *RunVMAsmParser(const char * AsmString, Module * M); + // UnEscapeLexed - Run through the specified buffer and change \xx codes to the // appropriate character. If AllowNull is set to false, a \00 value will cause |

